From 3bf38954c2cd794485ed1bac50df8e61ad1100eb Mon Sep 17 00:00:00 2001 From: seshendra Gadagottu Date: Wed, 17 May 2017 20:03:22 -0700 Subject: gpu: nvgpu: gv11b: move cbc init to mmu from ltc Added cbc_init in fb and removed cbc_init from ltc. Also avoid writing into read only registers in ltc. GPUT19X-70 GPUT19X-116 Change-Id: Ife53e8ec7f049d666baacea3b7c45179e3e13ff9 Signed-off-by: seshendra Gadagottu Reviewed-on: http://git-master/r/1484525 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Terje Bergstrom Reviewed-by: svccoveritychecker --- .../gpu/nvgpu/include/nvgpu/hw/gv11b/hw_fb_gv11b.h | 80 ++++++++++++++++++++++ 1 file changed, 80 insertions(+) (limited to 'drivers/gpu/nvgpu/include/nvgpu/hw/gv11b/hw_fb_gv11b.h') diff --git a/drivers/gpu/nvgpu/include/nvgpu/hw/gv11b/hw_fb_gv11b.h b/drivers/gpu/nvgpu/include/nvgpu/hw/gv11b/hw_fb_gv11b.h index 0ddccd45..e261ef14 100644 --- a/drivers/gpu/nvgpu/include/nvgpu/hw/gv11b/hw_fb_gv11b.h +++ b/drivers/gpu/nvgpu/include/nvgpu/hw/gv11b/hw_fb_gv11b.h @@ -1814,4 +1814,84 @@ static inline u32 fb_mmu_fault_status_valid_clear_f(void) { return 0x80000000; } +static inline u32 fb_mmu_num_active_ltcs_r(void) +{ + return 0x00100ec0; +} +static inline u32 fb_mmu_num_active_ltcs_count_f(u32 v) +{ + return (v & 0x1f) << 0; +} +static inline u32 fb_mmu_num_active_ltcs_count_v(u32 r) +{ + return (r >> 0) & 0x1f; +} +static inline u32 fb_mmu_cbc_base_r(void) +{ + return 0x00100ec4; +} +static inline u32 fb_mmu_cbc_base_address_f(u32 v) +{ + return (v & 0x3ffffff) << 0; +} +static inline u32 fb_mmu_cbc_base_address_v(u32 r) +{ + return (r >> 0) & 0x3ffffff; +} +static inline u32 fb_mmu_cbc_base_address_alignment_shift_v(void) +{ + return 0x0000000b; +} +static inline u32 fb_mmu_cbc_top_r(void) +{ + return 0x00100ec8; +} +static inline u32 fb_mmu_cbc_top_size_f(u32 v) +{ + return (v & 0x7fff) << 0; +} +static inline u32 fb_mmu_cbc_top_size_v(u32 r) +{ + return (r >> 0) & 0x7fff; +} +static inline u32 fb_mmu_cbc_top_size_alignment_shift_v(void) +{ + return 0x0000000b; +} +static inline u32 fb_mmu_cbc_max_r(void) +{ + return 0x00100ecc; +} +static inline u32 fb_mmu_cbc_max_comptagline_f(u32 v) +{ + return (v & 0xffffff) << 0; +} +static inline u32 fb_mmu_cbc_max_comptagline_v(u32 r) +{ + return (r >> 0) & 0xffffff; +} +static inline u32 fb_mmu_cbc_max_safe_f(u32 v) +{ + return (v & 0x1) << 30; +} +static inline u32 fb_mmu_cbc_max_safe_true_v(void) +{ + return 0x00000001; +} +static inline u32 fb_mmu_cbc_max_safe_false_v(void) +{ + return 0x00000000; +} +static inline u32 fb_mmu_cbc_max_unsafe_fault_f(u32 v) +{ + return (v & 0x1) << 31; +} +static inline u32 fb_mmu_cbc_max_unsafe_fault_enabled_v(void) +{ + return 0x00000000; +} +static inline u32 fb_mmu_cbc_max_unsafe_fault_disabled_v(void) +{ + return 0x00000001; +} #endif -- cgit v1.2.2