On 2/18/2026 4:27 PM, Imre Deak wrote:
Handle modeset WW mutex lock failures due to contention properly.
Return -EDEADLK to the caller instead of attempting to lock the same
mutex again in a subsequent joiner candidate iteration, where the WW
mutex is already in a contended state.
This fixes the following warning:
WARNING: drivers/gpu/drm/drm_modeset_lock.c:298 at modeset_lock+0x1c0/0x210
triggered by ctx->contended.
Cc: Ankit Nautiyal <[email protected]>
Fixes: 1f1e3e5c65f6d ("drm/i915/dp: Rework pipe joiner logic in compute_config")
Signed-off-by: Imre Deak <[email protected]>
---
drivers/gpu/drm/i915/display/intel_dp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/i915/display/intel_dp.c
b/drivers/gpu/drm/i915/display/intel_dp.c
index 454e6144ee4e2..025e906b63a97 100644
--- a/drivers/gpu/drm/i915/display/intel_dp.c
+++ b/drivers/gpu/drm/i915/display/intel_dp.c
@@ -2969,7 +2969,7 @@ intel_dp_compute_link_config(struct intel_encoder
*encoder,
ret = intel_dp_compute_link_for_joined_pipes(encoder, crtc_state, conn_state,
respect_downstream_limits);
- if (ret == 0)
+ if (ret == 0 || ret == -EDEADLK)
Seems like I had missed that intel_dp_mtp_tu_compute_config() and
mst_stream_compute_link_for_joined_pipes() can also return -EDEADLK.
Earlier we would just return any non‑zero error and the IOCTL would fail.
But now this code runs inside the iteration loop, so we try the next
joiner candidate for normal errors.
However, for -EDEADLK we need to break out of the loop and let the IOCTL
fail, since the lock retry sequence has to be handled by the upper layers.
The fix LGTM.
Reviewed-by: Ankit Nautiyal <[email protected]>
break;
}