summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichel Dänzer <michel@tungstengraphics.com>2007-03-05 10:22:07 +0100
committerMichel Dänzer <michel@tungstengraphics.com>2007-03-05 10:22:07 +0100
commit50ba1fff886a7f51b178ac6d3a1ba79a3014b214 (patch)
tree1a5417b4eaf53d7c6144daa2dbfa8080eab3ec0d
parent36cad3fcb65e3dcd88e58e301cd60adb121cb96b (diff)
Be more verbose when page flipping can't be enabled for various reasons.
-rw-r--r--src/i830_dri.c2
-rw-r--r--src/i830_driver.c21
-rw-r--r--src/i830_memory.c19
3 files changed, 31 insertions, 11 deletions
diff --git a/src/i830_dri.c b/src/i830_dri.c
index e5460668..dba1a07a 100644
--- a/src/i830_dri.c
+++ b/src/i830_dri.c
@@ -1146,7 +1146,7 @@ I830DRISwapContext(ScreenPtr pScreen, DRISyncType syncType,
if (pI830->pDamage == NULL) {
xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
"No screen damage record, page flipping disabled\n");
- pI830->allowPageFlip = 0;
+ pI830->allowPageFlip = FALSE;
} else {
DamageRegister(&pPix->drawable, pI830->pDamage);
diff --git a/src/i830_driver.c b/src/i830_driver.c
index 9bd70299..c9501497 100644
--- a/src/i830_driver.c
+++ b/src/i830_driver.c
@@ -853,7 +853,6 @@ I830PreInit(ScrnInfoPtr pScrn, int flags)
int i;
char *s;
pointer pVBEModule = NULL;
- Bool enable;
const char *chipname;
int num_pipe;
int max_width, max_height;
@@ -1479,14 +1478,14 @@ I830PreInit(ScrnInfoPtr pScrn, int flags)
pI830->colorKey);
#endif
- pI830->allowPageFlip = FALSE;
- enable = xf86ReturnOptValBool(pI830->Options, OPTION_PAGEFLIP, FALSE);
#ifdef XF86DRI
- if (!pI830->directRenderingDisabled) {
- pI830->allowPageFlip = enable;
- xf86DrvMsg(pScrn->scrnIndex, X_CONFIG, "page flipping %s\n",
- enable ? "enabled" : "disabled");
- }
+ pI830->allowPageFlip = FALSE;
+ from = (!pI830->directRenderingDisabled &&
+ xf86GetOptValBool(pI830->Options, OPTION_PAGEFLIP,
+ &pI830->allowPageFlip)) ? X_CONFIG : X_DEFAULT;
+
+ xf86DrvMsg(pScrn->scrnIndex, from, "Will%s try to enable page flipping\n",
+ pI830->allowPageFlip ? "" : " not");
#endif
#ifdef XF86DRI
@@ -1676,6 +1675,9 @@ I830PreInit(ScrnInfoPtr pScrn, int flags)
-pI830->MemoryAperture.Size / 1024);
}
pScrn->displayWidth = savedDisplayWidth;
+ if (pI830->allowPageFlip)
+ xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
+ "Can't enable page flipping due to the above\n");
pI830->allowPageFlip = FALSE;
} else if (pScrn->displayWidth != savedDisplayWidth) {
xf86DrvMsg(pScrn->scrnIndex, X_INFO,
@@ -2682,6 +2684,9 @@ I830ScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
I830SetupMemoryTiling(pScrn);
pI830->directRenderingEnabled = I830DRIDoMappings(pScreen);
}
+
+ xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Page Flipping %sabled\n",
+ pI830->allowPageFlip ? "en" : "dis");
#endif
DPRINTF(PFX, "assert( if(!I830MapMem(pScrn)) )\n");
diff --git a/src/i830_memory.c b/src/i830_memory.c
index 2d1cca9c..a952b708 100644
--- a/src/i830_memory.c
+++ b/src/i830_memory.c
@@ -1762,6 +1762,9 @@ I830SetupMemoryTiling(ScrnInfoPtr pScrn)
xf86DrvMsg(pScrn->scrnIndex, X_INFO,
"I830SetupMemoryTiling: Not tileable 0x%x\n",
pScrn->displayWidth * pI830->cpp);
+ if (pI830->allowPageFlip)
+ xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
+ "Can't enable page flipping due to the above\n");
pI830->allowPageFlip = FALSE;
return;
}
@@ -1778,14 +1781,20 @@ I830SetupMemoryTiling(ScrnInfoPtr pScrn)
"Activating tiled memory for the front buffer\n");
pI830->front_tiled = FENCE_XMAJOR;
} else {
- pI830->allowPageFlip = FALSE;
xf86DrvMsg(pScrn->scrnIndex, X_INFO,
"MakeTiles failed for the front buffer\n");
+ if (pI830->allowPageFlip)
+ xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
+ "Can't enable page flipping due to the above\n");
+ pI830->allowPageFlip = FALSE;
}
} else {
- pI830->allowPageFlip = FALSE;
xf86DrvMsg(pScrn->scrnIndex, X_INFO,
"Alignment bad for the front buffer\n");
+ if (pI830->allowPageFlip)
+ xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
+ "Can't enable page flipping due to the above\n");
+ pI830->allowPageFlip = FALSE;
}
}
@@ -1803,6 +1812,9 @@ I830SetupMemoryTiling(ScrnInfoPtr pScrn)
} else {
xf86DrvMsg(pScrn->scrnIndex, X_INFO,
"MakeTiles failed for the back buffer.\n");
+ if (pI830->allowPageFlip)
+ xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
+ "Can't enable page flipping due to the above\n");
pI830->allowPageFlip = FALSE;
}
}
@@ -1815,6 +1827,9 @@ I830SetupMemoryTiling(ScrnInfoPtr pScrn)
} else {
xf86DrvMsg(pScrn->scrnIndex, X_INFO,
"MakeTiles failed for the third buffer.\n");
+ if (pI830->allowPageFlip)
+ xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
+ "Can't enable page flipping due to the above\n");
pI830->allowPageFlip = FALSE;
}
}