Commit accbaf6e authored by Gustavo Padovan's avatar Gustavo Padovan Committed by Daniel Vetter

drm/armada: use drm_crtc_vblank_{get,put}()

Replace the legacy drm_vblank_{get,put}() with the new helper functions.
Signed-off-by: default avatarGustavo Padovan <gustavo.padovan@collabora.co.uk>
Reviewed-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/1465224105-21485-9-git-send-email-gustavo@padovan.org
parent 60629c4d
...@@ -199,7 +199,7 @@ static void armada_drm_plane_work_run(struct armada_crtc *dcrtc, ...@@ -199,7 +199,7 @@ static void armada_drm_plane_work_run(struct armada_crtc *dcrtc,
/* Handle any pending frame work. */ /* Handle any pending frame work. */
if (work) { if (work) {
work->fn(dcrtc, plane, work); work->fn(dcrtc, plane, work);
drm_vblank_put(dcrtc->crtc.dev, dcrtc->num); drm_crtc_vblank_put(&dcrtc->crtc);
} }
wake_up(&plane->frame_wait); wake_up(&plane->frame_wait);
...@@ -210,7 +210,7 @@ int armada_drm_plane_work_queue(struct armada_crtc *dcrtc, ...@@ -210,7 +210,7 @@ int armada_drm_plane_work_queue(struct armada_crtc *dcrtc,
{ {
int ret; int ret;
ret = drm_vblank_get(dcrtc->crtc.dev, dcrtc->num); ret = drm_crtc_vblank_get(&dcrtc->crtc);
if (ret) { if (ret) {
DRM_ERROR("failed to acquire vblank counter\n"); DRM_ERROR("failed to acquire vblank counter\n");
return ret; return ret;
...@@ -218,7 +218,7 @@ int armada_drm_plane_work_queue(struct armada_crtc *dcrtc, ...@@ -218,7 +218,7 @@ int armada_drm_plane_work_queue(struct armada_crtc *dcrtc,
ret = cmpxchg(&plane->work, NULL, work) ? -EBUSY : 0; ret = cmpxchg(&plane->work, NULL, work) ? -EBUSY : 0;
if (ret) if (ret)
drm_vblank_put(dcrtc->crtc.dev, dcrtc->num); drm_crtc_vblank_put(&dcrtc->crtc);
return ret; return ret;
} }
...@@ -234,7 +234,7 @@ struct armada_plane_work *armada_drm_plane_work_cancel( ...@@ -234,7 +234,7 @@ struct armada_plane_work *armada_drm_plane_work_cancel(
struct armada_plane_work *work = xchg(&plane->work, NULL); struct armada_plane_work *work = xchg(&plane->work, NULL);
if (work) if (work)
drm_vblank_put(dcrtc->crtc.dev, dcrtc->num); drm_crtc_vblank_put(&dcrtc->crtc);
return work; return work;
} }
...@@ -592,9 +592,9 @@ static int armada_drm_crtc_mode_set(struct drm_crtc *crtc, ...@@ -592,9 +592,9 @@ static int armada_drm_crtc_mode_set(struct drm_crtc *crtc,
if (interlaced ^ dcrtc->interlaced) { if (interlaced ^ dcrtc->interlaced) {
if (adj->flags & DRM_MODE_FLAG_INTERLACE) if (adj->flags & DRM_MODE_FLAG_INTERLACE)
drm_vblank_get(dcrtc->crtc.dev, dcrtc->num); drm_crtc_vblank_get(&dcrtc->crtc);
else else
drm_vblank_put(dcrtc->crtc.dev, dcrtc->num); drm_crtc_vblank_put(&dcrtc->crtc);
dcrtc->interlaced = interlaced; dcrtc->interlaced = interlaced;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment