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

Commit c1d7073d authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

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

parents 20cbeda9 3b18791c
Loading
Loading
Loading
Loading
+15 −2
Original line number Original line Diff line number Diff line
@@ -3651,14 +3651,26 @@ static void apply_dynamic_ot_limit(u32 *ot_lim,
	if (false == test_bit(MDSS_QOS_OTLIM, mdata->mdss_qos_map))
	if (false == test_bit(MDSS_QOS_OTLIM, mdata->mdss_qos_map))
		return;
		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;
	res = params->width * params->height;


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


	if ((params->is_rot && params->is_yuv) ||
	switch (mdata->mdp_rev) {
		params->is_wb) {
	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) {
		if (res <= RES_1080p) {
			*ot_lim = 2;
			*ot_lim = 2;
		} else if (res <= RES_UHD) {
		} else if (res <= RES_UHD) {
@@ -3667,6 +3679,7 @@ static void apply_dynamic_ot_limit(u32 *ot_lim,
			else
			else
				*ot_lim = 16;
				*ot_lim = 16;
		}
		}
		break;
	}
	}
}
}


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


	u64 last_input_time;
	u64 last_input_time;
	int pending_mode_switch;
	int pending_mode_switch;
	u16 frame_rate;
};
};


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


	mixer->ctl->frame_rate = fps;

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


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


	u32 dnsc_factor_w;
	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->img_height = ctl->height;
	ctx->width = ctl->width;
	ctx->width = ctl->width;
	ctx->height = ctl->height;
	ctx->height = ctl->height;
	ctx->frame_rate = ctl->frame_rate;
	ctx->dst_rect.x = 0;
	ctx->dst_rect.x = 0;
	ctx->dst_rect.y = 0;
	ctx->dst_rect.y = 0;
	ctx->dst_rect.w = ctx->width;
	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.num = ctx->wb_num;
	ot_params.width = ctx->width;
	ot_params.width = ctx->width;
	ot_params.height = ctx->height;
	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_vbif_lim_conf = MMSS_VBIF_WR_LIM_CONF;
	ot_params.reg_off_mdp_clk_ctrl = ctx->clk_ctrl.reg_off;
	ot_params.reg_off_mdp_clk_ctrl = ctx->clk_ctrl.reg_off;
	ot_params.bit_off_mdp_clk_ctrl = ctx->clk_ctrl.bit_off;
	ot_params.bit_off_mdp_clk_ctrl = ctx->clk_ctrl.bit_off;