diff options
author | Keith Packard <keithp@keithp.com> | 2009-07-08 11:47:25 -0700 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2009-07-10 18:26:59 -0700 |
commit | 98087a0b966d5dc69faf72719153a2c878ba3de1 (patch) | |
tree | 991dc0ddbba802a29a97b26ea31d8c8e1e55feba | |
parent | d655a3ff423e69c19a5dc07140cbf3caaa32cb86 (diff) | |
download | xf86-video-intel-98087a0b966d5dc69faf72719153a2c878ba3de1.tar.gz xf86-video-intel-98087a0b966d5dc69faf72719153a2c878ba3de1.tar.bz2 xf86-video-intel-98087a0b966d5dc69faf72719153a2c878ba3de1.zip |
Make xorg.conf DRI option work under KMS. Fix name of I830AccelMethodInit
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 <keithp@keithp.com>
-rw-r--r-- | 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 cc0a1f65f..ee39a1b9f 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; } |