]> git.ipfire.org Git - thirdparty/linux.git/commit
drm/i915/dp: Don't clobber the encoder state in the HPD IRQ handler
authorImre Deak <imre.deak@intel.com>
Wed, 25 Feb 2026 16:46:05 +0000 (18:46 +0200)
committerImre Deak <imre.deak@intel.com>
Tue, 3 Mar 2026 15:49:05 +0000 (17:49 +0200)
commit6997aa23db7ea1c1c062da0e9bf984465872b8d4
tree8b354aeab672f7fb6e086441117a9e1c6d38ea07
parenta6d89d46d32688943ed3a67d109a4a57d8fdb68d
drm/i915/dp: Don't clobber the encoder state in the HPD IRQ handler

The intel_dp_get_dpcd() function called from an HPD IRQ handler reads
out the DPRX capabilities from the sink and updates these in the
intel_dp encoder state. Since the IRQ handler can run in parallel with
the encoder/connector detection (intel_dp_detect()) which also calls
intel_dp_get_dpcd(), the encoder state can get corrupted, since the two
updates happen in a racy way.

Fix the above by checking only for any change in the sink count value in
the HPD IRQ handler, without updating the encoder state.

Note that any state change in the sink requiring an update of the
encoder state is handled via the sink's SINK_COUNT change,
RX_CAPS_CHANGED, DOWNSTREAM_PORT_STATUS_CHANGED signaling, which all
should result in a full connector detection.

Reviewed-by: Luca Coelho <luciano.coelho@intel.com>
Signed-off-by: Imre Deak <imre.deak@intel.com>
Link: https://patch.msgid.link/20260225164618.1261368-8-imre.deak@intel.com
drivers/gpu/drm/i915/display/intel_dp.c