summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gm20b
diff options
context:
space:
mode:
authorDeepak Nibade <dnibade@nvidia.com>2016-09-06 06:28:16 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2016-09-15 15:24:31 -0400
commitd07c4b48cfd5bbd52e3ece9c0234d16c97b75228 (patch)
treeb638bcc9569f83b4cfde88089f738a71e371e201 /drivers/gpu/nvgpu/gm20b
parent97512aecb60edf451914641231407a5e92559ac6 (diff)
gpu: nvgpu: select target based on aperture
While programming ucode's inst block in API gr_gk20a_load_falcon_bind_instblk(), use gk20a_aperture_mask() to select target address (i.e. if address is in sysmem or vidmem) based on aperture Also add target accessors for gr_fecs_new_ctx and gr_fecs_arb_ctx_ptr Jira DNVGPU-22 Change-Id: I88198080f188b349a4448a229dff8416a6a18073 Signed-off-by: Deepak Nibade <dnibade@nvidia.com> Reviewed-on: http://git-master/r/1216139 (cherry picked from commit 42bc14110df17400dd655bc994dc9e61c73048b1) Reviewed-on: http://git-master/r/1219703 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gm20b')
-rw-r--r--drivers/gpu/nvgpu/gm20b/hw_gr_gm20b.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/gm20b/hw_gr_gm20b.h b/drivers/gpu/nvgpu/gm20b/hw_gr_gm20b.h
index 45240e97..68b5a6d4 100644
--- a/drivers/gpu/nvgpu/gm20b/hw_gr_gm20b.h
+++ b/drivers/gpu/nvgpu/gm20b/hw_gr_gm20b.h
@@ -1226,6 +1226,14 @@ static inline u32 gr_fecs_new_ctx_target_v(u32 r)
1226{ 1226{
1227 return (r >> 28) & 0x3; 1227 return (r >> 28) & 0x3;
1228} 1228}
1229static inline u32 gr_fecs_new_ctx_target_vid_mem_f(void)
1230{
1231 return 0x0;
1232}
1233static inline u32 gr_fecs_new_ctx_target_sys_mem_ncoh_f(void)
1234{
1235 return 0x30000000;
1236}
1229static inline u32 gr_fecs_new_ctx_valid_s(void) 1237static inline u32 gr_fecs_new_ctx_valid_s(void)
1230{ 1238{
1231 return 1; 1239 return 1;
@@ -1278,6 +1286,14 @@ static inline u32 gr_fecs_arb_ctx_ptr_target_v(u32 r)
1278{ 1286{
1279 return (r >> 28) & 0x3; 1287 return (r >> 28) & 0x3;
1280} 1288}
1289static inline u32 gr_fecs_arb_ctx_ptr_target_vid_mem_f(void)
1290{
1291 return 0x0;
1292}
1293static inline u32 gr_fecs_arb_ctx_ptr_target_sys_mem_ncoh_f(void)
1294{
1295 return 0x30000000;
1296}
1281static inline u32 gr_fecs_arb_ctx_cmd_r(void) 1297static inline u32 gr_fecs_arb_ctx_cmd_r(void)
1282{ 1298{
1283 return 0x00409a10; 1299 return 0x00409a10;