aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c
diff options
context:
space:
mode:
authorAlex Deucher <alexander.deucher@amd.com>2016-05-05 16:03:57 -0400
committerAlex Deucher <alexander.deucher@amd.com>2016-05-11 12:31:25 -0400
commitcb9e59d7e999c68b79f23d6016b08fc5d0bb8a8d (patch)
treeb6a3f9e2d470c1f3cc259f6ddac599fbe58b5b94 /drivers/gpu/drm/amd/amdgpu/amdgpu_display.c
parenta71dd897599c94d38eb1c4d6c8d9f8e3275e82ce (diff)
drm/amdgpu: Support DRM_MODE_PAGE_FLIP_ASYNC (v2)
When this flag is set, we program the hardware to execute the flip during horizontal blank (i.e. for the next scanline) instead of during vertical blank (i.e. for the next frame). Ported from radeon commit: drm/radeon: Support DRM_MODE_PAGE_FLIP_ASYNC v2: drop DAL change for upstream Reviewed-by: Michel Dänzer <michel.daenzer@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_display.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_display.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c
index c835abe65df3..726803069fef 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c
@@ -132,7 +132,7 @@ static void amdgpu_flip_work_func(struct work_struct *__work)
132 vblank->linedur_ns / 1000, stat, vpos, hpos); 132 vblank->linedur_ns / 1000, stat, vpos, hpos);
133 133
134 /* Do the flip (mmio) */ 134 /* Do the flip (mmio) */
135 adev->mode_info.funcs->page_flip(adev, work->crtc_id, work->base); 135 adev->mode_info.funcs->page_flip(adev, work->crtc_id, work->base, work->async);
136 136
137 /* Set the flip status */ 137 /* Set the flip status */
138 amdgpuCrtc->pflip_status = AMDGPU_FLIP_SUBMITTED; 138 amdgpuCrtc->pflip_status = AMDGPU_FLIP_SUBMITTED;
@@ -197,6 +197,7 @@ int amdgpu_crtc_page_flip(struct drm_crtc *crtc,
197 work->event = event; 197 work->event = event;
198 work->adev = adev; 198 work->adev = adev;
199 work->crtc_id = amdgpu_crtc->crtc_id; 199 work->crtc_id = amdgpu_crtc->crtc_id;
200 work->async = (page_flip_flags & DRM_MODE_PAGE_FLIP_ASYNC) != 0;
200 201
201 /* schedule unpin of the old buffer */ 202 /* schedule unpin of the old buffer */
202 old_amdgpu_fb = to_amdgpu_framebuffer(crtc->primary->fb); 203 old_amdgpu_fb = to_amdgpu_framebuffer(crtc->primary->fb);