summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a
diff options
context:
space:
mode:
authorSeema Khowala <seemaj@nvidia.com>2018-01-19 17:47:47 -0500
committermobile promotions <svcmobile_promotions@nvidia.com>2018-01-31 16:23:21 -0500
commit9beefc45516097db2eabf2887ff66d3334ff9fde (patch)
treec2b390e4b6ebfb642c87af423a22290561fc60bf /drivers/gpu/nvgpu/gk20a
parent8e523a9a53088cd6b8645ab2b9ea8b3cd7cd5e9d (diff)
gpu: nvgpu: add fecs_host_int_enable hal
This will be used to enable fecs interrupts per chip. Change-Id: Id99412ca1a9c4caad999c3458b0e9701515db4b9 Signed-off-by: Seema Khowala <seemaj@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1642554 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a')
-rw-r--r--drivers/gpu/nvgpu/gk20a/gk20a.h1
-rw-r--r--drivers/gpu/nvgpu/gk20a/gr_gk20a.c27
-rw-r--r--drivers/gpu/nvgpu/gk20a/gr_gk20a.h2
3 files changed, 17 insertions, 13 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.h b/drivers/gpu/nvgpu/gk20a/gk20a.h
index 8bddad11..3bc10109 100644
--- a/drivers/gpu/nvgpu/gk20a/gk20a.h
+++ b/drivers/gpu/nvgpu/gk20a/gk20a.h
@@ -441,6 +441,7 @@ struct gpu_ops {
441 u32 (*get_gpcs_swdx_dss_zbc_z_format_reg)(struct gk20a *g); 441 u32 (*get_gpcs_swdx_dss_zbc_z_format_reg)(struct gk20a *g);
442 void (*dump_ctxsw_stats)(struct gk20a *g, struct vm_gk20a *vm, 442 void (*dump_ctxsw_stats)(struct gk20a *g, struct vm_gk20a *vm,
443 struct nvgpu_gr_ctx *gr_ctx); 443 struct nvgpu_gr_ctx *gr_ctx);
444 void (*fecs_host_int_enable)(struct gk20a *g);
444 } gr; 445 } gr;
445 struct { 446 struct {
446 void (*init_hw)(struct gk20a *g); 447 void (*init_hw)(struct gk20a *g);
diff --git a/drivers/gpu/nvgpu/gk20a/gr_gk20a.c b/drivers/gpu/nvgpu/gk20a/gr_gk20a.c
index 68ad7bcd..c7b00500 100644
--- a/drivers/gpu/nvgpu/gk20a/gr_gk20a.c
+++ b/drivers/gpu/nvgpu/gk20a/gr_gk20a.c
@@ -4344,6 +4344,16 @@ void gr_gk20a_enable_hww_exceptions(struct gk20a *g)
4344 gr_memfmt_hww_esr_reset_active_f()); 4344 gr_memfmt_hww_esr_reset_active_f());
4345} 4345}
4346 4346
4347void gr_gk20a_fecs_host_int_enable(struct gk20a *g)
4348{
4349 gk20a_writel(g, gr_fecs_host_int_enable_r(),
4350 gr_fecs_host_int_enable_ctxsw_intr1_enable_f() |
4351 gr_fecs_host_int_enable_fault_during_ctxsw_enable_f() |
4352 gr_fecs_host_int_enable_umimp_firmware_method_enable_f() |
4353 gr_fecs_host_int_enable_umimp_illegal_method_enable_f() |
4354 gr_fecs_host_int_enable_watchdog_enable_f());
4355}
4356
4347static int gk20a_init_gr_setup_hw(struct gk20a *g) 4357static int gk20a_init_gr_setup_hw(struct gk20a *g)
4348{ 4358{
4349 struct gr_gk20a *gr = &g->gr; 4359 struct gr_gk20a *gr = &g->gr;
@@ -4407,12 +4417,7 @@ static int gk20a_init_gr_setup_hw(struct gk20a *g)
4407 gk20a_writel(g, gr_intr_en_r(), 0xFFFFFFFF); 4417 gk20a_writel(g, gr_intr_en_r(), 0xFFFFFFFF);
4408 4418
4409 /* enable fecs error interrupts */ 4419 /* enable fecs error interrupts */
4410 gk20a_writel(g, gr_fecs_host_int_enable_r(), 4420 g->ops.gr.fecs_host_int_enable(g);
4411 gr_fecs_host_int_enable_ctxsw_intr1_enable_f() |
4412 gr_fecs_host_int_enable_fault_during_ctxsw_enable_f() |
4413 gr_fecs_host_int_enable_umimp_firmware_method_enable_f() |
4414 gr_fecs_host_int_enable_umimp_illegal_method_enable_f() |
4415 gr_fecs_host_int_enable_watchdog_enable_f());
4416 4421
4417 g->ops.gr.enable_hww_exceptions(g); 4422 g->ops.gr.enable_hww_exceptions(g);
4418 g->ops.gr.set_hww_esr_report_mask(g); 4423 g->ops.gr.set_hww_esr_report_mask(g);
@@ -5124,15 +5129,9 @@ int gk20a_gr_handle_fecs_error(struct gk20a *g, struct channel_gk20a *ch,
5124 u32 gr_fecs_intr = gk20a_readl(g, gr_fecs_host_int_status_r()); 5129 u32 gr_fecs_intr = gk20a_readl(g, gr_fecs_host_int_status_r());
5125 int ret = 0; 5130 int ret = 0;
5126 5131
5127 gk20a_dbg_fn("");
5128
5129 if (!gr_fecs_intr) 5132 if (!gr_fecs_intr)
5130 return 0; 5133 return 0;
5131 5134
5132 nvgpu_err(g,
5133 "unhandled fecs error interrupt 0x%08x for channel %u",
5134 gr_fecs_intr, isr_data->chid);
5135
5136 if (gr_fecs_intr & gr_fecs_host_int_status_umimp_firmware_method_f(1)) { 5135 if (gr_fecs_intr & gr_fecs_host_int_status_umimp_firmware_method_f(1)) {
5137 gk20a_gr_set_error_notifier(g, isr_data, 5136 gk20a_gr_set_error_notifier(g, isr_data,
5138 NVGPU_ERR_NOTIFIER_FECS_ERR_UNIMP_FIRMWARE_METHOD); 5137 NVGPU_ERR_NOTIFIER_FECS_ERR_UNIMP_FIRMWARE_METHOD);
@@ -5141,6 +5140,10 @@ int gk20a_gr_handle_fecs_error(struct gk20a *g, struct channel_gk20a *ch,
5141 gk20a_readl(g, gr_fecs_ctxsw_mailbox_r(6)), 5140 gk20a_readl(g, gr_fecs_ctxsw_mailbox_r(6)),
5142 isr_data->data_lo); 5141 isr_data->data_lo);
5143 ret = -1; 5142 ret = -1;
5143 } else {
5144 nvgpu_err(g,
5145 "fecs error interrupt 0x%08x for channel %u",
5146 gr_fecs_intr, isr_data->chid);
5144 } 5147 }
5145 5148
5146 gk20a_writel(g, gr_fecs_host_int_clear_r(), gr_fecs_intr); 5149 gk20a_writel(g, gr_fecs_host_int_clear_r(), gr_fecs_intr);
diff --git a/drivers/gpu/nvgpu/gk20a/gr_gk20a.h b/drivers/gpu/nvgpu/gk20a/gr_gk20a.h
index d1c32c03..fa0a4c2d 100644
--- a/drivers/gpu/nvgpu/gk20a/gr_gk20a.h
+++ b/drivers/gpu/nvgpu/gk20a/gr_gk20a.h
@@ -732,7 +732,7 @@ static inline void gr_gk20a_free_cyclestats_snapshot_data(struct gk20a *g)
732} 732}
733#endif 733#endif
734 734
735 735void gr_gk20a_fecs_host_int_enable(struct gk20a *g);
736int gk20a_gr_handle_fecs_error(struct gk20a *g, struct channel_gk20a *ch, 736int gk20a_gr_handle_fecs_error(struct gk20a *g, struct channel_gk20a *ch,
737 struct gr_gk20a_isr_data *isr_data); 737 struct gr_gk20a_isr_data *isr_data);
738int gk20a_gr_lock_down_sm(struct gk20a *g, 738int gk20a_gr_lock_down_sm(struct gk20a *g,