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

Commit e71adae9 authored by Karthikeyan Periasamy's avatar Karthikeyan Periasamy
Browse files

msm: vidc: Video firmware supports only random mode



Kernel sets only random mode to simplify the intra refresh mode
setting for encoder. All other modes will be deprecated.

CRs-Fixed: 2384822
Change-Id: I0b509538d23e61cc0e691e9735d83434923d39f5
Signed-off-by: default avatarKarthikeyan Periasamy <kperiasa@codeaurora.org>
parent 021eca99
Loading
Loading
Loading
Loading
+3 −4
Original line number Diff line number Diff line
@@ -2853,6 +2853,9 @@ int msm_venc_set_intra_refresh_mode(struct msm_vidc_inst *inst)
		rc_mode->val == V4L2_MPEG_VIDEO_BITRATE_MODE_CBR))
		return 0;

	/* Firmware supports only random mode */
	intra_refresh.mode = HFI_INTRA_REFRESH_RANDOM;

	ctrl = get_ctrl(inst, V4L2_CID_MPEG_VIDC_VIDEO_INTRA_REFRESH_RANDOM);
	intra_refresh.mbs = 0;
	if (ctrl->val) {
@@ -2860,9 +2863,6 @@ int msm_venc_set_intra_refresh_mode(struct msm_vidc_inst *inst)
		u32 width = inst->prop.width[CAPTURE_PORT];
		u32 height = inst->prop.height[CAPTURE_PORT];

		/* ignore cyclic mode if random mode is set */
		intra_refresh.mode = HFI_INTRA_REFRESH_RANDOM;

		num_mbs_per_frame = NUM_MBS_PER_FRAME(height, width);
		intra_refresh.mbs = num_mbs_per_frame / ctrl->val;
		if (num_mbs_per_frame % ctrl->val) {
@@ -2871,7 +2871,6 @@ int msm_venc_set_intra_refresh_mode(struct msm_vidc_inst *inst)
	} else {
		ctrl = get_ctrl(inst,
			V4L2_CID_MPEG_VIDEO_CYCLIC_INTRA_REFRESH_MB);
		intra_refresh.mode = HFI_INTRA_REFRESH_CYCLIC;
		intra_refresh.mbs = ctrl->val;
	}
	if (!intra_refresh.mbs) {