From ec08047a801e430ab4db002aa68e5d412bf40b7e Mon Sep 17 00:00:00 2001 From: Thomas Hellstrom Date: Tue, 12 Oct 2010 10:26:07 +0200 Subject: [PATCH] st/xorg: Don't try to use option values before processing options Signed-off-by: Thomas Hellstrom --- src/gallium/state_trackers/xorg/xorg_driver.c | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/src/gallium/state_trackers/xorg/xorg_driver.c b/src/gallium/state_trackers/xorg/xorg_driver.c index e10ff2f9508..835f06a73b1 100644 --- a/src/gallium/state_trackers/xorg/xorg_driver.c +++ b/src/gallium/state_trackers/xorg/xorg_driver.c @@ -402,19 +402,6 @@ drv_pre_init(ScrnInfoPtr pScrn, int flags) if (!drv_init_drm(pScrn)) return FALSE; - use3D = cust ? !cust->no_3d : TRUE; - ms->from_3D = xf86GetOptValBool(ms->Options, OPTION_3D_ACCEL, - &use3D) ? - X_CONFIG : X_PROBED; - - ms->no3D = !use3D; - - if (!drv_init_resource_management(pScrn)) { - xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "Could not init " - "Gallium3D or libKMS."); - return FALSE; - } - pScrn->monitor = pScrn->confScreen->monitor; pScrn->progClock = TRUE; pScrn->rgbBits = 8; @@ -449,6 +436,19 @@ drv_pre_init(ScrnInfoPtr pScrn, int flags) memcpy(ms->Options, drv_options, sizeof(drv_options)); xf86ProcessOptions(pScrn->scrnIndex, pScrn->options, ms->Options); + use3D = cust ? !cust->no_3d : TRUE; + ms->from_3D = xf86GetOptValBool(ms->Options, OPTION_3D_ACCEL, + &use3D) ? + X_CONFIG : X_PROBED; + + ms->no3D = !use3D; + + if (!drv_init_resource_management(pScrn)) { + xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "Could not init " + "Gallium3D or libKMS."); + return FALSE; + } + /* Allocate an xf86CrtcConfig */ xf86CrtcConfigInit(pScrn, &crtc_config_funcs); xf86_config = XF86_CRTC_CONFIG_PTR(pScrn); -- 2.30.2