From 25954c13e6fee4043c762a8f5140ceb6dc18c9a9 Mon Sep 17 00:00:00 2001 From: Arun Swain Date: Sun, 20 Sep 2020 22:18:10 -0700 Subject: [PATCH] drivers: platform: tegra: dce: Clean up ivc notify Revisit ivc signaling during handshake and clean it up to reduce spurious signals. JIRA TDS-6381 Bug 200666838 Change-Id: I1698220b968d0aa8d1b6d1d36d551118be283c02 Signed-off-by: Arun Swain Reviewed-on: https://git-master.nvidia.com/r/c/linux-t23x/+/2417049 Reviewed-by: automaticguardword Reviewed-by: Santosh Galma Reviewed-by: mobile promotions Tested-by: Santosh Galma Tested-by: mobile promotions GVS: Gerrit_Virtual_Submit --- drivers/platform/tegra/dce/dce-ipc.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/platform/tegra/dce/dce-ipc.c b/drivers/platform/tegra/dce/dce-ipc.c index 2f7e1bc4..cdef4b49 100644 --- a/drivers/platform/tegra/dce/dce-ipc.c +++ b/drivers/platform/tegra/dce/dce-ipc.c @@ -167,11 +167,6 @@ void dce_ipc_free_region(struct tegra_dce *d) */ static void dce_ipc_signal_target(struct ivc *ivc) { - struct dce_ipc_channel *ch; - - ch = container_of(ivc, struct dce_ipc_channel, d_ivc); - - ch->signal.notify(ch->d, &ch->signal.to_d); } static int _dce_ipc_wait(struct tegra_dce *d, u32 w_type, u32 ch_type) @@ -400,6 +395,9 @@ bool dce_ipc_channel_is_ready(struct tegra_dce *d, u32 ch_type) ret = (tegra_ivc_channel_notified(&ch->d_ivc) ? false : true); + if (ret) + ch->signal.notify(d, &ch->signal.to_d); + dce_mutex_unlock(&ch->lock); return ret; @@ -426,6 +424,8 @@ void dce_ipc_channel_reset(struct tegra_dce *d, u32 ch_type) ch->flags &= ~DCE_IPC_CHANNEL_SYNCED; + ch->signal.notify(d, &ch->signal.to_d); + _dce_ipc_wait(ch->d, DCE_IPC_WAIT_TYPE_SYNC, ch_type); ch->flags |= DCE_IPC_CHANNEL_SYNCED;