From 10239a90841ce6dd90af0b894790c64e3cc668d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konsta=20H=C3=B6ltt=C3=A4?= Date: Wed, 13 May 2020 09:34:54 +0300 Subject: [PATCH] gpu: nvgpu: delete idle check in cde completion MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit With an exclusively owned context and a channel per cde job, new cde jobs are never launched on an active channel. A context is allocated, then used with one job, and then released to the free pool when the completion callback occurs. There is no need to check for an empty job list, so delete the check to avoid a dependency to channel joblist internals from cde code. Long back in the history the cde contexts were reused before going idle but the dynamic allocation has existed for years now and each context/channel pair is isolated. Jira NVGPU-5492 Change-Id: I9047ef4cd029996ba58fec42ddd55bb52cf0d6a6 Signed-off-by: Konsta Hölttä Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2343243 Reviewed-by: automaticguardword Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Deepak Nibade Reviewed-by: mobile promotions GVS: Gerrit_Virtual_Submit Tested-by: mobile promotions --- drivers/gpu/nvgpu/os/linux/cde.c | 9 --------- 1 file changed, 9 deletions(-) diff --git a/drivers/gpu/nvgpu/os/linux/cde.c b/drivers/gpu/nvgpu/os/linux/cde.c index b0f3f2d2e..f89cd30a4 100644 --- a/drivers/gpu/nvgpu/os/linux/cde.c +++ b/drivers/gpu/nvgpu/os/linux/cde.c @@ -33,7 +33,6 @@ #include #include #include -#include #include #include #include @@ -1267,14 +1266,6 @@ __releases(&cde_app->mutex) struct nvgpu_os_linux *l = cde_ctx->l; struct gk20a *g = &l->g; struct gk20a_cde_app *cde_app = &l->cde_app; - bool channel_idle; - - nvgpu_channel_joblist_lock(ch); - channel_idle = nvgpu_channel_joblist_is_empty(ch); - nvgpu_channel_joblist_unlock(ch); - - if (!channel_idle) - return; #ifdef CONFIG_NVGPU_TRACE trace_gk20a_cde_finished_ctx_cb(cde_ctx);