summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gm20b/gr_gm20b.c
diff options
context:
space:
mode:
authorSami Kiminki <skiminki@nvidia.com>2014-10-24 13:40:57 -0400
committerDan Willemsen <dwillemsen@nvidia.com>2015-03-18 15:12:07 -0400
commitd11fbfe7b1b68b3aab93f7703896d95d40b79a58 (patch)
treea4b8574c9181284523efa5105878c2e3ef2e05fa /drivers/gpu/nvgpu/gm20b/gr_gm20b.c
parent2c5fdd1c8a76ef9ca21abcf894f2c9525d57fd49 (diff)
gpu: nvgpu: GPU characteristics additions
Add the following info into GPU characteristics: available big page sizes, support indicators for sync fence fds and cycle stats, gpc mask, SM version, SM SPA version and warp count, and IOCTL interface levels. Also, add new IOCTL to fetch TPC masks. Bug 1551769 Bug 1558186 Change-Id: I8a47d882645f29c7bf0c8f74334ebf47240e41de Signed-off-by: Sami Kiminki <skiminki@nvidia.com> Reviewed-on: http://git-master/r/562904 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gm20b/gr_gm20b.c')
-rw-r--r--drivers/gpu/nvgpu/gm20b/gr_gm20b.c13
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
751static 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
751void gm20b_init_gr(struct gpu_ops *gops) 763void 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}