From a6a3bde1b5db9280beb4d13f2f0c0e49a0e8c7d7 Mon Sep 17 00:00:00 2001 From: dt Date: Wed, 28 Apr 2021 10:51:32 +0000 Subject: [PATCH] gpu: nvgpu: Fix for MIG boot issue - The power device node is created at bootime and the power node is used to power-on the GPU. Power node is commmon for MIG and non-MIG platforms. As the same API is used for power and other MIG/non-MIG nodes, we need to distinguish between them. Otherwise the same nodes creation will give boot issue. - As we are supporting mig_mode setting for non-mig platforms like GV11B, the condition need to be added to create MIG-modes or not. If any mig-mode is set on gv11b/tu104 then graphics pipeline will be disabled. JIRA NVGPU-6633 Signed-off-by: dt Change-Id: I3c641e50c39180543efff04a9cf8b721dbf7f648 Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2521732 Reviewed-by: svcacv Reviewed-by: Vaibhav Kachore Reviewed-by: mobile promotions GVS: Gerrit_Virtual_Submit Tested-by: mobile promotions --- drivers/gpu/nvgpu/os/linux/ioctl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/nvgpu/os/linux/ioctl.c b/drivers/gpu/nvgpu/os/linux/ioctl.c index 0b731002f..8e73dd9c0 100644 --- a/drivers/gpu/nvgpu/os/linux/ioctl.c +++ b/drivers/gpu/nvgpu/os/linux/ioctl.c @@ -22,6 +22,7 @@ #include #include #include +#include #include #include "ioctl_channel.h" @@ -555,7 +556,7 @@ static int nvgpu_prepare_dev_node_class_list(struct gk20a *g, u32 *num_classes, { int err; - if (nvgpu_is_enabled(g, NVGPU_SUPPORT_MIG)) { + if ((!power_node) && nvgpu_grmgr_is_multi_gr_enabled(g)) { err = nvgpu_prepare_mig_dev_node_class_list(g, num_classes); } else { err = nvgpu_prepare_default_dev_node_class_list(g, num_classes, power_node);