]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915/selftests: Switch 4k kmalloc to use get_free_page for alignment
authorChris Wilson <chris@chris-wilson.co.uk>
Wed, 23 Sep 2020 11:41:56 +0000 (12:41 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Tue, 5 Jan 2021 13:06:02 +0000 (13:06 +0000)
commite170645528095bda256911fae6dea95b7a27f303
tree674e5277ff2528714167ba4e59f9c221fcddfe07
parenta41fc12b09a4dd50d5c12e4209a5b012e87a90b9
drm/i915/selftests: Switch 4k kmalloc to use get_free_page for alignment

In generating the reference LRC, we want a page-aligned address for
simplicity in computing the offsets within. This then shares the
computation for the HW LRC which is mapped and so page aligned, making
the comparison straightforward. It seems that kmalloc(4k) is not always
returning from a 4k-aligned slab cache (which would give us a page aligned
address) so force alignment by explicitly allocating a page.

Reported-by: "Gote, Nitin R" <nitin.r.gote@intel.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: "Gote, Nitin R" <nitin.r.gote@intel.com>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200923114156.17749-1-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/gt/selftest_lrc.c