diff options
Diffstat (limited to 'drivers/gpu/nvgpu/common/linux/vgpu/gv11b/vgpu_hal_gv11b.c')
-rw-r--r-- | drivers/gpu/nvgpu/common/linux/vgpu/gv11b/vgpu_hal_gv11b.c | 597 |
1 files changed, 0 insertions, 597 deletions
diff --git a/drivers/gpu/nvgpu/common/linux/vgpu/gv11b/vgpu_hal_gv11b.c b/drivers/gpu/nvgpu/common/linux/vgpu/gv11b/vgpu_hal_gv11b.c deleted file mode 100644 index 987dd186..00000000 --- a/drivers/gpu/nvgpu/common/linux/vgpu/gv11b/vgpu_hal_gv11b.c +++ /dev/null | |||
@@ -1,597 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2017-2018, NVIDIA CORPORATION. All rights reserved. | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify it | ||
5 | * under the terms and conditions of the GNU General Public License, | ||
6 | * version 2, as published by the Free Software Foundation. | ||
7 | * | ||
8 | * This program is distributed in the hope it will be useful, but WITHOUT | ||
9 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
10 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | ||
11 | * more details. | ||
12 | * | ||
13 | * You should have received a copy of the GNU General Public License | ||
14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
15 | */ | ||
16 | |||
17 | #include <gk20a/gk20a.h> | ||
18 | #include <gv11b/hal_gv11b.h> | ||
19 | |||
20 | #include "common/linux/vgpu/vgpu.h" | ||
21 | #include "common/linux/vgpu/fifo_vgpu.h" | ||
22 | #include "common/linux/vgpu/gr_vgpu.h" | ||
23 | #include "common/linux/vgpu/ltc_vgpu.h" | ||
24 | #include "common/linux/vgpu/mm_vgpu.h" | ||
25 | #include "common/linux/vgpu/dbg_vgpu.h" | ||
26 | #include "common/linux/vgpu/fecs_trace_vgpu.h" | ||
27 | #include "common/linux/vgpu/css_vgpu.h" | ||
28 | #include "common/linux/vgpu/gm20b/vgpu_gr_gm20b.h" | ||
29 | #include "common/linux/vgpu/gp10b/vgpu_mm_gp10b.h" | ||
30 | #include "common/linux/vgpu/gp10b/vgpu_gr_gp10b.h" | ||
31 | |||
32 | #include <gk20a/fb_gk20a.h> | ||
33 | #include <gk20a/flcn_gk20a.h> | ||
34 | #include <gk20a/bus_gk20a.h> | ||
35 | #include <gk20a/mc_gk20a.h> | ||
36 | |||
37 | #include <gm20b/gr_gm20b.h> | ||
38 | #include <gm20b/fb_gm20b.h> | ||
39 | #include <gm20b/fifo_gm20b.h> | ||
40 | #include <gm20b/pmu_gm20b.h> | ||
41 | #include <gm20b/mm_gm20b.h> | ||
42 | #include <gm20b/acr_gm20b.h> | ||
43 | #include <gm20b/ltc_gm20b.h> | ||
44 | |||
45 | #include <gp10b/fb_gp10b.h> | ||
46 | #include <gp10b/pmu_gp10b.h> | ||
47 | #include <gp10b/mm_gp10b.h> | ||
48 | #include <gp10b/mc_gp10b.h> | ||
49 | #include <gp10b/ce_gp10b.h> | ||
50 | #include "gp10b/gr_gp10b.h" | ||
51 | #include <gp10b/fifo_gp10b.h> | ||
52 | #include <gp10b/therm_gp10b.h> | ||
53 | #include <gp10b/priv_ring_gp10b.h> | ||
54 | #include <gp10b/ltc_gp10b.h> | ||
55 | |||
56 | #include <gp106/pmu_gp106.h> | ||
57 | #include <gp106/acr_gp106.h> | ||
58 | |||
59 | #include <gv11b/fb_gv11b.h> | ||
60 | #include <gv11b/pmu_gv11b.h> | ||
61 | #include <gv11b/acr_gv11b.h> | ||
62 | #include <gv11b/mm_gv11b.h> | ||
63 | #include <gv11b/mc_gv11b.h> | ||
64 | #include <gv11b/ce_gv11b.h> | ||
65 | #include <gv11b/fifo_gv11b.h> | ||
66 | #include <gv11b/therm_gv11b.h> | ||
67 | #include <gv11b/regops_gv11b.h> | ||
68 | #include <gv11b/gr_ctx_gv11b.h> | ||
69 | #include <gv11b/ltc_gv11b.h> | ||
70 | #include <gv11b/gv11b_gating_reglist.h> | ||
71 | #include <gv11b/gr_gv11b.h> | ||
72 | |||
73 | #include <nvgpu/enabled.h> | ||
74 | |||
75 | #include "vgpu_gv11b.h" | ||
76 | #include "vgpu_gr_gv11b.h" | ||
77 | #include "vgpu_fifo_gv11b.h" | ||
78 | #include "vgpu_subctx_gv11b.h" | ||
79 | #include "vgpu_tsg_gv11b.h" | ||
80 | |||
81 | #include <nvgpu/hw/gv11b/hw_fuse_gv11b.h> | ||
82 | #include <nvgpu/hw/gv11b/hw_fifo_gv11b.h> | ||
83 | #include <nvgpu/hw/gv11b/hw_ram_gv11b.h> | ||
84 | #include <nvgpu/hw/gv11b/hw_top_gv11b.h> | ||
85 | #include <nvgpu/hw/gv11b/hw_pwr_gv11b.h> | ||
86 | |||
87 | static const struct gpu_ops vgpu_gv11b_ops = { | ||
88 | .ltc = { | ||
89 | .determine_L2_size_bytes = vgpu_determine_L2_size_bytes, | ||
90 | .set_zbc_s_entry = gv11b_ltc_set_zbc_stencil_entry, | ||
91 | .set_zbc_color_entry = gm20b_ltc_set_zbc_color_entry, | ||
92 | .set_zbc_depth_entry = gm20b_ltc_set_zbc_depth_entry, | ||
93 | .init_cbc = NULL, | ||
94 | .init_fs_state = vgpu_ltc_init_fs_state, | ||
95 | .init_comptags = vgpu_ltc_init_comptags, | ||
96 | .cbc_ctrl = NULL, | ||
97 | .isr = gv11b_ltc_isr, | ||
98 | .flush = gm20b_flush_ltc, | ||
99 | .set_enabled = gp10b_ltc_set_enabled, | ||
100 | }, | ||
101 | .ce2 = { | ||
102 | .isr_stall = gv11b_ce_isr, | ||
103 | .isr_nonstall = gp10b_ce_nonstall_isr, | ||
104 | .get_num_pce = vgpu_ce_get_num_pce, | ||
105 | }, | ||
106 | .gr = { | ||
107 | .init_gpc_mmu = gr_gv11b_init_gpc_mmu, | ||
108 | .bundle_cb_defaults = gr_gv11b_bundle_cb_defaults, | ||
109 | .cb_size_default = gr_gv11b_cb_size_default, | ||
110 | .calc_global_ctx_buffer_size = | ||
111 | gr_gv11b_calc_global_ctx_buffer_size, | ||
112 | .commit_global_attrib_cb = gr_gv11b_commit_global_attrib_cb, | ||
113 | .commit_global_bundle_cb = gr_gp10b_commit_global_bundle_cb, | ||
114 | .commit_global_cb_manager = gr_gp10b_commit_global_cb_manager, | ||
115 | .commit_global_pagepool = gr_gp10b_commit_global_pagepool, | ||
116 | .handle_sw_method = gr_gv11b_handle_sw_method, | ||
117 | .set_alpha_circular_buffer_size = | ||
118 | gr_gv11b_set_alpha_circular_buffer_size, | ||
119 | .set_circular_buffer_size = gr_gv11b_set_circular_buffer_size, | ||
120 | .enable_hww_exceptions = gr_gv11b_enable_hww_exceptions, | ||
121 | .is_valid_class = gr_gv11b_is_valid_class, | ||
122 | .is_valid_gfx_class = gr_gv11b_is_valid_gfx_class, | ||
123 | .is_valid_compute_class = gr_gv11b_is_valid_compute_class, | ||
124 | .get_sm_dsm_perf_regs = gv11b_gr_get_sm_dsm_perf_regs, | ||
125 | .get_sm_dsm_perf_ctrl_regs = gv11b_gr_get_sm_dsm_perf_ctrl_regs, | ||
126 | .init_fs_state = vgpu_gr_init_fs_state, | ||
127 | .set_hww_esr_report_mask = gv11b_gr_set_hww_esr_report_mask, | ||
128 | .falcon_load_ucode = gr_gm20b_load_ctxsw_ucode_segments, | ||
129 | .load_ctxsw_ucode = gr_gk20a_load_ctxsw_ucode, | ||
130 | .set_gpc_tpc_mask = gr_gv11b_set_gpc_tpc_mask, | ||
131 | .get_gpc_tpc_mask = vgpu_gr_get_gpc_tpc_mask, | ||
132 | .alloc_obj_ctx = vgpu_gr_alloc_obj_ctx, | ||
133 | .bind_ctxsw_zcull = vgpu_gr_bind_ctxsw_zcull, | ||
134 | .get_zcull_info = vgpu_gr_get_zcull_info, | ||
135 | .is_tpc_addr = gr_gm20b_is_tpc_addr, | ||
136 | .get_tpc_num = gr_gm20b_get_tpc_num, | ||
137 | .detect_sm_arch = vgpu_gr_detect_sm_arch, | ||
138 | .add_zbc_color = gr_gp10b_add_zbc_color, | ||
139 | .add_zbc_depth = gr_gp10b_add_zbc_depth, | ||
140 | .zbc_set_table = vgpu_gr_add_zbc, | ||
141 | .zbc_query_table = vgpu_gr_query_zbc, | ||
142 | .pmu_save_zbc = gk20a_pmu_save_zbc, | ||
143 | .add_zbc = gr_gk20a_add_zbc, | ||
144 | .pagepool_default_size = gr_gv11b_pagepool_default_size, | ||
145 | .init_ctx_state = vgpu_gr_gp10b_init_ctx_state, | ||
146 | .alloc_gr_ctx = vgpu_gr_gp10b_alloc_gr_ctx, | ||
147 | .free_gr_ctx = vgpu_gr_free_gr_ctx, | ||
148 | .update_ctxsw_preemption_mode = | ||
149 | gr_gp10b_update_ctxsw_preemption_mode, | ||
150 | .dump_gr_regs = NULL, | ||
151 | .update_pc_sampling = gr_gm20b_update_pc_sampling, | ||
152 | .get_fbp_en_mask = vgpu_gr_get_fbp_en_mask, | ||
153 | .get_max_ltc_per_fbp = vgpu_gr_get_max_ltc_per_fbp, | ||
154 | .get_max_lts_per_ltc = vgpu_gr_get_max_lts_per_ltc, | ||
155 | .get_rop_l2_en_mask = vgpu_gr_rop_l2_en_mask, | ||
156 | .get_max_fbps_count = vgpu_gr_get_max_fbps_count, | ||
157 | .init_sm_dsm_reg_info = gv11b_gr_init_sm_dsm_reg_info, | ||
158 | .wait_empty = gr_gv11b_wait_empty, | ||
159 | .init_cyclestats = vgpu_gr_gm20b_init_cyclestats, | ||
160 | .set_sm_debug_mode = vgpu_gr_set_sm_debug_mode, | ||
161 | .enable_cde_in_fecs = gr_gm20b_enable_cde_in_fecs, | ||
162 | .bpt_reg_info = gv11b_gr_bpt_reg_info, | ||
163 | .get_access_map = gr_gv11b_get_access_map, | ||
164 | .handle_fecs_error = gr_gv11b_handle_fecs_error, | ||
165 | .handle_sm_exception = gr_gk20a_handle_sm_exception, | ||
166 | .handle_tex_exception = gr_gv11b_handle_tex_exception, | ||
167 | .enable_gpc_exceptions = gr_gv11b_enable_gpc_exceptions, | ||
168 | .enable_exceptions = gr_gv11b_enable_exceptions, | ||
169 | .get_lrf_tex_ltc_dram_override = get_ecc_override_val, | ||
170 | .update_smpc_ctxsw_mode = vgpu_gr_update_smpc_ctxsw_mode, | ||
171 | .update_hwpm_ctxsw_mode = vgpu_gr_update_hwpm_ctxsw_mode, | ||
172 | .record_sm_error_state = gv11b_gr_record_sm_error_state, | ||
173 | .update_sm_error_state = gv11b_gr_update_sm_error_state, | ||
174 | .clear_sm_error_state = vgpu_gr_clear_sm_error_state, | ||
175 | .suspend_contexts = vgpu_gr_suspend_contexts, | ||
176 | .resume_contexts = vgpu_gr_resume_contexts, | ||
177 | .get_preemption_mode_flags = gr_gp10b_get_preemption_mode_flags, | ||
178 | .init_sm_id_table = vgpu_gr_init_sm_id_table, | ||
179 | .load_smid_config = gr_gv11b_load_smid_config, | ||
180 | .program_sm_id_numbering = gr_gv11b_program_sm_id_numbering, | ||
181 | .is_ltcs_ltss_addr = gr_gm20b_is_ltcs_ltss_addr, | ||
182 | .is_ltcn_ltss_addr = gr_gm20b_is_ltcn_ltss_addr, | ||
183 | .split_lts_broadcast_addr = gr_gm20b_split_lts_broadcast_addr, | ||
184 | .split_ltc_broadcast_addr = gr_gm20b_split_ltc_broadcast_addr, | ||
185 | .setup_rop_mapping = gr_gv11b_setup_rop_mapping, | ||
186 | .program_zcull_mapping = gr_gv11b_program_zcull_mapping, | ||
187 | .commit_global_timeslice = gr_gv11b_commit_global_timeslice, | ||
188 | .commit_inst = vgpu_gr_gv11b_commit_inst, | ||
189 | .write_zcull_ptr = gr_gv11b_write_zcull_ptr, | ||
190 | .write_pm_ptr = gr_gv11b_write_pm_ptr, | ||
191 | .init_elcg_mode = gr_gv11b_init_elcg_mode, | ||
192 | .load_tpc_mask = gr_gv11b_load_tpc_mask, | ||
193 | .inval_icache = gr_gk20a_inval_icache, | ||
194 | .trigger_suspend = gv11b_gr_sm_trigger_suspend, | ||
195 | .wait_for_pause = gr_gk20a_wait_for_pause, | ||
196 | .resume_from_pause = gv11b_gr_resume_from_pause, | ||
197 | .clear_sm_errors = gr_gk20a_clear_sm_errors, | ||
198 | .tpc_enabled_exceptions = gr_gk20a_tpc_enabled_exceptions, | ||
199 | .get_esr_sm_sel = gv11b_gr_get_esr_sm_sel, | ||
200 | .sm_debugger_attached = gv11b_gr_sm_debugger_attached, | ||
201 | .suspend_single_sm = gv11b_gr_suspend_single_sm, | ||
202 | .suspend_all_sms = gv11b_gr_suspend_all_sms, | ||
203 | .resume_single_sm = gv11b_gr_resume_single_sm, | ||
204 | .resume_all_sms = gv11b_gr_resume_all_sms, | ||
205 | .get_sm_hww_warp_esr = gv11b_gr_get_sm_hww_warp_esr, | ||
206 | .get_sm_hww_global_esr = gv11b_gr_get_sm_hww_global_esr, | ||
207 | .get_sm_no_lock_down_hww_global_esr_mask = | ||
208 | gv11b_gr_get_sm_no_lock_down_hww_global_esr_mask, | ||
209 | .lock_down_sm = gv11b_gr_lock_down_sm, | ||
210 | .wait_for_sm_lock_down = gv11b_gr_wait_for_sm_lock_down, | ||
211 | .clear_sm_hww = gv11b_gr_clear_sm_hww, | ||
212 | .init_ovr_sm_dsm_perf = gv11b_gr_init_ovr_sm_dsm_perf, | ||
213 | .get_ovr_perf_regs = gv11b_gr_get_ovr_perf_regs, | ||
214 | .disable_rd_coalesce = gm20a_gr_disable_rd_coalesce, | ||
215 | .set_boosted_ctx = NULL, | ||
216 | .set_preemption_mode = vgpu_gr_gp10b_set_preemption_mode, | ||
217 | .set_czf_bypass = NULL, | ||
218 | .pre_process_sm_exception = gr_gv11b_pre_process_sm_exception, | ||
219 | .set_preemption_buffer_va = gr_gv11b_set_preemption_buffer_va, | ||
220 | .init_preemption_state = NULL, | ||
221 | .update_boosted_ctx = NULL, | ||
222 | .set_bes_crop_debug3 = gr_gp10b_set_bes_crop_debug3, | ||
223 | .set_bes_crop_debug4 = gr_gp10b_set_bes_crop_debug4, | ||
224 | .create_gr_sysfs = gr_gv11b_create_sysfs, | ||
225 | .set_ctxsw_preemption_mode = vgpu_gr_gp10b_set_ctxsw_preemption_mode, | ||
226 | .is_etpc_addr = gv11b_gr_pri_is_etpc_addr, | ||
227 | .egpc_etpc_priv_addr_table = gv11b_gr_egpc_etpc_priv_addr_table, | ||
228 | .handle_tpc_mpc_exception = gr_gv11b_handle_tpc_mpc_exception, | ||
229 | .zbc_s_query_table = gr_gv11b_zbc_s_query_table, | ||
230 | .load_zbc_s_default_tbl = gr_gv11b_load_stencil_default_tbl, | ||
231 | .handle_gpc_gpcmmu_exception = | ||
232 | gr_gv11b_handle_gpc_gpcmmu_exception, | ||
233 | .add_zbc_type_s = gr_gv11b_add_zbc_type_s, | ||
234 | .get_egpc_base = gv11b_gr_get_egpc_base, | ||
235 | .get_egpc_etpc_num = gv11b_gr_get_egpc_etpc_num, | ||
236 | .handle_gpc_gpccs_exception = | ||
237 | gr_gv11b_handle_gpc_gpccs_exception, | ||
238 | .load_zbc_s_tbl = gr_gv11b_load_stencil_tbl, | ||
239 | .access_smpc_reg = gv11b_gr_access_smpc_reg, | ||
240 | .is_egpc_addr = gv11b_gr_pri_is_egpc_addr, | ||
241 | .add_zbc_s = gr_gv11b_add_zbc_stencil, | ||
242 | .handle_gcc_exception = gr_gv11b_handle_gcc_exception, | ||
243 | .init_sw_veid_bundle = gr_gv11b_init_sw_veid_bundle, | ||
244 | .handle_tpc_sm_ecc_exception = | ||
245 | gr_gv11b_handle_tpc_sm_ecc_exception, | ||
246 | .decode_egpc_addr = gv11b_gr_decode_egpc_addr, | ||
247 | .init_ctxsw_hdr_data = gr_gp10b_init_ctxsw_hdr_data, | ||
248 | .init_gfxp_wfi_timeout_count = | ||
249 | gr_gv11b_init_gfxp_wfi_timeout_count, | ||
250 | .get_max_gfxp_wfi_timeout_count = | ||
251 | gr_gv11b_get_max_gfxp_wfi_timeout_count, | ||
252 | }, | ||
253 | .fb = { | ||
254 | .reset = gv11b_fb_reset, | ||
255 | .init_hw = gk20a_fb_init_hw, | ||
256 | .init_fs_state = gv11b_fb_init_fs_state, | ||
257 | .init_cbc = gv11b_fb_init_cbc, | ||
258 | .set_mmu_page_size = gm20b_fb_set_mmu_page_size, | ||
259 | .set_use_full_comp_tag_line = | ||
260 | gm20b_fb_set_use_full_comp_tag_line, | ||
261 | .compression_page_size = gp10b_fb_compression_page_size, | ||
262 | .compressible_page_size = gp10b_fb_compressible_page_size, | ||
263 | .compression_align_mask = gm20b_fb_compression_align_mask, | ||
264 | .vpr_info_fetch = gm20b_fb_vpr_info_fetch, | ||
265 | .dump_vpr_wpr_info = gm20b_fb_dump_vpr_wpr_info, | ||
266 | .read_wpr_info = gm20b_fb_read_wpr_info, | ||
267 | .is_debug_mode_enabled = NULL, | ||
268 | .set_debug_mode = vgpu_mm_mmu_set_debug_mode, | ||
269 | .tlb_invalidate = vgpu_mm_tlb_invalidate, | ||
270 | .hub_isr = gv11b_fb_hub_isr, | ||
271 | }, | ||
272 | .clock_gating = { | ||
273 | .slcg_bus_load_gating_prod = | ||
274 | gv11b_slcg_bus_load_gating_prod, | ||
275 | .slcg_ce2_load_gating_prod = | ||
276 | gv11b_slcg_ce2_load_gating_prod, | ||
277 | .slcg_chiplet_load_gating_prod = | ||
278 | gv11b_slcg_chiplet_load_gating_prod, | ||
279 | .slcg_ctxsw_firmware_load_gating_prod = | ||
280 | gv11b_slcg_ctxsw_firmware_load_gating_prod, | ||
281 | .slcg_fb_load_gating_prod = | ||
282 | gv11b_slcg_fb_load_gating_prod, | ||
283 | .slcg_fifo_load_gating_prod = | ||
284 | gv11b_slcg_fifo_load_gating_prod, | ||
285 | .slcg_gr_load_gating_prod = | ||
286 | gr_gv11b_slcg_gr_load_gating_prod, | ||
287 | .slcg_ltc_load_gating_prod = | ||
288 | ltc_gv11b_slcg_ltc_load_gating_prod, | ||
289 | .slcg_perf_load_gating_prod = | ||
290 | gv11b_slcg_perf_load_gating_prod, | ||
291 | .slcg_priring_load_gating_prod = | ||
292 | gv11b_slcg_priring_load_gating_prod, | ||
293 | .slcg_pmu_load_gating_prod = | ||
294 | gv11b_slcg_pmu_load_gating_prod, | ||
295 | .slcg_therm_load_gating_prod = | ||
296 | gv11b_slcg_therm_load_gating_prod, | ||
297 | .slcg_xbar_load_gating_prod = | ||
298 | gv11b_slcg_xbar_load_gating_prod, | ||
299 | .blcg_bus_load_gating_prod = | ||
300 | gv11b_blcg_bus_load_gating_prod, | ||
301 | .blcg_ce_load_gating_prod = | ||
302 | gv11b_blcg_ce_load_gating_prod, | ||
303 | .blcg_ctxsw_firmware_load_gating_prod = | ||
304 | gv11b_blcg_ctxsw_firmware_load_gating_prod, | ||
305 | .blcg_fb_load_gating_prod = | ||
306 | gv11b_blcg_fb_load_gating_prod, | ||
307 | .blcg_fifo_load_gating_prod = | ||
308 | gv11b_blcg_fifo_load_gating_prod, | ||
309 | .blcg_gr_load_gating_prod = | ||
310 | gv11b_blcg_gr_load_gating_prod, | ||
311 | .blcg_ltc_load_gating_prod = | ||
312 | gv11b_blcg_ltc_load_gating_prod, | ||
313 | .blcg_pwr_csb_load_gating_prod = | ||
314 | gv11b_blcg_pwr_csb_load_gating_prod, | ||
315 | .blcg_pmu_load_gating_prod = | ||
316 | gv11b_blcg_pmu_load_gating_prod, | ||
317 | .blcg_xbar_load_gating_prod = | ||
318 | gv11b_blcg_xbar_load_gating_prod, | ||
319 | .pg_gr_load_gating_prod = | ||
320 | gr_gv11b_pg_gr_load_gating_prod, | ||
321 | }, | ||
322 | .fifo = { | ||
323 | .init_fifo_setup_hw = vgpu_gv11b_init_fifo_setup_hw, | ||
324 | .bind_channel = vgpu_channel_bind, | ||
325 | .unbind_channel = vgpu_channel_unbind, | ||
326 | .disable_channel = vgpu_channel_disable, | ||
327 | .enable_channel = vgpu_channel_enable, | ||
328 | .alloc_inst = vgpu_channel_alloc_inst, | ||
329 | .free_inst = vgpu_channel_free_inst, | ||
330 | .setup_ramfc = vgpu_channel_setup_ramfc, | ||
331 | .default_timeslice_us = vgpu_fifo_default_timeslice_us, | ||
332 | .setup_userd = gk20a_fifo_setup_userd, | ||
333 | .userd_gp_get = gv11b_userd_gp_get, | ||
334 | .userd_gp_put = gv11b_userd_gp_put, | ||
335 | .userd_pb_get = gv11b_userd_pb_get, | ||
336 | .pbdma_acquire_val = gk20a_fifo_pbdma_acquire_val, | ||
337 | .preempt_channel = vgpu_fifo_preempt_channel, | ||
338 | .preempt_tsg = vgpu_fifo_preempt_tsg, | ||
339 | .enable_tsg = vgpu_enable_tsg, | ||
340 | .disable_tsg = gk20a_disable_tsg, | ||
341 | .tsg_verify_channel_status = NULL, | ||
342 | .tsg_verify_status_ctx_reload = NULL, | ||
343 | /* TODO: implement it for CE fault */ | ||
344 | .tsg_verify_status_faulted = NULL, | ||
345 | .update_runlist = vgpu_fifo_update_runlist, | ||
346 | .trigger_mmu_fault = NULL, | ||
347 | .get_mmu_fault_info = NULL, | ||
348 | .wait_engine_idle = vgpu_fifo_wait_engine_idle, | ||
349 | .get_num_fifos = gv11b_fifo_get_num_fifos, | ||
350 | .get_pbdma_signature = gp10b_fifo_get_pbdma_signature, | ||
351 | .set_runlist_interleave = vgpu_fifo_set_runlist_interleave, | ||
352 | .tsg_set_timeslice = vgpu_tsg_set_timeslice, | ||
353 | .tsg_open = vgpu_tsg_open, | ||
354 | .tsg_release = vgpu_tsg_release, | ||
355 | .force_reset_ch = vgpu_fifo_force_reset_ch, | ||
356 | .engine_enum_from_type = gp10b_fifo_engine_enum_from_type, | ||
357 | .device_info_data_parse = gp10b_device_info_data_parse, | ||
358 | .eng_runlist_base_size = fifo_eng_runlist_base__size_1_v, | ||
359 | .init_engine_info = vgpu_fifo_init_engine_info, | ||
360 | .runlist_entry_size = ram_rl_entry_size_v, | ||
361 | .get_tsg_runlist_entry = gv11b_get_tsg_runlist_entry, | ||
362 | .get_ch_runlist_entry = gv11b_get_ch_runlist_entry, | ||
363 | .is_fault_engine_subid_gpc = gv11b_is_fault_engine_subid_gpc, | ||
364 | .dump_pbdma_status = gk20a_dump_pbdma_status, | ||
365 | .dump_eng_status = gv11b_dump_eng_status, | ||
366 | .dump_channel_status_ramfc = gv11b_dump_channel_status_ramfc, | ||
367 | .intr_0_error_mask = gv11b_fifo_intr_0_error_mask, | ||
368 | .is_preempt_pending = gv11b_fifo_is_preempt_pending, | ||
369 | .init_pbdma_intr_descs = gv11b_fifo_init_pbdma_intr_descs, | ||
370 | .reset_enable_hw = gv11b_init_fifo_reset_enable_hw, | ||
371 | .teardown_ch_tsg = gv11b_fifo_teardown_ch_tsg, | ||
372 | .handle_sched_error = gv11b_fifo_handle_sched_error, | ||
373 | .handle_pbdma_intr_0 = gv11b_fifo_handle_pbdma_intr_0, | ||
374 | .handle_pbdma_intr_1 = gv11b_fifo_handle_pbdma_intr_1, | ||
375 | .init_eng_method_buffers = gv11b_fifo_init_eng_method_buffers, | ||
376 | .deinit_eng_method_buffers = | ||
377 | gv11b_fifo_deinit_eng_method_buffers, | ||
378 | .tsg_bind_channel = vgpu_gv11b_tsg_bind_channel, | ||
379 | .tsg_unbind_channel = vgpu_tsg_unbind_channel, | ||
380 | #ifdef CONFIG_TEGRA_GK20A_NVHOST | ||
381 | .alloc_syncpt_buf = vgpu_gv11b_fifo_alloc_syncpt_buf, | ||
382 | .free_syncpt_buf = gv11b_fifo_free_syncpt_buf, | ||
383 | .add_syncpt_wait_cmd = gv11b_fifo_add_syncpt_wait_cmd, | ||
384 | .get_syncpt_wait_cmd_size = gv11b_fifo_get_syncpt_wait_cmd_size, | ||
385 | .add_syncpt_incr_cmd = gv11b_fifo_add_syncpt_incr_cmd, | ||
386 | .get_syncpt_incr_cmd_size = gv11b_fifo_get_syncpt_incr_cmd_size, | ||
387 | .get_sync_ro_map = vgpu_gv11b_fifo_get_sync_ro_map, | ||
388 | #endif | ||
389 | .resetup_ramfc = NULL, | ||
390 | .reschedule_runlist = NULL, | ||
391 | .device_info_fault_id = top_device_info_data_fault_id_enum_v, | ||
392 | .free_channel_ctx_header = vgpu_gv11b_free_subctx_header, | ||
393 | .preempt_ch_tsg = gv11b_fifo_preempt_ch_tsg, | ||
394 | .handle_ctxsw_timeout = gv11b_fifo_handle_ctxsw_timeout, | ||
395 | }, | ||
396 | .gr_ctx = { | ||
397 | .get_netlist_name = gr_gv11b_get_netlist_name, | ||
398 | .is_fw_defined = gr_gv11b_is_firmware_defined, | ||
399 | }, | ||
400 | #ifdef CONFIG_GK20A_CTXSW_TRACE | ||
401 | .fecs_trace = { | ||
402 | .alloc_user_buffer = NULL, | ||
403 | .free_user_buffer = NULL, | ||
404 | .mmap_user_buffer = NULL, | ||
405 | .init = NULL, | ||
406 | .deinit = NULL, | ||
407 | .enable = NULL, | ||
408 | .disable = NULL, | ||
409 | .is_enabled = NULL, | ||
410 | .reset = NULL, | ||
411 | .flush = NULL, | ||
412 | .poll = NULL, | ||
413 | .bind_channel = NULL, | ||
414 | .unbind_channel = NULL, | ||
415 | .max_entries = NULL, | ||
416 | }, | ||
417 | #endif /* CONFIG_GK20A_CTXSW_TRACE */ | ||
418 | .mm = { | ||
419 | /* FIXME: add support for sparse mappings */ | ||
420 | .support_sparse = NULL, | ||
421 | .gmmu_map = vgpu_gp10b_locked_gmmu_map, | ||
422 | .gmmu_unmap = vgpu_locked_gmmu_unmap, | ||
423 | .vm_bind_channel = vgpu_vm_bind_channel, | ||
424 | .fb_flush = vgpu_mm_fb_flush, | ||
425 | .l2_invalidate = vgpu_mm_l2_invalidate, | ||
426 | .l2_flush = vgpu_mm_l2_flush, | ||
427 | .cbc_clean = gk20a_mm_cbc_clean, | ||
428 | .set_big_page_size = gm20b_mm_set_big_page_size, | ||
429 | .get_big_page_sizes = gm20b_mm_get_big_page_sizes, | ||
430 | .get_default_big_page_size = gp10b_mm_get_default_big_page_size, | ||
431 | .gpu_phys_addr = gm20b_gpu_phys_addr, | ||
432 | .get_iommu_bit = gk20a_mm_get_iommu_bit, | ||
433 | .get_mmu_levels = gp10b_mm_get_mmu_levels, | ||
434 | .init_pdb = gp10b_mm_init_pdb, | ||
435 | .init_mm_setup_hw = vgpu_gp10b_init_mm_setup_hw, | ||
436 | .is_bar1_supported = gv11b_mm_is_bar1_supported, | ||
437 | .init_inst_block = gv11b_init_inst_block, | ||
438 | .mmu_fault_pending = gv11b_mm_mmu_fault_pending, | ||
439 | .get_kind_invalid = gm20b_get_kind_invalid, | ||
440 | .get_kind_pitch = gm20b_get_kind_pitch, | ||
441 | .init_bar2_vm = gp10b_init_bar2_vm, | ||
442 | .init_bar2_mm_hw_setup = gv11b_init_bar2_mm_hw_setup, | ||
443 | .remove_bar2_vm = gv11b_mm_remove_bar2_vm, | ||
444 | .fault_info_mem_destroy = gv11b_mm_fault_info_mem_destroy, | ||
445 | }, | ||
446 | .therm = { | ||
447 | .init_therm_setup_hw = gp10b_init_therm_setup_hw, | ||
448 | .elcg_init_idle_filters = gv11b_elcg_init_idle_filters, | ||
449 | }, | ||
450 | .pmu = { | ||
451 | .pmu_setup_elpg = gp10b_pmu_setup_elpg, | ||
452 | .pmu_get_queue_head = pwr_pmu_queue_head_r, | ||
453 | .pmu_get_queue_head_size = pwr_pmu_queue_head__size_1_v, | ||
454 | .pmu_get_queue_tail = pwr_pmu_queue_tail_r, | ||
455 | .pmu_get_queue_tail_size = pwr_pmu_queue_tail__size_1_v, | ||
456 | .pmu_queue_head = gk20a_pmu_queue_head, | ||
457 | .pmu_queue_tail = gk20a_pmu_queue_tail, | ||
458 | .pmu_msgq_tail = gk20a_pmu_msgq_tail, | ||
459 | .pmu_mutex_size = pwr_pmu_mutex__size_1_v, | ||
460 | .pmu_mutex_acquire = gk20a_pmu_mutex_acquire, | ||
461 | .pmu_mutex_release = gk20a_pmu_mutex_release, | ||
462 | .write_dmatrfbase = gp10b_write_dmatrfbase, | ||
463 | .pmu_elpg_statistics = gp106_pmu_elpg_statistics, | ||
464 | .pmu_init_perfmon = nvgpu_pmu_init_perfmon_rpc, | ||
465 | .pmu_perfmon_start_sampling = nvgpu_pmu_perfmon_start_sampling_rpc, | ||
466 | .pmu_perfmon_stop_sampling = nvgpu_pmu_perfmon_stop_sampling_rpc, | ||
467 | .pmu_perfmon_get_samples_rpc = nvgpu_pmu_perfmon_get_samples_rpc, | ||
468 | .pmu_pg_init_param = gv11b_pg_gr_init, | ||
469 | .pmu_pg_supported_engines_list = gk20a_pmu_pg_engines_list, | ||
470 | .pmu_pg_engines_feature_list = gk20a_pmu_pg_feature_list, | ||
471 | .dump_secure_fuses = pmu_dump_security_fuses_gp10b, | ||
472 | .reset_engine = gp106_pmu_engine_reset, | ||
473 | .is_engine_in_reset = gp106_pmu_is_engine_in_reset, | ||
474 | .pmu_nsbootstrap = gv11b_pmu_bootstrap, | ||
475 | .pmu_pg_set_sub_feature_mask = gv11b_pg_set_subfeature_mask, | ||
476 | .is_pmu_supported = gv11b_is_pmu_supported, | ||
477 | }, | ||
478 | .regops = { | ||
479 | .get_global_whitelist_ranges = | ||
480 | gv11b_get_global_whitelist_ranges, | ||
481 | .get_global_whitelist_ranges_count = | ||
482 | gv11b_get_global_whitelist_ranges_count, | ||
483 | .get_context_whitelist_ranges = | ||
484 | gv11b_get_context_whitelist_ranges, | ||
485 | .get_context_whitelist_ranges_count = | ||
486 | gv11b_get_context_whitelist_ranges_count, | ||
487 | .get_runcontrol_whitelist = gv11b_get_runcontrol_whitelist, | ||
488 | .get_runcontrol_whitelist_count = | ||
489 | gv11b_get_runcontrol_whitelist_count, | ||
490 | .get_runcontrol_whitelist_ranges = | ||
491 | gv11b_get_runcontrol_whitelist_ranges, | ||
492 | .get_runcontrol_whitelist_ranges_count = | ||
493 | gv11b_get_runcontrol_whitelist_ranges_count, | ||
494 | .get_qctl_whitelist = gv11b_get_qctl_whitelist, | ||
495 | .get_qctl_whitelist_count = gv11b_get_qctl_whitelist_count, | ||
496 | .get_qctl_whitelist_ranges = gv11b_get_qctl_whitelist_ranges, | ||
497 | .get_qctl_whitelist_ranges_count = | ||
498 | gv11b_get_qctl_whitelist_ranges_count, | ||
499 | .apply_smpc_war = gv11b_apply_smpc_war, | ||
500 | }, | ||
501 | .mc = { | ||
502 | .intr_enable = mc_gv11b_intr_enable, | ||
503 | .intr_unit_config = mc_gp10b_intr_unit_config, | ||
504 | .isr_stall = mc_gp10b_isr_stall, | ||
505 | .intr_stall = mc_gp10b_intr_stall, | ||
506 | .intr_stall_pause = mc_gp10b_intr_stall_pause, | ||
507 | .intr_stall_resume = mc_gp10b_intr_stall_resume, | ||
508 | .intr_nonstall = mc_gp10b_intr_nonstall, | ||
509 | .intr_nonstall_pause = mc_gp10b_intr_nonstall_pause, | ||
510 | .intr_nonstall_resume = mc_gp10b_intr_nonstall_resume, | ||
511 | .enable = gk20a_mc_enable, | ||
512 | .disable = gk20a_mc_disable, | ||
513 | .reset = gk20a_mc_reset, | ||
514 | .boot_0 = gk20a_mc_boot_0, | ||
515 | .is_intr1_pending = mc_gp10b_is_intr1_pending, | ||
516 | .is_intr_hub_pending = gv11b_mc_is_intr_hub_pending, | ||
517 | }, | ||
518 | .debug = { | ||
519 | .show_dump = NULL, | ||
520 | }, | ||
521 | .dbg_session_ops = { | ||
522 | .exec_reg_ops = vgpu_exec_regops, | ||
523 | .dbg_set_powergate = vgpu_dbg_set_powergate, | ||
524 | .check_and_set_global_reservation = | ||
525 | vgpu_check_and_set_global_reservation, | ||
526 | .check_and_set_context_reservation = | ||
527 | vgpu_check_and_set_context_reservation, | ||
528 | .release_profiler_reservation = | ||
529 | vgpu_release_profiler_reservation, | ||
530 | .perfbuffer_enable = vgpu_perfbuffer_enable, | ||
531 | .perfbuffer_disable = vgpu_perfbuffer_disable, | ||
532 | }, | ||
533 | .bus = { | ||
534 | .init_hw = gk20a_bus_init_hw, | ||
535 | .isr = gk20a_bus_isr, | ||
536 | .read_ptimer = vgpu_read_ptimer, | ||
537 | .get_timestamps_zipper = vgpu_get_timestamps_zipper, | ||
538 | .bar1_bind = NULL, | ||
539 | }, | ||
540 | #if defined(CONFIG_GK20A_CYCLE_STATS) | ||
541 | .css = { | ||
542 | .enable_snapshot = vgpu_css_enable_snapshot_buffer, | ||
543 | .disable_snapshot = vgpu_css_release_snapshot_buffer, | ||
544 | .check_data_available = vgpu_css_flush_snapshots, | ||
545 | .detach_snapshot = vgpu_css_detach, | ||
546 | .set_handled_snapshots = NULL, | ||
547 | .allocate_perfmon_ids = NULL, | ||
548 | .release_perfmon_ids = NULL, | ||
549 | }, | ||
550 | #endif | ||
551 | .falcon = { | ||
552 | .falcon_hal_sw_init = gk20a_falcon_hal_sw_init, | ||
553 | }, | ||
554 | .priv_ring = { | ||
555 | .isr = gp10b_priv_ring_isr, | ||
556 | }, | ||
557 | .chip_init_gpu_characteristics = vgpu_gv11b_init_gpu_characteristics, | ||
558 | .get_litter_value = gv11b_get_litter_value, | ||
559 | }; | ||
560 | |||
561 | int vgpu_gv11b_init_hal(struct gk20a *g) | ||
562 | { | ||
563 | struct gpu_ops *gops = &g->ops; | ||
564 | |||
565 | gops->ltc = vgpu_gv11b_ops.ltc; | ||
566 | gops->ce2 = vgpu_gv11b_ops.ce2; | ||
567 | gops->gr = vgpu_gv11b_ops.gr; | ||
568 | gops->fb = vgpu_gv11b_ops.fb; | ||
569 | gops->clock_gating = vgpu_gv11b_ops.clock_gating; | ||
570 | gops->fifo = vgpu_gv11b_ops.fifo; | ||
571 | gops->gr_ctx = vgpu_gv11b_ops.gr_ctx; | ||
572 | gops->mm = vgpu_gv11b_ops.mm; | ||
573 | #ifdef CONFIG_GK20A_CTXSW_TRACE | ||
574 | gops->fecs_trace = vgpu_gv11b_ops.fecs_trace; | ||
575 | #endif | ||
576 | gops->therm = vgpu_gv11b_ops.therm; | ||
577 | gops->pmu = vgpu_gv11b_ops.pmu; | ||
578 | gops->regops = vgpu_gv11b_ops.regops; | ||
579 | gops->mc = vgpu_gv11b_ops.mc; | ||
580 | gops->debug = vgpu_gv11b_ops.debug; | ||
581 | gops->dbg_session_ops = vgpu_gv11b_ops.dbg_session_ops; | ||
582 | gops->bus = vgpu_gv11b_ops.bus; | ||
583 | #if defined(CONFIG_GK20A_CYCLE_STATS) | ||
584 | gops->css = vgpu_gv11b_ops.css; | ||
585 | #endif | ||
586 | gops->falcon = vgpu_gv11b_ops.falcon; | ||
587 | gops->priv_ring = vgpu_gv11b_ops.priv_ring; | ||
588 | |||
589 | /* Lone functions */ | ||
590 | gops->chip_init_gpu_characteristics = | ||
591 | vgpu_gv11b_ops.chip_init_gpu_characteristics; | ||
592 | gops->get_litter_value = vgpu_gv11b_ops.get_litter_value; | ||
593 | |||
594 | g->name = "gv11b"; | ||
595 | |||
596 | return 0; | ||
597 | } | ||