Skip to content

Commit 9193168

Browse files
author
Jyri Sarha
committed
drm/tilcdc: Take CRTC lock when calling tilcdc_crtc_disable()
Take CRTC lock when calling tilcdc_crtc_disable() in tilcdc_crtc_destroy(). In theory there could still be some operation ongoing, which should finish before destroying the CRTC. However, the main reason for adding this is to be able to add WARNing in tilcdc_crtc_disable() if CRTC is not locked. Signed-off-by: Jyri Sarha <[email protected]> Reviewed-by: Tomi Valkeinen <[email protected]>
1 parent 299676e commit 9193168

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/gpu/drm/tilcdc/tilcdc_crtc.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,9 @@ static void tilcdc_crtc_destroy(struct drm_crtc *crtc)
230230
struct tilcdc_crtc *tilcdc_crtc = to_tilcdc_crtc(crtc);
231231
struct tilcdc_drm_private *priv = crtc->dev->dev_private;
232232

233+
drm_modeset_lock_crtc(crtc, NULL);
233234
tilcdc_crtc_disable(crtc);
235+
drm_modeset_unlock_crtc(crtc);
234236

235237
flush_workqueue(priv->wq);
236238

0 commit comments

Comments
 (0)