From e5b96a827301a4ebdff45425722281de9d500d01 Mon Sep 17 00:00:00 2001 From: seshendra Gadagottu Date: Mon, 17 Oct 2016 16:38:21 -0700 Subject: gpu: nvgpu: gv11b: update sm arch info Use updated register offset for gr_gpc0_tpc0_sm_arch_r() to read and update correct sm arch info. JIRA GV11B-21 Change-Id: I34af2d4a7665d7848bd74bc56a92ff2c861ceac9 Signed-off-by: seshendra Gadagottu Reviewed-on: http://git-master/r/1237916 GVS: Gerrit_Virtual_Submit Reviewed-by: Alex Waterman Reviewed-by: Terje Bergstrom --- drivers/gpu/nvgpu/gv11b/gr_gv11b.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/drivers/gpu/nvgpu/gv11b/gr_gv11b.c b/drivers/gpu/nvgpu/gv11b/gr_gv11b.c index d8b79bac..4274a800 100644 --- a/drivers/gpu/nvgpu/gv11b/gr_gv11b.c +++ b/drivers/gpu/nvgpu/gv11b/gr_gv11b.c @@ -1651,11 +1651,24 @@ void gr_gv11b_program_zcull_mapping(struct gk20a *g, u32 zcull_num_entries, } } +static void gr_gv11b_detect_sm_arch(struct gk20a *g) +{ + u32 v = gk20a_readl(g, gr_gpc0_tpc0_sm_arch_r()); + + g->gpu_characteristics.sm_arch_spa_version = + gr_gpc0_tpc0_sm_arch_spa_version_v(v); + g->gpu_characteristics.sm_arch_sm_version = + gr_gpc0_tpc0_sm_arch_sm_version_v(v); + g->gpu_characteristics.sm_arch_warp_count = + gr_gpc0_tpc0_sm_arch_warp_count_v(v); + +} void gv11b_init_gr(struct gpu_ops *gops) { gp10b_init_gr(gops); gops->gr.init_fs_state = gr_gv11b_init_fs_state; + gops->gr.detect_sm_arch = gr_gv11b_detect_sm_arch; gops->gr.is_valid_class = gr_gv11b_is_valid_class; gops->gr.commit_global_cb_manager = gr_gv11b_commit_global_cb_manager; gops->gr.commit_global_pagepool = gr_gv11b_commit_global_pagepool; -- cgit v1.2.2