gpu: nvgpu: update SETUP_BIND uapi

This patch updates the SETUP_BIND uapi for conditionally
exposing the GPFIFO, UserD and Usermode MMIO GPU VAs to
userspace.

Bug 3938139

Change-Id: Ifa42d592d5224de075c8c9640dd67cab398a9786
Signed-off-by: Martin Radev <mradev@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2908614
Reviewed-by: Dinesh T <dt@nvidia.com>
Reviewed-by: Ankur Kishore <ankkishore@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
This commit is contained in:
Martin Radev
2023-05-22 21:52:38 +03:00
committed by mobile promotions
parent a062676e71
commit 9487599da1
2 changed files with 9 additions and 0 deletions

View File

@@ -201,6 +201,8 @@ struct nvgpu_gpu_zbc_query_table_args {
#define NVGPU_GPU_FLAGS_MULTI_PROCESS_TSG_SHARING (1ULL << 56)
/* SM LRF ECC is enabled */
#define NVGPU_GPU_FLAGS_ECC_ENABLED_SM_LRF (1ULL << 60)
/* Flag to indicate GPU MMIO support */
#define NVGPU_GPU_FLAGS_SUPPORT_GPU_MMIO (1ULL << 57)
/* SM SHM ECC is enabled */
#define NVGPU_GPU_FLAGS_ECC_ENABLED_SM_SHM (1ULL << 61)
/* TEX ECC is enabled */

View File

@@ -1087,12 +1087,19 @@ struct nvgpu_channel_setup_bind_args {
* SUBMIT_GPFIFO IOCTL cannot be used.
*/
#define NVGPU_CHANNEL_SETUP_BIND_FLAGS_USERMODE_SUPPORT (1 << 3)
/*
* Map usermode resources to GPU and return GPU VAs to userspace.
*/
#define NVGPU_CHANNEL_SETUP_BIND_FLAGS_USERMODE_GPU_MAP_RESOURCES_SUPPORT (1 << 4)
__u32 flags;
__s32 userd_dmabuf_fd; /* in */
__s32 gpfifo_dmabuf_fd; /* in */
__u32 work_submit_token; /* out */
__u64 userd_dmabuf_offset; /* in */
__u64 gpfifo_dmabuf_offset; /* in */
__u64 gpfifo_gpu_va; /* out */
__u64 userd_gpu_va; /* out */
__u64 usermode_mmio_gpu_va; /* out */
__u32 reserved[9];
};