diff options
author | Sami Kiminki <skiminki@nvidia.com> | 2016-10-28 16:05:23 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2016-11-11 05:21:04 -0500 |
commit | f329e674f477f0120f9a92a9e7b4945a1ddaefbb (patch) | |
tree | 55107ad03a029e438e93c1793afd5e940ab7206b /drivers/gpu/nvgpu/gk20a/gr_gk20a.c | |
parent | cc4208a27831faf95409b491aa29b8a161bf630a (diff) |
gpu: nvgpu: gk20a: Fix FBP/L2 masks, add GET_FBP_L2_MASKS
Fix FBP and ROP_L2 enable masks for Maxwell+. Deprecate rop_l2_en_mask
in GPU characteristics by adding _DEPRECATED postfix. The array is
too small to hold ROP_L2 enable masks for desktop GPUs.
Add NVGPU_GPU_IOCTL_GET_FBP_L2_MASKS to expose the ROP_L2 masks for
userspace.
Bug 200136909
Bug 200241845
Change-Id: I5ad5a5c09f3962ebb631b8d6e7a2f9df02f75ac7
Signed-off-by: Sami Kiminki <skiminki@nvidia.com>
Reviewed-on: http://git-master/r/1245294
(cherry picked from commit 0823b33e59defec341ea7919dae4e5f73a36d256)
Reviewed-on: http://git-master/r/1249883
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/gr_gk20a.c')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/gr_gk20a.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gr_gk20a.c b/drivers/gpu/nvgpu/gk20a/gr_gk20a.c index 41ef5424..4dbdb777 100644 --- a/drivers/gpu/nvgpu/gk20a/gr_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/gr_gk20a.c | |||
@@ -3257,6 +3257,7 @@ static void gk20a_remove_gr_support(struct gr_gk20a *gr) | |||
3257 | kfree(gr->sm_to_cluster); | 3257 | kfree(gr->sm_to_cluster); |
3258 | kfree(gr->gpc_skip_mask); | 3258 | kfree(gr->gpc_skip_mask); |
3259 | kfree(gr->map_tiles); | 3259 | kfree(gr->map_tiles); |
3260 | kfree(gr->fbp_rop_l2_en_mask); | ||
3260 | gr->gpc_tpc_count = NULL; | 3261 | gr->gpc_tpc_count = NULL; |
3261 | gr->gpc_zcb_count = NULL; | 3262 | gr->gpc_zcb_count = NULL; |
3262 | gr->gpc_ppc_count = NULL; | 3263 | gr->gpc_ppc_count = NULL; |
@@ -3266,6 +3267,7 @@ static void gk20a_remove_gr_support(struct gr_gk20a *gr) | |||
3266 | gr->pes_tpc_mask[1] = NULL; | 3267 | gr->pes_tpc_mask[1] = NULL; |
3267 | gr->gpc_skip_mask = NULL; | 3268 | gr->gpc_skip_mask = NULL; |
3268 | gr->map_tiles = NULL; | 3269 | gr->map_tiles = NULL; |
3270 | gr->fbp_rop_l2_en_mask = NULL; | ||
3269 | 3271 | ||
3270 | gr->ctx_vars.valid = false; | 3272 | gr->ctx_vars.valid = false; |
3271 | kfree(gr->ctx_vars.ucode.fecs.inst.l); | 3273 | kfree(gr->ctx_vars.ucode.fecs.inst.l); |
@@ -3336,6 +3338,11 @@ static int gr_gk20a_init_gr_config(struct gk20a *g, struct gr_gk20a *gr) | |||
3336 | 3338 | ||
3337 | gr->fbp_en_mask = g->ops.gr.get_fbp_en_mask(g); | 3339 | gr->fbp_en_mask = g->ops.gr.get_fbp_en_mask(g); |
3338 | 3340 | ||
3341 | gr->fbp_rop_l2_en_mask = | ||
3342 | kzalloc(gr->max_fbps_count * sizeof(u32), GFP_KERNEL); | ||
3343 | if (!gr->fbp_rop_l2_en_mask) | ||
3344 | goto clean_up; | ||
3345 | |||
3339 | tmp = gk20a_readl(g, top_tpc_per_gpc_r()); | 3346 | tmp = gk20a_readl(g, top_tpc_per_gpc_r()); |
3340 | gr->max_tpc_per_gpc_count = top_tpc_per_gpc_value_v(tmp); | 3347 | gr->max_tpc_per_gpc_count = top_tpc_per_gpc_value_v(tmp); |
3341 | 3348 | ||