]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
drm/etnaviv: Record GPU visible size of GEM BO separately
authorSui Jingfeng <sui.jingfeng@linux.dev>
Fri, 25 Oct 2024 20:43:54 +0000 (04:43 +0800)
committerLucas Stach <l.stach@pengutronix.de>
Mon, 28 Oct 2024 15:36:01 +0000 (16:36 +0100)
commitb5f1eed853c6ea6a99149fd97fe179f3ebd96a02
tree9095fd8a8a80e7c68181289d4954c01c8fbd14bc
parente1f3220b957a55a875d668f3e2fadd6315c8bbf4
drm/etnaviv: Record GPU visible size of GEM BO separately

The GPU visible size of a GEM BO is not necessarily PAGE_SIZE aligned,
which happens when CPU page size is not equal to GPU page size. Extra
precious resources such as GPU page tables and GPU TLBs may being paid
because of this but never get used.

Track the size of GPU visible part of GEM BO separately, ensure no
GPUVA range wasting by aligning that size to GPU page size.

Signed-off-by: Sui Jingfeng <sui.jingfeng@linux.dev>
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
drivers/gpu/drm/etnaviv/etnaviv_gem.c
drivers/gpu/drm/etnaviv/etnaviv_gem.h