diff options
author | Terje Bergstrom <tbergstrom@nvidia.com> | 2016-05-24 14:09:45 -0400 |
---|---|---|
committer | Terje Bergstrom <tbergstrom@nvidia.com> | 2016-05-25 16:16:10 -0400 |
commit | c8103a39ad78230266045bdb50c95b733c2042a2 (patch) | |
tree | 6c001a07d86581b7b212911b8eae6738bac70c89 /drivers/gpu/nvgpu/gk20a | |
parent | 2d10b3c5ede75561255cdc3bb694aa94d1bd6e52 (diff) |
gpu: nvgpu: Do not reallocate pes_tpc_mask array
We allocated a new pes_tpc_mask for each PES on each GPC. This
causes us to forget masks for all GPCs but the last one.
Change-Id: I825788ad75333d4aecd93c78d1b277c0d9d65f15
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: http://git-master/r/1152703
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a')
-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) + |