summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJeremy White <jwhite@codeweavers.com>2012-06-13 17:04:12 -0500
committerAlon Levy <alevy@redhat.com>2012-06-17 12:10:07 +0300
commite0f301fc0512502542573b3f8dd9452f5a7ea6e1 (patch)
tree8d4eb381756af751de0d22038e16c447382cca18 /src
parent6832c0fd917556c52f56f8e82706a83942ed3dc1 (diff)
Compute totalPixmapSize using the same logic as in dix/pixmap.c, rather than hard coding 100.
This was found while building with a modified X server; one with a PixmapRec size of 224, not 64 :-/.
Diffstat (limited to 'src')
-rw-r--r--src/qxl_driver.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/qxl_driver.c b/src/qxl_driver.c
index 54bbd4a..a6d7636 100644
--- a/src/qxl_driver.c
+++ b/src/qxl_driver.c
@@ -1138,8 +1138,6 @@ qxl_screen_init(SCREEN_INIT_ARGS_DECL)
ErrorF ("allocated %d x %d %p\n", pScrn->virtualX, pScrn->virtualY, qxl->fb);
#endif
- pScreen->totalPixmapSize = 100;
-
pScrn->virtualX = pScrn->currentMode->HDisplay;
pScrn->virtualY = pScrn->currentMode->VDisplay;
@@ -1198,6 +1196,10 @@ qxl_screen_init(SCREEN_INIT_ARGS_DECL)
DamageSetup(pScreen);
+ /* We need to set totalPixmapSize after setup_uxa and Damage,
+ as the privatessize is not computed correctly until then */
+ pScreen->totalPixmapSize = BitmapBytePad((sizeof(PixmapRec) + dixPrivatesSize(PRIVATE_PIXMAP) ) * 8);
+
miDCInitialize(pScreen, xf86GetPointerScreenFuncs());
if (!miCreateDefColormap(pScreen))
goto out;