summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/include
diff options
context:
space:
mode:
authorseshendra Gadagottu <sgadagottu@nvidia.com>2017-09-27 14:18:13 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2017-10-03 16:33:00 -0400
commit0d63e22a9920eb1e3d8653665cda650eca2311cd (patch)
tree8342c14bb0fe168c698f3d4b0dc734fcf6217a8f /drivers/gpu/nvgpu/include
parent1f6755b287cd5382a6e16baf0342bf6a7ab97f6c (diff)
gpu: nvgpu: gv11b: check for memory aperture type
Check for memory aperture type before setting relevant sysmem non-coherent or vidmem flags in ram entry. Modified following functions to correct memory aperture type: gv11b_get_ch_runlist_entry gv11b_subctx_commit_pdb Added following hw constants for chan_inst_target: ram_rl_entry_chan_inst_target_sys_mem_coh_v ram_rl_entry_chan_inst_target_vid_mem_v Change-Id: I85698044b9fe4c8baed71121845e4fb69dc33922 Signed-off-by: seshendra Gadagottu <sgadagottu@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1569521 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com> Reviewed-by: svccoveritychecker <svccoveritychecker@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/include')
-rw-r--r--drivers/gpu/nvgpu/include/nvgpu/hw/gv100/hw_ram_gv100.h8
-rw-r--r--drivers/gpu/nvgpu/include/nvgpu/hw/gv11b/hw_ram_gv11b.h8
2 files changed, 16 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/include/nvgpu/hw/gv100/hw_ram_gv100.h b/drivers/gpu/nvgpu/include/nvgpu/hw/gv100/hw_ram_gv100.h
index fa42ebbe..3a5bf6cb 100644
--- a/drivers/gpu/nvgpu/include/nvgpu/hw/gv100/hw_ram_gv100.h
+++ b/drivers/gpu/nvgpu/include/nvgpu/hw/gv100/hw_ram_gv100.h
@@ -672,6 +672,14 @@ static inline u32 ram_rl_entry_chan_inst_target_sys_mem_ncoh_v(void)
672{ 672{
673 return 0x00000003; 673 return 0x00000003;
674} 674}
675static inline u32 ram_rl_entry_chan_inst_target_sys_mem_coh_v(void)
676{
677 return 0x00000002U;
678}
679static inline u32 ram_rl_entry_chan_inst_target_vid_mem_v(void)
680{
681 return 0x00000000U;
682}
675static inline u32 ram_rl_entry_chan_userd_target_f(u32 v) 683static inline u32 ram_rl_entry_chan_userd_target_f(u32 v)
676{ 684{
677 return (v & 0x3) << 6; 685 return (v & 0x3) << 6;
diff --git a/drivers/gpu/nvgpu/include/nvgpu/hw/gv11b/hw_ram_gv11b.h b/drivers/gpu/nvgpu/include/nvgpu/hw/gv11b/hw_ram_gv11b.h
index c7f15f57..fe8bcd6b 100644
--- a/drivers/gpu/nvgpu/include/nvgpu/hw/gv11b/hw_ram_gv11b.h
+++ b/drivers/gpu/nvgpu/include/nvgpu/hw/gv11b/hw_ram_gv11b.h
@@ -672,6 +672,14 @@ static inline u32 ram_rl_entry_chan_inst_target_sys_mem_ncoh_v(void)
672{ 672{
673 return 0x00000003; 673 return 0x00000003;
674} 674}
675static inline u32 ram_rl_entry_chan_inst_target_sys_mem_coh_v(void)
676{
677 return 0x00000002U;
678}
679static inline u32 ram_rl_entry_chan_inst_target_vid_mem_v(void)
680{
681 return 0x00000000U;
682}
675static inline u32 ram_rl_entry_chan_userd_target_f(u32 v) 683static inline u32 ram_rl_entry_chan_userd_target_f(u32 v)
676{ 684{
677 return (v & 0x3) << 6; 685 return (v & 0x3) << 6;