From b6466fbe07d28fcc1a2ea93715a1f88b48dd8550 Mon Sep 17 00:00:00 2001 From: Deepak Nibade Date: Mon, 16 Jun 2014 12:08:18 +0530 Subject: 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 Reviewed-on: http://git-master/r/416612 Reviewed-by: Terje Bergstrom Tested-by: Terje Bergstrom --- drivers/gpu/nvgpu/gk20a/tsg_gk20a.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers/gpu/nvgpu/gk20a/tsg_gk20a.c') 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) tsg->num_runnable_channels += 1; mutex_unlock(&tsg->ch_list_lock); - return 0; + return tsg->num_runnable_channels; } 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) tsg->num_runnable_channels -= 1; mutex_unlock(&tsg->ch_list_lock); - return 0; + return tsg->num_runnable_channels; } /* -- cgit v1.2.2