]> rtime.felk.cvut.cz Git - sojka/nv-tegra/linux-3.10.git/commit
gpu: nvgpu: rework private command buffer free path
authorDeepak Nibade <dnibade@nvidia.com>
Wed, 4 Nov 2015 08:36:37 +0000 (14:06 +0530)
committermobile promotions <svcmobile_promotions@nvidia.com>
Sat, 7 Nov 2015 08:33:40 +0000 (00:33 -0800)
commitc6cefd69b71c9b70d6df5343b13dfcfb3fa99598
tree3eba4cfdd68b30fdf82c86afe115d57d3145eeea
parented314778ccade8d01c8b429d221dfd0ff8febd1c
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
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
drivers/gpu/nvgpu/gk20a/channel_gk20a.c
drivers/gpu/nvgpu/gk20a/channel_gk20a.h
drivers/gpu/nvgpu/gk20a/mm_gk20a.h