present: Add driver facing window flip mode hooks
To enable special functionality of window flips introduce for window flips a separate set of driver facing function hooks. Signed-off-by: Roman Gilg <subdiff@gmail.com> Reviewed-by: Adam Jackson <ajax@redhat.com>
This commit is contained in:
parent
7b071b4e44
commit
8d370fcdca
|
@ -41,6 +41,7 @@ typedef RRCrtcPtr (*present_get_crtc_ptr) (WindowPtr window);
|
|||
/* Return the current ust/msc for 'crtc'
|
||||
*/
|
||||
typedef int (*present_get_ust_msc_ptr) (RRCrtcPtr crtc, uint64_t *ust, uint64_t *msc);
|
||||
typedef int (*present_wnmd_get_ust_msc_ptr) (WindowPtr window, uint64_t *ust, uint64_t *msc);
|
||||
|
||||
/* Queue callback on 'crtc' for time 'msc'. Call present_event_notify with 'event_id'
|
||||
* at or after 'msc'. Return false if it didn't happen (which might occur if 'crtc'
|
||||
|
@ -49,12 +50,20 @@ typedef int (*present_get_ust_msc_ptr) (RRCrtcPtr crtc, uint64_t *ust, uint64_t
|
|||
typedef Bool (*present_queue_vblank_ptr) (RRCrtcPtr crtc,
|
||||
uint64_t event_id,
|
||||
uint64_t msc);
|
||||
typedef Bool (*present_wnmd_queue_vblank_ptr) (WindowPtr window,
|
||||
RRCrtcPtr crtc,
|
||||
uint64_t event_id,
|
||||
uint64_t msc);
|
||||
|
||||
/* Abort pending vblank. The extension is no longer interested in
|
||||
* 'event_id' which was to be notified at 'msc'. If possible, the
|
||||
* driver is free to de-queue the notification.
|
||||
*/
|
||||
typedef void (*present_abort_vblank_ptr) (RRCrtcPtr crtc, uint64_t event_id, uint64_t msc);
|
||||
typedef void (*present_wnmd_abort_vblank_ptr) (WindowPtr window,
|
||||
RRCrtcPtr crtc,
|
||||
uint64_t event_id,
|
||||
uint64_t msc);
|
||||
|
||||
/* Flush pending drawing on 'window' to the hardware.
|
||||
*/
|
||||
|
@ -84,6 +93,19 @@ typedef Bool (*present_flip_ptr) (RRCrtcPtr crtc,
|
|||
uint64_t target_msc,
|
||||
PixmapPtr pixmap,
|
||||
Bool sync_flip);
|
||||
/* Flip pixmap for window, return false if it didn't happen.
|
||||
*
|
||||
* Like present_flip_ptr, additionaly with:
|
||||
*
|
||||
* 'window' used for synchronization.
|
||||
*
|
||||
*/
|
||||
typedef Bool (*present_wnmd_flip_ptr) (WindowPtr window,
|
||||
RRCrtcPtr crtc,
|
||||
uint64_t event_id,
|
||||
uint64_t target_msc,
|
||||
PixmapPtr pixmap,
|
||||
Bool sync_flip);
|
||||
|
||||
/* "unflip" back to the regular screen scanout buffer
|
||||
*
|
||||
|
@ -92,6 +114,12 @@ typedef Bool (*present_flip_ptr) (RRCrtcPtr crtc,
|
|||
typedef void (*present_unflip_ptr) (ScreenPtr screen,
|
||||
uint64_t event_id);
|
||||
|
||||
/* Doing flips has been discontinued.
|
||||
*
|
||||
* Inform driver for potential cleanup on its side.
|
||||
*/
|
||||
typedef void (*present_wnmd_flips_stop_ptr) (WindowPtr window);
|
||||
|
||||
#define PRESENT_SCREEN_INFO_VERSION 1
|
||||
|
||||
typedef struct present_screen_info {
|
||||
|
@ -110,6 +138,21 @@ typedef struct present_screen_info {
|
|||
|
||||
} present_screen_info_rec, *present_screen_info_ptr;
|
||||
|
||||
typedef struct present_wnmd_info {
|
||||
uint32_t version;
|
||||
|
||||
present_get_crtc_ptr get_crtc;
|
||||
present_wnmd_get_ust_msc_ptr get_ust_msc;
|
||||
present_wnmd_queue_vblank_ptr queue_vblank;
|
||||
present_wnmd_abort_vblank_ptr abort_vblank;
|
||||
present_flush_ptr flush;
|
||||
uint32_t capabilities;
|
||||
present_check_flip2_ptr check_flip2;
|
||||
present_wnmd_flip_ptr flip;
|
||||
present_wnmd_flips_stop_ptr flips_stop;
|
||||
|
||||
} present_wnmd_info_rec, *present_wnmd_info_ptr;
|
||||
|
||||
/*
|
||||
* Called when 'event_id' occurs. 'ust' and 'msc' indicate when the
|
||||
* event actually happened
|
||||
|
|
|
@ -162,6 +162,7 @@ struct present_screen_priv {
|
|||
Bool flip_sync;
|
||||
|
||||
present_screen_info_ptr info;
|
||||
present_wnmd_info_ptr wnmd_info;
|
||||
|
||||
/* Mode hooks */
|
||||
present_priv_query_capabilities_ptr query_capabilities;
|
||||
|
|
Loading…
Reference in New Issue
Block a user