summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gv11b
diff options
context:
space:
mode:
authorDeepak Nibade <dnibade@nvidia.com>2020-07-07 06:17:00 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2020-07-14 05:40:09 -0400
commite878686302f126fc09d336310651ebe0f857576c (patch)
tree98aefbee1ddd38dd2c3fade1138bdc50ca29f5ae /drivers/gpu/nvgpu/gv11b
parent1b161b6c7a43f95f3b135d18efa97a8429300617 (diff)
gpu: nvgpu: wait ACK for FECS watchdog timeout
On Volta, nvgpu needs to wait for explicit ACK from CTXSW while setting FECS watchdog timeoout This is manual port of the fixes 4d7e5026e38528b88a4a168eca9a8b180475b368 and ad89436b03428a42e43042b6a849c15843fdebc4 on dev-main since clean cherry-pick is not possible due to huge file and structure differences. Bug 200603566 Change-Id: Icba69998ab45eee5fdf2a29e1ac1067589301be6 Signed-off-by: Deepak Nibade <dnibade@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2371708 Tested-by: mobile promotions <svcmobile_promotions@nvidia.com> Reviewed-by: automaticguardword <automaticguardword@nvidia.com> Reviewed-by: Alex Waterman <alexw@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gv11b')
-rw-r--r--drivers/gpu/nvgpu/gv11b/gr_gv11b.c14
-rw-r--r--drivers/gpu/nvgpu/gv11b/gr_gv11b.h1
-rw-r--r--drivers/gpu/nvgpu/gv11b/hal_gv11b.c1
3 files changed, 16 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/gv11b/gr_gv11b.c b/drivers/gpu/nvgpu/gv11b/gr_gv11b.c
index 5820a695..a7a804d2 100644
--- a/drivers/gpu/nvgpu/gv11b/gr_gv11b.c
+++ b/drivers/gpu/nvgpu/gv11b/gr_gv11b.c
@@ -5074,3 +5074,17 @@ fail:
5074 nvgpu_mutex_release(&g->dbg_sessions_lock); 5074 nvgpu_mutex_release(&g->dbg_sessions_lock);
5075 return err; 5075 return err;
5076} 5076}
5077
5078int gr_gv11b_set_fecs_watchdog_timeout(struct gk20a *g)
5079{
5080 return gr_gk20a_submit_fecs_method_op_locked(g,
5081 (struct fecs_method_op_gk20a) {
5082 .method.addr = gr_fecs_method_push_adr_set_watchdog_timeout_f(),
5083 .method.data = 0x7fffffff,
5084 .mailbox = { .id = 0,
5085 .data = ~0, .clr = ~0, .ret = NULL,
5086 .ok = gr_fecs_ctxsw_mailbox_value_pass_v(),
5087 .fail = 0, },
5088 .cond.ok = GR_IS_UCODE_OP_EQUAL,
5089 .cond.fail = GR_IS_UCODE_OP_SKIP}, false);
5090}
diff --git a/drivers/gpu/nvgpu/gv11b/gr_gv11b.h b/drivers/gpu/nvgpu/gv11b/gr_gv11b.h
index 2f765336..5d617a94 100644
--- a/drivers/gpu/nvgpu/gv11b/gr_gv11b.h
+++ b/drivers/gpu/nvgpu/gv11b/gr_gv11b.h
@@ -257,4 +257,5 @@ void gr_gv11b_set_skedcheck(struct gk20a *g, u32 data);
257void gr_gv11b_set_go_idle_timeout(struct gk20a *g, u32 data); 257void gr_gv11b_set_go_idle_timeout(struct gk20a *g, u32 data);
258void gr_gv11b_set_coalesce_buffer_size(struct gk20a *g, u32 data); 258void gr_gv11b_set_coalesce_buffer_size(struct gk20a *g, u32 data);
259void gr_gv11b_set_tex_in_dbg(struct gk20a *g, u32 data); 259void gr_gv11b_set_tex_in_dbg(struct gk20a *g, u32 data);
260int gr_gv11b_set_fecs_watchdog_timeout(struct gk20a *g);
260#endif /* NVGPU_GR_GV11B_H */ 261#endif /* NVGPU_GR_GV11B_H */
diff --git a/drivers/gpu/nvgpu/gv11b/hal_gv11b.c b/drivers/gpu/nvgpu/gv11b/hal_gv11b.c
index a2384fc8..c0f7e4e3 100644
--- a/drivers/gpu/nvgpu/gv11b/hal_gv11b.c
+++ b/drivers/gpu/nvgpu/gv11b/hal_gv11b.c
@@ -452,6 +452,7 @@ static const struct gpu_ops gv11b_ops = {
452 .get_offset_in_gpccs_segment = 452 .get_offset_in_gpccs_segment =
453 gr_gk20a_get_offset_in_gpccs_segment, 453 gr_gk20a_get_offset_in_gpccs_segment,
454 .set_debug_mode = gm20b_gr_set_debug_mode, 454 .set_debug_mode = gm20b_gr_set_debug_mode,
455 .set_fecs_watchdog_timeout = gr_gv11b_set_fecs_watchdog_timeout,
455 }, 456 },
456 .fb = { 457 .fb = {
457 .init_hw = gv11b_fb_init_hw, 458 .init_hw = gv11b_fb_init_hw,