提交 1f30a614 编写于 作者: C Chris Wilson 提交者: Daniel Vetter

drm/i915: Simplify i915_gem_obj_is_pinned() test for set-tiling

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: NChris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
上级 b7192a56
...@@ -336,7 +336,7 @@ i915_gem_set_tiling(struct drm_device *dev, void *data, ...@@ -336,7 +336,7 @@ i915_gem_set_tiling(struct drm_device *dev, void *data,
} }
mutex_lock(&dev->struct_mutex); mutex_lock(&dev->struct_mutex);
if (i915_gem_obj_is_pinned(obj) || obj->framebuffer_references) { if (obj->pin_display || obj->framebuffer_references) {
ret = -EBUSY; ret = -EBUSY;
goto err; goto err;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册