drm/tilcdc: Drop calls to modeset_lock_crtc
authorDaniel Vetter <daniel.vetter@ffwll.ch>
Wed, 22 Mar 2017 21:50:47 +0000 (22:50 +0100)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Sat, 25 Mar 2017 21:19:27 +0000 (22:19 +0100)
Again this is an internal helper, not the official way to lock a crtc.

Cc: Jyri Sarha <jsarha@ti.com>
Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Acked-by: Jyri Sarha <jsarha@ti.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20170322215058.8671-9-daniel.vetter@ffwll.ch
drivers/gpu/drm/tilcdc/tilcdc_crtc.c

index c92faa8f7560dd0bdf3c6574d4f739f46759733d..afd2a7b2aff72db22191fef86f0f51afbb090ce8 100644 (file)
@@ -579,7 +579,7 @@ static void tilcdc_crtc_recover_work(struct work_struct *work)
 
        dev_info(crtc->dev->dev, "%s: Reset CRTC", __func__);
 
-       drm_modeset_lock_crtc(crtc, NULL);
+       drm_modeset_lock(&crtc->mutex, NULL);
 
        if (!tilcdc_crtc_is_on(crtc))
                goto out;
@@ -587,7 +587,7 @@ static void tilcdc_crtc_recover_work(struct work_struct *work)
        tilcdc_crtc_disable(crtc);
        tilcdc_crtc_enable(crtc);
 out:
-       drm_modeset_unlock_crtc(crtc);
+       drm_modeset_unlock(&crtc->mutex);
 }
 
 static void tilcdc_crtc_destroy(struct drm_crtc *crtc)
@@ -595,9 +595,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);
+       drm_modeset_lock(&crtc->mutex, NULL);
        tilcdc_crtc_disable(crtc);
-       drm_modeset_unlock_crtc(crtc);
+       drm_modeset_unlock(&crtc->mutex);
 
        flush_workqueue(priv->wq);
 
@@ -856,7 +856,7 @@ void tilcdc_crtc_update_clk(struct drm_crtc *crtc)
        struct tilcdc_drm_private *priv = dev->dev_private;
        struct tilcdc_crtc *tilcdc_crtc = to_tilcdc_crtc(crtc);
 
-       drm_modeset_lock_crtc(crtc, NULL);
+       drm_modeset_lock(&crtc->mutex, NULL);
        if (tilcdc_crtc->lcd_fck_rate != clk_get_rate(priv->clk)) {
                if (tilcdc_crtc_is_on(crtc)) {
                        pm_runtime_get_sync(dev->dev);
@@ -868,7 +868,7 @@ void tilcdc_crtc_update_clk(struct drm_crtc *crtc)
                        pm_runtime_put_sync(dev->dev);
                }
        }
-       drm_modeset_unlock_crtc(crtc);
+       drm_modeset_unlock(&crtc->mutex);
 }
 
 #define SYNC_LOST_COUNT_LIMIT 50