summaryrefslogtreecommitdiff
path: root/shared-core
diff options
context:
space:
mode:
Diffstat (limited to 'shared-core')
-rw-r--r--shared-core/i915_dma.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/shared-core/i915_dma.c b/shared-core/i915_dma.c
index eb8c9153..acbb41dc 100644
--- a/shared-core/i915_dma.c
+++ b/shared-core/i915_dma.c
@@ -864,6 +864,9 @@ int i915_process_relocs(struct drm_file *file_priv,
} while (reloc_offset != reloc_end);
out:
+ drm_bo_kunmap(&relocatee->kmap);
+ relocatee->data_page = NULL;
+
drm_bo_kunmap(&reloc_kmap);
mutex_lock(&dev->struct_mutex);
@@ -901,7 +904,6 @@ static int i915_exec_reloc(struct drm_file *file_priv, drm_handle_t buf_handle,
}
}
- drm_bo_kunmap(&relocatee.kmap);
mutex_lock(&dev->struct_mutex);
drm_bo_usage_deref_locked(&relocatee.buf);
mutex_unlock(&dev->struct_mutex);