summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a/mm_gk20a.h
diff options
context:
space:
mode:
authorDeepak Nibade <dnibade@nvidia.com>2015-11-04 03:36:37 -0500
committerTerje Bergstrom <tbergstrom@nvidia.com>2015-11-23 11:33:01 -0500
commit2d40ebb1caa313d5d12a13f15b2623faa3ad914b (patch)
treeac9463d1255e896ec06fb7b03870a5323ff9ceb7 /drivers/gpu/nvgpu/gk20a/mm_gk20a.h
parentf50d0ffb15aef2cbf419b81cdbc3031097767bff (diff)
gpu: nvgpu: rework private command buffer free path
We currently allocate private command buffers (wait_cmd and incr_cmd) before submitting the job but we never free them explicitly. When private command queue of the channel is full, we then try to recycle/remove free command buffers. But this recycling happens during submit path, and hence that particular submit path takes much longer Rework this as below : - add reference of command buffers to job structure - when job completes, free the command buffers explicitly - remove the code to recycle buffers since it should not be needed now Note that command buffers need to be freed in order of their allocation. Ensure this with error print before freeing the command buffer entry Bug 200141116 Bug 1698667 Change-Id: Id4b69429d7ad966307e0d122a71ad55076684307 Signed-off-by: Deepak Nibade <dnibade@nvidia.com> Reviewed-on: http://git-master/r/827638 (cherry picked from commit c6cefd69b71c9b70d6df5343b13dfcfb3fa99598) Reviewed-on: http://git-master/r/835802 Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com> Tested-by: Terje Bergstrom <tbergstrom@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/mm_gk20a.h')
-rw-r--r--drivers/gpu/nvgpu/gk20a/mm_gk20a.h2
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/mm_gk20a.h b/drivers/gpu/nvgpu/gk20a/mm_gk20a.h
index 2dd4ccf5..ac55e988 100644
--- a/drivers/gpu/nvgpu/gk20a/mm_gk20a.h
+++ b/drivers/gpu/nvgpu/gk20a/mm_gk20a.h
@@ -160,8 +160,6 @@ struct priv_cmd_queue {
160 u32 size; /* num of entries in words */ 160 u32 size; /* num of entries in words */
161 u32 put; /* put for priv cmd queue */ 161 u32 put; /* put for priv cmd queue */
162 u32 get; /* get for priv cmd queue */ 162 u32 get; /* get for priv cmd queue */
163 struct list_head free; /* list of pre-allocated free entries */
164 struct list_head head; /* list of used entries */
165}; 163};
166 164
167struct priv_cmd_entry { 165struct priv_cmd_entry {