]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Early rejection of buffer allocations larger than RAM
authorChris Wilson <chris@chris-wilson.co.uk>
Mon, 3 Sep 2018 08:33:36 +0000 (09:33 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Mon, 3 Sep 2018 11:02:04 +0000 (12:02 +0100)
commit72190eeae9db47ae9c814018a7fdef9b016762ea
tree7d84162c185d09b0526e4b833b714ee12cf1a1fb
parentae5ce2045639b596ab6f7677f1ec367d87a6683a
drm/i915: Early rejection of buffer allocations larger than RAM

We currently try to pin and allocate the whole buffer at a time. If that
object is larger than RAM, we will try to pin the whole of physical
memory, force the machine into oom, and then still fail the allocation.

If the request is obviously too large, error out early. We opt to do
this in the backend to make it easy to use alternate paths that do not
require the entire object pinned, or may easily handle proxy objects
that are larger than physical memory.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180903083337.13134-4-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/i915_gem.c