summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/gpu/nvgpu/gp106/fb_gp106.c6
-rw-r--r--drivers/gpu/nvgpu/include/nvgpu/hw/gp106/hw_fb_gp106.h8
2 files changed, 14 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/gp106/fb_gp106.c b/drivers/gpu/nvgpu/gp106/fb_gp106.c
index 53f9af56..dcb7e545 100644
--- a/drivers/gpu/nvgpu/gp106/fb_gp106.c
+++ b/drivers/gpu/nvgpu/gp106/fb_gp106.c
@@ -21,6 +21,8 @@
21 21
22static void gp106_fb_reset(struct gk20a *g) 22static void gp106_fb_reset(struct gk20a *g)
23{ 23{
24 u32 val;
25
24 int retries = HW_SCRUB_TIMEOUT_MAX / HW_SCRUB_TIMEOUT_DEFAULT; 26 int retries = HW_SCRUB_TIMEOUT_MAX / HW_SCRUB_TIMEOUT_DEFAULT;
25 /* wait for memory to be accessible */ 27 /* wait for memory to be accessible */
26 do { 28 do {
@@ -31,6 +33,10 @@ static void gp106_fb_reset(struct gk20a *g)
31 } 33 }
32 nvgpu_udelay(HW_SCRUB_TIMEOUT_DEFAULT); 34 nvgpu_udelay(HW_SCRUB_TIMEOUT_DEFAULT);
33 } while (--retries); 35 } while (--retries);
36
37 val = gk20a_readl(g, fb_mmu_priv_level_mask_r());
38 val &= ~fb_mmu_priv_level_mask_write_violation_m();
39 gk20a_writel(g, fb_mmu_priv_level_mask_r(), val);
34} 40}
35 41
36void gp106_init_fb(struct gpu_ops *gops) 42void gp106_init_fb(struct gpu_ops *gops)
diff --git a/drivers/gpu/nvgpu/include/nvgpu/hw/gp106/hw_fb_gp106.h b/drivers/gpu/nvgpu/include/nvgpu/hw/gp106/hw_fb_gp106.h
index 1248e0f3..64b99cf0 100644
--- a/drivers/gpu/nvgpu/include/nvgpu/hw/gp106/hw_fb_gp106.h
+++ b/drivers/gpu/nvgpu/include/nvgpu/hw/gp106/hw_fb_gp106.h
@@ -482,6 +482,14 @@ static inline u32 fb_mmu_vpr_info_fetch_true_v(void)
482{ 482{
483 return 0x00000001; 483 return 0x00000001;
484} 484}
485static inline u32 fb_mmu_priv_level_mask_r(void)
486{
487 return 0x00100cdc;
488}
489static inline u32 fb_mmu_priv_level_mask_write_violation_m(void)
490{
491 return 0x1 << 7;
492}
485static inline u32 fb_niso_flush_sysmem_addr_r(void) 493static inline u32 fb_niso_flush_sysmem_addr_r(void)
486{ 494{
487 return 0x00100c10; 495 return 0x00100c10;