diff options
author | Eric Anholt <eric@anholt.net> | 2010-03-04 09:31:15 -0800 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2010-03-04 10:13:34 -0800 |
commit | faecd155c49229499e29815eb6e79662ed33ddd5 (patch) | |
tree | ac83d6d2d29b3e59eb63e1558d282210f4e498e5 /src/i830_driver.c | |
parent | 74e2b69a317cc728b00e675c18d2976987407aec (diff) |
Move batch and 965 render state setup/teardown to screen init/close.
Whether we're VT switched or not shouldn't impact rendering.
Diffstat (limited to 'src/i830_driver.c')
-rw-r--r-- | src/i830_driver.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/i830_driver.c b/src/i830_driver.c index 99db7c6e..c65de286 100644 --- a/src/i830_driver.c +++ b/src/i830_driver.c @@ -1182,6 +1182,11 @@ I830ScreenInit(int scrnIndex, ScreenPtr screen, int argc, char **argv) i830_fixup_mtrrs(scrn); + intel_batch_init(scrn); + + if (IS_I965G(intel)) + gen4_render_state_init(scrn); + miClearVisualTypes(); if (!miSetVisualTypes(scrn->depth, miGetDefaultVisualMask(scrn->depth), @@ -1366,13 +1371,6 @@ static void I830LeaveVT(int scrnIndex, int flags) xf86_hide_cursors(scrn); - intel_sync(scrn); - - intel_batch_teardown(scrn); - - if (IS_I965G(intel)) - gen4_render_state_cleanup(scrn); - ret = drmDropMaster(intel->drmSubFD); if (ret) xf86DrvMsg(scrn->scrnIndex, X_WARNING, @@ -1406,11 +1404,6 @@ static Bool I830EnterVT(int scrnIndex, int flags) if (!i830_reinit_memory(scrn)) return FALSE; - intel_batch_init(scrn); - - if (IS_I965G(intel)) - gen4_render_state_init(scrn); - if (!xf86SetDesiredModes(scrn)) return FALSE; @@ -1448,6 +1441,13 @@ static Bool I830CloseScreen(int scrnIndex, ScreenPtr screen) intel->front_buffer = NULL; } + intel_sync(scrn); + + intel_batch_teardown(scrn); + + if (IS_I965G(intel)) + gen4_render_state_cleanup(scrn); + xf86_cursors_fini(screen); /* Free most of the allocations */ |