summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a/gr_gk20a.c
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/gk20a/gr_gk20a.c
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/gk20a/gr_gk20a.c')
-rw-r--r--drivers/gpu/nvgpu/gk20a/gr_gk20a.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gr_gk20a.c b/drivers/gpu/nvgpu/gk20a/gr_gk20a.c
index 4c650520..35e4f0b8 100644
--- a/drivers/gpu/nvgpu/gk20a/gr_gk20a.c
+++ b/drivers/gpu/nvgpu/gk20a/gr_gk20a.c
@@ -2219,12 +2219,16 @@ void gr_gk20a_load_falcon_bind_instblk(struct gk20a *g)
2219 inst_ptr = gk20a_mm_inst_block_addr(g, &ucode_info->inst_blk_desc); 2219 inst_ptr = gk20a_mm_inst_block_addr(g, &ucode_info->inst_blk_desc);
2220 gk20a_writel(g, gr_fecs_new_ctx_r(), 2220 gk20a_writel(g, gr_fecs_new_ctx_r(),
2221 gr_fecs_new_ctx_ptr_f(inst_ptr >> 12) | 2221 gr_fecs_new_ctx_ptr_f(inst_ptr >> 12) |
2222 gr_fecs_new_ctx_target_m() | 2222 gk20a_aperture_mask(g, &ucode_info->inst_blk_desc,
2223 gr_fecs_new_ctx_target_sys_mem_ncoh_f(),
2224 gr_fecs_new_ctx_target_vid_mem_f()) |
2223 gr_fecs_new_ctx_valid_m()); 2225 gr_fecs_new_ctx_valid_m());
2224 2226
2225 gk20a_writel(g, gr_fecs_arb_ctx_ptr_r(), 2227 gk20a_writel(g, gr_fecs_arb_ctx_ptr_r(),
2226 gr_fecs_arb_ctx_ptr_ptr_f(inst_ptr >> 12) | 2228 gr_fecs_arb_ctx_ptr_ptr_f(inst_ptr >> 12) |
2227 gr_fecs_arb_ctx_ptr_target_m()); 2229 gk20a_aperture_mask(g, &ucode_info->inst_blk_desc,
2230 gr_fecs_arb_ctx_ptr_target_sys_mem_ncoh_f(),
2231 gr_fecs_arb_ctx_ptr_target_vid_mem_f()));
2228 2232
2229 gk20a_writel(g, gr_fecs_arb_ctx_cmd_r(), 0x7); 2233 gk20a_writel(g, gr_fecs_arb_ctx_cmd_r(), 0x7);
2230 2234