diff options
author | Peter Daifuku <pdaifuku@nvidia.com> | 2017-10-06 19:27:14 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2017-10-13 18:20:18 -0400 |
commit | 57fb527a7e33384341fc18f1f918d5a8225057f5 (patch) | |
tree | 23bb49f879ac495834237c99564f0589d637f07e /drivers/gpu/nvgpu/vgpu/vgpu.h | |
parent | 3d343c9eeaa3415851d1c71b8815eb7dc2677b5a (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.h | 40 |
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); |
95 | int vgpu_ce2_nonstall_isr(struct gk20a *g, | 95 | int 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); |
97 | void vgpu_init_fifo_ops(struct gpu_ops *gops); | 97 | u32 vgpu_ce_get_num_pce(struct gk20a *g); |
98 | void vgpu_init_gr_ops(struct gpu_ops *gops); | ||
99 | void vgpu_init_ltc_ops(struct gpu_ops *gops); | ||
100 | void vgpu_init_mm_ops(struct gpu_ops *gops); | ||
101 | void vgpu_init_debug_ops(struct gpu_ops *gops); | ||
102 | void vgpu_init_tsg_ops(struct gpu_ops *gops); | ||
103 | #if defined(CONFIG_GK20A_CYCLE_STATS) | ||
104 | void vgpu_init_css_ops(struct gpu_ops *gops); | ||
105 | #endif | ||
106 | void vgpu_init_ce2_ops(struct gpu_ops *gops); | ||
107 | int vgpu_init_mm_support(struct gk20a *g); | 98 | int vgpu_init_mm_support(struct gk20a *g); |
108 | int vgpu_init_gr_support(struct gk20a *g); | 99 | int vgpu_init_gr_support(struct gk20a *g); |
109 | int vgpu_init_fifo_support(struct gk20a *g); | 100 | int vgpu_init_fifo_support(struct gk20a *g); |
@@ -112,15 +103,17 @@ int vgpu_get_attribute(u64 handle, u32 attrib, u32 *value); | |||
112 | int vgpu_comm_sendrecv(struct tegra_vgpu_cmd_msg *msg, size_t size_in, | 103 | int 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 | ||
115 | void vgpu_init_hal_common(struct gk20a *g); | ||
116 | int vgpu_gm20b_init_hal(struct gk20a *g); | 106 | int vgpu_gm20b_init_hal(struct gk20a *g); |
117 | int vgpu_gp10b_init_hal(struct gk20a *g); | 107 | int vgpu_gp10b_init_hal(struct gk20a *g); |
118 | 108 | ||
119 | void vgpu_init_dbg_session_ops(struct gpu_ops *gops); | ||
120 | int vgpu_init_gpu_characteristics(struct gk20a *g); | 109 | int vgpu_init_gpu_characteristics(struct gk20a *g); |
121 | 110 | ||
122 | void vgpu_create_sysfs(struct device *dev); | 111 | void vgpu_create_sysfs(struct device *dev); |
123 | void vgpu_remove_sysfs(struct device *dev); | 112 | void vgpu_remove_sysfs(struct device *dev); |
113 | int vgpu_read_ptimer(struct gk20a *g, u64 *value); | ||
114 | int 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 |
125 | static inline int vgpu_pm_prepare_poweroff(struct device *dev) | 118 | static 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 | } |
172 | static inline void vgpu_init_fifo_ops(struct gpu_ops *gops) | ||
173 | { | ||
174 | } | ||
175 | static inline void vgpu_init_gr_ops(struct gpu_ops *gops) | ||
176 | { | ||
177 | } | ||
178 | static inline void vgpu_init_ltc_ops(struct gpu_ops *gops) | ||
179 | { | ||
180 | } | ||
181 | static inline void vgpu_init_mm_ops(struct gpu_ops *gops) | ||
182 | { | ||
183 | } | ||
184 | static inline void vgpu_init_debug_ops(struct gpu_ops *gops) | ||
185 | { | ||
186 | } | ||
187 | #if defined(CONFIG_GK20A_CYCLE_STATS) | ||
188 | static inline void vgpu_init_css_ops(struct gpu_ops *gops) | ||
189 | { | ||
190 | } | ||
191 | #endif | ||
192 | static inline void vgpu_init_ce2_ops(struct gpu_ops *gops) | ||
193 | { | ||
194 | } | ||
195 | static inline int vgpu_init_mm_support(struct gk20a *g) | 165 | static inline int vgpu_init_mm_support(struct gk20a *g) |
196 | { | 166 | { |
197 | return -ENOSYS; | 167 | return -ENOSYS; |