gpu: nvgpu: mig: Defer dev_nodes creation and create new power node to support MIG

- This is deferring the dev_nodes creation after power_on to
select the MIG config and to create the dev_nodes as per the
selected MIG config.

- The patch is adding a device node to issue power on. The
nodes are:
 for igpu :/dev/nvgpu/igpu0/power
 for dgpu:/dev/nvgpu/dgpu-0001:01:00.0/power

To issue power on :
echo "1" > /dev/nvgpu/igpu0/power
echo "1" > /dev/nvgpu/dgpu-0001:01:00.0/power

JIRA NVGPU-6633

Change-Id: Ic4f1f3e42724cc788dcfaf0e881d188fd3bd1ce1
Signed-off-by: dt <dt@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2512647
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
dt
2021-04-09 06:54:50 +00:00
committed by mobile promotions
parent cfc1281223
commit 639ca4edfb
9 changed files with 355 additions and 21 deletions

View File

@@ -78,6 +78,8 @@ struct nvgpu_os_linux {
struct nvgpu_list_node class_list_head;
struct nvgpu_list_node cdev_list_head;
u32 num_cdevs;
bool dev_nodes_created;
bool cdev_list_init_done;
dev_t cdev_region;