Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 180317
b: refs/heads/master
c: 93533c2
h: refs/heads/master
i:
  180315: 0585a26
v: v3
  • Loading branch information
Chris Wilson authored and Eric Anholt committed Feb 4, 2010
1 parent 3426fbb commit 534ff37
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 67026e03244d76b8f1fa725b079d4182fe8910aa
refs/heads/master: 93533c291a0af78ca57115fc44d2e6c4c9517cd2
7 changes: 5 additions & 2 deletions trunk/drivers/gpu/drm/i915/i915_gem.c
Original file line number Diff line number Diff line change
Expand Up @@ -3584,6 +3584,9 @@ i915_gem_put_relocs_to_user(struct drm_i915_gem_exec_object2 *exec_list,
uint32_t reloc_count = 0, i;
int ret = 0;

if (relocs == NULL)
return 0;

for (i = 0; i < buffer_count; i++) {
struct drm_i915_gem_relocation_entry __user *user_relocs;
int unwritten;
Expand Down Expand Up @@ -3673,7 +3676,7 @@ i915_gem_do_execbuffer(struct drm_device *dev, void *data,
struct drm_gem_object *batch_obj;
struct drm_i915_gem_object *obj_priv;
struct drm_clip_rect *cliprects = NULL;
struct drm_i915_gem_relocation_entry *relocs;
struct drm_i915_gem_relocation_entry *relocs = NULL;
int ret = 0, ret2, i, pinned = 0;
uint64_t exec_offset;
uint32_t seqno, flush_domains, reloc_index;
Expand Down Expand Up @@ -3950,6 +3953,7 @@ i915_gem_do_execbuffer(struct drm_device *dev, void *data,

mutex_unlock(&dev->struct_mutex);

pre_mutex_err:
/* Copy the updated relocations out regardless of current error
* state. Failure to update the relocs would mean that the next
* time userland calls execbuf, it would do so with presumed offset
Expand All @@ -3964,7 +3968,6 @@ i915_gem_do_execbuffer(struct drm_device *dev, void *data,
ret = ret2;
}

pre_mutex_err:
drm_free_large(object_list);
kfree(cliprects);

Expand Down

0 comments on commit 534ff37

Please sign in to comment.