]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
drm/panfrost: Introduce huge tmpfs mountpoint option
authorLoïc Molinari <loic.molinari@collabora.com>
Fri, 5 Dec 2025 18:22:30 +0000 (19:22 +0100)
committerBoris Brezillon <boris.brezillon@collabora.com>
Mon, 8 Dec 2025 09:56:31 +0000 (10:56 +0100)
commitc12e9fcb5a5a9713e242e8c9c6adecdea5067241
tree51f99222c5e5c06275cea1601b9478bf192763a3
parentc569b369cc2114526bec2ba0a41a49cfc27609b4
drm/panfrost: Introduce huge tmpfs mountpoint option

Introduce the 'panfrost.transparent_hugepage' boolean module parameter
(false by default). When the parameter is set to true, a new tmpfs
mountpoint is created and mounted using the 'huge=within_size'
option. It's then used at GEM object creation instead of the default
'shm_mnt' mountpoint in order to enable Transparent Hugepage (THP) for
the object (without having to rely on a system wide parameter).

v3:
- use huge tmpfs mountpoint in drm_device

v4:
- fix builds with CONFIG_TRANSPARENT_HUGEPAGE=n
- clean up mountpoint creation error handling
- print negative error value

v5:
- use drm_gem_has_huge_tmp() helper
- get rid of CONFIG_TRANSPARENT_HUGEPAGE ifdefs

v9:
- replace drm_gem_has_huge_tmp() by drm_gem_get_huge_tmp()

v11:
- enable 'panfrost.transparent_hugepage' by default

Signed-off-by: Loïc Molinari <loic.molinari@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Link: https://patch.msgid.link/20251205182231.194072-10-loic.molinari@collabora.com
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
drivers/gpu/drm/panfrost/panfrost_device.c
drivers/gpu/drm/panfrost/panfrost_drv.c
drivers/gpu/drm/panfrost/panfrost_drv.h [new file with mode: 0644]
drivers/gpu/drm/panfrost/panfrost_gem.c
drivers/gpu/drm/panfrost/panfrost_gem.h