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

Commit 31f9744a authored by Dikshita Agarwal's avatar Dikshita Agarwal
Browse files

msm: vidc: update calculation for BSE LB write for decoder



For h264 BSE LB write should be half of BSE LB read for decoder.
Update the calculation for the same.

Change-Id: I5ebceff4fa0795eaaf67b569e754d174be4a8146
Signed-off-by: default avatarDikshita Agarwal <dikshita@codeaurora.org>
parent fcad90b1
Loading
Loading
Loading
Loading
+11 −1
Original line number Diff line number Diff line
@@ -32,6 +32,7 @@ static unsigned long __calculate_decoder(struct vidc_bus_vote_data *d)
	/* Derived parameters */
	int lcu_per_frame, collocated_bytes_per_lcu, tnbr_per_lcu;
	unsigned long bitrate;
	unsigned int num_vpp_pipes;

	fp_t bins_to_bit_factor, vsp_read_factor, vsp_write_factor,
		dpb_factor, dpb_write_factor, y_bw_no_ubwc_8bpp;
@@ -83,6 +84,8 @@ static unsigned long __calculate_decoder(struct vidc_bus_vote_data *d)
	opb_write_compression_factor = opb_compression_enabled ?
		dpb_write_compression_factor : FP_ONE;

	num_vpp_pipes = d->num_vpp_pipes;

	if (d->codec == HAL_VIDEO_CODEC_HEVC ||
		d->codec == HAL_VIDEO_CODEC_VP9) {
		/* H264, VP8, MPEG2 use the same settings */
@@ -163,6 +166,13 @@ static unsigned long __calculate_decoder(struct vidc_bus_vote_data *d)
	ddr.line_buffer_read =
		fp_div(FP_INT(tnbr_per_lcu * lcu_per_frame * fps),
			FP_INT(bps(1)));
	/* This change is applicable for all IRIS2 targets,
	 * but currently being done for IRIS2 with 2 pipes
	 * only due to timeline constraints.
	 */
	if((num_vpp_pipes == 2) && (is_h264_category))
		ddr.line_buffer_write = fp_div(ddr.line_buffer_read,FP_INT(2));
	else
		ddr.line_buffer_write = ddr.line_buffer_read;
	if (llc_top_line_buf_enabled) {
		llc.line_buffer_read = ddr.line_buffer_read;
+3 −0
Original line number Diff line number Diff line
@@ -456,6 +456,9 @@ int msm_comm_vote_bus(struct msm_vidc_inst *inst)
		if (core->resources.sys_cache_res_set)
			vote_data->use_sys_cache = true;

		vote_data->num_vpp_pipes =
			inst->core->platform_data->num_vpp_pipes;

		call_core_op(core, calc_bw, vote_data);
	}

+1 −0
Original line number Diff line number Diff line
@@ -427,6 +427,7 @@ struct vidc_bus_vote_data {
	bool b_frames_enabled;
	unsigned long calc_bw_ddr;
	unsigned long calc_bw_llcc;
	u32 num_vpp_pipes;
};

struct profile_data {