From d5b16b037b8fe12ba85c68c8289b6a8cc5e3a09d Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Thu, 17 Mar 2011 23:48:52 -0700 Subject: Revert "dix: Remove usage_hint from pixmaps, store it in ->drawable.class" This reverts commit 1564c82417d201de5b9a5ec5e7aa4ef14c45fbad. The drivers used the top bits of the usage_hint to store driver private flags (intel, radeon, nouveau). With EXA we need to get at this data so if we migrate the pixmap we can create the correct type of pixmap in the driver, however this commit truncates the usage_hint into 8-bit class and loses all the good stuff. Signed-off-by: Dave Airlie Reviewed-by: Keith Packard --- hw/xnest/Pixmap.c | 5 +++-- hw/xnest/XNPixmap.h | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'hw/xnest') diff --git a/hw/xnest/Pixmap.c b/hw/xnest/Pixmap.c index c901db19f..3a92ffde8 100644 --- a/hw/xnest/Pixmap.c +++ b/hw/xnest/Pixmap.c @@ -37,7 +37,7 @@ DevPrivateKeyRec xnestPixmapPrivateKeyRec; PixmapPtr xnestCreatePixmap(ScreenPtr pScreen, int width, int height, int depth, - unsigned class) + unsigned usage_hint) { PixmapPtr pPixmap; @@ -45,7 +45,7 @@ xnestCreatePixmap(ScreenPtr pScreen, int width, int height, int depth, if (!pPixmap) return NullPixmap; pPixmap->drawable.type = DRAWABLE_PIXMAP; - pPixmap->drawable.class = class; + pPixmap->drawable.class = 0; pPixmap->drawable.depth = depth; pPixmap->drawable.bitsPerPixel = depth; pPixmap->drawable.id = 0; @@ -57,6 +57,7 @@ xnestCreatePixmap(ScreenPtr pScreen, int width, int height, int depth, pPixmap->drawable.serialNumber = NEXT_SERIAL_NUMBER; pPixmap->refcnt = 1; pPixmap->devKind = PixmapBytePad(width, depth); + pPixmap->usage_hint = usage_hint; if (width && height) xnestPixmapPriv(pPixmap)->pixmap = XCreatePixmap(xnestDisplay, diff --git a/hw/xnest/XNPixmap.h b/hw/xnest/XNPixmap.h index 638a43a1a..aa671ed1f 100644 --- a/hw/xnest/XNPixmap.h +++ b/hw/xnest/XNPixmap.h @@ -30,7 +30,7 @@ typedef struct { #define xnestSharePixmap(pPixmap) ((pPixmap)->refcnt++) PixmapPtr xnestCreatePixmap(ScreenPtr pScreen, int width, int height, - int depth, unsigned class); + int depth, unsigned usage_hint); Bool xnestDestroyPixmap(PixmapPtr pPixmap); RegionPtr xnestPixmapToRegion(PixmapPtr pPixmap); -- cgit v1.2.3