diff options
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/gr_gk20a.c | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gr_gk20a.c b/drivers/gpu/nvgpu/gk20a/gr_gk20a.c index 076ddd12..e8d363e1 100644 --- a/drivers/gpu/nvgpu/gk20a/gr_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/gr_gk20a.c | |||
@@ -3264,15 +3264,17 @@ static int gr_gk20a_init_gr_config(struct gk20a *g, struct gr_gk20a *gr) | |||
3264 | g->ops.gr.get_gpc_tpc_mask(g, gpc_index); | 3264 | g->ops.gr.get_gpc_tpc_mask(g, gpc_index); |
3265 | 3265 | ||
3266 | for (pes_index = 0; pes_index < gr->pe_count_per_gpc; pes_index++) { | 3266 | for (pes_index = 0; pes_index < gr->pe_count_per_gpc; pes_index++) { |
3267 | gr->pes_tpc_count[pes_index] = | 3267 | if (!gr->pes_tpc_count[pes_index]) { |
3268 | kzalloc(gr->gpc_count * sizeof(u32), | 3268 | gr->pes_tpc_count[pes_index] = |
3269 | GFP_KERNEL); | 3269 | kzalloc(gr->gpc_count * sizeof(u32), |
3270 | gr->pes_tpc_mask[pes_index] = | 3270 | GFP_KERNEL); |
3271 | kzalloc(gr->gpc_count * sizeof(u32), | 3271 | gr->pes_tpc_mask[pes_index] = |
3272 | GFP_KERNEL); | 3272 | kzalloc(gr->gpc_count * sizeof(u32), |
3273 | if (!gr->pes_tpc_count[pes_index] || | 3273 | GFP_KERNEL); |
3274 | !gr->pes_tpc_mask[pes_index]) | 3274 | if (!gr->pes_tpc_count[pes_index] || |
3275 | goto clean_up; | 3275 | !gr->pes_tpc_mask[pes_index]) |
3276 | goto clean_up; | ||
3277 | } | ||
3276 | 3278 | ||
3277 | tmp = gk20a_readl(g, | 3279 | tmp = gk20a_readl(g, |
3278 | gr_gpc0_gpm_pd_pes_tpc_id_mask_r(pes_index) + | 3280 | gr_gpc0_gpm_pd_pes_tpc_id_mask_r(pes_index) + |