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/gm206/hw_gr_gm206.h | |
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/gm206/hw_gr_gm206.h')
-rw-r--r-- | drivers/gpu/nvgpu/gm206/hw_gr_gm206.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/gm206/hw_gr_gm206.h b/drivers/gpu/nvgpu/gm206/hw_gr_gm206.h index 011e3142..ff677844 100644 --- a/drivers/gpu/nvgpu/gm206/hw_gr_gm206.h +++ b/drivers/gpu/nvgpu/gm206/hw_gr_gm206.h | |||
@@ -1206,6 +1206,14 @@ static inline u32 gr_fecs_new_ctx_target_v(u32 r) | |||
1206 | { | 1206 | { |
1207 | return (r >> 28) & 0x3; | 1207 | return (r >> 28) & 0x3; |
1208 | } | 1208 | } |
1209 | static inline u32 gr_fecs_new_ctx_target_vid_mem_f(void) | ||
1210 | { | ||
1211 | return 0x0; | ||
1212 | } | ||
1213 | static inline u32 gr_fecs_new_ctx_target_sys_mem_ncoh_f(void) | ||
1214 | { | ||
1215 | return 0x30000000; | ||
1216 | } | ||
1209 | static inline u32 gr_fecs_new_ctx_valid_s(void) | 1217 | static inline u32 gr_fecs_new_ctx_valid_s(void) |
1210 | { | 1218 | { |
1211 | return 1; | 1219 | return 1; |
@@ -1258,6 +1266,14 @@ static inline u32 gr_fecs_arb_ctx_ptr_target_v(u32 r) | |||
1258 | { | 1266 | { |
1259 | return (r >> 28) & 0x3; | 1267 | return (r >> 28) & 0x3; |
1260 | } | 1268 | } |
1269 | static inline u32 gr_fecs_arb_ctx_ptr_target_vid_mem_f(void) | ||
1270 | { | ||
1271 | return 0x0; | ||
1272 | } | ||
1273 | static inline u32 gr_fecs_arb_ctx_ptr_target_sys_mem_ncoh_f(void) | ||
1274 | { | ||
1275 | return 0x30000000; | ||
1276 | } | ||
1261 | static inline u32 gr_fecs_arb_ctx_cmd_r(void) | 1277 | static inline u32 gr_fecs_arb_ctx_cmd_r(void) |
1262 | { | 1278 | { |
1263 | return 0x00409a10; | 1279 | return 0x00409a10; |