summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gv11b/fifo_gv11b.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/nvgpu/gv11b/fifo_gv11b.c')
-rw-r--r--drivers/gpu/nvgpu/gv11b/fifo_gv11b.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/gpu/nvgpu/gv11b/fifo_gv11b.c b/drivers/gpu/nvgpu/gv11b/fifo_gv11b.c
index e210d40d..bd769f75 100644
--- a/drivers/gpu/nvgpu/gv11b/fifo_gv11b.c
+++ b/drivers/gpu/nvgpu/gv11b/fifo_gv11b.c
@@ -40,6 +40,7 @@
40#include <nvgpu/hw/gv11b/hw_top_gv11b.h> 40#include <nvgpu/hw/gv11b/hw_top_gv11b.h>
41#include <nvgpu/hw/gv11b/hw_gmmu_gv11b.h> 41#include <nvgpu/hw/gv11b/hw_gmmu_gv11b.h>
42#include <nvgpu/hw/gv11b/hw_mc_gv11b.h> 42#include <nvgpu/hw/gv11b/hw_mc_gv11b.h>
43#include <nvgpu/hw/gv11b/hw_gr_gv11b.h>
43 44
44#include "fifo_gv11b.h" 45#include "fifo_gv11b.h"
45#include "subctx_gv11b.h" 46#include "subctx_gv11b.h"
@@ -1717,16 +1718,20 @@ int gv11b_init_fifo_setup_hw(struct gk20a *g)
1717 struct fifo_gk20a *f = &g->fifo; 1718 struct fifo_gk20a *f = &g->fifo;
1718 1719
1719 f->t19x.usermode_regs = g->regs + usermode_cfg0_r(); 1720 f->t19x.usermode_regs = g->regs + usermode_cfg0_r();
1721 f->t19x.max_subctx_count =
1722 gr_pri_fe_chip_def_info_max_veid_count_v(
1723 gk20a_readl(g, gr_pri_fe_chip_def_info_r()));
1720 return 0; 1724 return 0;
1721} 1725}
1722 1726
1723static u32 gv11b_mmu_fault_id_to_gr_veid(struct gk20a *g, u32 gr_eng_fault_id, 1727static u32 gv11b_mmu_fault_id_to_gr_veid(struct gk20a *g, u32 gr_eng_fault_id,
1724 u32 mmu_fault_id) 1728 u32 mmu_fault_id)
1725{ 1729{
1730 struct fifo_gk20a *f = &g->fifo;
1726 u32 num_subctx; 1731 u32 num_subctx;
1727 u32 veid = FIFO_INVAL_VEID; 1732 u32 veid = FIFO_INVAL_VEID;
1728 1733
1729 num_subctx = gv11b_get_max_subctx_count(g); 1734 num_subctx = f->t19x.max_subctx_count;
1730 1735
1731 if (mmu_fault_id >= gr_eng_fault_id && 1736 if (mmu_fault_id >= gr_eng_fault_id &&
1732 mmu_fault_id < (gr_eng_fault_id + num_subctx)) 1737 mmu_fault_id < (gr_eng_fault_id + num_subctx))