[Spice-devel] [PATCH xf86-qxl 08/27] qxl_screen_init: move uxa_resources_init down to after qxl_switch_mode has run

Marc-André Lureau marcandre.lureau at gmail.com
Mon Jul 16 08:38:32 PDT 2012


From: Alon Levy <alevy at redhat.com>

---
 src/qxl_driver.c |   13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)

diff --git a/src/qxl_driver.c b/src/qxl_driver.c
index 2b0d567..b0967dc 100644
--- a/src/qxl_driver.c
+++ b/src/qxl_driver.c
@@ -1207,13 +1207,6 @@ qxl_screen_init(SCREEN_INIT_ARGS_DECL)
     if (!miCreateDefColormap(pScreen))
       goto out;
 
-    /* Note: this must be done after DamageSetup() because it calls
-     * _dixInitPrivates. And if that has been called, DamageSetup()
-     * will assert.
-     */
-    if (!uxa_resources_init (pScreen))
-	return FALSE;
-    
     qxl->create_screen_resources = pScreen->CreateScreenResources;
     pScreen->CreateScreenResources = qxl_create_screen_resources;
     
@@ -1229,6 +1222,12 @@ qxl_screen_init(SCREEN_INIT_ARGS_DECL)
     
     qxl_switch_mode(SWITCH_MODE_ARGS(pScrn, pScrn->currentMode));
     
+    /* Note: this must be done after DamageSetup() because it calls
+     * _dixInitPrivates. And if that has been called, DamageSetup()
+     * will assert.
+     */
+    if (!uxa_resources_init (pScreen))
+	return FALSE;
     CHECK_POINT();
 
     return TRUE;
-- 
1.7.10.4



More information about the Spice-devel mailing list