diff options
author | sujeet baranwal <sbaranwal@nvidia.com> | 2015-03-06 14:55:36 -0500 |
---|---|---|
committer | Dan Willemsen <dwillemsen@nvidia.com> | 2015-04-04 21:58:05 -0400 |
commit | 2155dfeaba1714bb00cb86af090aa056aec3acfd (patch) | |
tree | 545b791cbf1271750f8728e1e5ec30d107a4ef7b /drivers/gpu/nvgpu/gk20a/gr_gk20a.c | |
parent | 895675e1d5790e2361b22edb50d702f7dd9a8edd (diff) |
gpu: nvgpu: Gpu characterstics enhancement
New members are added in nvgpu_gpu_characterstics to export more
information required specially from CUDA tools.
Change-Id: I907f3bcbd272405a13f47ef6236bc2cff01c6c80
Signed-off-by: Sujeet Baranwal <sbaranwal@nvidia.com>
Reviewed-on: http://git-master/r/679202
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Tested-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 | 43 |
1 files changed, 42 insertions, 1 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gr_gk20a.c b/drivers/gpu/nvgpu/gk20a/gr_gk20a.c index 7e8d4e13..e9b209c4 100644 --- a/drivers/gpu/nvgpu/gk20a/gr_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/gr_gk20a.c | |||
@@ -3066,6 +3066,8 @@ static int gr_gk20a_init_gr_config(struct gk20a *g, struct gr_gk20a *gr) | |||
3066 | tmp = gk20a_readl(g, top_num_fbps_r()); | 3066 | tmp = gk20a_readl(g, top_num_fbps_r()); |
3067 | gr->max_fbps_count = top_num_fbps_value_v(tmp); | 3067 | gr->max_fbps_count = top_num_fbps_value_v(tmp); |
3068 | 3068 | ||
3069 | gr->fbp_en_mask = g->ops.gr.get_fbp_en_mask(g); | ||
3070 | |||
3069 | tmp = gk20a_readl(g, top_tpc_per_gpc_r()); | 3071 | tmp = gk20a_readl(g, top_tpc_per_gpc_r()); |
3070 | gr->max_tpc_per_gpc_count = top_tpc_per_gpc_value_v(tmp); | 3072 | gr->max_tpc_per_gpc_count = top_tpc_per_gpc_value_v(tmp); |
3071 | 3073 | ||
@@ -7313,6 +7315,41 @@ static u32 gr_gk20a_pagepool_default_size(struct gk20a *g) | |||
7313 | return gr_scc_pagepool_total_pages_hwmax_value_v(); | 7315 | return gr_scc_pagepool_total_pages_hwmax_value_v(); |
7314 | } | 7316 | } |
7315 | 7317 | ||
7318 | static u32 gr_gk20a_get_max_fbps_count(struct gk20a *g) | ||
7319 | { | ||
7320 | u32 max_fbps_count, tmp; | ||
7321 | tmp = gk20a_readl(g, top_num_fbps_r()); | ||
7322 | max_fbps_count = top_num_fbps_value_v(tmp); | ||
7323 | return max_fbps_count; | ||
7324 | } | ||
7325 | |||
7326 | |||
7327 | static u32 gr_gk20a_get_fbp_en_mask(struct gk20a *g) | ||
7328 | { | ||
7329 | u32 fbp_en_mask, opt_fbio; | ||
7330 | opt_fbio = gk20a_readl(g, top_fs_status_fbp_r()); | ||
7331 | fbp_en_mask = top_fs_status_fbp_cluster_v(opt_fbio); | ||
7332 | return fbp_en_mask; | ||
7333 | } | ||
7334 | |||
7335 | static u32 gr_gk20a_get_max_ltc_per_fbp(struct gk20a *g) | ||
7336 | { | ||
7337 | return 1; | ||
7338 | } | ||
7339 | |||
7340 | static u32 gr_gk20a_get_max_lts_per_ltc(struct gk20a *g) | ||
7341 | { | ||
7342 | return 1; | ||
7343 | } | ||
7344 | |||
7345 | u32 *gr_gk20a_rop_l2_en_mask(struct gk20a *g) | ||
7346 | { | ||
7347 | /* gk20a doesnt have rop_l2_en_mask */ | ||
7348 | return NULL; | ||
7349 | } | ||
7350 | |||
7351 | |||
7352 | |||
7316 | static int gr_gk20a_dump_gr_status_regs(struct gk20a *g, | 7353 | static int gr_gk20a_dump_gr_status_regs(struct gk20a *g, |
7317 | struct gk20a_debug_output *o) | 7354 | struct gk20a_debug_output *o) |
7318 | { | 7355 | { |
@@ -7470,5 +7507,9 @@ void gk20a_init_gr_ops(struct gpu_ops *gops) | |||
7470 | gops->gr.alloc_gr_ctx = gr_gk20a_alloc_gr_ctx; | 7507 | gops->gr.alloc_gr_ctx = gr_gk20a_alloc_gr_ctx; |
7471 | gops->gr.free_gr_ctx = gr_gk20a_free_gr_ctx; | 7508 | gops->gr.free_gr_ctx = gr_gk20a_free_gr_ctx; |
7472 | gops->gr.dump_gr_regs = gr_gk20a_dump_gr_status_regs; | 7509 | gops->gr.dump_gr_regs = gr_gk20a_dump_gr_status_regs; |
7510 | gops->gr.get_max_fbps_count = gr_gk20a_get_max_fbps_count; | ||
7511 | gops->gr.get_fbp_en_mask = gr_gk20a_get_fbp_en_mask; | ||
7512 | gops->gr.get_max_ltc_per_fbp = gr_gk20a_get_max_ltc_per_fbp; | ||
7513 | gops->gr.get_max_lts_per_ltc = gr_gk20a_get_max_lts_per_ltc; | ||
7514 | gops->gr.get_rop_l2_en_mask = gr_gk20a_rop_l2_en_mask; | ||
7473 | } | 7515 | } |
7474 | |||