summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/gpu/nvgpu/gp10b/fifo_gp10b.c10
-rw-r--r--drivers/gpu/nvgpu/gp10b/hw_bus_gp10b.h18
-rw-r--r--drivers/gpu/nvgpu/gp10b/hw_ccsr_gp10b.h10
-rw-r--r--drivers/gpu/nvgpu/gp10b/hw_fb_gp10b.h22
-rw-r--r--drivers/gpu/nvgpu/gp10b/hw_fifo_gp10b.h8
-rw-r--r--drivers/gpu/nvgpu/gp10b/hw_gmmu_gp10b.h32
-rw-r--r--drivers/gpu/nvgpu/gp10b/hw_gr_gp10b.h8
-rw-r--r--drivers/gpu/nvgpu/gp10b/hw_pbdma_gp10b.h8
-rw-r--r--drivers/gpu/nvgpu/gp10b/hw_pwr_gp10b.h6
-rw-r--r--drivers/gpu/nvgpu/gp10b/hw_ram_gp10b.h10
-rw-r--r--drivers/gpu/nvgpu/gp10b/mm_gp10b.c38
11 files changed, 149 insertions, 21 deletions
diff --git a/drivers/gpu/nvgpu/gp10b/fifo_gp10b.c b/drivers/gpu/nvgpu/gp10b/fifo_gp10b.c
index ade6ff0a..9cb26d3f 100644
--- a/drivers/gpu/nvgpu/gp10b/fifo_gp10b.c
+++ b/drivers/gpu/nvgpu/gp10b/fifo_gp10b.c
@@ -53,6 +53,7 @@ static int channel_gp10b_commit_userd(struct channel_gk20a *c)
53 u32 addr_lo; 53 u32 addr_lo;
54 u32 addr_hi; 54 u32 addr_hi;
55 void *inst_ptr; 55 void *inst_ptr;
56 struct gk20a *g = c->g;
56 57
57 gk20a_dbg_fn(""); 58 gk20a_dbg_fn("");
58 59
@@ -67,12 +68,13 @@ static int channel_gp10b_commit_userd(struct channel_gk20a *c)
67 c->hw_chid, (u64)c->userd_iova); 68 c->hw_chid, (u64)c->userd_iova);
68 69
69 gk20a_mem_wr32(inst_ptr, ram_in_ramfc_w() + ram_fc_userd_w(), 70 gk20a_mem_wr32(inst_ptr, ram_in_ramfc_w() + ram_fc_userd_w(),
70 pbdma_userd_target_vid_mem_f() | 71 (g->mm.vidmem_is_vidmem ?
71 pbdma_userd_addr_f(addr_lo)); 72 pbdma_userd_target_sys_mem_ncoh_f() :
73 pbdma_userd_target_vid_mem_f()) |
74 pbdma_userd_addr_f(addr_lo));
72 75
73 gk20a_mem_wr32(inst_ptr, ram_in_ramfc_w() + ram_fc_userd_hi_w(), 76 gk20a_mem_wr32(inst_ptr, ram_in_ramfc_w() + ram_fc_userd_hi_w(),
74 pbdma_userd_target_vid_mem_f() | 77 pbdma_userd_hi_addr_f(addr_hi));
75 pbdma_userd_hi_addr_f(addr_hi));
76 78
77 return 0; 79 return 0;
78} 80}
diff --git a/drivers/gpu/nvgpu/gp10b/hw_bus_gp10b.h b/drivers/gpu/nvgpu/gp10b/hw_bus_gp10b.h
index c04b01c1..bf251cd6 100644
--- a/drivers/gpu/nvgpu/gp10b/hw_bus_gp10b.h
+++ b/drivers/gpu/nvgpu/gp10b/hw_bus_gp10b.h
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (c) 2014, NVIDIA CORPORATION. All rights reserved. 2 * Copyright (c) 2014-2016, NVIDIA CORPORATION. All rights reserved.
3 * 3 *
4 * This program is free software; you can redistribute it and/or modify it 4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms and conditions of the GNU General Public License, 5 * under the terms and conditions of the GNU General Public License,
@@ -62,6 +62,14 @@ static inline u32 bus_bar1_block_target_vid_mem_f(void)
62{ 62{
63 return 0x0; 63 return 0x0;
64} 64}
65static inline u32 bus_bar1_block_target_sys_mem_coh_f(void)
66{
67 return 0x20000000;
68}
69static inline u32 bus_bar1_block_target_sys_mem_ncoh_f(void)
70{
71 return 0x30000000;
72}
65static inline u32 bus_bar1_block_mode_virtual_f(void) 73static inline u32 bus_bar1_block_mode_virtual_f(void)
66{ 74{
67 return 0x80000000; 75 return 0x80000000;
@@ -78,6 +86,14 @@ static inline u32 bus_bar2_block_target_vid_mem_f(void)
78{ 86{
79 return 0x0; 87 return 0x0;
80} 88}
89static inline u32 bus_bar2_block_target_sys_mem_coh_f(void)
90{
91 return 0x20000000;
92}
93static inline u32 bus_bar2_block_target_sys_mem_ncoh_f(void)
94{
95 return 0x30000000;
96}
81static inline u32 bus_bar2_block_mode_virtual_f(void) 97static inline u32 bus_bar2_block_mode_virtual_f(void)
82{ 98{
83 return 0x80000000; 99 return 0x80000000;
diff --git a/drivers/gpu/nvgpu/gp10b/hw_ccsr_gp10b.h b/drivers/gpu/nvgpu/gp10b/hw_ccsr_gp10b.h
index cd5265b3..99398961 100644
--- a/drivers/gpu/nvgpu/gp10b/hw_ccsr_gp10b.h
+++ b/drivers/gpu/nvgpu/gp10b/hw_ccsr_gp10b.h
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (c) 2014, NVIDIA CORPORATION. All rights reserved. 2 * Copyright (c) 2014-2016, NVIDIA CORPORATION. All rights reserved.
3 * 3 *
4 * This program is free software; you can redistribute it and/or modify it 4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms and conditions of the GNU General Public License, 5 * under the terms and conditions of the GNU General Public License,
@@ -66,6 +66,14 @@ static inline u32 ccsr_channel_inst_target_vid_mem_f(void)
66{ 66{
67 return 0x0; 67 return 0x0;
68} 68}
69static inline u32 ccsr_channel_inst_target_sys_mem_coh_f(void)
70{
71 return 0x20000000;
72}
73static inline u32 ccsr_channel_inst_target_sys_mem_ncoh_f(void)
74{
75 return 0x30000000;
76}
69static inline u32 ccsr_channel_inst_bind_false_f(void) 77static inline u32 ccsr_channel_inst_bind_false_f(void)
70{ 78{
71 return 0x0; 79 return 0x0;
diff --git a/drivers/gpu/nvgpu/gp10b/hw_fb_gp10b.h b/drivers/gpu/nvgpu/gp10b/hw_fb_gp10b.h
index 1fee19b1..236c2f8a 100644
--- a/drivers/gpu/nvgpu/gp10b/hw_fb_gp10b.h
+++ b/drivers/gpu/nvgpu/gp10b/hw_fb_gp10b.h
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (c) 2014-2015, NVIDIA CORPORATION. All rights reserved. 2 * Copyright (c) 2014-2016, NVIDIA CORPORATION. All rights reserved.
3 * 3 *
4 * This program is free software; you can redistribute it and/or modify it 4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms and conditions of the GNU General Public License, 5 * under the terms and conditions of the GNU General Public License,
@@ -106,6 +106,10 @@ static inline u32 fb_mmu_invalidate_pdb_aperture_vid_mem_f(void)
106{ 106{
107 return 0x0; 107 return 0x0;
108} 108}
109static inline u32 fb_mmu_invalidate_pdb_aperture_sys_mem_f(void)
110{
111 return 0x2;
112}
109static inline u32 fb_mmu_invalidate_pdb_addr_f(u32 v) 113static inline u32 fb_mmu_invalidate_pdb_addr_f(u32 v)
110{ 114{
111 return (v & 0xfffffff) << 4; 115 return (v & 0xfffffff) << 4;
@@ -378,6 +382,14 @@ static inline u32 fb_mmu_debug_wr_aperture_vid_mem_f(void)
378{ 382{
379 return 0x0; 383 return 0x0;
380} 384}
385static inline u32 fb_mmu_debug_wr_aperture_sys_mem_coh_f(void)
386{
387 return 0x2;
388}
389static inline u32 fb_mmu_debug_wr_aperture_sys_mem_ncoh_f(void)
390{
391 return 0x3;
392}
381static inline u32 fb_mmu_debug_wr_vol_false_f(void) 393static inline u32 fb_mmu_debug_wr_vol_false_f(void)
382{ 394{
383 return 0x0; 395 return 0x0;
@@ -406,6 +418,14 @@ static inline u32 fb_mmu_debug_rd_aperture_vid_mem_f(void)
406{ 418{
407 return 0x0; 419 return 0x0;
408} 420}
421static inline u32 fb_mmu_debug_rd_aperture_sys_mem_coh_f(void)
422{
423 return 0x2;
424}
425static inline u32 fb_mmu_debug_rd_aperture_sys_mem_ncoh_f(void)
426{
427 return 0x3;
428}
409static inline u32 fb_mmu_debug_rd_vol_false_f(void) 429static inline u32 fb_mmu_debug_rd_vol_false_f(void)
410{ 430{
411 return 0x0; 431 return 0x0;
diff --git a/drivers/gpu/nvgpu/gp10b/hw_fifo_gp10b.h b/drivers/gpu/nvgpu/gp10b/hw_fifo_gp10b.h
index 34977523..4781ff85 100644
--- a/drivers/gpu/nvgpu/gp10b/hw_fifo_gp10b.h
+++ b/drivers/gpu/nvgpu/gp10b/hw_fifo_gp10b.h
@@ -82,6 +82,14 @@ static inline u32 fifo_runlist_base_target_vid_mem_f(void)
82{ 82{
83 return 0x0; 83 return 0x0;
84} 84}
85static inline u32 fifo_runlist_base_target_sys_mem_coh_f(void)
86{
87 return 0x20000000;
88}
89static inline u32 fifo_runlist_base_target_sys_mem_ncoh_f(void)
90{
91 return 0x30000000;
92}
85static inline u32 fifo_runlist_r(void) 93static inline u32 fifo_runlist_r(void)
86{ 94{
87 return 0x00002274; 95 return 0x00002274;
diff --git a/drivers/gpu/nvgpu/gp10b/hw_gmmu_gp10b.h b/drivers/gpu/nvgpu/gp10b/hw_gmmu_gp10b.h
index 30e4307d..86870aea 100644
--- a/drivers/gpu/nvgpu/gp10b/hw_gmmu_gp10b.h
+++ b/drivers/gpu/nvgpu/gp10b/hw_gmmu_gp10b.h
@@ -70,6 +70,14 @@ static inline u32 gmmu_new_pde_aperture_video_memory_f(void)
70{ 70{
71 return 0x2; 71 return 0x2;
72} 72}
73static inline u32 gmmu_new_pde_aperture_sys_mem_coh_f(void)
74{
75 return 0x4;
76}
77static inline u32 gmmu_new_pde_aperture_sys_mem_ncoh_f(void)
78{
79 return 0x6;
80}
73static inline u32 gmmu_new_pde_address_sys_f(u32 v) 81static inline u32 gmmu_new_pde_address_sys_f(u32 v)
74{ 82{
75 return (v & 0xfffffff) << 8; 83 return (v & 0xfffffff) << 8;
@@ -118,6 +126,14 @@ static inline u32 gmmu_new_dual_pde_aperture_big_video_memory_f(void)
118{ 126{
119 return 0x2; 127 return 0x2;
120} 128}
129static inline u32 gmmu_new_dual_pde_aperture_big_sys_mem_coh_f(void)
130{
131 return 0x4;
132}
133static inline u32 gmmu_new_dual_pde_aperture_big_sys_mem_ncoh_f(void)
134{
135 return 0x6;
136}
121static inline u32 gmmu_new_dual_pde_address_big_sys_f(u32 v) 137static inline u32 gmmu_new_dual_pde_address_big_sys_f(u32 v)
122{ 138{
123 return (v & 0xfffffff) << 4; 139 return (v & 0xfffffff) << 4;
@@ -138,6 +154,14 @@ static inline u32 gmmu_new_dual_pde_aperture_small_video_memory_f(void)
138{ 154{
139 return 0x2; 155 return 0x2;
140} 156}
157static inline u32 gmmu_new_dual_pde_aperture_small_sys_mem_coh_f(void)
158{
159 return 0x4;
160}
161static inline u32 gmmu_new_dual_pde_aperture_small_sys_mem_ncoh_f(void)
162{
163 return 0x6;
164}
141static inline u32 gmmu_new_dual_pde_vol_small_w(void) 165static inline u32 gmmu_new_dual_pde_vol_small_w(void)
142{ 166{
143 return 2; 167 return 2;
@@ -238,6 +262,14 @@ static inline u32 gmmu_new_pte_aperture_video_memory_f(void)
238{ 262{
239 return 0x0; 263 return 0x0;
240} 264}
265static inline u32 gmmu_new_pte_aperture_sys_mem_coh_f(void)
266{
267 return 0x4;
268}
269static inline u32 gmmu_new_pte_aperture_sys_mem_ncoh_f(void)
270{
271 return 0x6;
272}
241static inline u32 gmmu_new_pte_read_only_w(void) 273static inline u32 gmmu_new_pte_read_only_w(void)
242{ 274{
243 return 0; 275 return 0;
diff --git a/drivers/gpu/nvgpu/gp10b/hw_gr_gp10b.h b/drivers/gpu/nvgpu/gp10b/hw_gr_gp10b.h
index 78792f50..78304fb1 100644
--- a/drivers/gpu/nvgpu/gp10b/hw_gr_gp10b.h
+++ b/drivers/gpu/nvgpu/gp10b/hw_gr_gp10b.h
@@ -1010,6 +1010,14 @@ static inline u32 gr_fecs_current_ctx_target_vid_mem_f(void)
1010{ 1010{
1011 return 0x0; 1011 return 0x0;
1012} 1012}
1013static inline u32 gr_fecs_current_ctx_target_sys_mem_coh_f(void)
1014{
1015 return 0x20000000;
1016}
1017static inline u32 gr_fecs_current_ctx_target_sys_mem_ncoh_f(void)
1018{
1019 return 0x30000000;
1020}
1013static inline u32 gr_fecs_current_ctx_valid_s(void) 1021static inline u32 gr_fecs_current_ctx_valid_s(void)
1014{ 1022{
1015 return 1; 1023 return 1;
diff --git a/drivers/gpu/nvgpu/gp10b/hw_pbdma_gp10b.h b/drivers/gpu/nvgpu/gp10b/hw_pbdma_gp10b.h
index f66fa934..0caffb22 100644
--- a/drivers/gpu/nvgpu/gp10b/hw_pbdma_gp10b.h
+++ b/drivers/gpu/nvgpu/gp10b/hw_pbdma_gp10b.h
@@ -322,6 +322,14 @@ static inline u32 pbdma_userd_target_vid_mem_f(void)
322{ 322{
323 return 0x0; 323 return 0x0;
324} 324}
325static inline u32 pbdma_userd_target_sys_mem_coh_f(void)
326{
327 return 0x2;
328}
329static inline u32 pbdma_userd_target_sys_mem_ncoh_f(void)
330{
331 return 0x3;
332}
325static inline u32 pbdma_userd_addr_f(u32 v) 333static inline u32 pbdma_userd_addr_f(u32 v)
326{ 334{
327 return (v & 0x7fffff) << 9; 335 return (v & 0x7fffff) << 9;
diff --git a/drivers/gpu/nvgpu/gp10b/hw_pwr_gp10b.h b/drivers/gpu/nvgpu/gp10b/hw_pwr_gp10b.h
index 75bf59a3..9a3591c7 100644
--- a/drivers/gpu/nvgpu/gp10b/hw_pwr_gp10b.h
+++ b/drivers/gpu/nvgpu/gp10b/hw_pwr_gp10b.h
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (c) 2014-2015, NVIDIA CORPORATION. All rights reserved. 2 * Copyright (c) 2014-2016, NVIDIA CORPORATION. All rights reserved.
3 * 3 *
4 * This program is free software; you can redistribute it and/or modify it 4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms and conditions of the GNU General Public License, 5 * under the terms and conditions of the GNU General Public License,
@@ -542,6 +542,10 @@ static inline u32 pwr_pmu_new_instblk_target_sys_coh_f(void)
542{ 542{
543 return 0x20000000; 543 return 0x20000000;
544} 544}
545static inline u32 pwr_pmu_new_instblk_target_sys_ncoh_f(void)
546{
547 return 0x30000000;
548}
545static inline u32 pwr_pmu_new_instblk_valid_f(u32 v) 549static inline u32 pwr_pmu_new_instblk_valid_f(u32 v)
546{ 550{
547 return (v & 0x1) << 30; 551 return (v & 0x1) << 30;
diff --git a/drivers/gpu/nvgpu/gp10b/hw_ram_gp10b.h b/drivers/gpu/nvgpu/gp10b/hw_ram_gp10b.h
index 863b15b8..55323579 100644
--- a/drivers/gpu/nvgpu/gp10b/hw_ram_gp10b.h
+++ b/drivers/gpu/nvgpu/gp10b/hw_ram_gp10b.h
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (c) 2014-2015, NVIDIA CORPORATION. All rights reserved. 2 * Copyright (c) 2014-2016, NVIDIA CORPORATION. All rights reserved.
3 * 3 *
4 * This program is free software; you can redistribute it and/or modify it 4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms and conditions of the GNU General Public License, 5 * under the terms and conditions of the GNU General Public License,
@@ -70,6 +70,14 @@ static inline u32 ram_in_page_dir_base_target_vid_mem_f(void)
70{ 70{
71 return 0x0; 71 return 0x0;
72} 72}
73static inline u32 ram_in_page_dir_base_target_sys_mem_coh_f(void)
74{
75 return 0x2;
76}
77static inline u32 ram_in_page_dir_base_target_sys_mem_ncoh_f(void)
78{
79 return 0x3;
80}
73static inline u32 ram_in_page_dir_base_vol_w(void) 81static inline u32 ram_in_page_dir_base_vol_w(void)
74{ 82{
75 return 128; 83 return 128;
diff --git a/drivers/gpu/nvgpu/gp10b/mm_gp10b.c b/drivers/gpu/nvgpu/gp10b/mm_gp10b.c
index deb8c138..0c00feb4 100644
--- a/drivers/gpu/nvgpu/gp10b/mm_gp10b.c
+++ b/drivers/gpu/nvgpu/gp10b/mm_gp10b.c
@@ -43,9 +43,11 @@ static int gp10b_init_mm_setup_hw(struct gk20a *g)
43 gk20a_dbg_info("bar1 inst block ptr: 0x%08x", (u32)inst_pa); 43 gk20a_dbg_info("bar1 inst block ptr: 0x%08x", (u32)inst_pa);
44 44
45 gk20a_writel(g, bus_bar1_block_r(), 45 gk20a_writel(g, bus_bar1_block_r(),
46 bus_bar1_block_target_vid_mem_f() | 46 (g->mm.vidmem_is_vidmem ?
47 bus_bar1_block_mode_virtual_f() | 47 bus_bar1_block_target_sys_mem_ncoh_f() :
48 bus_bar1_block_ptr_f(inst_pa)); 48 bus_bar1_block_target_vid_mem_f()) |
49 bus_bar1_block_mode_virtual_f() |
50 bus_bar1_block_ptr_f(inst_pa));
49 51
50 if (g->ops.mm.init_bar2_mm_hw_setup) { 52 if (g->ops.mm.init_bar2_mm_hw_setup) {
51 err = g->ops.mm.init_bar2_mm_hw_setup(g); 53 err = g->ops.mm.init_bar2_mm_hw_setup(g);
@@ -107,9 +109,11 @@ static int gb10b_init_bar2_mm_hw_setup(struct gk20a *g)
107 gk20a_dbg_info("bar2 inst block ptr: 0x%08x", (u32)inst_pa); 109 gk20a_dbg_info("bar2 inst block ptr: 0x%08x", (u32)inst_pa);
108 110
109 gk20a_writel(g, bus_bar2_block_r(), 111 gk20a_writel(g, bus_bar2_block_r(),
110 bus_bar2_block_target_vid_mem_f() | 112 (g->mm.vidmem_is_vidmem ?
111 bus_bar2_block_mode_virtual_f() | 113 bus_bar2_block_target_sys_mem_ncoh_f() :
112 bus_bar2_block_ptr_f(inst_pa)); 114 bus_bar2_block_target_vid_mem_f()) |
115 bus_bar2_block_mode_virtual_f() |
116 bus_bar2_block_ptr_f(inst_pa));
113 117
114 gk20a_dbg_fn("done"); 118 gk20a_dbg_fn("done");
115 return 0; 119 return 0;
@@ -179,7 +183,9 @@ static int update_gmmu_pde3_locked(struct vm_gk20a *vm,
179 pte_addr = entry_addr(g, pte) >> gmmu_new_pde_address_shift_v(); 183 pte_addr = entry_addr(g, pte) >> gmmu_new_pde_address_shift_v();
180 pde_addr = entry_addr(g, parent); 184 pde_addr = entry_addr(g, parent);
181 185
182 pde_v[0] |= gmmu_new_pde_aperture_video_memory_f(); 186 pde_v[0] |= g->mm.vidmem_is_vidmem ?
187 gmmu_new_pde_aperture_sys_mem_ncoh_f() :
188 gmmu_new_pde_aperture_video_memory_f();
183 pde_v[0] |= gmmu_new_pde_address_sys_f(u64_lo32(pte_addr)); 189 pde_v[0] |= gmmu_new_pde_address_sys_f(u64_lo32(pte_addr));
184 pde_v[0] |= gmmu_new_pde_vol_true_f(); 190 pde_v[0] |= gmmu_new_pde_vol_true_f();
185 pde_v[1] |= pte_addr >> 24; 191 pde_v[1] |= pte_addr >> 24;
@@ -232,7 +238,9 @@ static int update_gmmu_pde0_locked(struct vm_gk20a *vm,
232 238
233 if (small_valid) { 239 if (small_valid) {
234 pde_v[2] |= gmmu_new_dual_pde_address_small_sys_f(pte_addr_small); 240 pde_v[2] |= gmmu_new_dual_pde_address_small_sys_f(pte_addr_small);
235 pde_v[2] |= gmmu_new_dual_pde_aperture_small_video_memory_f(); 241 pde_v[2] |= g->mm.vidmem_is_vidmem ?
242 gmmu_new_dual_pde_aperture_small_sys_mem_ncoh_f() :
243 gmmu_new_dual_pde_aperture_small_video_memory_f();
236 pde_v[2] |= gmmu_new_dual_pde_vol_small_true_f(); 244 pde_v[2] |= gmmu_new_dual_pde_vol_small_true_f();
237 pde_v[3] |= pte_addr_small >> 24; 245 pde_v[3] |= pte_addr_small >> 24;
238 } 246 }
@@ -240,7 +248,9 @@ static int update_gmmu_pde0_locked(struct vm_gk20a *vm,
240 if (big_valid) { 248 if (big_valid) {
241 pde_v[0] |= gmmu_new_dual_pde_address_big_sys_f(pte_addr_big); 249 pde_v[0] |= gmmu_new_dual_pde_address_big_sys_f(pte_addr_big);
242 pde_v[0] |= gmmu_new_dual_pde_vol_big_true_f(); 250 pde_v[0] |= gmmu_new_dual_pde_vol_big_true_f();
243 pde_v[0] |= gmmu_new_dual_pde_aperture_big_video_memory_f(); 251 pde_v[0] |= g->mm.vidmem_is_vidmem ?
252 gmmu_new_dual_pde_aperture_big_sys_mem_ncoh_f() :
253 gmmu_new_dual_pde_aperture_big_video_memory_f();
244 pde_v[1] |= pte_addr_big >> 28; 254 pde_v[1] |= pte_addr_big >> 28;
245 } 255 }
246 256
@@ -279,8 +289,10 @@ static int update_gmmu_pte_locked(struct vm_gk20a *vm,
279 pte_w[0] = gmmu_new_pte_valid_false_f(); 289 pte_w[0] = gmmu_new_pte_valid_false_f();
280 else 290 else
281 pte_w[0] = gmmu_new_pte_valid_true_f(); 291 pte_w[0] = gmmu_new_pte_valid_true_f();
282 pte_w[0] |= gmmu_new_pte_aperture_video_memory_f() | 292 pte_w[0] |= g->mm.vidmem_is_vidmem ?
283 gmmu_new_pte_address_sys_f(*iova 293 gmmu_new_pte_aperture_sys_mem_ncoh_f() :
294 gmmu_new_pte_aperture_video_memory_f();
295 pte_w[0] |= gmmu_new_pte_address_sys_f(*iova
284 >> gmmu_new_pte_address_shift_v()); 296 >> gmmu_new_pte_address_shift_v());
285 297
286 if (priv) 298 if (priv)
@@ -373,7 +385,9 @@ static void gp10b_mm_init_pdb(struct gk20a *g, void *inst_ptr, u64 pdb_addr)
373 u32 pdb_addr_hi = u64_hi32(pdb_addr); 385 u32 pdb_addr_hi = u64_hi32(pdb_addr);
374 386
375 gk20a_mem_wr32(inst_ptr, ram_in_page_dir_base_lo_w(), 387 gk20a_mem_wr32(inst_ptr, ram_in_page_dir_base_lo_w(),
376 ram_in_page_dir_base_target_vid_mem_f() | 388 (g->mm.vidmem_is_vidmem ?
389 ram_in_page_dir_base_target_sys_mem_ncoh_f() :
390 ram_in_page_dir_base_target_vid_mem_f()) |
377 ram_in_page_dir_base_vol_true_f() | 391 ram_in_page_dir_base_vol_true_f() |
378 ram_in_page_dir_base_lo_f(pdb_addr_lo) | 392 ram_in_page_dir_base_lo_f(pdb_addr_lo) |
379 1 << 10); 393 1 << 10);