summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXiang, Haihao <haihao.xiang@intel.com>2008-09-16 13:21:43 -0700
committerEric Anholt <eric@anholt.net>2008-09-16 21:30:03 -0700
commit043b6e71b83eb05339a6f8c4814e6941f8b9695a (patch)
tree6e5984c5f3911660d9257924c13c756090af0971
parent0a2d17f7c2ea9b695df1855aab4ccc519546d8e5 (diff)
Move bufmgr init earlier so it's available at I830DRIDoMappings time.
Fixes a crash with non-GEM mode. Bug #17540. (cherry picked from commit 62b75df84c893bf28e20014cf88ce45064611dc9)
-rw-r--r--src/i830_driver.c17
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");