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

Commit 3b18791c authored by Jayant Shekhar's avatar Jayant Shekhar
Browse files

msm: mdss: Update OT settings for Rotator and WFD on 8937



Modify the Rotator and WFD OT setting as per recomendations
from systems team.

Change-Id: Ic523230ff0343bbac6c001080cce88acda4b3c7e
Signed-off-by: default avatarJayant Shekhar <jshekhar@codeaurora.org>
parent bfbfa771
Loading
Loading
Loading
Loading
+15 −2
Original line number Diff line number Diff line
@@ -3642,14 +3642,26 @@ static void apply_dynamic_ot_limit(u32 *ot_lim,
	if (false == test_bit(MDSS_QOS_OTLIM, mdata->mdss_qos_map))
		return;

	/* Dynamic OT setting done only for rotator and WFD */
	if (!((params->is_rot && params->is_yuv) || params->is_wb))
		return;

	res = params->width * params->height;

	pr_debug("w:%d h:%d rot:%d yuv:%d wb:%d res:%d\n",
		params->width, params->height, params->is_rot,
		params->is_yuv, params->is_wb, res);

	if ((params->is_rot && params->is_yuv) ||
		params->is_wb) {
	switch (mdata->mdp_rev) {
	case MDSS_MDP_HW_REV_114:
		if ((res <= RES_1080p) && (params->frame_rate <= 30))
			*ot_lim = 2;
		else if (params->is_rot && params->is_yuv)
			*ot_lim = 4;
		else
			*ot_lim = 6;
		break;
	default:
		if (res <= RES_1080p) {
			*ot_lim = 2;
		} else if (res <= RES_UHD) {
@@ -3658,6 +3670,7 @@ static void apply_dynamic_ot_limit(u32 *ot_lim,
			else
				*ot_lim = 16;
		}
		break;
	}
}

+2 −0
Original line number Diff line number Diff line
@@ -371,6 +371,7 @@ struct mdss_mdp_ctl {

	u64 last_input_time;
	int pending_mode_switch;
	u16 frame_rate;
};

struct mdss_mdp_mixer {
@@ -699,6 +700,7 @@ struct mdss_mdp_set_ot_params {
	u32 num;
	u32 width;
	u32 height;
	u16 frame_rate;
	bool is_rot;
	bool is_wb;
	bool is_yuv;
+2 −0
Original line number Diff line number Diff line
@@ -724,6 +724,8 @@ int mdss_mdp_perf_calc_pipe(struct mdss_mdp_pipe *pipe,
		h_total = mixer->width;
	}

	mixer->ctl->frame_rate = fps;

	if (roi && !mixer->ctl->is_video_mode && !pipe->src_split_req)
		mdss_mdp_crop_rect(&src, &dst, roi);

+3 −0
Original line number Diff line number Diff line
@@ -54,6 +54,7 @@ struct mdss_mdp_writeback_ctx {
	u16 img_height;
	u16 width;
	u16 height;
	u16 frame_rate;
	struct mdss_rect dst_rect;

	u32 dnsc_factor_w;
@@ -374,6 +375,7 @@ static int mdss_mdp_writeback_prepare_wfd(struct mdss_mdp_ctl *ctl, void *arg)
	ctx->img_height = ctl->height;
	ctx->width = ctl->width;
	ctx->height = ctl->height;
	ctx->frame_rate = ctl->frame_rate;
	ctx->dst_rect.x = 0;
	ctx->dst_rect.y = 0;
	ctx->dst_rect.w = ctx->width;
@@ -734,6 +736,7 @@ static void mdss_mdp_set_ot_limit_wb(struct mdss_mdp_writeback_ctx *ctx)
	ot_params.num = ctx->wb_num;
	ot_params.width = ctx->width;
	ot_params.height = ctx->height;
	ot_params.frame_rate = ctx->frame_rate;
	ot_params.reg_off_vbif_lim_conf = MMSS_VBIF_WR_LIM_CONF;
	ot_params.reg_off_mdp_clk_ctrl = ctx->clk_ctrl.reg_off;
	ot_params.bit_off_mdp_clk_ctrl = ctx->clk_ctrl.bit_off;