drm/qxl: use drm_crtc_vblank_{get,put}()
authorGustavo Padovan <gustavo.padovan@collabora.co.uk>
Mon, 6 Jun 2016 14:41:43 +0000 (11:41 -0300)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Mon, 6 Jun 2016 16:04:24 +0000 (18:04 +0200)
Replace the legacy drm_vblank_{get,put}() with the new helper functions.

Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/1465224105-21485-12-git-send-email-gustavo@padovan.org
drivers/gpu/drm/qxl/qxl_display.c

index 90503222aa80d534f4618e62c4fdea90ed5542c3..ad429683fef771f2f05da51518b9f0383279d7c2 100644 (file)
@@ -221,7 +221,6 @@ static int qxl_crtc_page_flip(struct drm_crtc *crtc,
 {
        struct drm_device *dev = crtc->dev;
        struct qxl_device *qdev = dev->dev_private;
-       struct qxl_crtc *qcrtc = to_qxl_crtc(crtc);
        struct qxl_framebuffer *qfb_src = to_qxl_framebuffer(fb);
        struct qxl_framebuffer *qfb_old = to_qxl_framebuffer(crtc->primary->fb);
        struct qxl_bo *bo_old = gem_to_qxl_bo(qfb_old->obj);
@@ -252,14 +251,14 @@ static int qxl_crtc_page_flip(struct drm_crtc *crtc,
        qxl_draw_dirty_fb(qdev, qfb_src, bo, 0, 0,
                          &norect, one_clip_rect, inc);
 
-       drm_vblank_get(dev, qcrtc->index);
+       drm_crtc_vblank_get(crtc);
 
        if (event) {
                spin_lock_irqsave(&dev->event_lock, flags);
                drm_crtc_send_vblank_event(crtc, event);
                spin_unlock_irqrestore(&dev->event_lock, flags);
        }
-       drm_vblank_put(dev, qcrtc->index);
+       drm_crtc_vblank_put(crtc);
 
        ret = qxl_bo_reserve(bo, false);
        if (!ret) {