mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-24 02:22:34 +03:00
gpu: nvgpu: vgpu: create vgpu_common file
vgpu_common file contains common functions that could be shared by legacy vgpu and vf. Jira GVSCI-15779 Change-Id: Ie301eb29dfceed95bcd96a1024663f31eb7558fd Signed-off-by: Richard Zhao <rizhao@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2884175 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
678df244b9
commit
03da61c9ce
42
drivers/gpu/nvgpu/os/linux/vgpu/vgpu_common.h
Normal file
42
drivers/gpu/nvgpu/os/linux/vgpu/vgpu_common.h
Normal file
@@ -0,0 +1,42 @@
|
||||
/*
|
||||
* 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 LINUX_VGPU_COMMON_H
|
||||
#define LINUX_VGPU_COMMON_H
|
||||
|
||||
struct device;
|
||||
struct nvgpu_os_linux;
|
||||
|
||||
#ifdef CONFIG_NVGPU_GR_VIRTUALIZATION
|
||||
|
||||
int vgpu_pm_prepare_poweroff(struct device *dev);
|
||||
int vgpu_pm_finalize_poweron(struct device *dev);
|
||||
int vgpu_probe_common(struct nvgpu_os_linux *l);
|
||||
|
||||
#else
|
||||
|
||||
static inline int vgpu_pm_prepare_poweroff(struct device *dev)
|
||||
{
|
||||
return -ENOSYS;
|
||||
}
|
||||
static inline int vgpu_pm_finalize_poweron(struct device *dev)
|
||||
{
|
||||
return -ENOSYS;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user