mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-22 09:12:24 +03:00
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:
committed by
mobile promotions
parent
76db00b237
commit
a4145c7b6e
@@ -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
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
// SPDX-FileCopyrightText: Copyright (c) 2011-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||
// SPDX-FileCopyrightText: Copyright (c) 2011-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||
|
||||
/*
|
||||
* GK20A Graphics
|
||||
@@ -495,7 +495,9 @@ int gk20a_pm_finalize_poweron(struct device *dev)
|
||||
goto done;
|
||||
}
|
||||
|
||||
if (!l->dev_nodes_created) {
|
||||
if ((!l->dev_nodes_created) ||
|
||||
(nvgpu_grmgr_is_multi_gr_enabled(g))) {
|
||||
gk20a_user_nodes_deinit(dev);
|
||||
err = gk20a_user_nodes_init(dev);
|
||||
if (err) {
|
||||
goto done;
|
||||
|
||||
@@ -1,19 +1,8 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
// SPDX-FileCopyrightText: Copyright (c) 2023-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||
|
||||
/*
|
||||
* Linux common code for legacy VGPU and VF
|
||||
*
|
||||
* Copyright (c) 2023, 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/>.
|
||||
*/
|
||||
|
||||
#include <linux/dma-mapping.h>
|
||||
@@ -27,7 +16,7 @@
|
||||
#include <nvgpu/nvgpu_init.h>
|
||||
#include <nvgpu/regops.h>
|
||||
#include <nvgpu/soc.h>
|
||||
|
||||
#include <nvgpu/grmgr.h>
|
||||
#include "vgpu_linux.h"
|
||||
#include "common/vgpu/ivc/comm_vgpu.h"
|
||||
#include "common/vgpu/init/init_vgpu.h"
|
||||
@@ -167,7 +156,9 @@ int vgpu_pm_finalize_poweron(struct device *dev)
|
||||
if (err)
|
||||
goto done;
|
||||
|
||||
if (!l->dev_nodes_created) {
|
||||
if ((!l->dev_nodes_created) ||
|
||||
(nvgpu_grmgr_is_multi_gr_enabled(g))) {
|
||||
gk20a_user_nodes_deinit(dev);
|
||||
err = gk20a_user_nodes_init(dev);
|
||||
if (err) {
|
||||
goto done;
|
||||
|
||||
Reference in New Issue
Block a user