[PATCH 07/20] drm/i915/dp: Don't clobber the encoder state in the HPD IRQ handler
Luca Coelho
luca at coelho.fi
Tue Jul 1 08:56:05 UTC 2025
On Thu, 2025-06-26 at 11:20 +0300, Imre Deak wrote:
> From: Imre Deak <imre.deak at gmail.com>
>
> 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.
>
> Signed-off-by: Imre Deak <imre.deak at gmail.com>
> ---
Reviewed-by: Luca Coelho <luciano.coelho at intel.com>
--
Cheers,
Luca.
More information about the Intel-gfx
mailing list