summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorKonsta Holtta <kholtta@nvidia.com>2018-06-26 05:22:29 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2018-06-28 14:13:42 -0400
commitd8833c6da35c99d73f817e614f327e5617788860 (patch)
tree217148dd6f96883cdc7a9335eee071c97c1169a7 /drivers
parent610dafa1e0d3db345cd7a46adcf82617236c8602 (diff)
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>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/nvgpu/gk20a/gr_gk20a.c3
-rw-r--r--drivers/gpu/nvgpu/gv11b/subctx_gv11b.c2
2 files changed, 0 insertions, 5 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gr_gk20a.c b/drivers/gpu/nvgpu/gk20a/gr_gk20a.c
index b218397a..d787a693 100644
--- a/drivers/gpu/nvgpu/gk20a/gr_gk20a.c
+++ b/drivers/gpu/nvgpu/gk20a/gr_gk20a.c
@@ -1763,9 +1763,6 @@ int gr_gk20a_update_hwpm_ctxsw_mode(struct gk20a *g,
1763 return -ENOMEM; 1763 return -ENOMEM;
1764 } 1764 }
1765 } 1765 }
1766
1767 /* Now clear the buffer */
1768 nvgpu_memset(g, &pm_ctx->mem, 0, 0, pm_ctx->mem.size);
1769 } 1766 }
1770 1767
1771 data = nvgpu_mem_rd(g, gr_mem, ctxsw_prog_main_image_pm_o()); 1768 data = nvgpu_mem_rd(g, gr_mem, ctxsw_prog_main_image_pm_o());
diff --git a/drivers/gpu/nvgpu/gv11b/subctx_gv11b.c b/drivers/gpu/nvgpu/gv11b/subctx_gv11b.c
index 4f8de196..b0bcb585 100644
--- a/drivers/gpu/nvgpu/gv11b/subctx_gv11b.c
+++ b/drivers/gpu/nvgpu/gv11b/subctx_gv11b.c
@@ -79,8 +79,6 @@ int gv11b_alloc_subctx_header(struct channel_gk20a *c)
79 nvgpu_dma_free(g, &ctx->mem); 79 nvgpu_dma_free(g, &ctx->mem);
80 return -ENOMEM; 80 return -ENOMEM;
81 } 81 }
82 /* Now clear the buffer */
83 nvgpu_memset(g, &ctx->mem, 0, 0, ctx->mem.size);
84 } 82 }
85 return ret; 83 return ret;
86} 84}