diff options
author | Deepak Nibade <dnibade@nvidia.com> | 2014-04-20 06:10:52 -0400 |
---|---|---|
committer | Dan Willemsen <dwillemsen@nvidia.com> | 2015-03-18 15:09:43 -0400 |
commit | eea79aaa60087174adf7e6876ac089cb4734ebaf (patch) | |
tree | 486c0ba2e0e25dab00c6bac8c6be524a6d4eff61 /drivers/gpu/nvgpu/gk20a/gk20a.c | |
parent | d4030081a867865be95cd3ede1407f0d35d5c761 (diff) |
gpu: nvgpu: gk20a: free syncpt when channel becomes idle
All of the channel's submit jobs are added to the list channel->jobs
In channel_update(), we iterate over this list and check if any job
has completed. If any job is complete then we remove it from the list.
If this list is empty then it means channel is idle and we can free
its syncpt.
Hence after iterating this list, check if it is empty or not.
If it is empty AND if we are aggressive to free the syncpt
(syncpt_aggressive_destroy flag is set) then free the syncpt
at this point.
Keep the syncpt free code inside submit_lock to avoid race conditions.
Also, do not free the syncpt if we have already scheduled WFI on some
other path. In that case, syncpt is still needed to check for channel
idle. Once WFI completes, we free the syncpt anyway.
Bug 1305024
Change-Id: I1654e1db3b76b7ad14644dbb900b03f195ca3b2c
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: http://git-master/r/398617
Reviewed-by: Shridhar Rasal <srasal@nvidia.com>
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/gk20a.c')
0 files changed, 0 insertions, 0 deletions