summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/vgpu/vgpu.h
diff options
context:
space:
mode:
authorPeter Daifuku <pdaifuku@nvidia.com>2017-10-06 19:27:14 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2017-10-13 18:20:18 -0400
commit57fb527a7e33384341fc18f1f918d5a8225057f5 (patch)
tree23bb49f879ac495834237c99564f0589d637f07e /drivers/gpu/nvgpu/vgpu/vgpu.h
parent3d343c9eeaa3415851d1c71b8815eb7dc2677b5a (diff)
gpu: nvgpu: vgpu: flatten out vgpu hal
Instead of calling the native HAL init function then adding multiple layers of modification for VGPU, flatten out the sequence so that all entry points are set statically and visible in a single file. JIRA ESRM-30 Change-Id: Ie424abb48bce5038874851d399baac5e4bb7d27c Signed-off-by: Peter Daifuku <pdaifuku@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1574616 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/vgpu/vgpu.h')
-rw-r--r--drivers/gpu/nvgpu/vgpu/vgpu.h40
1 files changed, 5 insertions, 35 deletions
diff --git a/drivers/gpu/nvgpu/vgpu/vgpu.h b/drivers/gpu/nvgpu/vgpu/vgpu.h
index 7364a8d9..d5c49c0f 100644
--- a/drivers/gpu/nvgpu/vgpu/vgpu.h
+++ b/drivers/gpu/nvgpu/vgpu/vgpu.h
@@ -94,16 +94,7 @@ int vgpu_fifo_nonstall_isr(struct gk20a *g,
94 struct tegra_vgpu_fifo_nonstall_intr_info *info); 94 struct tegra_vgpu_fifo_nonstall_intr_info *info);
95int vgpu_ce2_nonstall_isr(struct gk20a *g, 95int vgpu_ce2_nonstall_isr(struct gk20a *g,
96 struct tegra_vgpu_ce2_nonstall_intr_info *info); 96 struct tegra_vgpu_ce2_nonstall_intr_info *info);
97void vgpu_init_fifo_ops(struct gpu_ops *gops); 97u32 vgpu_ce_get_num_pce(struct gk20a *g);
98void vgpu_init_gr_ops(struct gpu_ops *gops);
99void vgpu_init_ltc_ops(struct gpu_ops *gops);
100void vgpu_init_mm_ops(struct gpu_ops *gops);
101void vgpu_init_debug_ops(struct gpu_ops *gops);
102void vgpu_init_tsg_ops(struct gpu_ops *gops);
103#if defined(CONFIG_GK20A_CYCLE_STATS)
104void vgpu_init_css_ops(struct gpu_ops *gops);
105#endif
106void vgpu_init_ce2_ops(struct gpu_ops *gops);
107int vgpu_init_mm_support(struct gk20a *g); 98int vgpu_init_mm_support(struct gk20a *g);
108int vgpu_init_gr_support(struct gk20a *g); 99int vgpu_init_gr_support(struct gk20a *g);
109int vgpu_init_fifo_support(struct gk20a *g); 100int vgpu_init_fifo_support(struct gk20a *g);
@@ -112,15 +103,17 @@ int vgpu_get_attribute(u64 handle, u32 attrib, u32 *value);
112int vgpu_comm_sendrecv(struct tegra_vgpu_cmd_msg *msg, size_t size_in, 103int vgpu_comm_sendrecv(struct tegra_vgpu_cmd_msg *msg, size_t size_in,
113 size_t size_out); 104 size_t size_out);
114 105
115void vgpu_init_hal_common(struct gk20a *g);
116int vgpu_gm20b_init_hal(struct gk20a *g); 106int vgpu_gm20b_init_hal(struct gk20a *g);
117int vgpu_gp10b_init_hal(struct gk20a *g); 107int vgpu_gp10b_init_hal(struct gk20a *g);
118 108
119void vgpu_init_dbg_session_ops(struct gpu_ops *gops);
120int vgpu_init_gpu_characteristics(struct gk20a *g); 109int vgpu_init_gpu_characteristics(struct gk20a *g);
121 110
122void vgpu_create_sysfs(struct device *dev); 111void vgpu_create_sysfs(struct device *dev);
123void vgpu_remove_sysfs(struct device *dev); 112void vgpu_remove_sysfs(struct device *dev);
113int vgpu_read_ptimer(struct gk20a *g, u64 *value);
114int vgpu_get_timestamps_zipper(struct gk20a *g,
115 u32 source_id, u32 count,
116 struct nvgpu_cpu_time_correlation_sample *samples);
124#else 117#else
125static inline int vgpu_pm_prepare_poweroff(struct device *dev) 118static inline int vgpu_pm_prepare_poweroff(struct device *dev)
126{ 119{
@@ -169,29 +162,6 @@ static inline int vgpu_fifo_isr(struct gk20a *g,
169{ 162{
170 return 0; 163 return 0;
171} 164}
172static inline void vgpu_init_fifo_ops(struct gpu_ops *gops)
173{
174}
175static inline void vgpu_init_gr_ops(struct gpu_ops *gops)
176{
177}
178static inline void vgpu_init_ltc_ops(struct gpu_ops *gops)
179{
180}
181static inline void vgpu_init_mm_ops(struct gpu_ops *gops)
182{
183}
184static inline void vgpu_init_debug_ops(struct gpu_ops *gops)
185{
186}
187#if defined(CONFIG_GK20A_CYCLE_STATS)
188static inline void vgpu_init_css_ops(struct gpu_ops *gops)
189{
190}
191#endif
192static inline void vgpu_init_ce2_ops(struct gpu_ops *gops)
193{
194}
195static inline int vgpu_init_mm_support(struct gk20a *g) 165static inline int vgpu_init_mm_support(struct gk20a *g)
196{ 166{
197 return -ENOSYS; 167 return -ENOSYS;