summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu
diff options
context:
space:
mode:
authorTerje Bergstrom <tbergstrom@nvidia.com>2018-07-06 12:41:08 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2018-07-08 00:06:25 -0400
commit59f07dcdc5480bd233d7e74ad733dc1f85d0b374 (patch)
tree40e5fc9de2c43a46fd9a960b7344d451a969b431 /drivers/gpu/nvgpu
parente899ec032e46f1b2d19b76ed27e69de3b08e4699 (diff)
gpu: nvgpu: Call handle_replayable_fault via HAL
gr_gv11b.c had a direct dependency to fb_gv11b.c because it calls FB to process replayable faults while waiting for SM lockdown. Redirect that call via HAL to remove the dependency. JIRA NVGPU-714 Change-Id: Ie6df3658f06b1f867893bc98fe581c95813f0431 Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1772884 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu')
-rw-r--r--drivers/gpu/nvgpu/gk20a/gk20a.h1
-rw-r--r--drivers/gpu/nvgpu/gv11b/gr_gv11b.c6
-rw-r--r--drivers/gpu/nvgpu/gv11b/hal_gv11b.c1
3 files changed, 5 insertions, 3 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.h b/drivers/gpu/nvgpu/gk20a/gk20a.h
index 4aa04139..4f02ce23 100644
--- a/drivers/gpu/nvgpu/gk20a/gk20a.h
+++ b/drivers/gpu/nvgpu/gk20a/gk20a.h
@@ -532,6 +532,7 @@ struct gpu_ops {
532 void (*set_debug_mode)(struct gk20a *g, bool enable); 532 void (*set_debug_mode)(struct gk20a *g, bool enable);
533 void (*tlb_invalidate)(struct gk20a *g, struct nvgpu_mem *pdb); 533 void (*tlb_invalidate)(struct gk20a *g, struct nvgpu_mem *pdb);
534 void (*hub_isr)(struct gk20a *g); 534 void (*hub_isr)(struct gk20a *g);
535 void (*handle_replayable_fault)(struct gk20a *g);
535 int (*mem_unlock)(struct gk20a *g); 536 int (*mem_unlock)(struct gk20a *g);
536 int (*init_nvlink)(struct gk20a *g); 537 int (*init_nvlink)(struct gk20a *g);
537 int (*enable_nvlink)(struct gk20a *g); 538 int (*enable_nvlink)(struct gk20a *g);
diff --git a/drivers/gpu/nvgpu/gv11b/gr_gv11b.c b/drivers/gpu/nvgpu/gv11b/gr_gv11b.c
index 1336557a..4280e8ff 100644
--- a/drivers/gpu/nvgpu/gv11b/gr_gv11b.c
+++ b/drivers/gpu/nvgpu/gv11b/gr_gv11b.c
@@ -48,7 +48,6 @@
48#include "gv11b/subctx_gv11b.h" 48#include "gv11b/subctx_gv11b.h"
49#include "gv11b/gv11b.h" 49#include "gv11b/gv11b.h"
50#include "gv11b/gr_pri_gv11b.h" 50#include "gv11b/gr_pri_gv11b.h"
51#include "gv11b/fb_gv11b.h"
52 51
53#include <nvgpu/hw/gv11b/hw_gr_gv11b.h> 52#include <nvgpu/hw/gv11b/hw_gr_gv11b.h>
54#include <nvgpu/hw/gv11b/hw_fifo_gv11b.h> 53#include <nvgpu/hw/gv11b/hw_fifo_gv11b.h>
@@ -3741,8 +3740,9 @@ int gv11b_gr_wait_for_sm_lock_down(struct gk20a *g,
3741 return 0; 3740 return 0;
3742 } 3741 }
3743 3742
3744 if (mmu_debug_mode_enabled) { 3743 if (mmu_debug_mode_enabled &&
3745 gv11b_fb_handle_replayable_mmu_fault(g); 3744 g->ops.fb.handle_replayable_fault != NULL) {
3745 g->ops.fb.handle_replayable_fault(g);
3746 } else { 3746 } else {
3747 /* if an mmu fault is pending and mmu debug mode is not 3747 /* if an mmu fault is pending and mmu debug mode is not
3748 * enabled, the sm will never lock down. 3748 * enabled, the sm will never lock down.
diff --git a/drivers/gpu/nvgpu/gv11b/hal_gv11b.c b/drivers/gpu/nvgpu/gv11b/hal_gv11b.c
index 9e9387d0..5bfa85da 100644
--- a/drivers/gpu/nvgpu/gv11b/hal_gv11b.c
+++ b/drivers/gpu/nvgpu/gv11b/hal_gv11b.c
@@ -439,6 +439,7 @@ static const struct gpu_ops gv11b_ops = {
439 .set_debug_mode = gm20b_fb_set_debug_mode, 439 .set_debug_mode = gm20b_fb_set_debug_mode,
440 .tlb_invalidate = gk20a_fb_tlb_invalidate, 440 .tlb_invalidate = gk20a_fb_tlb_invalidate,
441 .hub_isr = gv11b_fb_hub_isr, 441 .hub_isr = gv11b_fb_hub_isr,
442 .handle_replayable_fault = gv11b_fb_handle_replayable_mmu_fault,
442 .mem_unlock = NULL, 443 .mem_unlock = NULL,
443 .enable_hub_intr = gv11b_fb_enable_hub_intr, 444 .enable_hub_intr = gv11b_fb_enable_hub_intr,
444 .disable_hub_intr = gv11b_fb_disable_hub_intr, 445 .disable_hub_intr = gv11b_fb_disable_hub_intr,