From 2870a4bcecf93133141aee9f4d9007f0df22cfa8 Mon Sep 17 00:00:00 2001 From: Konsta Holtta Date: Thu, 2 Oct 2014 15:09:20 +0300 Subject: 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 Reviewed-on: http://git-master/r/552898 Reviewed-by: Aingara Paramakuru Reviewed-by: Terje Bergstrom --- drivers/gpu/nvgpu/vgpu/vgpu.h | 61 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) (limited to 'drivers/gpu/nvgpu/vgpu/vgpu.h') 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 @@ #include #include "gk20a/gk20a.h" +#ifdef CONFIG_TEGRA_GR_VIRTUALIZATION int vgpu_pm_prepare_poweroff(struct device *dev); int vgpu_pm_finalize_poweron(struct device *dev); int vgpu_probe(struct platform_device *dev); @@ -37,5 +38,65 @@ int vgpu_init_fifo_support(struct gk20a *g); int vgpu_get_attribute(u64 handle, u32 attrib, u32 *value); int vgpu_comm_sendrecv(struct tegra_vgpu_cmd_msg *msg, size_t size_in, size_t size_out); +#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; +} +static inline int vgpu_probe(struct platform_device *dev) +{ + return -ENOSYS; +} +static inline int vgpu_remove(struct platform_device *dev) +{ + return -ENOSYS; +} +static inline u64 vgpu_bar1_map(struct gk20a *g, struct sg_table **sgt, u64 size) +{ + return 0; +} +static inline int vgpu_gr_isr(struct gk20a *g, struct tegra_vgpu_gr_intr_info *info) +{ + return 0; +} +static inline void vgpu_init_fifo_ops(struct gpu_ops *gops) +{ +} +static inline void vgpu_init_gr_ops(struct gpu_ops *gops) +{ +} +static inline void vgpu_init_ltc_ops(struct gpu_ops *gops) +{ +} +static inline void vgpu_init_mm_ops(struct gpu_ops *gops) +{ +} +static inline int vgpu_init_mm_support(struct gk20a *g) +{ + return -ENOSYS; +} +static inline int vgpu_init_gr_support(struct gk20a *g) +{ + return -ENOSYS; +} +static inline int vgpu_init_fifo_support(struct gk20a *g) +{ + return -ENOSYS; +} + +static inline int vgpu_get_attribute(u64 handle, u32 attrib, u32 *value) +{ + return -ENOSYS; +} +static inline int vgpu_comm_sendrecv(struct tegra_vgpu_cmd_msg *msg, size_t size_in, + size_t size_out) +{ + return -ENOSYS; +} +#endif #endif -- cgit v1.2.2