Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 131614
b: refs/heads/master
c: a35f2e2
h: refs/heads/master
v: v3
  • Loading branch information
Roland Dreier authored and Dave Airlie committed Feb 20, 2009
1 parent aae98da commit fad0239
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 10 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: 96dec61d563fb8dff2c8427fdf85327a95b65c74
refs/heads/master: a35f2e2b83a789e189a501ebd722bc9a1310eb05
21 changes: 12 additions & 9 deletions trunk/drivers/gpu/drm/i915/i915_gem.c
Original file line number Diff line number Diff line change
Expand Up @@ -2634,15 +2634,6 @@ i915_gem_execbuffer(struct drm_device *dev, void *data,

i915_verify_inactive(dev, __FILE__, __LINE__);

/* Copy the new buffer offsets back to the user's exec list. */
ret = copy_to_user((struct drm_i915_relocation_entry __user *)
(uintptr_t) args->buffers_ptr,
exec_list,
sizeof(*exec_list) * args->buffer_count);
if (ret)
DRM_ERROR("failed to copy %d exec entries "
"back to user (%d)\n",
args->buffer_count, ret);
err:
for (i = 0; i < pinned; i++)
i915_gem_object_unpin(object_list[i]);
Expand All @@ -2652,6 +2643,18 @@ i915_gem_execbuffer(struct drm_device *dev, void *data,

mutex_unlock(&dev->struct_mutex);

if (!ret) {
/* Copy the new buffer offsets back to the user's exec list. */
ret = copy_to_user((struct drm_i915_relocation_entry __user *)
(uintptr_t) args->buffers_ptr,
exec_list,
sizeof(*exec_list) * args->buffer_count);
if (ret)
DRM_ERROR("failed to copy %d exec entries "
"back to user (%d)\n",
args->buffer_count, ret);
}

pre_mutex_err:
drm_free(object_list, sizeof(*object_list) * args->buffer_count,
DRM_MEM_DRIVER);
Expand Down

0 comments on commit fad0239

Please sign in to comment.