diff options
author | Xiang, Haihao <haihao.xiang@intel.com> | 2008-09-16 13:21:43 -0700 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2008-09-16 13:21:43 -0700 |
commit | 62b75df84c893bf28e20014cf88ce45064611dc9 (patch) | |
tree | a4fedc780f67db8fc34366cfdfaeb5d5e911d085 /src/i830_driver.c | |
parent | 188d58dac9a87b56dbc34ec219cd196928bbcf64 (diff) |
Move bufmgr init earlier so it's available at I830DRIDoMappings time.
Fixes a crash with non-GEM mode. Bug #17540.
Diffstat (limited to 'src/i830_driver.c')
-rw-r--r-- | src/i830_driver.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/src/i830_driver.c b/src/i830_driver.c index 5e505cf2..9bf0a64f 100644 --- a/src/i830_driver.c +++ b/src/i830_driver.c @@ -3254,6 +3254,14 @@ I830ScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv) } #endif + if (!pI830->use_drm_mode) { + DPRINTF(PFX, "assert( if(!I830MapMem(pScrn)) )\n"); + if (!I830MapMem(pScrn)) + return FALSE; + pScrn->memPhysBase = (unsigned long)pI830->FbBase; + } + i830_init_bufmgr(pScrn); + #ifdef XF86DRI /* * Setup DRI after visuals have been established, but before fbScreenInit @@ -3287,13 +3295,6 @@ I830ScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv) pI830->allowPageFlip ? "en" : "dis"); #endif - if (!pI830->use_drm_mode) { - DPRINTF(PFX, "assert( if(!I830MapMem(pScrn)) )\n"); - if (!I830MapMem(pScrn)) - return FALSE; - pScrn->memPhysBase = (unsigned long)pI830->FbBase; - } - if (I830IsPrimary(pScrn)) { pScrn->fbOffset = pI830->front_buffer->offset; } else { @@ -3311,8 +3312,6 @@ I830ScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv) return FALSE; } - i830_init_bufmgr(pScrn); - i830_disable_render_standby(pScrn); DPRINTF(PFX, "assert( if(!I830EnterVT(scrnIndex, 0)) )\n"); |