diff options
author | Sami Kiminki <skiminki@nvidia.com> | 2014-10-24 13:40:57 -0400 |
---|---|---|
committer | Dan Willemsen <dwillemsen@nvidia.com> | 2015-03-18 15:12:07 -0400 |
commit | d11fbfe7b1b68b3aab93f7703896d95d40b79a58 (patch) | |
tree | a4b8574c9181284523efa5105878c2e3ef2e05fa /drivers/gpu/nvgpu/gk20a/gr_gk20a.c | |
parent | 2c5fdd1c8a76ef9ca21abcf894f2c9525d57fd49 (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/gk20a/gr_gk20a.c')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/gr_gk20a.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gr_gk20a.c b/drivers/gpu/nvgpu/gk20a/gr_gk20a.c index 2c62c790..da257cd4 100644 --- a/drivers/gpu/nvgpu/gk20a/gr_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/gr_gk20a.c | |||
@@ -3490,6 +3490,27 @@ int gr_gk20a_get_zcull_info(struct gk20a *g, struct gr_gk20a *gr, | |||
3490 | return 0; | 3490 | return 0; |
3491 | } | 3491 | } |
3492 | 3492 | ||
3493 | static void gr_gk20a_detect_sm_arch(struct gk20a *g) | ||
3494 | { | ||
3495 | u32 v = gk20a_readl(g, gr_gpc0_tpc0_sm_arch_r()); | ||
3496 | |||
3497 | u32 raw_version = gr_gpc0_tpc0_sm_arch_spa_version_v(v); | ||
3498 | u32 version = 0; | ||
3499 | |||
3500 | if (raw_version == gr_gpc0_tpc0_sm_arch_spa_version_smkepler_lp_v()) | ||
3501 | version = 0x320; /* SM 3.2 */ | ||
3502 | else | ||
3503 | gk20a_err(dev_from_gk20a(g), "Unknown SM version 0x%x\n", | ||
3504 | raw_version); | ||
3505 | |||
3506 | /* on Kepler, SM version == SPA version */ | ||
3507 | g->gpu_characteristics.sm_arch_spa_version = version; | ||
3508 | g->gpu_characteristics.sm_arch_sm_version = version; | ||
3509 | |||
3510 | g->gpu_characteristics.sm_arch_warp_count = | ||
3511 | gr_gpc0_tpc0_sm_arch_warp_count_v(v); | ||
3512 | } | ||
3513 | |||
3493 | static int gr_gk20a_add_zbc_color(struct gk20a *g, struct gr_gk20a *gr, | 3514 | static int gr_gk20a_add_zbc_color(struct gk20a *g, struct gr_gk20a *gr, |
3494 | struct zbc_entry *color_val, u32 index) | 3515 | struct zbc_entry *color_val, u32 index) |
3495 | { | 3516 | { |
@@ -7328,5 +7349,6 @@ void gk20a_init_gr_ops(struct gpu_ops *gops) | |||
7328 | gops->gr.get_zcull_info = gr_gk20a_get_zcull_info; | 7349 | gops->gr.get_zcull_info = gr_gk20a_get_zcull_info; |
7329 | gops->gr.is_tpc_addr = gr_gk20a_is_tpc_addr; | 7350 | gops->gr.is_tpc_addr = gr_gk20a_is_tpc_addr; |
7330 | gops->gr.get_tpc_num = gr_gk20a_get_tpc_num; | 7351 | gops->gr.get_tpc_num = gr_gk20a_get_tpc_num; |
7352 | gops->gr.detect_sm_arch = gr_gk20a_detect_sm_arch; | ||
7331 | } | 7353 | } |
7332 | 7354 | ||