drm/gem: Create a drm_gem_object_init_with_mnt() function
authorMaíra Canal <mcanal@igalia.com>
Mon, 23 Sep 2024 13:55:08 +0000 (10:55 -0300)
committerMaíra Canal <mcanal@igalia.com>
Wed, 25 Sep 2024 11:40:20 +0000 (08:40 -0300)
commit0992b2541e1cd9580c2e70fab7a78558de054bae
tree37ef5e207ea00c69fce2528a938615de64d7cb0e
parent56cf76ed784fe5347c9305f7f0f3d0f9cb8d8a3b
drm/gem: Create a drm_gem_object_init_with_mnt() function

For some applications, such as applications that uses huge pages, we might
want to have a different mountpoint, for which we pass mount flags that
better match our usecase.

Therefore, create a new function `drm_gem_object_init_with_mnt()` that
allow us to define the tmpfs mountpoint where the GEM object will be
created. If this parameter is NULL, then we fallback to `shmem_file_setup()`.

Signed-off-by: Maíra Canal <mcanal@igalia.com>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@igalia.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240923141348.2422499-5-mcanal@igalia.com
drivers/gpu/drm/drm_gem.c
include/drm/drm_gem.h