KMS mode does not call I830AccelMethodInit as that does the user modesetting initialization (yes, it was misnamed), but that means that the DRI option was ignored. Create a new i830_check_dri_option function to do the option detection, then remove that from I830AccelMethodInit, which is renamed i830_user_modesetting_init to reflect what it actually does.
Signed-off-by: Keith Packard <kei...@keithp.com> --- src/i830_driver.c | 18 ++++++++++++------ 1 files changed, 12 insertions(+), 6 deletions(-) diff --git a/src/i830_driver.c b/src/i830_driver.c index cc0a1f6..ee39a1b 100644 --- a/src/i830_driver.c +++ b/src/i830_driver.c @@ -1301,12 +1301,10 @@ I830PreInitCrtcConfig(ScrnInfoPtr pScrn) xf86CrtcSetSizeRange (pScrn, 320, 200, max_width, max_height); } -static Bool -I830AccelMethodInit(ScrnInfoPtr pScrn) +static void +i830_check_dri_option(ScrnInfoPtr pScrn) { I830Ptr pI830 = I830PTR(pScrn); - int i, num_pipe; - pI830->directRenderingType = DRI_NONE; if (!xf86ReturnOptValBool(pI830->Options, OPTION_DRI, TRUE)) pI830->directRenderingType = DRI_DISABLED; @@ -1316,6 +1314,13 @@ I830AccelMethodInit(ScrnInfoPtr pScrn) "runs only at depths 16 and 24.\n"); pI830->directRenderingType = DRI_DISABLED; } +} + +static Bool +i830_user_modesetting_init(ScrnInfoPtr pScrn) +{ + I830Ptr pI830 = I830PTR(pScrn); + int i, num_pipe; I830MapMMIO(pScrn); @@ -1442,7 +1447,6 @@ I830DrmModeInit(ScrnInfoPtr pScrn) return FALSE; } - pI830->directRenderingType = DRI_NONE; pI830->have_gem = TRUE; i830_init_bufmgr(pScrn); @@ -1587,6 +1591,8 @@ I830PreInit(ScrnInfoPtr pScrn, int flags) if (!i830_detect_chipset(pScrn)) return FALSE; + i830_check_dri_option(pScrn); + if (pI830->use_drm_mode) { if (!I830DrmModeInit(pScrn)) return FALSE; @@ -1595,7 +1601,7 @@ I830PreInit(ScrnInfoPtr pScrn, int flags) xf86DrvMsg(pScrn->scrnIndex, X_WARNING, "VBIOS initialization failed.\n"); I830PreInitCrtcConfig(pScrn); - if (!I830AccelMethodInit(pScrn)) + if (!i830_user_modesetting_init(pScrn)) return FALSE; } -- 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