]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Translate ENOSPC from shmem_get_page() to ENOMEM
authorChris Wilson <chris@chris-wilson.co.uk>
Tue, 25 Mar 2014 13:23:03 +0000 (13:23 +0000)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Tue, 20 May 2014 07:45:22 +0000 (09:45 +0200)
commitd777328533221ef9526b21fe270c815ec3aa7767
tree5144ebd78efeab36b99f483e3fd1b509f60d7209
parent1db6560de0d2fb8809ec8a4ac32d6549f348b6ab
drm/i915: Translate ENOSPC from shmem_get_page() to ENOMEM

shmemfs first checks if there is enough memory to allocate the page
and reports ENOSPC should there be insufficient, along with
the usual ENOMEM for a genuine allocation failure.

We use ENOSPC in our driver to mean that we have run out of aperture
space and so want to translate the error from shmemfs back to
our usual understanding of ENOMEM. None of the the other GEM users
appear to distinguish between ENOMEM and ENOSPC in their error handling,
hence it is easiest to do the fixup in i915.ko

Cc: Hugh Dickins <hughd@google.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Robert Beckett <robert.beckett@intel.com>
Reviewed-by: Rafael Barbalho <rafael.barbalho@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/i915_gem.c