[PATCH v2 1/8] xf86: Add PRIME flipping functions to ScreenRec

Alex Goins agoins at nvidia.com
Tue Jan 5 13:55:59 PST 2016


Adds typdefs for (*StartFlippingPixmapTrackingProcPtr),
(*PresentSharedPixmapProcPtr), (*SharedPixmapNotifyDamageProcPtr),
(*RequestSharedPixmapNotifyDamageProcPtr),
(*StopFlippingPixmapTrackingProcPtr), (*EnableSharedPixmapFlippingProcPtr),
and (*DisableSharedPixmapFlippingProcPtr).

Adds (Enable/Disable)SharedPixmapFlipping,
(Start/Stop)FlippingPixmapTracking, PresentSharedPixmap,
SharedPixmapNotifyDamage, and RequestSharedPixmapNotifyDamage to ScreenRec.

EnableSharedPixmapFlipping will allow the sink driver to setup for flipping
between two shared pixmaps.

DisableSharedPixmapFlipping will allow the sink driver to do teardown
associated with flipping between two shared pixmaps.

(Start/Stop)FlippingPixmapTracking are merely the double-buffered
equivalents of (Start/Stop)PixmapTracking, allowing the source driver to do
whatever setup and teardown necessary for presenting on the two shared
pixmaps.

PresentSharedPixmap is a function exposed by the source driver for the X
server or sink driver to call to request a present on a given shared
pixmap.  This way, presents can be driven by the sink's vblank instead of a
timer or similar mechanism.

SharedPixmapNotifyDamage and RequestSharedPixmapNotifyDamage are OPTIONAL
(even for double-buffered PRIME) functions exposed by the sink driver and
the source driver, respectively. By calling
master->RequestSharedPixmapNotifyDamage(ppix), the sink driver can request
for the source driver to call slave->SharedPixmapNotifyDamage(ppix) in
response to damage on the master screen pixmap tracked by ppix.

v1: Initial commit
v2: Rename PresentTrackedFlippingPixmap to PresentSharedPixmap
    Add SharedPixmapNotifyDamage / RequestSharedPixmapNotifyDamage

Signed-off-by: Alex Goins <agoins at nvidia.com>
---
 include/scrnintstr.h | 28 ++++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)

diff --git a/include/scrnintstr.h b/include/scrnintstr.h
index 2e617c4..5fc1119 100644
--- a/include/scrnintstr.h
+++ b/include/scrnintstr.h
@@ -349,8 +349,27 @@ typedef Bool (*StartPixmapTrackingProcPtr)(PixmapPtr, PixmapPtr,
                                            int dst_x, int dst_y,
                                            Rotation rotation);
 
+typedef Bool (*StartFlippingPixmapTrackingProcPtr)(PixmapPtr,
+                                                   PixmapPtr, PixmapPtr,
+                                                   int x, int y,
+                                                   int dst_x, int dst_y,
+                                                   Rotation rotation);
+
+typedef Bool (*PresentSharedPixmapProcPtr)(PixmapPtr);
+
+typedef Bool (*RequestSharedPixmapNotifyDamageProcPtr)(PixmapPtr);
+
 typedef Bool (*StopPixmapTrackingProcPtr)(PixmapPtr, PixmapPtr);
 
+typedef Bool (*StopFlippingPixmapTrackingProcPtr)(PixmapPtr,
+                                                  PixmapPtr, PixmapPtr);
+
+typedef Bool (*EnableSharedPixmapFlippingProcPtr)(void *);
+
+typedef Bool (*SharedPixmapNotifyDamageProcPtr)(PixmapPtr);
+
+typedef void (*DisableSharedPixmapFlippingProcPtr)(void *);
+
 typedef Bool (*ReplaceScanoutPixmapProcPtr)(DrawablePtr, PixmapPtr, Bool);
 
 typedef WindowPtr (*XYToWindowProcPtr)(ScreenPtr pScreen,
@@ -601,9 +620,18 @@ typedef struct _Screen {
     SharePixmapBackingProcPtr SharePixmapBacking;
     SetSharedPixmapBackingProcPtr SetSharedPixmapBacking;
 
+    EnableSharedPixmapFlippingProcPtr EnableSharedPixmapFlipping;
+    SharedPixmapNotifyDamageProcPtr SharedPixmapNotifyDamage;
+    DisableSharedPixmapFlippingProcPtr DisableSharedPixmapFlipping;
+
     StartPixmapTrackingProcPtr StartPixmapTracking;
     StopPixmapTrackingProcPtr StopPixmapTracking;
 
+    StartFlippingPixmapTrackingProcPtr StartFlippingPixmapTracking;
+    PresentSharedPixmapProcPtr PresentSharedPixmap;
+    RequestSharedPixmapNotifyDamageProcPtr RequestSharedPixmapNotifyDamage;
+    StopFlippingPixmapTrackingProcPtr StopFlippingPixmapTracking;
+
     struct xorg_list pixmap_dirty_list;
     struct xorg_list offload_slave_list;
     struct xorg_list offload_head;
-- 
1.9.1



More information about the xorg-devel mailing list