diff options
author | Michel Dänzer <michel.daenzer@amd.com> | 2018-07-20 17:07:23 +0200 |
---|---|---|
committer | Michel Dänzer <michel@daenzer.net> | 2018-08-16 17:11:23 +0200 |
commit | 6029794e8a35417faf825491a89b85f713c77fc1 (patch) | |
tree | 5729a202787b2b5c24f677e9fdf4c4f170ee28bb /src/amdgpu_drm_queue.c | |
parent | 0148283984c77f7a6e97026edc3093497547e0a4 (diff) |
Add amdgpu_drm_wait_pending_flip function
Replacing the drmmode_crtc_wait_pending_event macro.
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'src/amdgpu_drm_queue.c')
-rw-r--r-- | src/amdgpu_drm_queue.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/amdgpu_drm_queue.c b/src/amdgpu_drm_queue.c index dfe0148..9c01661 100644 --- a/src/amdgpu_drm_queue.c +++ b/src/amdgpu_drm_queue.c @@ -178,6 +178,19 @@ amdgpu_drm_abort_id(uint64_t id) } /* + * Wait for pending page flip on given CRTC to complete + */ +void amdgpu_drm_wait_pending_flip(xf86CrtcPtr crtc) +{ + drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private; + AMDGPUEntPtr pAMDGPUEnt = AMDGPUEntPriv(crtc->scrn); + drmmode_ptr drmmode = drmmode_crtc->drmmode; + + while (drmmode_crtc->flip_pending && + drmHandleEvent(pAMDGPUEnt->fd, &drmmode->event_context) > 0); +} + +/* * Initialize the DRM event queue */ void |