summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>2008-10-30 19:01:54 -0200
committerPaulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>2008-10-30 19:01:54 -0200
commit5acf7e22c256637ba7139733cdba1c59557dd7ff (patch)
tree10dd68252927f19a0dac084d8215dc891ff67066
parentc756ed67cbcf5bdd40c300627802d8bcd3d95123 (diff)
Disable HW cursor in dualhead mode in smi 501/502
Other chipsets are doing the same. But this apparently is to circumvent a problem in randr/cursor implementation, that appears to not work very well with hardware that supports two hw cursors, but not argb cursors.
-rw-r--r--src/smi_crtc.c4
-rw-r--r--src/smi_driver.c22
2 files changed, 20 insertions, 6 deletions
diff --git a/src/smi_crtc.c b/src/smi_crtc.c
index 90728f4..8ca5ec5 100644
--- a/src/smi_crtc.c
+++ b/src/smi_crtc.c
@@ -82,7 +82,7 @@ SMI_CrtcPrepare(xf86CrtcPtr crtc)
ENTER();
- if (!pSmi->Dualhead && pSmi->HwCursor)
+ if (pSmi->HwCursor)
crtc->funcs->hide_cursor(crtc);
LEAVE();
@@ -110,7 +110,7 @@ SMI_CrtcCommit(xf86CrtcPtr crtc)
* It should not be a problem if argb cursors were supported,
* or only one output is available...
*/
- if (!pSmi->Dualhead && pSmi->HwCursor)
+ if (pSmi->HwCursor)
xf86_reload_cursors(pScrn->pScreen);
LEAVE();
diff --git a/src/smi_driver.c b/src/smi_driver.c
index 9e80cd1..b3dff95 100644
--- a/src/smi_driver.c
+++ b/src/smi_driver.c
@@ -822,9 +822,23 @@ SMI_PreInit(ScrnInfoPtr pScrn, int flags)
pSmi->lcd = TRUE;
if (pSmi->Dualhead && pSmi->UseFBDev) {
xf86DrvMsg(pScrn->scrnIndex, X_INFO,
- "Dual head disabled when using fbdev mode\n");
+ "Dual head disabled in fbdev mode\n");
pSmi->Dualhead = FALSE;
}
+ /* FIXME Randr cursor code only works properly when argb cursors
+ * are also supported.
+ * FIXME This probably is a randr cursor bug, and since access to
+ * hw/xfree86/ramdac/xf86CursorPriv.h:xf86CursorScreenRec.SWCursor
+ * field is not available, one cannot easily workaround the problem,
+ * so, just disable it...
+ * TODO Check with a X Server newer then 1.4.0.90 (that is being
+ * used in the 502 OEM image).
+ * */
+ if (pSmi->Dualhead && pSmi->HwCursor) {
+ xf86DrvMsg(pScrn->scrnIndex, X_INFO,
+ "HW Cursor disabled in dual head mode\n");
+ pSmi->HwCursor = FALSE;
+ }
}
else if (SMI_LYNXM_SERIES(pSmi->Chipset)) {
/* tweak options for dualhead */
@@ -1492,9 +1506,6 @@ SMI_MapMem(ScrnInfoPtr pScrn)
"Logical frame buffer at %p - %p\n", pSmi->FBBase,
pSmi->FBBase + pSmi->videoRAMBytes - 1);
- xf86DrvMsg(pScrn->scrnIndex, X_INFO,
- "Cursor Offset: %08lX\n", (unsigned long)pSmi->FBCursorOffset);
-
if (IS_MSOC(pSmi))
/* Reserve space for panel cursr, and crt if in dual head mode */
pSmi->FBReserved = pSmi->FBCursorOffset = pSmi->videoRAMBytes -
@@ -1518,6 +1529,9 @@ SMI_MapMem(ScrnInfoPtr pScrn)
else
pSmi->FBReserved = pSmi->videoRAMBytes - 2048;
+ xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Cursor Offset: %08lX\n",
+ (unsigned long)pSmi->FBCursorOffset);
+
/* Assign hwp->MemBase & IOBase here */
hwp = VGAHWPTR(pScrn);
if (pSmi->IOBase != NULL)