From 0fbffa4b55ec3636d81994c822863f3010f427fd Mon Sep 17 00:00:00 2001 From: Vasantha Balla Date: Fri, 17 Dec 2021 14:48:52 +0530 Subject: [PATCH] msm: vidc: Add clock/bus votes for eos/flush commands If voting is not added for eos and flush command processing, Firmware is processing only high priority session commands which causes non real time session to wait for completion of realtime session for its eos processing. So adding votes for eos and flush commands. Change-Id: I9de8c1d0dc79e93d991d34d2d687e2fa1910531b Signed-off-by: Vasantha Balla --- msm/vidc/msm_vidc_clocks.c | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/msm/vidc/msm_vidc_clocks.c b/msm/vidc/msm_vidc_clocks.c index 168abc2f8080..667d62c38054 100644 --- a/msm/vidc/msm_vidc_clocks.c +++ b/msm/vidc/msm_vidc_clocks.c @@ -318,8 +318,16 @@ int msm_comm_set_buses(struct msm_vidc_core *core, u32 sid) mutex_unlock(&inst->registeredbufs.lock); if (!filled_len || !device_addr) { + mutex_lock(&inst->eosbufs.lock); + if (list_empty(&inst->eosbufs.list) && + !inst->in_flush && !inst->out_flush) { + s_vpr_l(sid, "%s: No pending eos/flush cmds\n", + __func__); + mutex_unlock(&inst->eosbufs.lock); + continue; + } + mutex_unlock(&inst->eosbufs.lock); s_vpr_l(sid, "%s: no input\n", __func__); - continue; } /* skip inactive session bus bandwidth */ @@ -856,8 +864,16 @@ int msm_vidc_set_clocks(struct msm_vidc_core *core, u32 sid) mutex_unlock(&inst->registeredbufs.lock); if (!filled_len || !device_addr) { + mutex_lock(&inst->eosbufs.lock); + if (list_empty(&inst->eosbufs.list) && !inst->in_flush + && !inst->out_flush) { + s_vpr_l(sid, "%s: No pending eos/flush cmds\n", + __func__); + mutex_unlock(&inst->eosbufs.lock); + continue; + } + mutex_unlock(&inst->eosbufs.lock); s_vpr_l(sid, "%s: no input\n", __func__); - continue; } /* skip inactive session clock rate */