drm/amdgpu: use drm_crtc_vblank_{get,put}()
authorGustavo Padovan <gustavo.padovan@collabora.co.uk>
Mon, 6 Jun 2016 14:41:39 +0000 (11:41 -0300)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Mon, 6 Jun 2016 16:03:49 +0000 (18:03 +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-8-git-send-email-gustavo@padovan.org
drivers/gpu/drm/amd/amdgpu/amdgpu_display.c
drivers/gpu/drm/amd/amdgpu/dce_v10_0.c
drivers/gpu/drm/amd/amdgpu/dce_v11_0.c
drivers/gpu/drm/amd/amdgpu/dce_v8_0.c

index b0832da2ef7e463ab8fe1c15d3234dcc657d14a7..0b5f3accb1e49a4e5b39a56777bb3368bebded97 100644 (file)
@@ -240,7 +240,7 @@ int amdgpu_crtc_page_flip(struct drm_crtc *crtc,
 
        work->base = base;
 
-       r = drm_vblank_get(crtc->dev, amdgpu_crtc->crtc_id);
+       r = drm_crtc_vblank_get(crtc);
        if (r) {
                DRM_ERROR("failed to get vblank before flip\n");
                goto pflip_cleanup;
@@ -268,7 +268,7 @@ int amdgpu_crtc_page_flip(struct drm_crtc *crtc,
        return 0;
 
 vblank_cleanup:
-       drm_vblank_put(crtc->dev, amdgpu_crtc->crtc_id);
+       drm_crtc_vblank_put(&amdgpu_crtc->base);
 
 pflip_cleanup:
        if (unlikely(amdgpu_bo_reserve(new_rbo, false) != 0)) {
index 8227344d2ff6e8ce43d0ce41e4c1179b57a2b6d1..7e57447bf5f4ddecaccd212970fabfeab0598c53 100644 (file)
@@ -3372,7 +3372,7 @@ static int dce_v10_0_pageflip_irq(struct amdgpu_device *adev,
 
        spin_unlock_irqrestore(&adev->ddev->event_lock, flags);
 
-       drm_vblank_put(adev->ddev, amdgpu_crtc->crtc_id);
+       drm_crtc_vblank_put(&amdgpu_crtc->base);
        schedule_work(&works->unpin_work);
 
        return 0;
index af26ec0bc59d35b1c09b00cb7be2fb4c5ca5ede0..da101551960b94206bb491108a8c2405a22f2afb 100644 (file)
@@ -3433,7 +3433,7 @@ static int dce_v11_0_pageflip_irq(struct amdgpu_device *adev,
 
        spin_unlock_irqrestore(&adev->ddev->event_lock, flags);
 
-       drm_vblank_put(adev->ddev, amdgpu_crtc->crtc_id);
+       drm_crtc_vblank_put(&amdgpu_crtc->base);
        schedule_work(&works->unpin_work);
 
        return 0;
index 3fb65e41a6ef5e9402a4c2a3df4b30e1372ac5c8..41d9bc5f9c0e3f45cfd3a09b5c3c9cb781174a27 100644 (file)
@@ -3376,7 +3376,7 @@ static int dce_v8_0_pageflip_irq(struct amdgpu_device *adev,
 
        spin_unlock_irqrestore(&adev->ddev->event_lock, flags);
 
-       drm_vblank_put(adev->ddev, amdgpu_crtc->crtc_id);
+       drm_crtc_vblank_put(&amdgpu_crtc->base);
        schedule_work(&works->unpin_work);
 
        return 0;