From 28cbdcde73cab9c006f66b41c1674dd102a562c3 Mon Sep 17 00:00:00 2001 From: Shashank Singh Date: Thu, 30 Mar 2023 08:54:14 +0000 Subject: [PATCH] gpu: nvgpu: remove partial mapping capability flag Remove NVGPU_SUPPORT_PARTIAL_MAPPINGS kernel flag and the corresponding uapi gpu charaacteristics flag NVGPU_GPU_FLAGS_SUPPORT_PARTIAL_MAPPINGS. This functionality is supported by fixed mapping ioctl by default. Jira NVGPU-9832 Bug 4034184 Change-Id: Ie887c753f152afb6a4a1e4aafb5f8f6fd3b7b398 Signed-off-by: Shashank Singh Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2879793 Tested-by: mobile promotions Reviewed-by: mobile promotions --- drivers/gpu/nvgpu/include/nvgpu/enabled.h | 2 -- drivers/gpu/nvgpu/os/linux/ioctl_ctrl.c | 2 -- drivers/gpu/nvgpu/os/linux/module.c | 1 - include/uapi/linux/nvgpu-ctrl.h | 2 -- 4 files changed, 7 deletions(-) diff --git a/drivers/gpu/nvgpu/include/nvgpu/enabled.h b/drivers/gpu/nvgpu/include/nvgpu/enabled.h index 61c30a273..13c12d09d 100644 --- a/drivers/gpu/nvgpu/include/nvgpu/enabled.h +++ b/drivers/gpu/nvgpu/include/nvgpu/enabled.h @@ -72,8 +72,6 @@ struct gk20a; "User-space managed address spaces support"), \ DEFINE_FLAG(NVGPU_SUPPORT_IO_COHERENCE, \ "IO coherence support is available"), \ - DEFINE_FLAG(NVGPU_SUPPORT_PARTIAL_MAPPINGS, \ - "MAP_BUFFER_EX with partial mappings"), \ DEFINE_FLAG(NVGPU_SUPPORT_SPARSE_ALLOCS, \ "MAP_BUFFER_EX with sparse allocations"), \ DEFINE_FLAG(NVGPU_SUPPORT_MAP_DIRECT_KIND_CTRL, \ diff --git a/drivers/gpu/nvgpu/os/linux/ioctl_ctrl.c b/drivers/gpu/nvgpu/os/linux/ioctl_ctrl.c index b2ac2906b..73d50e079 100644 --- a/drivers/gpu/nvgpu/os/linux/ioctl_ctrl.c +++ b/drivers/gpu/nvgpu/os/linux/ioctl_ctrl.c @@ -226,8 +226,6 @@ static struct nvgpu_flags_mapping flags_mapping[] = { NVGPU_CAN_RAILGATE}, {NVGPU_GPU_FLAGS_HAS_SYNCPOINTS, NVGPU_HAS_SYNCPOINTS}, - {NVGPU_GPU_FLAGS_SUPPORT_PARTIAL_MAPPINGS, - NVGPU_SUPPORT_PARTIAL_MAPPINGS}, {NVGPU_GPU_FLAGS_SUPPORT_SPARSE_ALLOCS, NVGPU_SUPPORT_SPARSE_ALLOCS}, {NVGPU_GPU_FLAGS_SUPPORT_SYNC_FENCE_FDS, diff --git a/drivers/gpu/nvgpu/os/linux/module.c b/drivers/gpu/nvgpu/os/linux/module.c index dd1389388..b82da023b 100644 --- a/drivers/gpu/nvgpu/os/linux/module.c +++ b/drivers/gpu/nvgpu/os/linux/module.c @@ -351,7 +351,6 @@ void gk20a_init_linux_characteristics(struct gk20a *g) { struct device *dev = dev_from_gk20a(g); - nvgpu_set_enabled(g, NVGPU_SUPPORT_PARTIAL_MAPPINGS, true); nvgpu_set_enabled(g, NVGPU_SUPPORT_DETERMINISTIC_OPTS, true); nvgpu_set_enabled(g, NVGPU_SUPPORT_USERSPACE_MANAGED_AS, true); nvgpu_set_enabled(g, NVGPU_SUPPORT_REMAP, true); diff --git a/include/uapi/linux/nvgpu-ctrl.h b/include/uapi/linux/nvgpu-ctrl.h index 4ac535382..0809be353 100644 --- a/include/uapi/linux/nvgpu-ctrl.h +++ b/include/uapi/linux/nvgpu-ctrl.h @@ -95,8 +95,6 @@ struct nvgpu_gpu_zbc_query_table_args { #define NVGPU_GPU_BUS_TYPE_AXI 32 #define NVGPU_GPU_FLAGS_HAS_SYNCPOINTS (1ULL << 0) -/* MAP_BUFFER_EX with partial mappings */ -#define NVGPU_GPU_FLAGS_SUPPORT_PARTIAL_MAPPINGS (1ULL << 1) /* MAP_BUFFER_EX with sparse allocations */ #define NVGPU_GPU_FLAGS_SUPPORT_SPARSE_ALLOCS (1ULL << 2) /* sync fence FDs are available in, e.g., submit_gpfifo */