drm/i915: Remove the error message for unbinding pinned buffers
authorChris Wilson <chris@chris-wilson.co.uk>
Thu, 24 May 2012 18:11:20 +0000 (19:11 +0100)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Fri, 25 May 2012 08:10:40 +0000 (10:10 +0200)
This is now used intentionally to prevent proliferation of is-pinned
checks upon the inactive list following:

commit 1b50247a8ddde4af5aaa0e6bc125615372ce6c16
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Tue Apr 24 15:47:30 2012 +0100

    drm/i915: Remove the list of pinned inactive objects

Reported-and-tested-by: guang.a.yang@intel.com
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=50075
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/i915_gem.c

index 1d4b51c53874a8b852c97366f15c3f94edca0941..465e775b8cdef29e6a82c3e71f561c0aeb6091e0 100644 (file)
@@ -2033,10 +2033,8 @@ i915_gem_object_unbind(struct drm_i915_gem_object *obj)
        if (obj->gtt_space == NULL)
                return 0;
 
-       if (obj->pin_count != 0) {
-               DRM_ERROR("Attempting to unbind pinned buffer\n");
-               return -EINVAL;
-       }
+       if (obj->pin_count)
+               return -EBUSY;
 
        ret = i915_gem_object_finish_gpu(obj);
        if (ret)