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

Commit 4f7a708f authored by Ujwal Patel's avatar Ujwal Patel
Browse files

msm: mdss: fix compression ratio for logic for rotator and wfd



Currently rotator driver is using input compression ratio for output.
This is not correct because it is possible to have different input and
output formats which changes compression ratios. Similarly for WFD, use
output compression ratio passed by user-space.

Change-Id: I63650bcbf9f02ddf3310aacdc27f009381775481
Signed-off-by: default avatarUjwal Patel <ujwalp@codeaurora.org>
parent 40ef490b
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -259,9 +259,12 @@ struct mdss_mdp_ctl {
	u16 height;
	u16 border_x_off;
	u16 border_y_off;
	u32 dst_format;
	bool is_secure;

	/* used for WFD */
	u32 dst_format;
	struct mult_factor dst_comp_ratio;

	u32 clk_rate;
	int force_screen_state;
	struct mdss_mdp_perf_params cur_perf;
+4 −4
Original line number Diff line number Diff line
@@ -926,7 +926,7 @@ static void mdss_mdp_perf_calc_mixer(struct mdss_mdp_mixer *mixer,

			if (pinfo->type == WRITEBACK_PANEL) {
				fmt = mdss_mdp_get_format_params(
					pinfo->out_format);
					mixer->ctl->dst_format);
				if (fmt)
					bpp = fmt->bpp;
				pinfo = NULL;
@@ -946,10 +946,10 @@ static void mdss_mdp_perf_calc_mixer(struct mdss_mdp_mixer *mixer,
			if (test_bit(MDSS_QOS_OVERHEAD_FACTOR,
					mdata->mdss_qos_map))
				perf->bw_writeback = apply_overhead_factors(
					perf->bw_writeback,
					true, false, fmt, &pipe->comp_ratio);
		/* for command mode, run as fast as the link allows us */
					perf->bw_writeback, true, false, fmt,
					&mixer->ctl->dst_comp_ratio);
		} else if (pinfo->type == MIPI_CMD_PANEL) {
			/* for cmd mode, run as fast as the link allows us */
			u32 dsi_pclk_rate = pinfo->mipi.dsi_pclk_rate;

			if (is_pingpong_split(mixer->ctl->mfd))
+1 −0
Original line number Diff line number Diff line
@@ -193,6 +193,7 @@ int mdss_mdp_wfd_setup(struct mdss_mdp_wfd *wfd,
	}

	ctl->dst_format = layer->buffer.format;
	ctl->dst_comp_ratio = layer->buffer.comp_ratio;
	ctl->width = layer->buffer.width;
	ctl->height = layer->buffer.height;
	ctl->roi =  (struct mdss_rect) {0, 0, ctl->width, ctl->height};
+1 −1
Original line number Diff line number Diff line
@@ -1009,7 +1009,7 @@ static int mdss_rotator_calc_perf(struct mdss_rot_perf *perf)
	read_bw = mdss_apply_overhead_factors(read_bw,
		true, true, in_fmt, &config->input.comp_ratio);
	write_bw = mdss_apply_overhead_factors(write_bw,
		true, false, out_fmt, &config->input.comp_ratio);
		true, false, out_fmt, &config->output.comp_ratio);

	perf->bw = read_bw + write_bw;
	return 0;