gpu: nvgpu: remove unnecessary nvgpu_memset calls

Some graphics context buffers are explicitly cleared to zero after
allocation. That's not necessary because the allocator gives
zero-initialized memory already, so remove the clears.

Change-Id: I8f9913605801e35082762e7743762d97f88e1d12
Signed-off-by: Konsta Holtta <kholtta@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1761578
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Alex Waterman <alexw@nvidia.com>
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
Konsta Holtta
2018-06-26 12:22:29 +03:00
committed by mobile promotions
parent 610dafa1e0
commit d8833c6da3
2 changed files with 0 additions and 5 deletions

View File

@@ -1763,9 +1763,6 @@ int gr_gk20a_update_hwpm_ctxsw_mode(struct gk20a *g,
return -ENOMEM; return -ENOMEM;
} }
} }
/* Now clear the buffer */
nvgpu_memset(g, &pm_ctx->mem, 0, 0, pm_ctx->mem.size);
} }
data = nvgpu_mem_rd(g, gr_mem, ctxsw_prog_main_image_pm_o()); data = nvgpu_mem_rd(g, gr_mem, ctxsw_prog_main_image_pm_o());

View File

@@ -79,8 +79,6 @@ int gv11b_alloc_subctx_header(struct channel_gk20a *c)
nvgpu_dma_free(g, &ctx->mem); nvgpu_dma_free(g, &ctx->mem);
return -ENOMEM; return -ENOMEM;
} }
/* Now clear the buffer */
nvgpu_memset(g, &ctx->mem, 0, 0, ctx->mem.size);
} }
return ret; return ret;
} }