From ec00a6c2db2b6e163c2bb1245584a2d009fa1252 Mon Sep 17 00:00:00 2001 From: Terje Bergstrom Date: Fri, 9 Feb 2018 14:42:07 -0800 Subject: gpu: nvgpu: Use preallocated VPR buffer To prevent deadlock while allocating VPR in nvgpu, allocate all the needed VPR memory at probe time and use an internal allocator to hand out space for VPR buffers. Change-Id: I584b9a0f746d5d1dec021cdfbd6f26b4b92e4412 Signed-off-by: Terje Bergstrom Reviewed-on: https://git-master.nvidia.com/r/1655324 Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/common/linux/platform_gk20a.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'drivers/gpu/nvgpu/common/linux/platform_gk20a.h') diff --git a/drivers/gpu/nvgpu/common/linux/platform_gk20a.h b/drivers/gpu/nvgpu/common/linux/platform_gk20a.h index 6994677e..ba4880af 100644 --- a/drivers/gpu/nvgpu/common/linux/platform_gk20a.h +++ b/drivers/gpu/nvgpu/common/linux/platform_gk20a.h @@ -32,7 +32,8 @@ struct gk20a_scale_profile; struct secure_page_buffer { void (*destroy)(struct gk20a *, struct secure_page_buffer *); size_t size; - u64 iova; + dma_addr_t phys; + size_t used; }; struct gk20a_platform { @@ -148,6 +149,8 @@ struct gk20a_platform { /* Powerdown platform dependencies */ void (*idle)(struct device *dev); + /* Preallocated VPR buffer for kernel */ + size_t secure_buffer_size; struct secure_page_buffer secure_buffer; /* Device is going to be suspended */ -- cgit v1.2.2