From bb6923908a2873b079ad67d22c9fcb014c00af28 Mon Sep 17 00:00:00 2001 From: Deepak Nibade Date: Tue, 6 Sep 2016 16:13:31 +0530 Subject: gpu: nvgpu: select target based on aperture For bar2 and pmu instance blocks, 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: Ieaa80bd83a4191fe57b7fba6e0f9cdaeb195a077 Signed-off-by: Deepak Nibade Reviewed-on: http://git-master/r/1216138 (cherry picked from commit 7a9f4175abc5dddf0879215de4637b7b6eb0ab7b) Reviewed-on: http://git-master/r/1219712 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Terje Bergstrom --- drivers/gpu/nvgpu/gp106/hw_gr_gp106.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'drivers/gpu/nvgpu/gp106/hw_gr_gp106.h') diff --git a/drivers/gpu/nvgpu/gp106/hw_gr_gp106.h b/drivers/gpu/nvgpu/gp106/hw_gr_gp106.h index e5e1c527..bb1f9fa9 100644 --- a/drivers/gpu/nvgpu/gp106/hw_gr_gp106.h +++ b/drivers/gpu/nvgpu/gp106/hw_gr_gp106.h @@ -1342,6 +1342,14 @@ static inline u32 gr_fecs_new_ctx_target_v(u32 r) { return (r >> 28) & 0x3; } +static inline u32 gr_fecs_new_ctx_target_vid_mem_f(void) +{ + return 0x0; +} +static inline u32 gr_fecs_new_ctx_target_sys_mem_ncoh_f(void) +{ + return 0x30000000; +} static inline u32 gr_fecs_new_ctx_valid_s(void) { return 1; @@ -1394,6 +1402,14 @@ static inline u32 gr_fecs_arb_ctx_ptr_target_v(u32 r) { return (r >> 28) & 0x3; } +static inline u32 gr_fecs_arb_ctx_ptr_target_vid_mem_f(void) +{ + return 0x0; +} +static inline u32 gr_fecs_arb_ctx_ptr_target_sys_mem_ncoh_f(void) +{ + return 0x30000000; +} static inline u32 gr_fecs_arb_ctx_cmd_r(void) { return 0x00409a10; -- cgit v1.2.2