From d7ae490dffc2aac4855a4df55eb83cef70ba5243 Mon Sep 17 00:00:00 2001 From: Debarshi Dutta Date: Thu, 19 Sep 2019 15:56:49 +0530 Subject: [PATCH] gpu: nvgpu: Reduce CCM for channel function Reduce CCM for nvgpu_channel_suspend_all_serviceable_ch by early calling channel.unbind nvgpu_channel_suspend_all_serviceable_ch: Previous MCC TCC | Current MCC TCC 11 11 | 8 8 Jira NVGPU-4063 Change-Id: If701c7d83cbde31a19bbc19866962322c58c370d Signed-off-by: Debarshi Dutta Reviewed-on: https://git-master.nvidia.com/r/2201486 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Sagar Kamble Reviewed-by: Deepak Nibade Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/common/fifo/channel.c | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/drivers/gpu/nvgpu/common/fifo/channel.c b/drivers/gpu/nvgpu/common/fifo/channel.c index 56c2bc4ee..e8c89db8a 100644 --- a/drivers/gpu/nvgpu/common/fifo/channel.c +++ b/drivers/gpu/nvgpu/common/fifo/channel.c @@ -2567,6 +2567,8 @@ int nvgpu_channel_suspend_all_serviceable_ch(struct gk20a *g) g->os_channel.work_completion_cancel_sync(ch); } + g->ops.channel.unbind(ch); + channels_in_use = true; active_runlist_ids |= BIT32(ch->runlist_id); @@ -2578,22 +2580,6 @@ int nvgpu_channel_suspend_all_serviceable_ch(struct gk20a *g) if (channels_in_use) { nvgpu_assert(nvgpu_runlist_reload_ids(g, active_runlist_ids, false) == 0); - - for (chid = 0; chid < f->num_channels; chid++) { - struct nvgpu_channel *ch = - nvgpu_channel_from_id(g, chid); - - if (ch != NULL) { - if (nvgpu_channel_check_unserviceable(ch)) { - nvgpu_log_info(g, "do not unbind " - "recovered channel %d", - chid); - } else { - g->ops.channel.unbind(ch); - } - nvgpu_channel_put(ch); - } - } } nvgpu_log_fn(g, "done");