From 4f2b0494e40c33ced3049211508ee50f75b723ea Mon Sep 17 00:00:00 2001 From: Seshendra Gadagottu Date: Mon, 18 Apr 2016 12:41:06 -0700 Subject: gpu: nvgpu: gv11b: sysmem aperture for soc memory In gv11b, soc memory needs to be accessed as sysmem instead of videmem. Bug 1749338 Change-Id: I325c107958229cf717b0b0f18dd123597d1d7567 Signed-off-by: Seshendra Gadagottu Reviewed-on: http://git-master/r/1128377 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Ken Adams --- drivers/gpu/nvgpu/gv11b/hw_bus_gv11b.h | 16 ++++++++++++++++ drivers/gpu/nvgpu/gv11b/hw_ccsr_gv11b.h | 8 ++++++++ drivers/gpu/nvgpu/gv11b/hw_fb_gv11b.h | 20 ++++++++++++++++++++ drivers/gpu/nvgpu/gv11b/hw_fifo_gv11b.h | 8 ++++++++ drivers/gpu/nvgpu/gv11b/hw_gr_gv11b.h | 8 ++++++++ drivers/gpu/nvgpu/gv11b/hw_pbdma_gv11b.h | 8 ++++++++ drivers/gpu/nvgpu/gv11b/hw_ram_gv11b.h | 8 ++++++++ 7 files changed, 76 insertions(+) (limited to 'drivers/gpu/nvgpu') diff --git a/drivers/gpu/nvgpu/gv11b/hw_bus_gv11b.h b/drivers/gpu/nvgpu/gv11b/hw_bus_gv11b.h index 730fb0a7..cb5d2dc0 100644 --- a/drivers/gpu/nvgpu/gv11b/hw_bus_gv11b.h +++ b/drivers/gpu/nvgpu/gv11b/hw_bus_gv11b.h @@ -62,6 +62,14 @@ static inline u32 bus_bar1_block_target_vid_mem_f(void) { return 0x0; } +static inline u32 bus_bar1_block_target_sys_mem_coh_f(void) +{ + return 0x20000000; +} +static inline u32 bus_bar1_block_target_sys_mem_ncoh_f(void) +{ + return 0x30000000; +} static inline u32 bus_bar1_block_mode_virtual_f(void) { return 0x80000000; @@ -78,6 +86,14 @@ static inline u32 bus_bar2_block_target_vid_mem_f(void) { return 0x0; } +static inline u32 bus_bar2_block_target_sys_mem_coh_f(void) +{ + return 0x20000000; +} +static inline u32 bus_bar2_block_target_sys_mem_ncoh_f(void) +{ + return 0x30000000; +} static inline u32 bus_bar2_block_mode_virtual_f(void) { return 0x80000000; diff --git a/drivers/gpu/nvgpu/gv11b/hw_ccsr_gv11b.h b/drivers/gpu/nvgpu/gv11b/hw_ccsr_gv11b.h index 29df4bdd..04055b8c 100644 --- a/drivers/gpu/nvgpu/gv11b/hw_ccsr_gv11b.h +++ b/drivers/gpu/nvgpu/gv11b/hw_ccsr_gv11b.h @@ -66,6 +66,14 @@ static inline u32 ccsr_channel_inst_target_vid_mem_f(void) { return 0x0; } +static inline u32 ccsr_channel_inst_target_sys_mem_coh_f(void) +{ + return 0x20000000; +} +static inline u32 ccsr_channel_inst_target_sys_mem_ncoh_f(void) +{ + return 0x30000000; +} static inline u32 ccsr_channel_inst_bind_false_f(void) { return 0x0; diff --git a/drivers/gpu/nvgpu/gv11b/hw_fb_gv11b.h b/drivers/gpu/nvgpu/gv11b/hw_fb_gv11b.h index 7537f749..0a5622b4 100644 --- a/drivers/gpu/nvgpu/gv11b/hw_fb_gv11b.h +++ b/drivers/gpu/nvgpu/gv11b/hw_fb_gv11b.h @@ -106,6 +106,10 @@ static inline u32 fb_mmu_invalidate_pdb_aperture_vid_mem_f(void) { return 0x0; } +static inline u32 fb_mmu_invalidate_pdb_aperture_sys_mem_f(void) +{ + return 0x2; +} static inline u32 fb_mmu_invalidate_pdb_addr_f(u32 v) { return (v & 0xfffffff) << 4; @@ -374,6 +378,14 @@ static inline u32 fb_mmu_debug_wr_aperture_vid_mem_f(void) { return 0x0; } +static inline u32 fb_mmu_debug_wr_aperture_sys_mem_coh_f(void) +{ + return 0x2; +} +static inline u32 fb_mmu_debug_wr_aperture_sys_mem_ncoh_f(void) +{ + return 0x3; +} static inline u32 fb_mmu_debug_wr_vol_false_f(void) { return 0x0; @@ -402,6 +414,14 @@ static inline u32 fb_mmu_debug_rd_aperture_vid_mem_f(void) { return 0x0; } +static inline u32 fb_mmu_debug_rd_aperture_sys_mem_coh_f(void) +{ + return 0x2; +} +static inline u32 fb_mmu_debug_rd_aperture_sys_mem_ncoh_f(void) +{ + return 0x3; +} static inline u32 fb_mmu_debug_rd_vol_false_f(void) { return 0x0; diff --git a/drivers/gpu/nvgpu/gv11b/hw_fifo_gv11b.h b/drivers/gpu/nvgpu/gv11b/hw_fifo_gv11b.h index a4989aba..500d2434 100644 --- a/drivers/gpu/nvgpu/gv11b/hw_fifo_gv11b.h +++ b/drivers/gpu/nvgpu/gv11b/hw_fifo_gv11b.h @@ -82,6 +82,14 @@ static inline u32 fifo_runlist_base_target_vid_mem_f(void) { return 0x0; } +static inline u32 fifo_runlist_base_target_sys_mem_coh_f(void) +{ + return 0x20000000; +} +static inline u32 fifo_runlist_base_target_sys_mem_ncoh_f(void) +{ + return 0x30000000; +} static inline u32 fifo_runlist_r(void) { return 0x00002274; diff --git a/drivers/gpu/nvgpu/gv11b/hw_gr_gv11b.h b/drivers/gpu/nvgpu/gv11b/hw_gr_gv11b.h index 37556fb9..39b7074f 100644 --- a/drivers/gpu/nvgpu/gv11b/hw_gr_gv11b.h +++ b/drivers/gpu/nvgpu/gv11b/hw_gr_gv11b.h @@ -1010,6 +1010,14 @@ static inline u32 gr_fecs_current_ctx_target_vid_mem_f(void) { return 0x0; } +static inline u32 gr_fecs_current_ctx_target_sys_mem_coh_f(void) +{ + return 0x20000000; +} +static inline u32 gr_fecs_current_ctx_target_sys_mem_ncoh_f(void) +{ + return 0x30000000; +} static inline u32 gr_fecs_current_ctx_valid_s(void) { return 1; diff --git a/drivers/gpu/nvgpu/gv11b/hw_pbdma_gv11b.h b/drivers/gpu/nvgpu/gv11b/hw_pbdma_gv11b.h index a921d502..3863c6d6 100644 --- a/drivers/gpu/nvgpu/gv11b/hw_pbdma_gv11b.h +++ b/drivers/gpu/nvgpu/gv11b/hw_pbdma_gv11b.h @@ -322,6 +322,14 @@ static inline u32 pbdma_userd_target_vid_mem_f(void) { return 0x0; } +static inline u32 pbdma_userd_target_sys_mem_coh_f(void) +{ + return 0x2; +} +static inline u32 pbdma_userd_target_sys_mem_ncoh_f(void) +{ + return 0x3; +} static inline u32 pbdma_userd_addr_f(u32 v) { return (v & 0x7fffff) << 9; diff --git a/drivers/gpu/nvgpu/gv11b/hw_ram_gv11b.h b/drivers/gpu/nvgpu/gv11b/hw_ram_gv11b.h index d60f3bd2..a19e5251 100644 --- a/drivers/gpu/nvgpu/gv11b/hw_ram_gv11b.h +++ b/drivers/gpu/nvgpu/gv11b/hw_ram_gv11b.h @@ -70,6 +70,14 @@ static inline u32 ram_in_page_dir_base_target_vid_mem_f(void) { return 0x0; } +static inline u32 ram_in_page_dir_base_target_sys_mem_coh_f(void) +{ + return 0x2; +} +static inline u32 ram_in_page_dir_base_target_sys_mem_ncoh_f(void) +{ + return 0x3; +} static inline u32 ram_in_page_dir_base_vol_w(void) { return 128; -- cgit v1.2.2