gpu: nvgpu: Device nodes creation as default

This is creating GPU nodes by default.
If MIG enabled after probe then delete and recreate
the device nodes.

Bug 5084299

Change-Id: I9ce33e148ec13f29735db9d778f666dc02b64e66
Signed-off-by: Dinesh T <dt@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/3442428
(cherry picked from commit 5c59e4d3d5a7df6f49668995b62d7f67f57f0cc6)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/3456076
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
Tested-by: Jon Hunter <jonathanh@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
This commit is contained in:
Dinesh T
2025-08-28 18:47:46 +00:00
committed by mobile promotions
parent 76db00b237
commit a4145c7b6e
3 changed files with 17 additions and 43 deletions

View File

@@ -1,18 +1,5 @@
/*
* Copyright (c) 2016-2024, NVIDIA CORPORATION. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms and conditions of the GNU General Public License,
* version 2, as published by the Free Software Foundation.
*
* This program is distributed in the hope it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
// SPDX-License-Identifier: GPL-2.0-only
// SPDX-FileCopyrightText: Copyright (c) 2016-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#include <linux/reboot.h>
#include <nvgpu/errata.h>
@@ -507,16 +494,10 @@ int nvgpu_probe(struct gk20a *g,
*/
nvgpu_read_support_gpu_tools(g);
/*
* TODO: While removing the legacy nodes the following condition
* need to be removed.
*/
if (platform->platform_chip_id == TEGRA_210) {
err = gk20a_user_nodes_init(dev);
if (err)
return err;
l->dev_nodes_created = true;
}
err = gk20a_user_nodes_init(dev);
if (err)
return err;
l->dev_nodes_created = true;
/*
* Note that for runtime suspend to work the clocks have to be setup