diff options
author | Konsta Holtta <kholtta@nvidia.com> | 2014-10-02 08:09:20 -0400 |
---|---|---|
committer | Dan Willemsen <dwillemsen@nvidia.com> | 2015-03-18 15:11:36 -0400 |
commit | 2870a4bcecf93133141aee9f4d9007f0df22cfa8 (patch) | |
tree | 4494762e8b0710dc37b318b8d3915f547a0d10af /drivers/gpu/nvgpu/vgpu/vgpu.h | |
parent | 17e4b7ff3f48aca2d258f246a1eef4ed32dd53a2 (diff) |
gpu: nvgpu: Add no-op stubs for vgpu
Implement empty or -ENOSYS functions for vgpu if
CONFIG_TEGRA_GR_VIRTUALIZATION is not enabled, and remove ifdefs around
the calling code.
Change-Id: Idc75c9bc486d661786bc222bd9e0380aa7766e78
Signed-off-by: Konsta Holtta <kholtta@nvidia.com>
Reviewed-on: http://git-master/r/552898
Reviewed-by: Aingara Paramakuru <aparamakuru@nvidia.com>
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/vgpu/vgpu.h')
-rw-r--r-- | drivers/gpu/nvgpu/vgpu/vgpu.h | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/vgpu/vgpu.h b/drivers/gpu/nvgpu/vgpu/vgpu.h index 445a1c90..972c2107 100644 --- a/drivers/gpu/nvgpu/vgpu/vgpu.h +++ b/drivers/gpu/nvgpu/vgpu/vgpu.h | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/tegra_vgpu.h> | 20 | #include <linux/tegra_vgpu.h> |
21 | #include "gk20a/gk20a.h" | 21 | #include "gk20a/gk20a.h" |
22 | 22 | ||
23 | #ifdef CONFIG_TEGRA_GR_VIRTUALIZATION | ||
23 | int vgpu_pm_prepare_poweroff(struct device *dev); | 24 | int vgpu_pm_prepare_poweroff(struct device *dev); |
24 | int vgpu_pm_finalize_poweron(struct device *dev); | 25 | int vgpu_pm_finalize_poweron(struct device *dev); |
25 | int vgpu_probe(struct platform_device *dev); | 26 | int vgpu_probe(struct platform_device *dev); |
@@ -37,5 +38,65 @@ int vgpu_init_fifo_support(struct gk20a *g); | |||
37 | int vgpu_get_attribute(u64 handle, u32 attrib, u32 *value); | 38 | int vgpu_get_attribute(u64 handle, u32 attrib, u32 *value); |
38 | int vgpu_comm_sendrecv(struct tegra_vgpu_cmd_msg *msg, size_t size_in, | 39 | int vgpu_comm_sendrecv(struct tegra_vgpu_cmd_msg *msg, size_t size_in, |
39 | size_t size_out); | 40 | size_t size_out); |
41 | #else | ||
42 | static inline int vgpu_pm_prepare_poweroff(struct device *dev) | ||
43 | { | ||
44 | return -ENOSYS; | ||
45 | } | ||
46 | static inline int vgpu_pm_finalize_poweron(struct device *dev) | ||
47 | { | ||
48 | return -ENOSYS; | ||
49 | } | ||
50 | static inline int vgpu_probe(struct platform_device *dev) | ||
51 | { | ||
52 | return -ENOSYS; | ||
53 | } | ||
54 | static inline int vgpu_remove(struct platform_device *dev) | ||
55 | { | ||
56 | return -ENOSYS; | ||
57 | } | ||
58 | static inline u64 vgpu_bar1_map(struct gk20a *g, struct sg_table **sgt, u64 size) | ||
59 | { | ||
60 | return 0; | ||
61 | } | ||
62 | static inline int vgpu_gr_isr(struct gk20a *g, struct tegra_vgpu_gr_intr_info *info) | ||
63 | { | ||
64 | return 0; | ||
65 | } | ||
66 | static inline void vgpu_init_fifo_ops(struct gpu_ops *gops) | ||
67 | { | ||
68 | } | ||
69 | static inline void vgpu_init_gr_ops(struct gpu_ops *gops) | ||
70 | { | ||
71 | } | ||
72 | static inline void vgpu_init_ltc_ops(struct gpu_ops *gops) | ||
73 | { | ||
74 | } | ||
75 | static inline void vgpu_init_mm_ops(struct gpu_ops *gops) | ||
76 | { | ||
77 | } | ||
78 | static inline int vgpu_init_mm_support(struct gk20a *g) | ||
79 | { | ||
80 | return -ENOSYS; | ||
81 | } | ||
82 | static inline int vgpu_init_gr_support(struct gk20a *g) | ||
83 | { | ||
84 | return -ENOSYS; | ||
85 | } | ||
86 | static inline int vgpu_init_fifo_support(struct gk20a *g) | ||
87 | { | ||
88 | return -ENOSYS; | ||
89 | } | ||
90 | |||
91 | static inline int vgpu_get_attribute(u64 handle, u32 attrib, u32 *value) | ||
92 | { | ||
93 | return -ENOSYS; | ||
94 | } | ||
95 | static inline int vgpu_comm_sendrecv(struct tegra_vgpu_cmd_msg *msg, size_t size_in, | ||
96 | size_t size_out) | ||
97 | { | ||
98 | return -ENOSYS; | ||
99 | } | ||
100 | #endif | ||
40 | 101 | ||
41 | #endif | 102 | #endif |