summaryrefslogtreecommitdiff
path: root/fb
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2011-03-17 23:48:52 -0700
committerKeith Packard <keithp@keithp.com>2011-03-17 23:48:52 -0700
commitd5b16b037b8fe12ba85c68c8289b6a8cc5e3a09d (patch)
tree38b4d32afa0143d36d1d1eaeb5fc393dcf9654ea /fb
parentdc9ce695a69ca0787f58f8d160212a7a41acb703 (diff)
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 <airlied@gmail.com> Reviewed-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'fb')
-rw-r--r--fb/fb.h4
-rw-r--r--fb/fb24_32.c2
-rw-r--r--fb/fbpixmap.c10
3 files changed, 9 insertions, 7 deletions
diff --git a/fb/fb.h b/fb/fb.h
index d90521907..021a940d0 100644
--- a/fb/fb.h
+++ b/fb/fb.h
@@ -1625,11 +1625,11 @@ fbPictureInit (ScreenPtr pScreen,
extern _X_EXPORT PixmapPtr
fbCreatePixmapBpp (ScreenPtr pScreen, int width, int height, int depth, int bpp,
- unsigned class);
+ unsigned usage_hint);
extern _X_EXPORT PixmapPtr
fbCreatePixmap (ScreenPtr pScreen, int width, int height, int depth,
- unsigned class);
+ unsigned usage_hint);
extern _X_EXPORT Bool
fbDestroyPixmap (PixmapPtr pPixmap);
diff --git a/fb/fb24_32.c b/fb/fb24_32.c
index e24f394bc..2e600edc0 100644
--- a/fb/fb24_32.c
+++ b/fb/fb24_32.c
@@ -546,7 +546,7 @@ fb24_32ReformatTile(PixmapPtr pOldTile, int bitsPerPixel)
pNewTile = pScreen->CreatePixmap(pScreen, pOldTile->drawable.width,
pOldTile->drawable.height,
pOldTile->drawable.depth,
- pOldTile->drawable.class);
+ pOldTile->usage_hint);
if (!pNewTile)
return 0;
fbGetDrawable (&pOldTile->drawable,
diff --git a/fb/fbpixmap.c b/fb/fbpixmap.c
index 232de82a9..41b12cea7 100644
--- a/fb/fbpixmap.c
+++ b/fb/fbpixmap.c
@@ -30,7 +30,7 @@
PixmapPtr
fbCreatePixmapBpp (ScreenPtr pScreen, int width, int height, int depth, int bpp,
- unsigned class)
+ unsigned usage_hint)
{
PixmapPtr pPixmap;
size_t datasize;
@@ -54,7 +54,7 @@ fbCreatePixmapBpp (ScreenPtr pScreen, int width, int height, int depth, int bpp,
if (!pPixmap)
return NullPixmap;
pPixmap->drawable.type = DRAWABLE_PIXMAP;
- pPixmap->drawable.class = class;
+ pPixmap->drawable.class = 0;
pPixmap->drawable.pScreen = pScreen;
pPixmap->drawable.depth = depth;
pPixmap->drawable.bitsPerPixel = bpp;
@@ -78,12 +78,14 @@ fbCreatePixmapBpp (ScreenPtr pScreen, int width, int height, int depth, int bpp,
pPixmap->screen_y = 0;
#endif
+ pPixmap->usage_hint = usage_hint;
+
return pPixmap;
}
PixmapPtr
fbCreatePixmap (ScreenPtr pScreen, int width, int height, int depth,
- unsigned class)
+ unsigned usage_hint)
{
int bpp;
bpp = BitsPerPixel (depth);
@@ -91,7 +93,7 @@ fbCreatePixmap (ScreenPtr pScreen, int width, int height, int depth,
if (bpp == 32 && depth <= 24)
bpp = fbGetScreenPrivate(pScreen)->pix32bpp;
#endif
- return fbCreatePixmapBpp (pScreen, width, height, depth, bpp, class);
+ return fbCreatePixmapBpp (pScreen, width, height, depth, bpp, usage_hint);
}
Bool