[PATCH] xf86-video-geode: change cursor size to match cimarron

Andres Salomon dilinger at queued.net
Wed Nov 26 14:56:14 PST 2008


When we use ARGB cursors and rotate the screen, we get double cursors
and stale cursor data left over.  This is because cimarron expects a
cursor that is smaller than or equal to 48x64, but hardcodes a memory
shift of 192 bytes (4*48).  This means that if we have a 32x64 cursor,
cimarron screws it up.

This begs the question of what size cursor we *actually* want.  According
to the data sheet, we support 64x64.  Cimarron claims that we should
have 48x64, with anything smaller being surrounded by transparency.  The
previous driver was size 32x32.

For now, change the cursor size to 48x64 and leave cimarron alone.

Signed-off-by: Andres Salomon <dilinger at debian.org>
---
 src/geode.h     |    2 +-
 src/lx_memory.c |    3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/geode.h b/src/geode.h
index 37bee2e..755cb5e 100644
--- a/src/geode.h
+++ b/src/geode.h
@@ -92,7 +92,7 @@
 
 #define DEFAULT_EXA_SCRATCH_BFRSZ 0x40000
 
-#define LX_CURSOR_MAX_WIDTH  32
+#define LX_CURSOR_MAX_WIDTH  48
 #define LX_CURSOR_MAX_HEIGHT 64
 
 /* FIXME: Get rid of this from GX */
diff --git a/src/lx_memory.c b/src/lx_memory.c
index 41adba5..92fa3fb 100644
--- a/src/lx_memory.c
+++ b/src/lx_memory.c
@@ -284,7 +284,8 @@ LXInitOffscreen(ScrnInfoPtr pScrni)
 	    pScrni->virtualY * LX_CB_PITCH);
 
     if (pGeode->HWCursor)
-	xf86DrvMsg(pScrni->scrnIndex, X_INFO, " Cursor: 0x400 bytes\n");
+	xf86DrvMsg(pScrni->scrnIndex, X_INFO, " Cursor: 0x%x bytes\n",
+	    LX_CURSOR_MAX_WIDTH * 4 * LX_CURSOR_MAX_HEIGHT);
 
     if (pGeode->pExa->offScreenBase)
 	xf86DrvMsg(pScrni->scrnIndex, X_INFO, " EXA: 0x%x bytes\n",
-- 
1.5.6.5




More information about the xorg mailing list