summaryrefslogtreecommitdiff
path: root/present
diff options
context:
space:
mode:
authorRoman Gilg <subdiff@gmail.com>2018-03-13 16:00:47 +0100
committerAdam Jackson <ajax@redhat.com>2018-03-28 14:36:34 -0400
commit8d370fcdcaed210d9f4afc1650aa8b161c7fbb44 (patch)
treeafa0eca7eb0db8582c921cd77c30bcde80a0d551 /present
parent7b071b4e440313254398f06eb59b1596a6d3e8fe (diff)
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>
Diffstat (limited to 'present')
-rw-r--r--present/present.h43
-rw-r--r--present/present_priv.h1
2 files changed, 44 insertions, 0 deletions
diff --git a/present/present.h b/present/present.h
index ade838bda..8224322b3 100644
--- a/present/present.h
+++ b/present/present.h
@@ -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
diff --git a/present/present_priv.h b/present/present_priv.h
index f69747191..375a100b6 100644
--- a/present/present_priv.h
+++ b/present/present_priv.h
@@ -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;