diff options
author | Deepak Nibade <dnibade@nvidia.com> | 2016-09-06 06:28:16 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2016-09-15 15:24:31 -0400 |
commit | d07c4b48cfd5bbd52e3ece9c0234d16c97b75228 (patch) | |
tree | b638bcc9569f83b4cfde88089f738a71e371e201 /drivers/gpu/nvgpu/gm20b | |
parent | 97512aecb60edf451914641231407a5e92559ac6 (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.h | 16 |
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 | } |
1229 | static inline u32 gr_fecs_new_ctx_target_vid_mem_f(void) | ||
1230 | { | ||
1231 | return 0x0; | ||
1232 | } | ||
1233 | static inline u32 gr_fecs_new_ctx_target_sys_mem_ncoh_f(void) | ||
1234 | { | ||
1235 | return 0x30000000; | ||
1236 | } | ||
1229 | static inline u32 gr_fecs_new_ctx_valid_s(void) | 1237 | static 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 | } |
1289 | static inline u32 gr_fecs_arb_ctx_ptr_target_vid_mem_f(void) | ||
1290 | { | ||
1291 | return 0x0; | ||
1292 | } | ||
1293 | static inline u32 gr_fecs_arb_ctx_ptr_target_sys_mem_ncoh_f(void) | ||
1294 | { | ||
1295 | return 0x30000000; | ||
1296 | } | ||
1281 | static inline u32 gr_fecs_arb_ctx_cmd_r(void) | 1297 | static inline u32 gr_fecs_arb_ctx_cmd_r(void) |
1282 | { | 1298 | { |
1283 | return 0x00409a10; | 1299 | return 0x00409a10; |