diff options
author | Michel Dänzer <michel.daenzer@amd.com> | 2015-03-10 16:52:18 +0900 |
---|---|---|
committer | Michel Dänzer <michel@daenzer.net> | 2015-03-17 11:00:01 +0900 |
commit | 6c3a721cde9317233072b573f9502348dcd21b16 (patch) | |
tree | 8325b0266bde98442ec280823b4bdc5c0aa342b9 /src/drmmode_display.h | |
parent | c3fa22a479e61d1899fa9d327d9c4e2a7f64b0c1 (diff) |
DRI2: Use helper functions for DRM event queue management v3
This is mostly in preparation for Present support, but it also simplifies
the DRI2 specific code a little.
v2: Fix up for struct radeon_drm_queue -> radeon_drm_queue_entry.
v3: Removed excess 0s from conversion from microseconds to seconds,
thanks to Richard Wilbur <richard.wilbur@gmail.com> for the catch!
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'src/drmmode_display.h')
-rw-r--r-- | src/drmmode_display.h | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/drmmode_display.h b/src/drmmode_display.h index c9920e09..b3134608 100644 --- a/src/drmmode_display.h +++ b/src/drmmode_display.h @@ -32,6 +32,7 @@ #include "libudev.h" #endif +#include "radeon_drm_queue.h" #include "radeon_probe.h" #ifndef DRM_CAP_TIMESTAMP_MONOTONIC @@ -61,13 +62,14 @@ typedef struct { int flip_count; void *event_data; unsigned int fe_frame; - unsigned int fe_tv_sec; - unsigned int fe_tv_usec; + uint64_t fe_usec; } drmmode_flipdata_rec, *drmmode_flipdata_ptr; typedef struct { drmmode_flipdata_ptr flipdata; Bool dispatch_me; + radeon_drm_handler_proc handler; + radeon_drm_abort_proc abort; } drmmode_flipevtcarrier_rec, *drmmode_flipevtcarrier_ptr; typedef struct { @@ -121,11 +123,15 @@ extern Bool drmmode_setup_colormap(ScreenPtr pScreen, ScrnInfoPtr pScrn); extern void drmmode_uevent_init(ScrnInfoPtr scrn, drmmode_ptr drmmode); extern void drmmode_uevent_fini(ScrnInfoPtr scrn, drmmode_ptr drmmode); +extern int drmmode_get_crtc_id(xf86CrtcPtr crtc); extern int drmmode_get_height_align(ScrnInfoPtr scrn, uint32_t tiling); extern int drmmode_get_pitch_align(ScrnInfoPtr scrn, int bpe, uint32_t tiling); extern int drmmode_get_base_align(ScrnInfoPtr scrn, int bpe, uint32_t tiling); -Bool radeon_do_pageflip(ScrnInfoPtr scrn, struct radeon_bo *new_front, void *data, int ref_crtc_hw_id); +Bool radeon_do_pageflip(ScrnInfoPtr scrn, ClientPtr client, + struct radeon_bo *new_front, uint64_t id, void *data, + int ref_crtc_hw_id, radeon_drm_handler_proc handler, + radeon_drm_abort_proc abort); int drmmode_get_current_ust(int drm_fd, CARD64 *ust); #endif |