summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/common/linux/platform_gk20a.h
diff options
context:
space:
mode:
authorTerje Bergstrom <tbergstrom@nvidia.com>2018-02-09 17:42:07 -0500
committermobile promotions <svcmobile_promotions@nvidia.com>2018-02-15 00:43:43 -0500
commitec00a6c2db2b6e163c2bb1245584a2d009fa1252 (patch)
tree7676cdb8840ccbbac287e31b2a5087d210854a8f /drivers/gpu/nvgpu/common/linux/platform_gk20a.h
parent1582bdb5eeff44a93f53987080a652910d51c3c4 (diff)
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 <tbergstrom@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1655324 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/common/linux/platform_gk20a.h')
-rw-r--r--drivers/gpu/nvgpu/common/linux/platform_gk20a.h5
1 files changed, 4 insertions, 1 deletions
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;
32struct secure_page_buffer { 32struct secure_page_buffer {
33 void (*destroy)(struct gk20a *, struct secure_page_buffer *); 33 void (*destroy)(struct gk20a *, struct secure_page_buffer *);
34 size_t size; 34 size_t size;
35 u64 iova; 35 dma_addr_t phys;
36 size_t used;
36}; 37};
37 38
38struct gk20a_platform { 39struct gk20a_platform {
@@ -148,6 +149,8 @@ struct gk20a_platform {
148 /* Powerdown platform dependencies */ 149 /* Powerdown platform dependencies */
149 void (*idle)(struct device *dev); 150 void (*idle)(struct device *dev);
150 151
152 /* Preallocated VPR buffer for kernel */
153 size_t secure_buffer_size;
151 struct secure_page_buffer secure_buffer; 154 struct secure_page_buffer secure_buffer;
152 155
153 /* Device is going to be suspended */ 156 /* Device is going to be suspended */