Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 533aa1cc authored by Qiwei Liu's avatar Qiwei Liu
Browse files

msm: vidc: don't skip set ctrl for the same value



By default, v4l2 driver will skip set ctrl if the same
value is set again.
Add EXECUTE_ON_WRITE flag for all ctrls to make sure
set ctrl is not skipped even when value is unchanged.

Change-Id: I67542d648c412e4e87d82cfa9de47f679ab3a860
Signed-off-by: default avatarQiwei Liu <qiweil@codeaurora.org>
parent 3152012b
Loading
Loading
Loading
Loading
+1 −6
Original line number Diff line number Diff line
@@ -636,6 +636,7 @@ int msm_comm_ctrl_init(struct msm_vidc_inst *inst,
		}

		ctrl->flags |= drv_ctrls[idx].flags;
		ctrl->flags |= V4L2_CTRL_FLAG_EXECUTE_ON_WRITE;
		inst->ctrls[idx] = ctrl;
	}
	inst->num_ctrls = num_ctrls;
@@ -7257,12 +7258,6 @@ int msm_comm_check_window_bitrate(struct msm_vidc_inst *inst,
		!frame_data->filled_len)
		return 0;

	/*
	 * MaxAvgFrameSize <= (1 + B/S) * (MaxClock / fps - 25*NumOfMacroBlockperFrame) / 1.35
	 * S: Sliding window = #Frames in 40ms (av sync window) Closest point
	 * B: Buffer Count = B(vsp-vpp) = 2 for 2Stage, 0 for 1stage
	 */

	fps = inst->clk_data.frame_rate >> 16;
	window_size = inst->core->resources.avsync_window_size * fps;
	window_size = DIV_ROUND_CLOSEST(window_size, 1000);