mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-24 02:22:34 +03:00
gpu: nvgpu: linux: add virtual function support
vf probe is called by pci general probe when platform data indicates it's a virtual device. vf_linux covers PCIE specific initialization, then call common vgpu probe. Jira GVSCI-15779 Change-Id: I47ce1c4807b23363a9062ff0cbc8e08b9c6cdc97 Signed-off-by: Richard Zhao <rizhao@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2884177 Tested-by: mobile promotions <svcmobile_promotions@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
8a411096c9
commit
f9242c032e
33
drivers/gpu/nvgpu/os/linux/vgpu/vf_linux.h
Normal file
33
drivers/gpu/nvgpu/os/linux/vgpu/vf_linux.h
Normal file
@@ -0,0 +1,33 @@
|
||||
/*
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
#ifndef NVGPU_VF_LINUX_H
|
||||
#define NVGPU_VF_LINUX_H
|
||||
|
||||
struct pci_dev;
|
||||
struct gk20a_platform;
|
||||
|
||||
#ifdef CONFIG_NVGPU_GR_VIRTUALIZATION
|
||||
int vf_probe(struct pci_dev *pdev, struct gk20a_platform *platform);
|
||||
#else
|
||||
static inline int vf_probe(struct pci_dev *pdev,
|
||||
struct gk20a_platform *platform)
|
||||
{
|
||||
return -ENOSYS;
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user