Skip to contentSkip to conversation

drm/amd/display: Fix ignored timeout in do_aquire_global_lock

PATCH New TrainedPro 1 participant 1 message Feb 2

Subsystems (3)
lore
Share & tools
lore

TrainedPro

author
#0 lore raw

PATCH 1/1 drm/amd/display: Fix ignored timeout in do_aquire_global_lock

The do_aquire_global_lock function was incorrectly returning success (0) even when wait_for_completion_interruptible_timeout returned 0 (indicating a timeout).

This caused the driver to proceed with atomic updates significantly after the hardware had hung, leading to system freezes.

Propagate -ETIMEDOUT to correct this behavior.

---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +3 -0
index 39df45f65..6546bc9f2 100644
@@ -10458,6 +10458,9 @@ static int do_aquire_global_lock(struct drm_device *dev,
 				  crtc->base.id, crtc->name);
 
 		drm_crtc_commit_put(commit);
+
+		if (ret == 0)
+			return -ETIMEDOUT;
 	}
 
 	return ret < 0 ? ret : 0;
Signature · 1 line
2.43.0