mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-22 17:36:20 +03:00
gpu: nvgpu: mig: Add sysfs nodes for mig mode selection
This is adding two sysfs nodes 1. mig_mode_config: to select the mig_mode 2. mig_mode_config_list: to list the available mig configs. Added logic to skip gpu dev node creation only for real MIG physical device. Added logic to skip the gpu characteristics flags only for real MIG physical device. JIRA NVGPU-6633 Change-Id: I4a450b6d658f76e79d89f863c00dffad4558c70f Signed-off-by: dt <dt@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2499284 Tested-by: mobile promotions <svcmobile_promotions@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
@@ -384,7 +384,9 @@ static long gk20a_ctrl_ioctl_gpu_characteristics(
|
||||
gpu.cbc_comptags_per_line = g->cbc->comptags_per_cacheline;
|
||||
#endif
|
||||
|
||||
if (!nvgpu_is_enabled(g, NVGPU_SUPPORT_MIG) || (gpu_instance_id != 0U)) {
|
||||
if (!nvgpu_is_enabled(g, NVGPU_SUPPORT_MIG) ||
|
||||
(gpu_instance_id != 0U) ||
|
||||
(!nvgpu_grmgr_is_multi_gr_enabled(g))) {
|
||||
gpu.flags = nvgpu_ctrl_ioctl_gpu_characteristics_flags(g);
|
||||
nvgpu_set_preemption_mode_flags(g, &gpu);
|
||||
} else {
|
||||
@@ -2140,7 +2142,9 @@ long gk20a_ctrl_dev_ioctl(struct file *filp, unsigned int cmd, unsigned long arg
|
||||
break;
|
||||
|
||||
case NVGPU_GPU_IOCTL_GET_ENGINE_INFO:
|
||||
if (nvgpu_is_enabled(g, NVGPU_SUPPORT_MIG) && (gpu_instance_id != 0U)) {
|
||||
if (nvgpu_is_enabled(g, NVGPU_SUPPORT_MIG) &&
|
||||
((gpu_instance_id != 0U) ||
|
||||
(!nvgpu_grmgr_is_multi_gr_enabled(g)))) {
|
||||
err = nvgpu_gpu_get_gpu_instance_engine_info(g, gpu_instance_id,
|
||||
(struct nvgpu_gpu_get_engine_info_args *)buf);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user