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 <quic_vballa@quicinc.com>
This commit is contained in:
Vasantha Balla 2021-12-17 14:48:52 +05:30 committed by Gerrit - the friendly Code Review server
parent 214fecd891
commit 0fbffa4b55

View File

@ -318,9 +318,17 @@ int msm_comm_set_buses(struct msm_vidc_core *core, u32 sid)
mutex_unlock(&inst->registeredbufs.lock); mutex_unlock(&inst->registeredbufs.lock);
if (!filled_len || !device_addr) { if (!filled_len || !device_addr) {
s_vpr_l(sid, "%s: no input\n", __func__); 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; continue;
} }
mutex_unlock(&inst->eosbufs.lock);
s_vpr_l(sid, "%s: no input\n", __func__);
}
/* skip inactive session bus bandwidth */ /* skip inactive session bus bandwidth */
if (!is_active_session(inst->last_qbuf_time_ns, curr_time_ns)) { if (!is_active_session(inst->last_qbuf_time_ns, curr_time_ns)) {
@ -856,9 +864,17 @@ int msm_vidc_set_clocks(struct msm_vidc_core *core, u32 sid)
mutex_unlock(&inst->registeredbufs.lock); mutex_unlock(&inst->registeredbufs.lock);
if (!filled_len || !device_addr) { if (!filled_len || !device_addr) {
s_vpr_l(sid, "%s: no input\n", __func__); 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; continue;
} }
mutex_unlock(&inst->eosbufs.lock);
s_vpr_l(sid, "%s: no input\n", __func__);
}
/* skip inactive session clock rate */ /* skip inactive session clock rate */
if (!is_active_session(inst->last_qbuf_time_ns, curr_time_ns)) { if (!is_active_session(inst->last_qbuf_time_ns, curr_time_ns)) {