bo_gem->mapped says whether user space knows about our mapping, not whether
we've created one. bo_gem->virtual tracks whether we have made a mapping, so
use that to determine when to call munmap at bo_free time.

Signed-off-by: Keith Packard <kei...@keithp.com>
---
 libdrm/intel/intel_bufmgr_gem.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/libdrm/intel/intel_bufmgr_gem.c b/libdrm/intel/intel_bufmgr_gem.c
index 9f6ef68..9ba377b 100644
--- a/libdrm/intel/intel_bufmgr_gem.c
+++ b/libdrm/intel/intel_bufmgr_gem.c
@@ -480,7 +480,7 @@ drm_intel_gem_bo_free(drm_intel_bo *bo)
     struct drm_gem_close close;
     int ret;
 
-    if (bo_gem->mapped)
+    if (bo_gem->virtual)
        munmap (bo_gem->virtual, bo_gem->bo.size);
 
     /* Close this object */
-- 
1.5.6.5


------------------------------------------------------------------------------
SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
The future of the web can't happen without you.  Join us at MIX09 to help
pave the way to the Next Web now. Learn more and register at
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
--
_______________________________________________
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel

Reply via email to