From 3227958a5e30692c22433b3f8afe3f0254137b62 Mon Sep 17 00:00:00 2001 From: Deepak Nibade Date: Thu, 5 Jun 2014 17:06:17 +0530 Subject: gpu: nvgpu: allocate secure buffer in probe Allocate dummy secure buffer of size PAGE_SIZE during gk20a_probe(). This will also help to initiate first secure memory (VPR) resize call while GPU is rail gated and in reset. This dummy buffer is released after we allocate some more secure memory buffers in alloc_global_ctx_buffers() Bug 1487804 Change-Id: I61604d9e5ffb585801ee893435c98a0d3e69d666 Signed-off-by: Deepak Nibade Reviewed-on: http://git-master/r/421701 (cherry picked from commit 4236ab3323ee3c02fac562740d8b80d763589dea) Reviewed-on: http://git-master/r/419610 Reviewed-by: Terje Bergstrom Tested-by: Terje Bergstrom --- drivers/gpu/nvgpu/gk20a/gr_gk20a.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'drivers/gpu/nvgpu/gk20a/gr_gk20a.c') diff --git a/drivers/gpu/nvgpu/gk20a/gr_gk20a.c b/drivers/gpu/nvgpu/gk20a/gr_gk20a.c index f3e82243..0e178e9e 100644 --- a/drivers/gpu/nvgpu/gk20a/gr_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/gr_gk20a.c @@ -2348,6 +2348,9 @@ static int gr_gk20a_alloc_global_ctx_buffers(struct gk20a *g) &gr->global_ctx_buffer[ATTRIBUTE_VPR], attr_buffer_size); + if (platform->secure_buffer.destroy) + platform->secure_buffer.destroy(pdev, &platform->secure_buffer); + gk20a_dbg_info("golden_image_size : %d", gr->ctx_vars.golden_image_size); -- cgit v1.2.2