From 6c3a721cde9317233072b573f9502348dcd21b16 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michel=20D=C3=A4nzer?= Date: Tue, 10 Mar 2015 16:52:18 +0900 Subject: 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 for the catch! Reviewed-by: Alex Deucher --- src/radeon_dri2.h | 37 ------------------------------------- 1 file changed, 37 deletions(-) (limited to 'src/radeon_dri2.h') diff --git a/src/radeon_dri2.h b/src/radeon_dri2.h index 37d46f3d..9ba47c78 100644 --- a/src/radeon_dri2.h +++ b/src/radeon_dri2.h @@ -43,48 +43,11 @@ struct radeon_dri2 { Bool radeon_dri2_screen_init(ScreenPtr pScreen); void radeon_dri2_close_screen(ScreenPtr pScreen); -int drmmode_get_crtc_id(xf86CrtcPtr crtc); -void radeon_dri2_frame_event_handler(unsigned int frame, unsigned int tv_sec, - unsigned int tv_usec, void *event_data); -void radeon_dri2_flip_event_handler(unsigned int frame, unsigned int tv_sec, - unsigned int tv_usec, void *event_data); - #else static inline Bool radeon_dri2_screen_init(ScreenPtr pScreen) { return FALSE; } static inline void radeon_dri2_close_screen(ScreenPtr pScreen) {} -static inline void -radeon_dri2_dummy_event_handler(unsigned int frame, unsigned int tv_sec, - unsigned int tv_usec, void *event_data, - const char *name) -{ - static Bool warned; - - if (!warned) { - ErrorF("%s called but DRI2 disabled at build time\n", name); - warned = TRUE; - } - - free(event_data); -} - -static inline void -radeon_dri2_frame_event_handler(unsigned int frame, unsigned int tv_sec, - unsigned int tv_usec, void *event_data) -{ - radeon_dri2_dummy_event_handler(frame, tv_sec, tv_usec, event_data, - __func__); -} - -static inline void -radeon_dri2_flip_event_handler(unsigned int frame, unsigned int tv_sec, - unsigned int tv_usec, void *event_data) -{ - radeon_dri2_dummy_event_handler(frame, tv_sec, tv_usec, event_data, - __func__); -} - #endif #endif /* RADEON_DRI2_H */ -- cgit v1.2.3