summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a')
-rw-r--r--drivers/gpu/nvgpu/gk20a/gk20a.h1
-rw-r--r--drivers/gpu/nvgpu/gk20a/hw_gmmu_gk20a.h6
-rw-r--r--drivers/gpu/nvgpu/gk20a/mm_gk20a.c9
-rw-r--r--drivers/gpu/nvgpu/gk20a/mm_gk20a.h1
4 files changed, 16 insertions, 1 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.h b/drivers/gpu/nvgpu/gk20a/gk20a.h
index d3dc03e7..6f2258e9 100644
--- a/drivers/gpu/nvgpu/gk20a/gk20a.h
+++ b/drivers/gpu/nvgpu/gk20a/gk20a.h
@@ -197,6 +197,7 @@ struct gpu_ops {
197 void (*init_uncompressed_kind_map)(struct gk20a *g); 197 void (*init_uncompressed_kind_map)(struct gk20a *g);
198 void (*init_kind_attr)(struct gk20a *g); 198 void (*init_kind_attr)(struct gk20a *g);
199 void (*set_mmu_page_size)(struct gk20a *g); 199 void (*set_mmu_page_size)(struct gk20a *g);
200 bool (*set_use_full_comp_tag_line)(struct gk20a *g);
200 int (*compression_page_size)(struct gk20a *g); 201 int (*compression_page_size)(struct gk20a *g);
201 int (*compressible_page_size)(struct gk20a *g); 202 int (*compressible_page_size)(struct gk20a *g);
202 void (*dump_vpr_wpr_info)(struct gk20a *g); 203 void (*dump_vpr_wpr_info)(struct gk20a *g);
diff --git a/drivers/gpu/nvgpu/gk20a/hw_gmmu_gk20a.h b/drivers/gpu/nvgpu/gk20a/hw_gmmu_gk20a.h
index 19e44382..d92f0d58 100644
--- a/drivers/gpu/nvgpu/gk20a/hw_gmmu_gk20a.h
+++ b/drivers/gpu/nvgpu/gk20a/hw_gmmu_gk20a.h
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (c) 2012-2014, NVIDIA CORPORATION. All rights reserved. 2 * Copyright (c) 2012-2015, 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,
@@ -210,6 +210,10 @@ static inline u32 gmmu_pte_read_disable_true_f(void)
210{ 210{
211 return 0x40000000; 211 return 0x40000000;
212} 212}
213static inline u32 gmmu_pte_comptagline_s(void)
214{
215 return 17;
216}
213static inline u32 gmmu_pte_comptagline_f(u32 v) 217static inline u32 gmmu_pte_comptagline_f(u32 v)
214{ 218{
215 return (v & 0x1ffff) << 12; 219 return (v & 0x1ffff) << 12;
diff --git a/drivers/gpu/nvgpu/gk20a/mm_gk20a.c b/drivers/gpu/nvgpu/gk20a/mm_gk20a.c
index 6c4637e8..76c33512 100644
--- a/drivers/gpu/nvgpu/gk20a/mm_gk20a.c
+++ b/drivers/gpu/nvgpu/gk20a/mm_gk20a.c
@@ -414,6 +414,10 @@ int gk20a_init_mm_setup_hw(struct gk20a *g)
414 gk20a_dbg_fn(""); 414 gk20a_dbg_fn("");
415 415
416 g->ops.fb.set_mmu_page_size(g); 416 g->ops.fb.set_mmu_page_size(g);
417 if (g->ops.fb.set_use_full_comp_tag_line)
418 mm->use_full_comp_tag_line =
419 g->ops.fb.set_use_full_comp_tag_line(g);
420
417 421
418 inst_pa = (u32)(inst_pa >> bar1_instance_block_shift_gk20a()); 422 inst_pa = (u32)(inst_pa >> bar1_instance_block_shift_gk20a());
419 gk20a_dbg_info("bar1 inst block ptr: 0x%08x", (u32)inst_pa); 423 gk20a_dbg_info("bar1 inst block ptr: 0x%08x", (u32)inst_pa);
@@ -2327,6 +2331,11 @@ static int update_gmmu_pte_locked(struct vm_gk20a *vm,
2327 gmmu_pte_kind_f(kind_v) | 2331 gmmu_pte_kind_f(kind_v) |
2328 gmmu_pte_comptagline_f((u32)(*ctag / ctag_granularity)); 2332 gmmu_pte_comptagline_f((u32)(*ctag / ctag_granularity));
2329 2333
2334 if (vm->mm->use_full_comp_tag_line && *iova & 0x10000) {
2335 pte_w[1] |= gmmu_pte_comptagline_f(
2336 1 << (gmmu_pte_comptagline_s() - 1));
2337 }
2338
2330 if (rw_flag == gk20a_mem_flag_read_only) { 2339 if (rw_flag == gk20a_mem_flag_read_only) {
2331 pte_w[0] |= gmmu_pte_read_only_true_f(); 2340 pte_w[0] |= gmmu_pte_read_only_true_f();
2332 pte_w[1] |= 2341 pte_w[1] |=
diff --git a/drivers/gpu/nvgpu/gk20a/mm_gk20a.h b/drivers/gpu/nvgpu/gk20a/mm_gk20a.h
index ac55e988..5ce931c3 100644
--- a/drivers/gpu/nvgpu/gk20a/mm_gk20a.h
+++ b/drivers/gpu/nvgpu/gk20a/mm_gk20a.h
@@ -329,6 +329,7 @@ struct mm_gk20a {
329 void (*remove_support)(struct mm_gk20a *mm); 329 void (*remove_support)(struct mm_gk20a *mm);
330 bool sw_ready; 330 bool sw_ready;
331 int physical_bits; 331 int physical_bits;
332 bool use_full_comp_tag_line;
332#ifdef CONFIG_DEBUG_FS 333#ifdef CONFIG_DEBUG_FS
333 u32 ltc_enabled; 334 u32 ltc_enabled;
334 u32 ltc_enabled_debug; 335 u32 ltc_enabled_debug;