From ab593b9ccd3132404406ef6340348fdb28c23bf0 Mon Sep 17 00:00:00 2001 From: Sachit Kadle Date: Wed, 14 Sep 2016 11:45:38 -0700 Subject: gpu: nvgpu: make deferred clean-up conditional This change makes the invocation of the deferred job clean-up mechanism conditional. For submissions that require job tracking, deferred clean-up is only required if any of the following conditions are met: 1) Channel's deterministic flag is not set 2) Rail-gating is enabled 3) Channel WDT is enabled 4) Buffer refcounting is enabled 5) Dependency on Sync Framework In case deferred clean-up is not needed, we clean-up a single job tracking resource in the submit path. For deterministic channels, we do not allow deferred clean-up to occur and fail any submits that require it. Bug 1795076 Change-Id: I4021dffe8a71aa58f12db6b58518d3f4021f3313 Signed-off-by: Sachit Kadle Reviewed-on: http://git-master/r/1220920 Reviewed-by: mobile promotions Tested-by: mobile promotions (cherry picked from commit b09f7589d5ad3c496e7350f1ed583a4fe2db574a) Reviewed-on: http://git-master/r/1223941 GVS: Gerrit_Virtual_Submit Reviewed-by: Terje Bergstrom Tested-by: Terje Bergstrom --- drivers/gpu/nvgpu/gk20a/channel_sync_gk20a.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'drivers/gpu/nvgpu/gk20a/channel_sync_gk20a.h') diff --git a/drivers/gpu/nvgpu/gk20a/channel_sync_gk20a.h b/drivers/gpu/nvgpu/gk20a/channel_sync_gk20a.h index c3a92ad2..5e75dd9b 100644 --- a/drivers/gpu/nvgpu/gk20a/channel_sync_gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/channel_sync_gk20a.h @@ -57,7 +57,8 @@ struct gk20a_channel_sync { int (*incr)(struct gk20a_channel_sync *s, struct priv_cmd_entry *entry, struct gk20a_fence *fence, - bool need_sync_fence); + bool need_sync_fence, + bool register_irq); /* Increment syncpoint/semaphore, preceded by a wfi. * Returns @@ -80,7 +81,8 @@ struct gk20a_channel_sync { struct priv_cmd_entry *entry, struct gk20a_fence *fence, bool wfi, - bool need_sync_fence); + bool need_sync_fence, + bool register_irq); /* Reset the channel syncpoint/semaphore. */ void (*set_min_eq_max)(struct gk20a_channel_sync *s); @@ -99,5 +101,6 @@ struct gk20a_channel_sync { void gk20a_channel_sync_destroy(struct gk20a_channel_sync *sync); struct gk20a_channel_sync *gk20a_channel_sync_create(struct channel_gk20a *c); +bool gk20a_channel_sync_needs_sync_framework(struct channel_gk20a *c); #endif -- cgit v1.2.2