]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
drm/i915/dp: Fix ww mutex lock failure in for_each_joiner_candidate() loop
authorImre Deak <imre.deak@intel.com>
Wed, 18 Feb 2026 10:57:07 +0000 (12:57 +0200)
committerImre Deak <imre.deak@intel.com>
Thu, 19 Feb 2026 08:00:28 +0000 (10:00 +0200)
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 <ankit.k.nautiyal@intel.com>
Fixes: 1f1e3e5c65f6d ("drm/i915/dp: Rework pipe joiner logic in compute_config")
Reviewed-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
Signed-off-by: Imre Deak <imre.deak@intel.com>
Link: https://patch.msgid.link/20260218105708.845161-1-imre.deak@intel.com
drivers/gpu/drm/i915/display/intel_dp.c

index 454e6144ee4e24d0295ecb6e059af9f8c4b2f52f..025e906b63a97d37e0c3260a147f0a9f57b1de1e 100644 (file)
@@ -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)
                        break;
        }