Skip to content

Commit

Permalink
drm/i915: Simplify i915_gem_obj_is_pinned() test for set-tiling
Browse files Browse the repository at this point in the history
Since the removal of the user pin_ioctl, the only means for pinning an
object is either through binding to the scanout or during execbuf
reservation. As the later prevents a call to set-tiling, we need only
check if the obj is pinned into the display plane to see if we need
reject the set-tiling ioctl.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
  • Loading branch information
Chris Wilson authored and Daniel Vetter committed Apr 16, 2015
1 parent b7192a5 commit 1f30a61
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/gpu/drm/i915/i915_gem_tiling.c
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ i915_gem_set_tiling(struct drm_device *dev, void *data,
}

mutex_lock(&dev->struct_mutex);
if (i915_gem_obj_is_pinned(obj) || obj->framebuffer_references) {
if (obj->pin_display || obj->framebuffer_references) {
ret = -EBUSY;
goto err;
}
Expand Down

0 comments on commit 1f30a61

Please sign in to comment.