video: driver: Compute Average Bitrate only for Queued/Deffered buffers

For Decode batching enabled case, max_data_size is being calculated
as the average of the data_size for all the buffers.
These buffers may contains EBD as well having data_size as 0,
which may reduce the average value by significant numbers and
hence reducing vsp numbers which may lead to vote clock to low
corners.
This may lead to slow decoding and hence Framework may drop the
frames.
Therefore, compute Average data_size only for Queued/Deffered bufs.

Change-Id: I12f155852dd750701b9448d3900b75f470eac126
Signed-off-by: Vedang Nagar <quic_vnagar@quicinc.com>
This commit is contained in:
Vedang Nagar
2023-04-26 13:38:10 +05:30
committed by Gerrit - the friendly Code Review server
vanhempi 76ac7dd6d5
commit 246d7ad413

Näytä tiedosto

@@ -588,8 +588,11 @@ int msm_vidc_scale_power(struct msm_vidc_inst *inst, bool scale_buses)
*/
if (inst->decode_batch.enable) {
list_for_each_entry(vbuf, &inst->buffers.input.list, list) {
data_size += vbuf->data_size;
cnt++;
if (vbuf->attr & MSM_VIDC_ATTR_DEFERRED ||
vbuf->attr & MSM_VIDC_ATTR_QUEUED) {
data_size += vbuf->data_size;
cnt++;
}
}
if (cnt)
data_size /= cnt;