diff options
author | Deepak Nibade <dnibade@nvidia.com> | 2014-06-16 02:38:18 -0400 |
---|---|---|
committer | Dan Willemsen <dwillemsen@nvidia.com> | 2015-03-18 15:10:16 -0400 |
commit | b6466fbe07d28fcc1a2ea93715a1f88b48dd8550 (patch) | |
tree | 8eef989215f1becfa5d72642dccaf7727b3a21f1 /drivers/gpu/nvgpu/gk20a/tsg_gk20a.c | |
parent | bea937a74ede83ff3973b52d684ffdfabaa33767 (diff) |
gpu: nvgpu: add TSG support to runlists
- when a TSG channel is made runnable, add it to TSG's
runnable list
- when a TSG channel is removed from runlist, remove it
from TSG's runnable list
When we rewrite the entire runlist :
- first add all the channels which are not part of any TSG
- then find all active TSGs, add an entry in runlist for the TSG
(with TSG id and length of TSG)
- then write entries for each channel in that TSG
Bug 1470692
Change-Id: Ic55a4d5959abc72cd20b8224eb4c31d3ff411861
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: http://git-master/r/416612
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Tested-by: Terje Bergstrom <tbergstrom@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/tsg_gk20a.c')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/tsg_gk20a.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/tsg_gk20a.c b/drivers/gpu/nvgpu/gk20a/tsg_gk20a.c index d9e10d30..7c65c695 100644 --- a/drivers/gpu/nvgpu/gk20a/tsg_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/tsg_gk20a.c | |||
@@ -50,7 +50,7 @@ int gk20a_bind_runnable_channel_to_tsg(struct channel_gk20a *ch, int tsgid) | |||
50 | tsg->num_runnable_channels += 1; | 50 | tsg->num_runnable_channels += 1; |
51 | mutex_unlock(&tsg->ch_list_lock); | 51 | mutex_unlock(&tsg->ch_list_lock); |
52 | 52 | ||
53 | return 0; | 53 | return tsg->num_runnable_channels; |
54 | } | 54 | } |
55 | 55 | ||
56 | int gk20a_unbind_channel_from_tsg(struct channel_gk20a *ch, int tsgid) | 56 | int gk20a_unbind_channel_from_tsg(struct channel_gk20a *ch, int tsgid) |
@@ -68,7 +68,7 @@ int gk20a_unbind_channel_from_tsg(struct channel_gk20a *ch, int tsgid) | |||
68 | tsg->num_runnable_channels -= 1; | 68 | tsg->num_runnable_channels -= 1; |
69 | mutex_unlock(&tsg->ch_list_lock); | 69 | mutex_unlock(&tsg->ch_list_lock); |
70 | 70 | ||
71 | return 0; | 71 | return tsg->num_runnable_channels; |
72 | } | 72 | } |
73 | 73 | ||
74 | /* | 74 | /* |