diff options
author | Michel Dänzer <michel.daenzer@amd.com> | 2018-08-16 17:27:06 +0200 |
---|---|---|
committer | Michel Dänzer <michel@daenzer.net> | 2018-08-17 09:58:57 +0200 |
commit | 93621e408c17dd9e082236c17f051c06558d7f4d (patch) | |
tree | 6c12df1888f0bb0e39e4c28d67915ae79761e3a5 /src/radeon_drm_queue.c | |
parent | ecdf0b7ec9378bc386ce8276f16fb16d09f72812 (diff) |
Add radeon_drm_wait_pending_flip function
Replacing the drmmode_crtc_wait_pending_event macro.
(Ported from amdgpu commit 6029794e8a35417faf825491a89b85f713c77fc1)
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'src/radeon_drm_queue.c')
-rw-r--r-- | src/radeon_drm_queue.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/radeon_drm_queue.c b/src/radeon_drm_queue.c index bff010fa..69474be2 100644 --- a/src/radeon_drm_queue.c +++ b/src/radeon_drm_queue.c @@ -178,6 +178,19 @@ radeon_drm_abort_id(uint64_t id) } /* + * Wait for pending page flip on given CRTC to complete + */ +void radeon_drm_wait_pending_flip(xf86CrtcPtr crtc) +{ + drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private; + RADEONEntPtr pRADEONEnt = RADEONEntPriv(crtc->scrn); + drmmode_ptr drmmode = drmmode_crtc->drmmode; + + while (drmmode_crtc->flip_pending && + drmHandleEvent(pRADEONEnt->fd, &drmmode->event_context) > 0); +} + +/* * Initialize the DRM event queue */ void |