Skip to content

Commit

Permalink
drm/tilcdc: Take CRTC lock when calling tilcdc_crtc_disable()
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
Jyri Sarha committed Sep 7, 2016
1 parent 299676e commit 9193168
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/gpu/drm/tilcdc/tilcdc_crtc.c
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,9 @@ static void tilcdc_crtc_destroy(struct drm_crtc *crtc)
struct tilcdc_crtc *tilcdc_crtc = to_tilcdc_crtc(crtc);
struct tilcdc_drm_private *priv = crtc->dev->dev_private;

drm_modeset_lock_crtc(crtc, NULL);
tilcdc_crtc_disable(crtc);
drm_modeset_unlock_crtc(crtc);

flush_workqueue(priv->wq);

Expand Down

0 comments on commit 9193168

Please sign in to comment.