]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915/buddy: sanity check the size
authorMatthew Auld <matthew.auld@intel.com>
Wed, 20 Apr 2022 18:16:11 +0000 (19:16 +0100)
committerMatthew Auld <matthew.auld@intel.com>
Thu, 21 Apr 2022 09:10:35 +0000 (10:10 +0100)
commitf8ccad99beb2fad16374277bc709ef2a594a75c5
treecf55af5c185cd5ee19cc41a78278566c775e7ab5
parent3c33276f3ff956193c3315703195c3651b0de9d8
drm/i915/buddy: sanity check the size

Ensure we check that the size is compatible with the requested
page_size. For tiny objects that are automatically annotated with
TTM_PL_FLAG_CONTIGUOUS(since they fit within a single page), we
currently end up silently overriding the min_page_size, which ends up
hiding bugs elsewhere.

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