summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/os/linux/vgpu/vgpu_linux.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/nvgpu/os/linux/vgpu/vgpu_linux.h')
-rw-r--r--drivers/gpu/nvgpu/os/linux/vgpu/vgpu_linux.h57
1 files changed, 57 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/os/linux/vgpu/vgpu_linux.h b/drivers/gpu/nvgpu/os/linux/vgpu/vgpu_linux.h
new file mode 100644
index 00000000..38379cf2
--- /dev/null
+++ b/drivers/gpu/nvgpu/os/linux/vgpu/vgpu_linux.h
@@ -0,0 +1,57 @@
1/*
2 * Virtualized GPU Linux Interfaces
3 *
4 * Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.
5 *
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms and conditions of the GNU General Public License,
8 * version 2, as published by the Free Software Foundation.
9 *
10 * This program is distributed in the hope it will be useful, but WITHOUT
11 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
13 * more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 */
18
19#ifndef __VGPU_LINUX_H__
20#define __VGPU_LINUX_H__
21
22struct device;
23struct platform_device;
24
25#ifdef CONFIG_TEGRA_GR_VIRTUALIZATION
26
27#include <nvgpu/vgpu/vgpu.h>
28
29int vgpu_pm_prepare_poweroff(struct device *dev);
30int vgpu_pm_finalize_poweron(struct device *dev);
31int vgpu_probe(struct platform_device *dev);
32int vgpu_remove(struct platform_device *dev);
33
34void vgpu_create_sysfs(struct device *dev);
35void vgpu_remove_sysfs(struct device *dev);
36#else
37/* define placeholders for functions used outside of vgpu */
38
39static inline int vgpu_pm_prepare_poweroff(struct device *dev)
40{
41 return -ENOSYS;
42}
43static inline int vgpu_pm_finalize_poweron(struct device *dev)
44{
45 return -ENOSYS;
46}
47static inline int vgpu_probe(struct platform_device *dev)
48{
49 return -ENOSYS;
50}
51static inline int vgpu_remove(struct platform_device *dev)
52{
53 return -ENOSYS;
54}
55#endif
56
57#endif