summaryrefslogtreecommitdiff
path: root/src/amdgpu_dri2.c
diff options
context:
space:
mode:
authorMichel Dänzer <michel.daenzer@amd.com>2017-08-18 15:03:52 +0900
committerMichel Dänzer <michel@daenzer.net>2017-08-22 18:32:05 +0900
commit24b2718992e4bbc859c07e5b29b571f53314045d (patch)
treed307a9e5b2d873667438fb92896507a9ac71fbce /src/amdgpu_dri2.c
parent87a1f577f1de62f6b628bbe221cd8d551531e708 (diff)
Pass reference CRTC to amdgpu_do_pageflip directly
Simplifies the code slightly. (Ported from radeon commit 49cc61ab970ee28d4509b4e2dd0a57165136889f) Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'src/amdgpu_dri2.c')
-rw-r--r--src/amdgpu_dri2.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/amdgpu_dri2.c b/src/amdgpu_dri2.c
index dfbc999..52fac03 100644
--- a/src/amdgpu_dri2.c
+++ b/src/amdgpu_dri2.c
@@ -541,7 +541,6 @@ amdgpu_dri2_schedule_flip(xf86CrtcPtr crtc, ClientPtr client,
AMDGPUInfoPtr info = AMDGPUPTR(scrn);
struct dri2_buffer_priv *back_priv;
DRI2FrameEventPtr flip_info;
- int ref_crtc_hw_id = drmmode_get_crtc_id(crtc);
flip_info = calloc(1, sizeof(DRI2FrameEventRec));
if (!flip_info)
@@ -561,8 +560,7 @@ amdgpu_dri2_schedule_flip(xf86CrtcPtr crtc, ClientPtr client,
/* Page flip the full screen buffer */
back_priv = back->driverPrivate;
if (amdgpu_do_pageflip(scrn, client, back_priv->pixmap,
- AMDGPU_DRM_QUEUE_ID_DEFAULT, flip_info,
- ref_crtc_hw_id,
+ AMDGPU_DRM_QUEUE_ID_DEFAULT, flip_info, crtc,
amdgpu_dri2_flip_event_handler,
amdgpu_dri2_flip_event_abort, FLIP_VSYNC,
target_msc - amdgpu_get_msc_delta(draw, crtc))) {