]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915/gem: Differentiate oom failures from invalid map types
authorChris Wilson <chris@chris-wilson.co.uk>
Fri, 27 Nov 2020 19:53:34 +0000 (19:53 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Mon, 30 Nov 2020 18:18:48 +0000 (18:18 +0000)
commit7739cfa0e2c1793f6d34f63e1878862d64707afb
tree7256317a85be44b03228cf248b2310f6a1c23a9e
parent19b2655c9c2c33844e02416ac0d5e6a56021e3ad
drm/i915/gem: Differentiate oom failures from invalid map types

After a cursory check on the parameters to i915_gem_object_pin_map(),
where we return a precise error, if the backend rejects the mapping we
always return PTR_ERR(-ENOMEM). Let us also return a more precise error
here so we can differentiate between running out of memory and
programming errors (or situations where we may be trying different paths
and looking for an error from an unsupported map).

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Matthew Auld <matthew.auld@intel.com>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20201127195334.13134-1-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/gem/i915_gem_pages.c