summaryrefslogtreecommitdiff
path: root/intel
diff options
context:
space:
mode:
Diffstat (limited to 'intel')
-rw-r--r--intel/intel_bufmgr_gem.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/intel/intel_bufmgr_gem.c b/intel/intel_bufmgr_gem.c
index 571ab5c8..5b76340a 100644
--- a/intel/intel_bufmgr_gem.c
+++ b/intel/intel_bufmgr_gem.c
@@ -1201,23 +1201,17 @@ drm_intel_gem_bo_emit_reloc(drm_intel_bo *bo, uint32_t offset,
drm_intel_bo_gem *bo_gem = (drm_intel_bo_gem *) bo;
drm_intel_bo_gem *target_bo_gem = (drm_intel_bo_gem *) target_bo;
- pthread_mutex_lock(&bufmgr_gem->lock);
- if (bo_gem->has_error) {
- pthread_mutex_unlock(&bufmgr_gem->lock);
+ if (bo_gem->has_error)
return -ENOMEM;
- }
if (target_bo_gem->has_error) {
bo_gem->has_error = 1;
- pthread_mutex_unlock(&bufmgr_gem->lock);
return -ENOMEM;
}
/* Create a new relocation list if needed */
- if (bo_gem->relocs == NULL && drm_intel_setup_reloc_list(bo)) {
- pthread_mutex_unlock(&bufmgr_gem->lock);
+ if (bo_gem->relocs == NULL && drm_intel_setup_reloc_list(bo))
return -ENOMEM;
- }
/* Check overflow */
assert(bo_gem->reloc_count < bufmgr_gem->max_relocs);
@@ -1249,8 +1243,6 @@ drm_intel_gem_bo_emit_reloc(drm_intel_bo *bo, uint32_t offset,
bo_gem->reloc_count++;
- pthread_mutex_unlock(&bufmgr_gem->lock);
-
return 0;
}