summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJon Nettleton <jon.nettleton@gmail.com>2009-01-04 13:09:54 +0000
committerJon Nettleton <jon.nettleton@gmail.com>2009-01-04 13:09:54 +0000
commit5a4a6dc0a27d43adc819981ecaa061548eaad0b9 (patch)
tree4405fd0fd7ba152ac29860c17f905fedc568c61c
parent3989402c74b79f9d792f180b272a855fdda143df (diff)
fixup the chipset settings
-rw-r--r--ChangeLog10
-rw-r--r--src/via_cursor.c38
-rw-r--r--src/via_driver.c1
3 files changed, 28 insertions, 21 deletions
diff --git a/ChangeLog b/ChangeLog
index bba23e9..a9ff79b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2009-01-05 Jon Nettleton <jon.nettleton@gmail.com>
+
+ * src/via_cursor.c: (viaHWCursorInit), (viaUseHWCursorARGB),
+ (viaUseHWCursor):
+ * src/via_driver.c: (VIAScreenInit):
+
+ Missed a couple of changes for the chipset specific
+ cursors. Moved chipset detection to HWInit. Removed
+ some extraneous debugging.
+
2009-01-04 Jon Nettleton <jon.nettleton@gmail.com>
* src/via_cursor.c: (viaHWCursorInit), (viaCursorSetFB),
diff --git a/src/via_cursor.c b/src/via_cursor.c
index aeb2b32..39adbc6 100644
--- a/src/via_cursor.c
+++ b/src/via_cursor.c
@@ -62,13 +62,29 @@ viaHWCursorInit(ScreenPtr pScreen)
VIAPtr pVia = VIAPTR(pScrn);
xf86CursorInfoPtr infoPtr;
+ switch (pVia->Chipset) {
+ case VIA_CLE266:
+ case VIA_KM400:
+ pVia->CursorARGBSupported = FALSE;
+ pVia->CursorMaxWidth = 32;
+ pVia->CursorMaxHeight = 32;
+ pVia->CursorSize = ((pVia->CursorMaxWidth * (pVia->CursorMaxHeight + 1)) / 8) * 2;
+ break;
+ default:
+ pVia->CursorARGBSupported = TRUE;
+ pVia->CursorMaxWidth = 64;
+ pVia->CursorMaxHeight = 64;
+ pVia->CursorSize = pVia->CursorMaxWidth * (pVia->CursorMaxHeight + 1) * 4;
+ break;
+ }
+
if (pVia->NoAccel)
viaCursorSetFB(pScrn);
pVia->cursorMap = pVia->FBBase + pVia->CursorStart;
if (pVia->cursorMap == NULL)
- return FALSE;
+ return FALSE;
pVia->cursorOffset = pScrn->fbOffset + pVia->CursorStart;
memset(pVia->cursorMap, 0x00, pVia->CursorSize);
@@ -337,8 +353,6 @@ viaUseHWCursorARGB(ScreenPtr pScreen, CursorPtr pCurs)
ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
VIAPtr pVia = VIAPTR(pScrn);
- DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, "viaCursorARGBUse\n"));
-
return (pVia->hwcursor
&& pVia->CursorARGBSupported
&& pCurs->bits->width <= pVia->CursorMaxWidth
@@ -351,24 +365,6 @@ viaUseHWCursor(ScreenPtr pScreen, CursorPtr pCurs)
ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
VIAPtr pVia = VIAPTR(pScrn);
- DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO, "viaUseHWCursor\n"));
-
- switch (pVia->Chipset) {
- case VIA_CLE266:
- case VIA_KM400:
- pVia->CursorARGBSupported = FALSE;
- pVia->CursorMaxWidth = 32;
- pVia->CursorMaxHeight = 32;
- pVia->CursorSize = ((pVia->CursorMaxWidth * (pVia->CursorMaxHeight + 1)) / 8) * 2;
- break;
- default:
- pVia->CursorARGBSupported = TRUE;
- pVia->CursorMaxWidth = 64;
- pVia->CursorMaxHeight = 64;
- pVia->CursorSize = pVia->CursorMaxWidth * (pVia->CursorMaxHeight + 1) * 4;
- break;
- }
-
return (pVia->hwcursor
/* Can't enable HW cursor on both CRTCs at the same time. */
&& !(pVia->pBIOSInfo->FirstCRTC->IsActive
diff --git a/src/via_driver.c b/src/via_driver.c
index eaafbbe..8a20c72 100644
--- a/src/via_driver.c
+++ b/src/via_driver.c
@@ -2775,6 +2775,7 @@ VIAScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
if (pVia->hwcursor) {
if (!viaHWCursorInit(pScreen)) {
+ pVia->hwcursor = FALSE;
xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
"Hardware cursor initialization failed\n");
}