diff options
author | Terje Bergstrom <tbergstrom@nvidia.com> | 2016-05-17 10:57:47 -0400 |
---|---|---|
committer | Deepak Nibade <dnibade@nvidia.com> | 2016-12-27 04:56:15 -0500 |
commit | 2580fa57fb4d1c0b6c002bade851a358ac867b24 (patch) | |
tree | ab4e0ba9f0f0d5f8bd15078d71689cadb7d99c83 /drivers/gpu/nvgpu/gp10b/mm_gp10b.c | |
parent | a6682186de77b90fa41718d4b0012b35aba95ae0 (diff) |
gpu: nvgpu: gp10b: Program NISO sysmem flush addr
Program sysmem flush address to prevent random accesses of
address 0.
Change-Id: Ia577106c63a80589c154af41d18b70480ed7c7d7
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: http://git-master/r/1149174
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Alex Waterman <alexw@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gp10b/mm_gp10b.c')
-rw-r--r-- | drivers/gpu/nvgpu/gp10b/mm_gp10b.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/drivers/gpu/nvgpu/gp10b/mm_gp10b.c b/drivers/gpu/nvgpu/gp10b/mm_gp10b.c index 0b693f7c..c25abc78 100644 --- a/drivers/gpu/nvgpu/gp10b/mm_gp10b.c +++ b/drivers/gpu/nvgpu/gp10b/mm_gp10b.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include "gk20a/gk20a.h" | 18 | #include "gk20a/gk20a.h" |
19 | #include "mm_gp10b.h" | 19 | #include "mm_gp10b.h" |
20 | #include "rpfb_gp10b.h" | 20 | #include "rpfb_gp10b.h" |
21 | #include "hw_fb_gp10b.h" | ||
21 | #include "hw_ram_gp10b.h" | 22 | #include "hw_ram_gp10b.h" |
22 | #include "hw_bus_gp10b.h" | 23 | #include "hw_bus_gp10b.h" |
23 | #include "hw_gmmu_gp10b.h" | 24 | #include "hw_gmmu_gp10b.h" |
@@ -39,15 +40,11 @@ static int gp10b_init_mm_setup_hw(struct gk20a *g) | |||
39 | 40 | ||
40 | g->ops.fb.set_mmu_page_size(g); | 41 | g->ops.fb.set_mmu_page_size(g); |
41 | 42 | ||
42 | inst_pa = (u32)(inst_pa >> bar1_instance_block_shift_gk20a()); | 43 | gk20a_writel(g, fb_niso_flush_sysmem_addr_r(), |
43 | gk20a_dbg_info("bar1 inst block ptr: 0x%08x", (u32)inst_pa); | 44 | (g->ops.mm.get_iova_addr(g, g->mm.sysmem_flush.sgt->sgl, 0) |
45 | >> 8ULL)); | ||
44 | 46 | ||
45 | gk20a_writel(g, bus_bar1_block_r(), | 47 | g->ops.mm.bar1_bind(g, inst_pa); |
46 | (g->mm.vidmem_is_vidmem ? | ||
47 | bus_bar1_block_target_sys_mem_ncoh_f() : | ||
48 | bus_bar1_block_target_vid_mem_f()) | | ||
49 | bus_bar1_block_mode_virtual_f() | | ||
50 | bus_bar1_block_ptr_f(inst_pa)); | ||
51 | 48 | ||
52 | if (g->ops.mm.init_bar2_mm_hw_setup) { | 49 | if (g->ops.mm.init_bar2_mm_hw_setup) { |
53 | err = g->ops.mm.init_bar2_mm_hw_setup(g); | 50 | err = g->ops.mm.init_bar2_mm_hw_setup(g); |