]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915/buddy: tweak 2big check
authorMatthew Auld <matthew.auld@intel.com>
Fri, 25 Feb 2022 14:55:01 +0000 (14:55 +0000)
committerMatthew Auld <matthew.auld@intel.com>
Mon, 28 Feb 2022 08:47:35 +0000 (08:47 +0000)
commit61a56ec12191cafca7c0e9b7c9adc304e6fa09f5
tree664e1166283b149f3e1dab8dd80a6c037f30b2a4
parent41bd4eb03c7d86f12ed5544a50beee92eb1bb4b0
drm/i915/buddy: tweak 2big check

Otherwise we get -EINVAL, instead of the more useful -E2BIG if the
allocation doesn't fit within the pfn range, like with mappable lmem.
The hugepages selftest, for example, needs this to know if a smaller
size is needed.

Signed-off-by: Matthew Auld <matthew.auld@intel.com>
Cc: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Reviewed-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Acked-by: Nirmoy Das <nirmoy.das@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220225145502.331818-6-matthew.auld@intel.com
drivers/gpu/drm/i915/i915_ttm_buddy_manager.c