summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2010-06-29 20:12:44 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2010-06-29 20:16:56 +0100
commitc3ddfea1a64b7aaaebfb429243c71feb0801da9d (patch)
tree9da17515aa4b770fa66ec122dd84e08f106c3c49
parent726210f87d558d558022f35bc8c839e798a19f0c (diff)
intel: Suppress the error return from setting domains after mapping.
If the mapping succeeds we have a valid pointer. If setting the domain failures we may incur cache corruption. However the usual failure mode is because of a hung GPU, in which case it is preferable to ignore the minor error from setting the domain and continue on oblivious. If these errors persist, we should rate limit the warning [or even just remove it]. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r--intel/intel_bufmgr_gem.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/intel/intel_bufmgr_gem.c b/intel/intel_bufmgr_gem.c
index 26dc3348..3446390c 100644
--- a/intel/intel_bufmgr_gem.c
+++ b/intel/intel_bufmgr_gem.c
@@ -1006,12 +1006,9 @@ static int drm_intel_gem_bo_map(drm_intel_bo *bo, int write_enable)
&set_domain);
} while (ret == -1 && errno == EINTR);
if (ret != 0) {
- ret = -errno;
fprintf(stderr, "%s:%d: Error setting to CPU domain %d: %s\n",
__FILE__, __LINE__, bo_gem->gem_handle,
strerror(errno));
- pthread_mutex_unlock(&bufmgr_gem->lock);
- return ret;
}
pthread_mutex_unlock(&bufmgr_gem->lock);
@@ -1086,9 +1083,7 @@ int drm_intel_gem_bo_map_gtt(drm_intel_bo *bo)
DRM_IOCTL_I915_GEM_SET_DOMAIN,
&set_domain);
} while (ret == -1 && errno == EINTR);
-
if (ret != 0) {
- ret = -errno;
fprintf(stderr, "%s:%d: Error setting domain %d: %s\n",
__FILE__, __LINE__, bo_gem->gem_handle,
strerror(errno));
@@ -1096,7 +1091,7 @@ int drm_intel_gem_bo_map_gtt(drm_intel_bo *bo)
pthread_mutex_unlock(&bufmgr_gem->lock);
- return ret;
+ return 0;
}
int drm_intel_gem_bo_unmap_gtt(drm_intel_bo *bo)