]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915/display: Load DP_TP_CTL/STATUS offset before use it
authorJosé Roberto de Souza <jose.souza@intel.com>
Tue, 14 Apr 2020 23:04:40 +0000 (16:04 -0700)
committerRodrigo Vivi <rodrigo.vivi@intel.com>
Mon, 20 Apr 2020 17:12:46 +0000 (10:12 -0700)
commit39bfe5a9b60af44bf9218b01d06a71fcc27f1495
tree03c7794a8ebed95f0957e035c0f0fd5169a5d710
parent43a666d28e9585e09e5f90a8d677881b7b412457
drm/i915/display: Load DP_TP_CTL/STATUS offset before use it

Right now dp.regs.dp_tp_ctl/status are only set during the encoder
pre_enable() hook, what is causing all reads and writes to those
registers to go to offset 0x0 before pre_enable() is executed.

So if i915 takes the BIOS state and don't do a modeset any following
link retraing will fail.

In the case that i915 needs to do a modeset, the DDI disable sequence
will write to a wrong register not disabling DP 'Transport Enable' in
DP_TP_CTL, making a HDMI modeset in the same port/transcoder to
not light up the monitor.

So here for GENs older than 12, that have those registers fixed at
port offset range it is loading at encoder/port init while for GEN12
it will keep setting it at encoder pre_enable() and during HW state
readout.

Fixes: d1fd77d9cca3 ("drm/i915/tgl: move DP_TP_* to transcoder")
Cc: Matt Roper <matthew.d.roper@intel.com>
Cc: Lucas De Marchi <lucas.demarchi@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Matt Roper <matthew.d.roper@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200414230442.262092-1-jose.souza@intel.com
(cherry picked from commit edcb9028d66b44d74ba4f8b9daa379b004dc1f85)
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
drivers/gpu/drm/i915/display/intel_ddi.c
drivers/gpu/drm/i915/display/intel_dp.c