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

Commit 427ac510 authored by Shi Zhongbo's avatar Shi Zhongbo
Browse files

msm: venc: set perf mode for HEIC buffers



1. Set perf mode for image session buffers so that
they will be processed quickly.
2. Set max frequency for any turbo sessions.

Change-Id: Icf9b0af5cffcd395356783a9ff7a9421a309f52c
Signed-off-by: default avatarShi Zhongbo <zhongbos@codeaurora.org>
parent 5a9f8395
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -375,6 +375,12 @@ int msm_vidc_qbuf(void *instance, struct v4l2_buffer *b)
		msm_comm_store_input_tag(&inst->etb_data, b->index,
			client_data->id, 0, inst->sid);
	}
	/*
	 * set perf mode for image session buffers so that
	 * they will be processed quickly
	 */
	if (is_grid_session(inst) && b->type == INPUT_MPLANE)
		b->flags |= V4L2_BUF_FLAG_PERF_MODE;

	q = msm_comm_get_vb2q(inst, b->type);
	if (!q) {
+3 −5
Original line number Diff line number Diff line
@@ -974,11 +974,8 @@ int msm_comm_scale_clocks(struct msm_vidc_inst *inst)
		if (temp->vvb.vb2_buf.type == INPUT_MPLANE) {
			filled_len = max(filled_len,
				temp->vvb.vb2_buf.planes[0].bytesused);
			if (inst->session_type == MSM_VIDC_ENCODER &&
				(temp->vvb.flags &
				 V4L2_BUF_FLAG_PERF_MODE)) {
			if (temp->vvb.flags & V4L2_BUF_FLAG_PERF_MODE)
				is_turbo = true;
			}
			device_addr = temp->smem[0].device_addr;
		}
	}
@@ -989,7 +986,8 @@ int msm_comm_scale_clocks(struct msm_vidc_inst *inst)
		return 0;
	}

	if (inst->clk_data.buffer_counter < DCVS_FTB_WINDOW || is_turbo) {
	if (inst->clk_data.buffer_counter < DCVS_FTB_WINDOW || is_turbo ||
		is_turbo_session(inst)) {
		inst->clk_data.min_freq =
				msm_vidc_max_freq(inst->core, inst->sid);
		inst->clk_data.dcvs_flags = 0;