summaryrefslogtreecommitdiff
path: root/intel
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2010-11-02 11:21:56 -0700
committerEric Anholt <eric@anholt.net>2010-11-02 11:32:32 -0700
commita52e61b5c888444435929a2770f14109c3a94f2f (patch)
tree1be1a7ce281e24fffb0b3464812ad2058849ae97 /intel
parent4abb65f95c79c9a2ec2cc1147a753704b5cdd22e (diff)
intel: Drop silly asserts on mappings present at unmap time.
The intent of these was to catch mismatched map/unmap. What it actually did was check whether there was ever a mapping of that type (including in a previous life of the buffer through the userland BO cache), not whether they were mismatched. We don't even actually want to catch mismatched map/unmap, unless we also do refcounting, since at one point Mesa would do map/map/use/unmap/unmap. Just remove this code instead.
Diffstat (limited to 'intel')
-rw-r--r--intel/intel_bufmgr_gem.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/intel/intel_bufmgr_gem.c b/intel/intel_bufmgr_gem.c
index 8b0deaf7..2da3a8a1 100644
--- a/intel/intel_bufmgr_gem.c
+++ b/intel/intel_bufmgr_gem.c
@@ -1087,14 +1087,11 @@ int drm_intel_gem_bo_map_gtt(drm_intel_bo *bo)
int drm_intel_gem_bo_unmap_gtt(drm_intel_bo *bo)
{
drm_intel_bufmgr_gem *bufmgr_gem = (drm_intel_bufmgr_gem *) bo->bufmgr;
- drm_intel_bo_gem *bo_gem = (drm_intel_bo_gem *) bo;
int ret = 0;
if (bo == NULL)
return 0;
- assert(bo_gem->gtt_virtual != NULL);
-
pthread_mutex_lock(&bufmgr_gem->lock);
bo->virtual = NULL;
pthread_mutex_unlock(&bufmgr_gem->lock);
@@ -1112,8 +1109,6 @@ static int drm_intel_gem_bo_unmap(drm_intel_bo *bo)
if (bo == NULL)
return 0;
- assert(bo_gem->mem_virtual != NULL);
-
pthread_mutex_lock(&bufmgr_gem->lock);
/* Cause a flush to happen if the buffer's pinned for scanout, so the