diff options
Diffstat (limited to 'drivers/gpu/nvgpu/common/linux/vgpu/vgpu_linux.h')
-rw-r--r-- | drivers/gpu/nvgpu/common/linux/vgpu/vgpu_linux.h | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/common/linux/vgpu/vgpu_linux.h b/drivers/gpu/nvgpu/common/linux/vgpu/vgpu_linux.h new file mode 100644 index 00000000..8fcc121f --- /dev/null +++ b/drivers/gpu/nvgpu/common/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 | |||
22 | struct device; | ||
23 | struct platform_device; | ||
24 | |||
25 | #ifdef CONFIG_TEGRA_GR_VIRTUALIZATION | ||
26 | |||
27 | #include "vgpu.h" | ||
28 | |||
29 | int vgpu_pm_prepare_poweroff(struct device *dev); | ||
30 | int vgpu_pm_finalize_poweron(struct device *dev); | ||
31 | int vgpu_probe(struct platform_device *dev); | ||
32 | int vgpu_remove(struct platform_device *dev); | ||
33 | |||
34 | void vgpu_create_sysfs(struct device *dev); | ||
35 | void vgpu_remove_sysfs(struct device *dev); | ||
36 | #else | ||
37 | /* define placeholders for functions used outside of vgpu */ | ||
38 | |||
39 | static inline int vgpu_pm_prepare_poweroff(struct device *dev) | ||
40 | { | ||
41 | return -ENOSYS; | ||
42 | } | ||
43 | static inline int vgpu_pm_finalize_poweron(struct device *dev) | ||
44 | { | ||
45 | return -ENOSYS; | ||
46 | } | ||
47 | static inline int vgpu_probe(struct platform_device *dev) | ||
48 | { | ||
49 | return -ENOSYS; | ||
50 | } | ||
51 | static inline int vgpu_remove(struct platform_device *dev) | ||
52 | { | ||
53 | return -ENOSYS; | ||
54 | } | ||
55 | #endif | ||
56 | |||
57 | #endif | ||