Mesa (mesa_7_7_branch): st/xorg: New libkms destroy api

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


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

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

st/xorg: New libkms destroy api

---

 src/gallium/state_trackers/xorg/xorg_crtc.c   |    4 ++--
 src/gallium/state_trackers/xorg/xorg_driver.c |    8 +++-----
 2 files changed, 5 insertions(+), 7 deletions(-)

diff --git a/src/gallium/state_trackers/xorg/xorg_crtc.c b/src/gallium/state_trackers/xorg/xorg_crtc.c
index ddcaedd..be9fcbc 100644
--- a/src/gallium/state_trackers/xorg/xorg_crtc.c
+++ b/src/gallium/state_trackers/xorg/xorg_crtc.c
@@ -257,7 +257,7 @@ crtc_load_cursor_argb_kms(xf86CrtcPtr crtc, CARD32 * image)
     return;
 
 err_bo_destroy:
-    kms_bo_destroy(crtcp->cursor_bo);
+    kms_bo_destroy(&crtcp->cursor_bo);
 }
 #endif
 
@@ -305,7 +305,7 @@ xorg_crtc_cursor_destroy(xf86CrtcPtr crtc)
 	pipe_texture_reference(&crtcp->cursor_tex, NULL);
 #ifdef HAVE_LIBKMS
     if (crtcp->cursor_bo)
-	kms_bo_destroy(crtcp->cursor_bo);
+	kms_bo_destroy(&crtcp->cursor_bo);
 #endif
 
     xfree(crtcp);
diff --git a/src/gallium/state_trackers/xorg/xorg_driver.c b/src/gallium/state_trackers/xorg/xorg_driver.c
index da86295..22db8bb 100644
--- a/src/gallium/state_trackers/xorg/xorg_driver.c
+++ b/src/gallium/state_trackers/xorg/xorg_driver.c
@@ -260,8 +260,7 @@ drv_close_resource_management(ScrnInfoPtr pScrn)
 
 #ifdef HAVE_LIBKMS
     if (ms->kms)
-	kms_destroy(ms->kms);
-    ms->kms = NULL;
+	kms_destroy(&ms->kms);
 #endif
 
     return TRUE;
@@ -898,8 +897,7 @@ drv_destroy_front_buffer_kms(ScrnInfoPtr pScrn)
 	return TRUE;
 
     kms_bo_unmap(ms->root_bo);
-    kms_bo_destroy(ms->root_bo);
-    ms->root_bo = NULL;
+    kms_bo_destroy(&ms->root_bo);
     return TRUE;
 }
 
@@ -945,7 +943,7 @@ drv_create_front_buffer_kms(ScrnInfoPtr pScrn)
     return TRUE;
 
 err_destroy:
-    kms_bo_destroy(bo);
+    kms_bo_destroy(&bo);
     return FALSE;
 }
 



More information about the mesa-commit mailing list