video: driver: limit auto-frame-rate to original fps value

Limit the auto-frame-rate feature to the original fps value the client
set, ignore other cases.

Change-Id: Ib8f374cc385da1cc4de464bc1d0520eb1d637b7e
Signed-off-by: Wenjie Yin <quic_wenjyin@quicinc.com>
This commit is contained in:
Wenjie Yin
2024-03-14 17:31:09 +08:00
parent 2502af1259
commit ca60c1dc9e

Vedi File

@@ -1643,6 +1643,11 @@ int msm_vidc_set_auto_framerate(struct msm_vidc_inst *inst, u64 timestamp)
if (counter < ENC_FPS_WINDOW)
goto exit;
if (curr_fr > inst->capabilities[FRAME_RATE].value) {
i_vpr_l(inst, "%s: fps: %u limitted to client fps.\n", __func__, curr_fr >> 16);
curr_fr = inst->capabilities[FRAME_RATE].value;
}
/* if framerate changed and stable for 2 frames, set to firmware */
if (curr_fr == prev_fr && curr_fr != inst->auto_framerate) {
i_vpr_l(inst, "%s: updated fps: %u -> %u\n", __func__,