KMS mode does not call I830AccelMethodInit as that does a ton of random
device initialization, but that means that the NoAccel and DRI options
were ignored. Split out the option parsing from I830AccelMethodInit and
have both KMS and UMS invoke it.

Signed-off-by: Keith Packard <kei...@keithp.com>
---
 src/i830_driver.c |   16 +++++++++++++---
 1 files changed, 13 insertions(+), 3 deletions(-)

diff --git a/src/i830_driver.c b/src/i830_driver.c
index 8986368..b92c081 100644
--- a/src/i830_driver.c
+++ b/src/i830_driver.c
@@ -1354,15 +1354,15 @@ I830PreInitCrtcConfig(ScrnInfoPtr pScrn)
     xf86CrtcSetSizeRange (pScrn, 320, 200, max_width, max_height);
 }
 
-static Bool
-I830AccelMethodInit(ScrnInfoPtr pScrn)
+static void
+I830AccelMethodSelect(ScrnInfoPtr pScrn)
 {
     I830Ptr pI830 = I830PTR(pScrn);
     MessageType from = X_PROBED;
-    int i, num_pipe;
 
     if (xf86ReturnOptValBool(pI830->Options, OPTION_NOACCEL, FALSE)) {
        pI830->accel = ACCEL_NONE;
+       xf86DrvMsg(pScrn->scrnIndex, from, "Acceleration disabled\n");
     } else {
        pI830->accel = ACCEL_UXA;
        xf86DrvMsg(pScrn->scrnIndex, from, "Using %s for acceleration\n",
@@ -1382,6 +1382,15 @@ I830AccelMethodInit(ScrnInfoPtr pScrn)
                "runs only at depths 16 and 24.\n");
        pI830->directRenderingType = DRI_DISABLED;
     }
+}
+
+static Bool
+I830AccelMethodInit(ScrnInfoPtr pScrn)
+{
+    I830Ptr pI830 = I830PTR(pScrn);
+    int i, num_pipe;
+
+    I830AccelMethodSelect(pScrn);
 
     I830MapMMIO(pScrn);
 
@@ -1657,6 +1666,7 @@ I830PreInit(ScrnInfoPtr pScrn, int flags)
    if (pI830->use_drm_mode) {
        if (!I830DrmModeInit(pScrn))
           return FALSE;
+       I830AccelMethodSelect(pScrn);
    } else {
        if (i830_bios_init(pScrn))
           xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
-- 
1.6.3.3


------------------------------------------------------------------------------
Enter the BlackBerry Developer Challenge  
This is your chance to win up to $100,000 in prizes! For a limited time, 
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize  
details at: http://p.sf.net/sfu/Challenge
--
_______________________________________________
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel

Reply via email to