summaryrefslogtreecommitdiff
path: root/src/radeon_drm_queue.h
AgeCommit message (Collapse)Author
2018-12-28Explicitly keep track of whether a DRM event is for a flip or notMichel Dänzer
When an async flip is performed, and TearFree is enabled on the CRTC used for timing, we schedule a vblank event for completing the page flip. The DRM event queuing code treated this event like a vblank event, but it needs to be treated like a page flip event. (Ported from amdgpu commit e2c7369cae65069aa93eed1c0b678f975ce5c274)
2018-08-17Defer vblank event handling while waiting for a pending flipMichel Dänzer
This is to avoid submitting more flips while we are waiting for pending ones to complete. (Ported from amdgpu commit e52872da69ecc84dafb3355839e35b0383f0d228) Acked-by: Alex Deucher <alexander.deucher@amd.com>
2018-08-17Add radeon_drm_handle_event wrapper for drmHandleEventMichel Dänzer
Instead of processing DRM events directly from drmHandleEvent's callbacks, there are three phases: 1. drmHandleEvent is called, and signalled events are re-queued to _signalled lists from its callbacks. 2. Signalled page flip completion events are processed. 3. Signalled vblank events are processed. This should make sure that we never call drmHandleEvent from one of its callbacks, which would usually result in blocking forever. (Ported from amdgpu commit 739181c8d3334ff14b5a607895dfdeb29b0d9020) Acked-by: Alex Deucher <alexander.deucher@amd.com>
2018-08-17Add radeon_drm_wait_pending_flip functionMichel Dänzer
Replacing the drmmode_crtc_wait_pending_event macro. (Ported from amdgpu commit 6029794e8a35417faf825491a89b85f713c77fc1) Acked-by: Alex Deucher <alexander.deucher@amd.com>
2018-08-17Move DRM event queue related initialization to radeon_drm_queue_initMichel Dänzer
And make radeon_drm_queue_handler not directly accessible outside of radeon_drm_queue.c. (Ported from amdgpu commit 0148283984c77f7a6e97026edc3093497547e0a4) Acked-by: Alex Deucher <alexander.deucher@amd.com>
2016-07-22Add explicit RADEON_DRM_QUEUE_ERROR defineMichel Dänzer
Should make the radeon_drm_queue_alloc error handling clearer, and gets rid of a compile warning about it returning NULL. Reviewed-by: Alexandre Demers <alexandre.f.demers@gmail.com>
2016-04-01Identify DRM event queue entries by sequence number instead of by pointerMichel Dänzer
If the memory for an entry was allocated at the same address as that for a previously cancelled entry, the handler could theoretically be called prematurely, triggered by the DRM event which was submitted for the cancelled entry. Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2016-02-27Make DRM event queue xf86CrtcPtr based instead of ScrnInfoPtr basedMichel Dänzer
This allows for a minor simplification of the code. Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2015-03-17Add DRM event queue helpers v2Michel Dänzer
v2: Rename struct radeon_drm_queue to struct radeon_drm_queue_event, thanks to Richard Wilbur <richard.wilbur@gmail.com> for the suggestion. Also changed the corresponding parameter and local variable names from 'q' to 'e'. Reviewed-by: Alex Deucher <alexander.deucher@amd.com>