From d0bc8237e31dc13d664030128e29e71c94eb8fa8 Mon Sep 17 00:00:00 2001 From: Lakshmanan M Date: Tue, 10 Dec 2019 10:11:11 +0530 Subject: [PATCH] gpu: nvgpu: linux: Disable diversity related support SM and CE diversities are safety only features. Hence, we do not require to expose their ioctl and diversity related flags for Linux. JIRA NVGPU-4133 Bug 2776580 Change-Id: Icc3cc04734ffdcd901222206fca9a3594340d0e1 Signed-off-by: Lakshmanan M Reviewed-on: https://git-master.nvidia.com/r/2258872 Reviewed-by: Shashank Singh GVS: Gerrit_Virtual_Submit Reviewed-by: Alex Waterman Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/os/linux/ioctl_channel.c | 10 ---------- drivers/gpu/nvgpu/os/linux/ioctl_ctrl.c | 17 +---------------- include/uapi/linux/nvgpu.h | 7 +------ 3 files changed, 2 insertions(+), 32 deletions(-) diff --git a/drivers/gpu/nvgpu/os/linux/ioctl_channel.c b/drivers/gpu/nvgpu/os/linux/ioctl_channel.c index c23939e58..d5d52b2f1 100644 --- a/drivers/gpu/nvgpu/os/linux/ioctl_channel.c +++ b/drivers/gpu/nvgpu/os/linux/ioctl_channel.c @@ -1133,16 +1133,6 @@ long gk20a_channel_ioctl(struct file *filp, struct nvgpu_alloc_obj_ctx_args *args = (struct nvgpu_alloc_obj_ctx_args *)buf; - if (nvgpu_is_enabled(ch->g, NVGPU_SUPPORT_SM_DIVERSITY)) { - if (args->sm_diversity_config >= - ch->g->max_sm_diversity_config_count) { - err = -EINVAL; - break; - } - } else { - args->sm_diversity_config = 0U; - } - err = gk20a_busy(ch->g); if (err) { dev_err(dev, diff --git a/drivers/gpu/nvgpu/os/linux/ioctl_ctrl.c b/drivers/gpu/nvgpu/os/linux/ioctl_ctrl.c index ef5b4899d..ed82bdebb 100644 --- a/drivers/gpu/nvgpu/os/linux/ioctl_ctrl.c +++ b/drivers/gpu/nvgpu/os/linux/ioctl_ctrl.c @@ -248,11 +248,7 @@ static struct nvgpu_flags_mapping flags_mapping[] = { {NVGPU_GPU_FLAGS_SUPPORT_SET_CTX_MMU_DEBUG_MODE, NVGPU_SUPPORT_SET_CTX_MMU_DEBUG_MODE}, {NVGPU_GPU_FLAGS_SUPPORT_FAULT_RECOVERY, - NVGPU_SUPPORT_FAULT_RECOVERY}, - {NVGPU_GPU_FLAGS_SUPPORT_COPY_ENGINE_DIVERSITY, - NVGPU_SUPPORT_COPY_ENGINE_DIVERSITY}, - {NVGPU_GPU_FLAGS_SUPPORT_SM_DIVERSITY, - NVGPU_SUPPORT_SM_DIVERSITY} + NVGPU_SUPPORT_FAULT_RECOVERY} }; static u64 nvgpu_ctrl_ioctl_gpu_characteristics_flags(struct gk20a *g) @@ -323,8 +319,6 @@ gk20a_ctrl_ioctl_gpu_characteristics( gpu.num_tpc_per_gpc = nvgpu_gr_config_get_max_tpc_per_gpc_count(gr_config); - gpu.max_sm_diversity_config_count = g->max_sm_diversity_config_count; - gpu.bus_type = NVGPU_GPU_BUS_TYPE_AXI; /* always AXI for now */ gpu.compression_page_size = g->ops.fb.compression_page_size(g); @@ -853,15 +847,6 @@ static int gk20a_ctrl_vsm_mapping(struct gk20a *g, struct nvgpu_gr_config *gr_config = nvgpu_gr_get_config_ptr(g); u32 i; - if (nvgpu_is_enabled(g, NVGPU_SUPPORT_SM_DIVERSITY)) { - if (args->sm_diversity_config >= - g->max_sm_diversity_config_count) { - return -EINVAL; - } - } else { - args->sm_diversity_config = 0U; - } - vsms_buf = nvgpu_kzalloc(g, write_size); if (vsms_buf == NULL) return -ENOMEM; diff --git a/include/uapi/linux/nvgpu.h b/include/uapi/linux/nvgpu.h index 0b84423f4..73733d40e 100644 --- a/include/uapi/linux/nvgpu.h +++ b/include/uapi/linux/nvgpu.h @@ -294,8 +294,7 @@ struct nvgpu_gpu_characteristics { __u8 reserved2[6]; __u32 max_ctxsw_ring_buffer_size; - /* Max CTA diversity configuration count. */ - __u32 max_sm_diversity_config_count; + __u32 reserved3; /* Notes: - This struct can be safely appended with new fields. However, always @@ -460,8 +459,6 @@ struct nvgpu_gpu_vsms_mapping_entry { }; struct nvgpu_gpu_vsms_mapping { - __u32 sm_diversity_config; - __u32 reserved; __u64 vsms_map_buf_addr; }; @@ -1524,8 +1521,6 @@ struct nvgpu_set_nvmap_fd_args { struct nvgpu_alloc_obj_ctx_args { __u32 class_num; /* kepler3d, 2d, compute, etc */ __u32 flags; /* input, output */ - __u32 sm_diversity_config; /* input */ - __u32 reserved; __u64 obj_id; /* output, used to free later */ };