Skip to contentSkip to conversation

amdgpu/dc: Fix double unlock in amdgpu_dm_commit_planes

PATCH In review Ernst Sjöstrand 2 participants 2 messages Nov 7, 2017 1 message not in the archive

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 amdgpu/dc: Fix double unlock in amdgpu_dm_commit_planes

Reported by smartch:
amdgpu_dm_commit_planes() error: double unlock 'spin_lock:&crtc->dev->event_lock' amdgpu_dm_commit_planes() error: double unlock 'irqsave:flags'

The error path doesn't return so we only need a single unlock.

---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 1 -
 1 file changed, 1 deletion(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +0 -1
index 2ba5d9bddd6f..86c39fc68b2f 100644
@@ -3928,7 +3928,6 @@ static void amdgpu_dm_commit_planes(struct drm_atomic_state *state,
 			DRM_ERROR("%s: acrtc %d, already busy\n",
 				  __func__,
 				  acrtc_attach->crtc_id);
-			spin_unlock_irqrestore(&crtc->dev->event_lock, flags);
 			/* In commit tail framework this cannot happen */
 			WARN_ON(1);
 		}
Signature · 6 lines
2.14.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): 20171107201806.22852-1-ernstp-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org

Reviewed-by
#2 lore raw
Quoted 7 lines · Ernst Sjöstrand

Reported by smartch:
amdgpu_dm_commit_planes() error: double unlock 'spin_lock:&crtc->dev->event_lock' amdgpu_dm_commit_planes() error: double unlock 'irqsave:flags'

The error path doesn't return so we only need a single unlock.

Harry

Quoted 10 lines
---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 1 -
 1 file changed, 1 deletion(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +0 -0
index 2ba5d9bddd6f..86c39fc68b2f 100644

drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c static void amdgpu_dm_commit_planes(struct drm_atomic_state *state, · line 3933

Quoted 7 lines
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +0 -1
@@ -3928,7 +3928,6 @@ static void amdgpu_dm_commit_planes(struct drm_atomic_state *state,
 			DRM_ERROR("%s: acrtc %d, already busy\n",
 				  __func__,
 				  acrtc_attach->crtc_id);
-			spin_unlock_irqrestore(&crtc->dev->event_lock, flags);
 			/* In commit tail framework this cannot happen */
 			WARN_ON(1);
 		}

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx