Re: [PATCH 21/36] dix: pixmap sharing infrastructure (v2)
On Mon, Jul 2, 2012 at 10:32 PM, Keith Packard kei...@keithp.com wrote: Dave Airlie airl...@gmail.com writes: On Mon, Jul 2, 2012 at 8:20 PM, Keith Packard kei...@keithp.com wrote: though a void * that just cases an fd is probably okay. That was my thinking. void * covers a lot of sins. Okay I'll convert the 3 patches to use void *. I won't repost them, can you R-b this one then with that in mind? Dave. ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH 21/36] dix: pixmap sharing infrastructure (v2)
Dave Airlie airl...@gmail.com writes: On Mon, Jul 2, 2012 at 10:32 PM, Keith Packard kei...@keithp.com wrote: Dave Airlie airl...@gmail.com writes: On Mon, Jul 2, 2012 at 8:20 PM, Keith Packard kei...@keithp.com wrote: though a void * that just cases an fd is probably okay. That was my thinking. void * covers a lot of sins. Okay I'll convert the 3 patches to use void *. I won't repost them, can you R-b this one then with that in mind? Yes, Reviewed-by: Keith Packard kei...@keithp.com -- keith.pack...@intel.com pgpWapyzlVIoW.pgp Description: PGP signature ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
[PATCH 21/36] dix: pixmap sharing infrastructure (v2)
From: Dave Airlie airl...@redhat.com This is a hooks for pixmap sharing and tracking. The pixmap sharing ones get an integer handle for the pixmap and use a handle to be the backing for a pixmap. The tracker interface is to be used when a GPU needs to track pixmaps to be updated for another GPU. v2: pass slave to sharing so it can use it to work out driver. Signed-off-by: Dave Airlie airl...@redhat.com --- include/scrnintstr.h | 17 + 1 file changed, 17 insertions(+) diff --git a/include/scrnintstr.h b/include/scrnintstr.h index 6a22167..5b9f245 100644 --- a/include/scrnintstr.h +++ b/include/scrnintstr.h @@ -179,6 +179,8 @@ typedef void (*ClipNotifyProcPtr) (WindowPtr /*pWindow */ , #define CREATE_PIXMAP_USAGE_BACKING_PIXMAP 2 /* pixmap will contain a glyph */ #define CREATE_PIXMAP_USAGE_GLYPH_PICTURE 3 +/* pixmap will be shared */ +#define CREATE_PIXMAP_USAGE_SHARED 4 typedef PixmapPtr (*CreatePixmapProcPtr) (ScreenPtr /*pScreen */ , int /*width */ , @@ -339,6 +341,16 @@ typedef void (*DeviceCursorCleanupProcPtr) (DeviceIntPtr /* pDev */ , typedef void (*ConstrainCursorHarderProcPtr) (DeviceIntPtr, ScreenPtr, int, int *, int *); + +typedef Bool (*SharePixmapBackingProcPtr)(PixmapPtr, ScreenPtr, int *); + +typedef Bool (*SetSharedPixmapBackingProcPtr)(PixmapPtr, int); + +typedef Bool (*StartPixmapTrackingProcPtr)(PixmapPtr, PixmapPtr, + int x, int y); + +typedef Bool (*StopPixmapTrackingProcPtr)(PixmapPtr, PixmapPtr); + typedef struct _Screen { int myNum; /* index of this instance in Screens[] */ ATOM id; @@ -486,6 +498,11 @@ typedef struct _Screen { struct xorg_list output_slave_list; struct xorg_list output_head; +SharePixmapBackingProcPtr SharePixmapBacking; +SetSharedPixmapBackingProcPtr SetSharedPixmapBacking; + +StartPixmapTrackingProcPtr StartPixmapTracking; +StopPixmapTrackingProcPtr StopPixmapTracking; } ScreenRec; static inline RegionPtr -- 1.7.10.2 ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH 21/36] dix: pixmap sharing infrastructure (v2)
Dave Airlie airl...@gmail.com writes: From: Dave Airlie airl...@redhat.com This is a hooks for pixmap sharing and tracking. The pixmap sharing ones get an integer handle for the pixmap and use a handle to be the backing for a pixmap. The tracker interface is to be used when a GPU needs to track pixmaps to be updated for another GPU. v2: pass slave to sharing so it can use it to work out driver. Signed-off-by: Dave Airlie airl...@redhat.com --- include/scrnintstr.h | 17 + 1 file changed, 17 insertions(+) diff --git a/include/scrnintstr.h b/include/scrnintstr.h index 6a22167..5b9f245 100644 --- a/include/scrnintstr.h +++ b/include/scrnintstr.h @@ -179,6 +179,8 @@ typedef void (*ClipNotifyProcPtr) (WindowPtr /*pWindow */ , #define CREATE_PIXMAP_USAGE_BACKING_PIXMAP 2 /* pixmap will contain a glyph */ #define CREATE_PIXMAP_USAGE_GLYPH_PICTURE 3 +/* pixmap will be shared */ +#define CREATE_PIXMAP_USAGE_SHARED 4 typedef PixmapPtr (*CreatePixmapProcPtr) (ScreenPtr /*pScreen */ , int /*width */ , @@ -339,6 +341,16 @@ typedef void (*DeviceCursorCleanupProcPtr) (DeviceIntPtr /* pDev */ , typedef void (*ConstrainCursorHarderProcPtr) (DeviceIntPtr, ScreenPtr, int, int *, int *); + +typedef Bool (*SharePixmapBackingProcPtr)(PixmapPtr, ScreenPtr, int *); Not sure 'int' is the best type for this; I know it's sufficient for current usage, but one wonders if 64-bit identifiers, or something even more complicated will happen in the future. (void *) instead? -- keith.pack...@intel.com pgp1ByGbccDkp.pgp Description: PGP signature ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH 21/36] dix: pixmap sharing infrastructure (v2)
On Mon, Jul 2, 2012 at 8:20 PM, Keith Packard kei...@keithp.com wrote: Dave Airlie airl...@gmail.com writes: From: Dave Airlie airl...@redhat.com This is a hooks for pixmap sharing and tracking. The pixmap sharing ones get an integer handle for the pixmap and use a handle to be the backing for a pixmap. The tracker interface is to be used when a GPU needs to track pixmaps to be updated for another GPU. v2: pass slave to sharing so it can use it to work out driver. Signed-off-by: Dave Airlie airl...@redhat.com --- include/scrnintstr.h | 17 + 1 file changed, 17 insertions(+) diff --git a/include/scrnintstr.h b/include/scrnintstr.h index 6a22167..5b9f245 100644 --- a/include/scrnintstr.h +++ b/include/scrnintstr.h @@ -179,6 +179,8 @@ typedef void (*ClipNotifyProcPtr) (WindowPtr /*pWindow */ , #define CREATE_PIXMAP_USAGE_BACKING_PIXMAP 2 /* pixmap will contain a glyph */ #define CREATE_PIXMAP_USAGE_GLYPH_PICTURE 3 +/* pixmap will be shared */ +#define CREATE_PIXMAP_USAGE_SHARED 4 typedef PixmapPtr (*CreatePixmapProcPtr) (ScreenPtr /*pScreen */ , int /*width */ , @@ -339,6 +341,16 @@ typedef void (*DeviceCursorCleanupProcPtr) (DeviceIntPtr /* pDev */ , typedef void (*ConstrainCursorHarderProcPtr) (DeviceIntPtr, ScreenPtr, int, int *, int *); + +typedef Bool (*SharePixmapBackingProcPtr)(PixmapPtr, ScreenPtr, int *); Not sure 'int' is the best type for this; I know it's sufficient for current usage, but one wonders if 64-bit identifiers, or something even more complicated will happen in the future. (void *) instead? Well using fd's makes the most sense since we've implemented that in the one true kernel, and I don't want something I'd have to malloc and keep lifetimes on. though a void * that just cases an fd is probably okay. Dave. ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
Re: [PATCH 21/36] dix: pixmap sharing infrastructure (v2)
Dave Airlie airl...@gmail.com writes: On Mon, Jul 2, 2012 at 8:20 PM, Keith Packard kei...@keithp.com wrote: though a void * that just cases an fd is probably okay. That was my thinking. void * covers a lot of sins. -- keith.pack...@intel.com pgpYRB2zYjbn0.pgp Description: PGP signature ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel