diff options
author | Benno Schulenberg <bensberg@justemail.net> | 2008-02-19 21:25:42 +0000 |
---|---|---|
committer | Benno Schulenberg <bensberg@justemail.net> | 2008-02-19 21:25:42 +0000 |
commit | 4987810d18aa79c7ea2123729b53fc9f4e1a6047 (patch) | |
tree | e2298f0cb0cdeec511a5b409b911265fed3dab93 | |
parent | a12de648a7e539ab351df77e0e254058dcf26f56 (diff) |
Dealing with NoAccel before Rotate, since the latter overrides the first.
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | src/via_driver.c | 47 |
2 files changed, 30 insertions, 24 deletions
diff --git a/ChangeLog b/ChangeLog index 04b844576bcf..804719d02f47 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2008-02-19 Benno Schulenberg <bensberg-at-justemail-dot-net> + + * src/via_driver.c: (VIAPreInit): + + Dealing with the NoAccel option before the Rotate option, since + the latter overrides the first. + 2008-01-28 Benno Schulenberg <bensberg-at-justemail-dot-net> * src/Makefile.am: diff --git a/src/via_driver.c b/src/via_driver.c index db790afb77e5..8093a86f9ce0 100644 --- a/src/via_driver.c +++ b/src/via_driver.c @@ -1019,26 +1019,37 @@ VIAPreInit(ScrnInfoPtr pScrn, int flags) xf86DrvMsg(pScrn->scrnIndex, X_CONFIG, "Setting amount of VideoRAM to %d kB\n", pScrn->videoRam); - //pVia->shadowFB = FALSE; - from = xf86GetOptValBool(VIAOptions, OPTION_SHADOW_FB, &pVia->shadowFB) ? - X_CONFIG : X_DEFAULT; - xf86DrvMsg(pScrn->scrnIndex, from, "ShadowFB is %s.\n", + from = (xf86GetOptValBool(VIAOptions, OPTION_SHADOW_FB, &pVia->shadowFB) + ? X_CONFIG : X_DEFAULT); + xf86DrvMsg(pScrn->scrnIndex, from, "Shadow framebuffer is %s.\n", pVia->shadowFB ? "enabled" : "disabled"); + /* Use hardware acceleration, unless on shadow framebuffer. */ + from = (xf86GetOptValBool(VIAOptions, OPTION_NOACCEL, &pVia->NoAccel) + ? X_CONFIG : X_DEFAULT); + if (!pVia->NoAccel && pVia->shadowFB) { + xf86DrvMsg(pScrn->scrnIndex, X_WARNING, "Acceleration is " + "not supported when using shadow framebuffer.\n"); + pVia->NoAccel = TRUE; + from = X_DEFAULT; + } + xf86DrvMsg(pScrn->scrnIndex, from, "Hardware acceleration is %s.\n", + !pVia->NoAccel ? "enabled" : "disabled"); + + /* When rotating, switch shadow framebuffer on and acceleration off. */ if ((s = xf86GetOptValString(VIAOptions, OPTION_ROTATE))) { if (!xf86NameCmp(s, "CW")) { - /* accel is disabled below for shadowFB */ pVia->shadowFB = TRUE; + pVia->NoAccel = TRUE; pVia->rotate = 1; - pVia->hwcursor = FALSE; - xf86DrvMsg(pScrn->scrnIndex, X_CONFIG, - "Rotating screen clockwise - acceleration disabled.\n"); + xf86DrvMsg(pScrn->scrnIndex, X_CONFIG, "Rotating screen " + "clockwise -- acceleration is disabled.\n"); } else if(!xf86NameCmp(s, "CCW")) { pVia->shadowFB = TRUE; + pVia->NoAccel = TRUE; pVia->rotate = -1; - pVia->hwcursor = FALSE; - xf86DrvMsg(pScrn->scrnIndex, X_CONFIG, "Rotating screen" - "counterclockwise - acceleration disabled.\n"); + xf86DrvMsg(pScrn->scrnIndex, X_CONFIG, "Rotating screen " + "counterclockwise -- acceleration is disabled.\n"); } else { xf86DrvMsg(pScrn->scrnIndex, X_CONFIG, "\"%s\" is not a valid" "value for Option \"Rotate\".\n", s); @@ -1047,18 +1058,6 @@ VIAPreInit(ScrnInfoPtr pScrn, int flags) } } - //pVia->NoAccel = FALSE; - from = xf86GetOptValBool(VIAOptions, OPTION_NOACCEL, &pVia->NoAccel) ? - X_CONFIG : X_DEFAULT; - xf86DrvMsg(pScrn->scrnIndex, from, "Acceleration is %s.\n", - !pVia->NoAccel ? "enabled" : "disabled"); - - if (pVia->shadowFB && !pVia->NoAccel) { - xf86DrvMsg(pScrn->scrnIndex, X_WARNING, - "HW acceleration not supported with \"shadowFB\".\n"); - pVia->NoAccel = TRUE; - } - #ifdef VIA_HAVE_EXA if(!pVia->NoAccel) { from = X_DEFAULT; @@ -1095,7 +1094,7 @@ VIAPreInit(ScrnInfoPtr pScrn, int flags) } #endif /* VIA_HAVE_EXA */ - /* Whether to use a software cursor or the default hardware cursor. */ + /* Use a hardware cursor, unless on secondary or on shadow framebuffer. */ from = X_DEFAULT; if (pVia->IsSecondary || pVia->shadowFB) pVia->hwcursor = FALSE; |