]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
drm/i915/dp_tunnel: Fix error handling when clearing stream BW in atomic state
authorImre Deak <imre.deak@intel.com>
Fri, 20 Mar 2026 09:29:00 +0000 (11:29 +0200)
committerImre Deak <imre.deak@intel.com>
Mon, 23 Mar 2026 08:18:02 +0000 (10:18 +0200)
commitfb69d0076e687421188bc8103ab0e8e5825b1df1
tree8224f17ca13c0bd126afb8b7c2c0fee074eab2ae
parent39f4b29d9e7359d8a5a4d176f09623ad963d4d68
drm/i915/dp_tunnel: Fix error handling when clearing stream BW in atomic state

Clearing the DP tunnel stream BW in the atomic state involves getting
the tunnel group state, which can fail. Handle the error accordingly.

This fixes at least one issue where drm_dp_tunnel_atomic_set_stream_bw()
failed to get the tunnel group state returning -EDEADLK, which wasn't
handled. This lead to the ctx->contended warn later in modeset_lock()
while taking a WW mutex for another object in the same atomic state, and
thus within the same already contended WW context.

Moving intel_crtc_state_alloc() later would avoid freeing saved_state on
the error path; this stable patch leaves that simplification for a
follow-up.

Cc: Uma Shankar <uma.shankar@intel.com>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: <stable@vger.kernel.org> # v6.9+
Fixes: a4efae87ecb2 ("drm/i915/dp: Compute DP tunnel BW during encoder state computation")
Closes: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/7617
Reviewed-by: Michał Grzelak <michal.grzelak@intel.com>
Reviewed-by: Uma Shankar <uma.shankar@intel.com>
Signed-off-by: Imre Deak <imre.deak@intel.com>
Link: https://patch.msgid.link/20260320092900.13210-1-imre.deak@intel.com
drivers/gpu/drm/i915/display/intel_display.c
drivers/gpu/drm/i915/display/intel_dp_tunnel.c
drivers/gpu/drm/i915/display/intel_dp_tunnel.h