Browse Source

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 <[email protected]>
Wenjie Yin 1 năm trước cách đây
mục cha
commit
ca60c1dc9e
1 tập tin đã thay đổi với 5 bổ sung0 xóa
  1. 5 0
      driver/vidc/src/msm_vidc_driver.c

+ 5 - 0
driver/vidc/src/msm_vidc_driver.c

@@ -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__,