summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--linux-core/i915_gem.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/linux-core/i915_gem.c b/linux-core/i915_gem.c
index 1fc48e0c..52a57d5e 100644
--- a/linux-core/i915_gem.c
+++ b/linux-core/i915_gem.c
@@ -1137,6 +1137,16 @@ i915_gem_reloc_and_validate_object(struct drm_gem_object *obj,
#endif
writel(reloc_val, reloc_entry);
+ /* Write the updated presumed offset for this entry back out
+ * to the user.
+ */
+ reloc.presumed_offset = target_obj_priv->gtt_offset;
+ ret = copy_to_user(relocs + i, &reloc, sizeof(reloc));
+ if (ret != 0) {
+ drm_gem_object_unreference(target_obj);
+ return ret;
+ }
+
drm_gem_object_unreference(target_obj);
}