diff options
Diffstat (limited to 'drivers/gpu/nvgpu/gm20b/gr_gm20b.c')
-rw-r--r-- | drivers/gpu/nvgpu/gm20b/gr_gm20b.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/gm20b/gr_gm20b.c b/drivers/gpu/nvgpu/gm20b/gr_gm20b.c index d40e9d52..8f056181 100644 --- a/drivers/gpu/nvgpu/gm20b/gr_gm20b.c +++ b/drivers/gpu/nvgpu/gm20b/gr_gm20b.c | |||
@@ -748,6 +748,18 @@ static int gr_gm20b_load_ctxsw_ucode(struct gk20a *g) | |||
748 | 748 | ||
749 | #endif | 749 | #endif |
750 | 750 | ||
751 | static void gr_gm20b_detect_sm_arch(struct gk20a *g) | ||
752 | { | ||
753 | u32 v = gk20a_readl(g, gr_gpc0_tpc0_sm_arch_r()); | ||
754 | |||
755 | g->gpu_characteristics.sm_arch_spa_version = | ||
756 | gr_gpc0_tpc0_sm_arch_spa_version_v(v); | ||
757 | g->gpu_characteristics.sm_arch_sm_version = | ||
758 | gr_gpc0_tpc0_sm_arch_sm_version_v(v); | ||
759 | g->gpu_characteristics.sm_arch_warp_count = | ||
760 | gr_gpc0_tpc0_sm_arch_warp_count_v(v); | ||
761 | } | ||
762 | |||
751 | void gm20b_init_gr(struct gpu_ops *gops) | 763 | void gm20b_init_gr(struct gpu_ops *gops) |
752 | { | 764 | { |
753 | gops->gr.init_gpc_mmu = gr_gm20b_init_gpc_mmu; | 765 | gops->gr.init_gpc_mmu = gr_gm20b_init_gpc_mmu; |
@@ -781,4 +793,5 @@ void gm20b_init_gr(struct gpu_ops *gops) | |||
781 | gops->gr.get_zcull_info = gr_gk20a_get_zcull_info; | 793 | gops->gr.get_zcull_info = gr_gk20a_get_zcull_info; |
782 | gops->gr.is_tpc_addr = gr_gm20b_is_tpc_addr; | 794 | gops->gr.is_tpc_addr = gr_gm20b_is_tpc_addr; |
783 | gops->gr.get_tpc_num = gr_gm20b_get_tpc_num; | 795 | gops->gr.get_tpc_num = gr_gm20b_get_tpc_num; |
796 | gops->gr.detect_sm_arch = gr_gm20b_detect_sm_arch; | ||
784 | } | 797 | } |