]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Remove pinned check from madvise ioctl
authorChris Wilson <chris@chris-wilson.co.uk>
Fri, 5 Aug 2016 09:14:20 +0000 (10:14 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Fri, 5 Aug 2016 09:54:41 +0000 (10:54 +0100)
commit0d14fe50f841403b0f878d9ed18bb5ba6c8d58a9
tree78bd7f16557096f7fd0a8453d1abd9ffb80c7a98
parent29f29574d9110882c72610d9c4b28d3b3c5588ff
drm/i915: Remove pinned check from madvise ioctl

We don't need to incur the overhead of checking whether the object is
pinned prior to changing its madvise. If the object is pinned, the
madvise will not take effect until it is unpinned and so we cannot free
the pages being pointed at by hardware. Marking a pinned object with
allocated pages as DONTNEED will not trigger any undue warnings. The check
is therefore superfluous, and by removing it we can remove a linear walk
over all the vma the object has.

Still despite it being an overzealous check, that error code is part of
the current ABI and so we must proceed with caution.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1470388464-28458-15-git-send-email-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/i915_gem.c