From 971a3c8050184f1defa894310cd572e41b3adc65 Mon Sep 17 00:00:00 2001 From: Seema Khowala Date: Fri, 3 Mar 2017 13:49:30 -0800 Subject: gpu: nvgpu: add mm ops for mmu_fault_pending This change is needed for t19x mmu fault handling. Change-Id: I7f9190ab305f699401f6b0033b6a93dd8b4fc3cd Signed-off-by: Seema Khowala Reviewed-on: http://git-master/r/1315201 Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/gk20a/gk20a.h | 1 + drivers/gpu/nvgpu/gk20a/gr_gk20a.c | 2 +- drivers/gpu/nvgpu/gk20a/mm_gk20a.c | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) (limited to 'drivers/gpu/nvgpu/gk20a') diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.h b/drivers/gpu/nvgpu/gk20a/gk20a.h index d5757130..5bf1e02d 100644 --- a/drivers/gpu/nvgpu/gk20a/gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/gk20a.h @@ -633,6 +633,7 @@ struct gpu_ops { size_t (*get_vidmem_size)(struct gk20a *g); void (*init_inst_block)(struct mem_desc *inst_block, struct vm_gk20a *vm, u32 big_page_size); + bool (*mmu_fault_pending)(struct gk20a *g); } mm; struct { int (*init_therm_setup_hw)(struct gk20a *g); diff --git a/drivers/gpu/nvgpu/gk20a/gr_gk20a.c b/drivers/gpu/nvgpu/gk20a/gr_gk20a.c index 5a76822f..9f527edd 100644 --- a/drivers/gpu/nvgpu/gk20a/gr_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/gr_gk20a.c @@ -8625,7 +8625,7 @@ int gk20a_gr_wait_for_sm_lock_down(struct gk20a *g, u32 gpc, u32 tpc, /* if an mmu fault is pending and mmu debug mode is not * enabled, the sm will never lock down. */ if (!mmu_debug_mode_enabled && - gk20a_fifo_mmu_fault_pending(g)) { + (g->ops.mm.mmu_fault_pending(g))) { gk20a_err(dev_from_gk20a(g), "GPC%d TPC%d: mmu fault pending," " sm will never lock down!", gpc, tpc); diff --git a/drivers/gpu/nvgpu/gk20a/mm_gk20a.c b/drivers/gpu/nvgpu/gk20a/mm_gk20a.c index bb7c7985..eaf8f74a 100644 --- a/drivers/gpu/nvgpu/gk20a/mm_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/mm_gk20a.c @@ -5450,4 +5450,5 @@ void gk20a_init_mm(struct gpu_ops *gops) gops->mm.bar1_bind = gk20a_mm_bar1_bind; gops->mm.init_inst_block = gk20a_init_inst_block; gops->mm.is_bar1_supported = gk20a_mm_is_bar1_supported; + gops->mm.mmu_fault_pending = gk20a_fifo_mmu_fault_pending; } -- cgit v1.2.2