summaryrefslogtreecommitdiff
path: root/src/smi_crtc.c
diff options
context:
space:
mode:
authorPaulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>2008-10-29 19:17:54 -0200
committerPaulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>2008-10-29 19:17:54 -0200
commitc756ed67cbcf5bdd40c300627802d8bcd3d95123 (patch)
treef225b7de7bfff2ac5292a0adde9492de2b7dee22 /src/smi_crtc.c
parent2671776999a5add36e1aeaad4080bfccedc2b1a5 (diff)
SMI501/502 cursor fixes.
Use separate buffers for crt and panel hw cursors. Describe, and workaround a problem with Dualhead and hw cursor enabled. It still has the inconvenient of having a blinking X when exiting the server or switching to a VT; maybe should also save the image currently configured also (and restore on exit), or just disable hw cursor on dual head mode. Also revert change to not initialize video on dualhead. Better to have fully functional video only on panel, that can be resized, then non resizable video..
Diffstat (limited to 'src/smi_crtc.c')
-rw-r--r--src/smi_crtc.c25
1 files changed, 21 insertions, 4 deletions
diff --git a/src/smi_crtc.c b/src/smi_crtc.c
index 9c452c9..90728f4 100644
--- a/src/smi_crtc.c
+++ b/src/smi_crtc.c
@@ -42,9 +42,12 @@ SMI_CrtcDPMS(xf86CrtcPtr crtc,
static Bool
SMI_CrtcLock (xf86CrtcPtr crtc)
{
+ ScrnInfoPtr pScrn = crtc->scrn;
+ SMIPtr pSmi = SMIPTR(pScrn);
+
ENTER();
- /* Nothing */
+ WaitIdle();
RETURN(FALSE);
}
@@ -79,8 +82,8 @@ SMI_CrtcPrepare(xf86CrtcPtr crtc)
ENTER();
- if (pSmi->HwCursor)
- xf86_hide_cursors(pScrn);
+ if (!pSmi->Dualhead && pSmi->HwCursor)
+ crtc->funcs->hide_cursor(crtc);
LEAVE();
}
@@ -93,7 +96,21 @@ SMI_CrtcCommit(xf86CrtcPtr crtc)
ENTER();
- if(pSmi->HwCursor)
+ /* Problem:
+ * When starting in Dualhead mode, both hw cursors will be shown,
+ * and at the same position, as both are at the same address.
+ * When reconfiguring with something like:
+ * $ xrandr --output VGA --right-of LVDS
+ * what will happen is basically:
+ * hide_cursor(panel)
+ * hide_cursor(crt)
+ * <set-crt-mode-and-modify-mapped-address>
+ * show_cursor(panel) <- besides a sw argb cursor is being used...
+ *
+ * It should not be a problem if argb cursors were supported,
+ * or only one output is available...
+ */
+ if (!pSmi->Dualhead && pSmi->HwCursor)
xf86_reload_cursors(pScrn->pScreen);
LEAVE();