Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 166023
b: refs/heads/master
c: cd0b9fb
h: refs/heads/master
i:
  166021: af18f1d
  166019: 5da0249
  166015: e86f36c
v: v3
  • Loading branch information
Chris Wilson authored and Jesse Barnes committed Sep 18, 2009
1 parent 634e596 commit cf46e66
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: edb81956422c9926553bb97e3e56b849da0f4bb5
refs/heads/master: cd0b9fb400ba775737bdc3874c4cbee4047e66d8
10 changes: 10 additions & 0 deletions trunk/drivers/gpu/drm/i915/i915_gem.c
Original file line number Diff line number Diff line change
Expand Up @@ -3158,6 +3158,16 @@ i915_gem_object_pin_and_relocate(struct drm_gem_object *obj,
return -EINVAL;
}

if (reloc->delta >= target_obj->size) {
DRM_ERROR("Relocation beyond target object bounds: "
"obj %p target %d delta %d size %d.\n",
obj, reloc->target_handle,
(int) reloc->delta, (int) target_obj->size);
drm_gem_object_unreference(target_obj);
i915_gem_object_unpin(obj);
return -EINVAL;
}

if (reloc->write_domain & I915_GEM_DOMAIN_CPU ||
reloc->read_domains & I915_GEM_DOMAIN_CPU) {
DRM_ERROR("reloc with read/write CPU domains: "
Expand Down

0 comments on commit cf46e66

Please sign in to comment.