drm/amdgpu: Switch to drm_vblank_on/off (v2)
authorDaniel Vetter <daniel.vetter@ffwll.ch>
Thu, 21 Jan 2016 10:08:58 +0000 (11:08 +0100)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 8 Mar 2016 16:01:40 +0000 (11:01 -0500)
Equivalent change to the radeon driver.

Note that with radeon this caught a bug in the dri3 DDX
implementation, which asked for vblank interrupts when the pipe is
off. That bug needs to be fixed before we can merge this patch (if
amdgpu is affected too). Michel discovered this one.

v2: agd: switch dce8 as well.

Acked-by: Michel Dänzer <michel.daenzer@amd.com>
Cc: Michel Dänzer <michel.daenzer@amd.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
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 e3ff809a0caeb4fe3b8a2ac238c5f2e4824b220b..b8cb411918abf46f2609a2986a6c8f8d58bfc54d 100644 (file)
@@ -2700,13 +2700,13 @@ static void dce_v10_0_crtc_dpms(struct drm_crtc *crtc, int mode)
                type = amdgpu_crtc_idx_to_irq_type(adev, amdgpu_crtc->crtc_id);
                amdgpu_irq_update(adev, &adev->crtc_irq, type);
                amdgpu_irq_update(adev, &adev->pageflip_irq, type);
-               drm_vblank_post_modeset(dev, amdgpu_crtc->crtc_id);
+               drm_vblank_on(dev, amdgpu_crtc->crtc_id);
                dce_v10_0_crtc_load_lut(crtc);
                break;
        case DRM_MODE_DPMS_STANDBY:
        case DRM_MODE_DPMS_SUSPEND:
        case DRM_MODE_DPMS_OFF:
-               drm_vblank_pre_modeset(dev, amdgpu_crtc->crtc_id);
+               drm_vblank_off(dev, amdgpu_crtc->crtc_id);
                if (amdgpu_crtc->enabled) {
                        dce_v10_0_vga_enable(crtc, true);
                        amdgpu_atombios_crtc_blank(crtc, ATOM_ENABLE);
index 6b6c9b6879ae371f228dca0a3588688206b80e57..6e8d74da183f4c422cb959bf023783c4c6bfb3d1 100644 (file)
@@ -2691,13 +2691,13 @@ static void dce_v11_0_crtc_dpms(struct drm_crtc *crtc, int mode)
                type = amdgpu_crtc_idx_to_irq_type(adev, amdgpu_crtc->crtc_id);
                amdgpu_irq_update(adev, &adev->crtc_irq, type);
                amdgpu_irq_update(adev, &adev->pageflip_irq, type);
-               drm_vblank_post_modeset(dev, amdgpu_crtc->crtc_id);
+               drm_vblank_on(dev, amdgpu_crtc->crtc_id);
                dce_v11_0_crtc_load_lut(crtc);
                break;
        case DRM_MODE_DPMS_STANDBY:
        case DRM_MODE_DPMS_SUSPEND:
        case DRM_MODE_DPMS_OFF:
-               drm_vblank_pre_modeset(dev, amdgpu_crtc->crtc_id);
+               drm_vblank_off(dev, amdgpu_crtc->crtc_id);
                if (amdgpu_crtc->enabled) {
                        dce_v11_0_vga_enable(crtc, true);
                        amdgpu_atombios_crtc_blank(crtc, ATOM_ENABLE);
index 56bea36a6b1822bdf02016bbf2291326d9592ac4..b059853d93bfd1ffdc4d494167a2cc796a049208 100644 (file)
@@ -2612,13 +2612,13 @@ static void dce_v8_0_crtc_dpms(struct drm_crtc *crtc, int mode)
                type = amdgpu_crtc_idx_to_irq_type(adev, amdgpu_crtc->crtc_id);
                amdgpu_irq_update(adev, &adev->crtc_irq, type);
                amdgpu_irq_update(adev, &adev->pageflip_irq, type);
-               drm_vblank_post_modeset(dev, amdgpu_crtc->crtc_id);
+               drm_vblank_on(dev, amdgpu_crtc->crtc_id);
                dce_v8_0_crtc_load_lut(crtc);
                break;
        case DRM_MODE_DPMS_STANDBY:
        case DRM_MODE_DPMS_SUSPEND:
        case DRM_MODE_DPMS_OFF:
-               drm_vblank_pre_modeset(dev, amdgpu_crtc->crtc_id);
+               drm_vblank_off(dev, amdgpu_crtc->crtc_id);
                if (amdgpu_crtc->enabled) {
                        dce_v8_0_vga_enable(crtc, true);
                        amdgpu_atombios_crtc_blank(crtc, ATOM_ENABLE);