From dafbbebafcc5f6b7c0ffd0dcf0e48565a6fead29 Mon Sep 17 00:00:00 2001 From: Richard Zhao Date: Fri, 19 Aug 2022 22:26:32 -0700 Subject: [PATCH] gpu: nvgpu: vgpu: add ERRBAR support to ga10b - set the enable flag for ERRBAR - set the HAL to ga10b_gr_set_sched_wait_for_errbar - move ga10b_gr_set_sched_wait_for_errbar to call .exec_regops which works in vgpu too. Bug 3758132 Signed-off-by: Richard Zhao Change-Id: Ie4821bf513da1253365386f08c71bb6e02d09b35 Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2764030 Reviewed-by: svc-mobile-coverity Reviewed-by: svc-mobile-misra Reviewed-by: svc-mobile-cert Reviewed-by: svcacv Reviewed-by: Vijayakumar Subbu GVS: Gerrit_Virtual_Submit --- drivers/gpu/nvgpu/hal/gr/gr/gr_ga10b.c | 2 +- drivers/gpu/nvgpu/hal/vgpu/init/vgpu_hal_ga10b.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/nvgpu/hal/gr/gr/gr_ga10b.c b/drivers/gpu/nvgpu/hal/gr/gr/gr_ga10b.c index e3071279e..8de5ed0f0 100644 --- a/drivers/gpu/nvgpu/hal/gr/gr/gr_ga10b.c +++ b/drivers/gpu/nvgpu/hal/gr/gr/gr_ga10b.c @@ -1128,7 +1128,7 @@ int ga10b_gr_set_sched_wait_for_errbar(struct gk20a *g, u32 flags = NVGPU_REG_OP_FLAG_MODE_ALL_OR_NONE; if (tsg != NULL) { - err = gr_gk20a_exec_ctx_ops(tsg, &ctx_ops, 1, 1, 0, &flags); + err = g->ops.regops.exec_regops(g, tsg, &ctx_ops, 1, 1, 0, &flags); if (err != 0) { nvgpu_err(g, "update implicit ERRBAR failed"); } diff --git a/drivers/gpu/nvgpu/hal/vgpu/init/vgpu_hal_ga10b.c b/drivers/gpu/nvgpu/hal/vgpu/init/vgpu_hal_ga10b.c index c0c5a8a0e..7ecb38a68 100644 --- a/drivers/gpu/nvgpu/hal/vgpu/init/vgpu_hal_ga10b.c +++ b/drivers/gpu/nvgpu/hal/vgpu/init/vgpu_hal_ga10b.c @@ -518,6 +518,7 @@ static const struct gops_gr vgpu_ga10b_ops_gr = { .get_offset_in_gpccs_segment = gr_gk20a_get_offset_in_gpccs_segment, .set_debug_mode = gm20b_gr_set_debug_mode, .set_mmu_debug_mode = vgpu_gr_set_mmu_debug_mode, + .set_sched_wait_for_errbar = ga10b_gr_set_sched_wait_for_errbar, #endif }; @@ -1236,6 +1237,7 @@ int vgpu_ga10b_init_hal(struct gk20a *g) #endif #ifdef CONFIG_NVGPU_DEBUGGER nvgpu_set_enabled(g, NVGPU_L2_MAX_WAYS_EVICT_LAST_ENABLED, true); + nvgpu_set_enabled(g, NVGPU_SCHED_EXIT_WAIT_FOR_ERRBAR_SUPPORTED, true); #endif g->name = "ga10b";