gpu: nvgpu: delete idle check in cde completion

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ä <kholtta@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2343243
Reviewed-by: automaticguardword <automaticguardword@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: Gerrit_Virtual_Submit
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
Konsta Hölttä
2020-05-13 09:34:54 +03:00
committed by Alex Waterman
parent b6bf13290e
commit 10239a9084

View File

@@ -33,7 +33,6 @@
#include <nvgpu/firmware.h>
#include <nvgpu/os_sched.h>
#include <nvgpu/channel.h>
#include <nvgpu/job.h>
#include <nvgpu/runlist.h>
#include <nvgpu/utils.h>
#include <nvgpu/gk20a.h>
@@ -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);