Mesa (mesa_7_7_branch): st/xorg: Fix leave enter vt cycle in crtc code

Jakob Bornecrantz wallbraker at kemper.freedesktop.org
Tue Dec 8 06:53:36 PST 2009


Module: Mesa
Branch: mesa_7_7_branch
Commit: c33520b360780bce496b00516384e25a0908e43c
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=c33520b360780bce496b00516384e25a0908e43c

Author: Jakob Bornecrantz <jakob at vmware.com>
Date:   Fri Dec  4 16:05:03 2009 +0100

st/xorg: Fix leave enter vt cycle in crtc code

---

 src/gallium/state_trackers/xorg/xorg_crtc.c |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/src/gallium/state_trackers/xorg/xorg_crtc.c b/src/gallium/state_trackers/xorg/xorg_crtc.c
index be9fcbc..337449a 100644
--- a/src/gallium/state_trackers/xorg/xorg_crtc.c
+++ b/src/gallium/state_trackers/xorg/xorg_crtc.c
@@ -307,8 +307,6 @@ xorg_crtc_cursor_destroy(xf86CrtcPtr crtc)
     if (crtcp->cursor_bo)
 	kms_bo_destroy(&crtcp->cursor_bo);
 #endif
-
-    xfree(crtcp);
 }
 
 /*
@@ -320,11 +318,12 @@ crtc_destroy(xf86CrtcPtr crtc)
 {
     struct crtc_private *crtcp = crtc->driver_private;
 
-    if (crtcp->cursor_tex)
-	pipe_texture_reference(&crtcp->cursor_tex, NULL);
+    xorg_crtc_cursor_destroy(crtc);
 
     drmModeFreeCrtc(crtcp->drm_crtc);
+
     xfree(crtcp);
+    crtc->driver_private = NULL;
 }
 
 static const xf86CrtcFuncsRec crtc_funcs = {



More information about the mesa-commit mailing list