diff options
author | Seema Khowala <seemaj@nvidia.com> | 2018-01-23 15:16:40 -0500 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2018-01-31 16:23:30 -0500 |
commit | 791ce6bd5480a8393c12be55e8afa459cb4dd1ff (patch) | |
tree | c34ed1f076bec31bfc5b87a7fa490eb28a2789d6 /drivers/gpu/nvgpu/gv11b | |
parent | 9beefc45516097db2eabf2887ff66d3334ff9fde (diff) |
gpu: nvgpu: gv11b: enable more gr exceptions
-pd, scc, ds, ssync, mme and sked exceptions are
enabled. This will be useful for debugging
-Handle enabled interrupts
-Add gr ops to handle ssync hww. For legacy
chips, ssync hww_esr register is gpcs_ppcs_ssync_hww_esr.
Since ssync hww is not enabled on legacy chips, added
ssync hww exception handling for volta only.
Change-Id: I63ba2eb51fa82e74832df26ee4cf3546458e5669
Signed-off-by: Seema Khowala <seemaj@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1644751
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gv11b')
-rw-r--r-- | drivers/gpu/nvgpu/gv11b/gr_gv11b.c | 38 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gv11b/gr_gv11b.h | 1 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gv11b/hal_gv11b.c | 1 |
3 files changed, 40 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/gv11b/gr_gv11b.c b/drivers/gpu/nvgpu/gv11b/gr_gv11b.c index 6b43fcc8..3e207811 100644 --- a/drivers/gpu/nvgpu/gv11b/gr_gv11b.c +++ b/drivers/gpu/nvgpu/gv11b/gr_gv11b.c | |||
@@ -313,12 +313,32 @@ static int gr_gv11b_handle_lrf_exception(struct gk20a *g, u32 gpc, u32 tpc, | |||
313 | void gr_gv11b_enable_hww_exceptions(struct gk20a *g) | 313 | void gr_gv11b_enable_hww_exceptions(struct gk20a *g) |
314 | { | 314 | { |
315 | /* enable exceptions */ | 315 | /* enable exceptions */ |
316 | |||
316 | gk20a_writel(g, gr_fe_hww_esr_r(), | 317 | gk20a_writel(g, gr_fe_hww_esr_r(), |
317 | gr_fe_hww_esr_en_enable_f() | | 318 | gr_fe_hww_esr_en_enable_f() | |
318 | gr_fe_hww_esr_reset_active_f()); | 319 | gr_fe_hww_esr_reset_active_f()); |
319 | gk20a_writel(g, gr_memfmt_hww_esr_r(), | 320 | gk20a_writel(g, gr_memfmt_hww_esr_r(), |
320 | gr_memfmt_hww_esr_en_enable_f() | | 321 | gr_memfmt_hww_esr_en_enable_f() | |
321 | gr_memfmt_hww_esr_reset_active_f()); | 322 | gr_memfmt_hww_esr_reset_active_f()); |
323 | gk20a_writel(g, gr_pd_hww_esr_r(), | ||
324 | gr_pd_hww_esr_en_enable_f() | | ||
325 | gr_pd_hww_esr_reset_active_f()); | ||
326 | gk20a_writel(g, gr_scc_hww_esr_r(), | ||
327 | gr_scc_hww_esr_en_enable_f() | | ||
328 | gr_scc_hww_esr_reset_active_f()); | ||
329 | gk20a_writel(g, gr_ds_hww_esr_r(), | ||
330 | gr_ds_hww_esr_en_enabled_f() | | ||
331 | gr_ds_hww_esr_reset_task_f()); | ||
332 | gk20a_writel(g, gr_ssync_hww_esr_r(), | ||
333 | gr_ssync_hww_esr_en_enable_f() | | ||
334 | gr_ssync_hww_esr_reset_active_f()); | ||
335 | gk20a_writel(g, gr_mme_hww_esr_r(), | ||
336 | gr_mme_hww_esr_en_enable_f() | | ||
337 | gr_mme_hww_esr_reset_active_f()); | ||
338 | |||
339 | /* For now leave POR values */ | ||
340 | nvgpu_log(g, gpu_dbg_info, "gr_sked_hww_esr_en_r 0x%08x", | ||
341 | gk20a_readl(g, gr_sked_hww_esr_en_r())); | ||
322 | } | 342 | } |
323 | 343 | ||
324 | void gr_gv11b_fecs_host_int_enable(struct gk20a *g) | 344 | void gr_gv11b_fecs_host_int_enable(struct gk20a *g) |
@@ -351,8 +371,16 @@ void gr_gv11b_enable_exceptions(struct gk20a *g) | |||
351 | 371 | ||
352 | reg_val = gr_exception_en_fe_enabled_f() | | 372 | reg_val = gr_exception_en_fe_enabled_f() | |
353 | gr_exception_en_memfmt_enabled_f() | | 373 | gr_exception_en_memfmt_enabled_f() | |
374 | gr_exception_en_pd_enabled_f() | | ||
375 | gr_exception_en_scc_enabled_f() | | ||
354 | gr_exception_en_ds_enabled_f() | | 376 | gr_exception_en_ds_enabled_f() | |
377 | gr_exception_en_ssync_enabled_f() | | ||
378 | gr_exception_en_mme_enabled_f() | | ||
379 | gr_exception_en_sked_enabled_f() | | ||
355 | gr_exception_en_gpc_enabled_f(); | 380 | gr_exception_en_gpc_enabled_f(); |
381 | |||
382 | nvgpu_log(g, gpu_dbg_info, "gr_exception_en 0x%08x", reg_val); | ||
383 | |||
356 | gk20a_writel(g, gr_exception_en_r(), reg_val); | 384 | gk20a_writel(g, gr_exception_en_r(), reg_val); |
357 | 385 | ||
358 | } | 386 | } |
@@ -4246,3 +4274,13 @@ u32 gr_gv11b_get_gpcs_swdx_dss_zbc_z_format_reg(struct gk20a *g) | |||
4246 | { | 4274 | { |
4247 | return gr_gpcs_swdx_dss_zbc_z_01_to_04_format_r(); | 4275 | return gr_gpcs_swdx_dss_zbc_z_01_to_04_format_r(); |
4248 | } | 4276 | } |
4277 | |||
4278 | int gr_gv11b_handle_ssync_hww(struct gk20a *g) | ||
4279 | { | ||
4280 | u32 ssync = gk20a_readl(g, gr_ssync_hww_esr_r()); | ||
4281 | |||
4282 | nvgpu_err(g, "ssync exception: esr 0x%08x", ssync); | ||
4283 | gk20a_writel(g, gr_ssync_hww_esr_r(), | ||
4284 | gr_ssync_hww_esr_reset_active_f()); | ||
4285 | return -EFAULT; | ||
4286 | } | ||
diff --git a/drivers/gpu/nvgpu/gv11b/gr_gv11b.h b/drivers/gpu/nvgpu/gv11b/gr_gv11b.h index 157c567a..2f8d2e17 100644 --- a/drivers/gpu/nvgpu/gv11b/gr_gv11b.h +++ b/drivers/gpu/nvgpu/gv11b/gr_gv11b.h | |||
@@ -227,5 +227,6 @@ int gr_gv11b_set_ctxsw_preemption_mode(struct gk20a *g, | |||
227 | void gr_gv11b_update_ctxsw_preemption_mode(struct gk20a *g, | 227 | void gr_gv11b_update_ctxsw_preemption_mode(struct gk20a *g, |
228 | struct channel_gk20a *ch_ctx, | 228 | struct channel_gk20a *ch_ctx, |
229 | struct nvgpu_mem *mem); | 229 | struct nvgpu_mem *mem); |
230 | int gr_gv11b_handle_ssync_hww(struct gk20a *g); | ||
230 | 231 | ||
231 | #endif | 232 | #endif |
diff --git a/drivers/gpu/nvgpu/gv11b/hal_gv11b.c b/drivers/gpu/nvgpu/gv11b/hal_gv11b.c index ec86d74c..91d80080 100644 --- a/drivers/gpu/nvgpu/gv11b/hal_gv11b.c +++ b/drivers/gpu/nvgpu/gv11b/hal_gv11b.c | |||
@@ -399,6 +399,7 @@ static const struct gpu_ops gv11b_ops = { | |||
399 | .ecc_init_scrub_reg = gr_gv11b_ecc_init_scrub_reg, | 399 | .ecc_init_scrub_reg = gr_gv11b_ecc_init_scrub_reg, |
400 | .dump_ctxsw_stats = gr_gp10b_dump_ctxsw_stats, | 400 | .dump_ctxsw_stats = gr_gp10b_dump_ctxsw_stats, |
401 | .fecs_host_int_enable = gr_gv11b_fecs_host_int_enable, | 401 | .fecs_host_int_enable = gr_gv11b_fecs_host_int_enable, |
402 | .handle_ssync_hww = gr_gv11b_handle_ssync_hww, | ||
402 | }, | 403 | }, |
403 | .fb = { | 404 | .fb = { |
404 | .reset = gv11b_fb_reset, | 405 | .reset = gv11b_fb_reset, |