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

Commit 6c39d1d9 authored by Jayant Shekhar's avatar Jayant Shekhar
Browse files

msm: mdss: update rotator frame rate in the pipe configuration



Update rotator frame rate in pipe and control data structures
which is used for OT calculation.

Change-Id: I1397e7880604ad6b61e93201921ce0d8326c9464
Signed-off-by: default avatarJayant Shekhar <jshekhar@codeaurora.org>
parent 6899126b
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -4148,9 +4148,9 @@ static void apply_dynamic_ot_limit(u32 *ot_lim,

	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 fps:%d\n",
		params->width, params->height, params->is_rot,
		params->is_yuv, params->is_wb, res);
		params->is_yuv, params->is_wb, res, params->frame_rate);

	switch (mdata->mdp_rev) {
	case MDSS_MDP_HW_REV_114:
+3 −0
Original line number Diff line number Diff line
@@ -397,6 +397,7 @@ static int mdss_mdp_writeback_prepare_rot(struct mdss_mdp_ctl *ctl, void *arg)
	struct mdss_mdp_writeback_arg *wb_args;
	struct mdss_rot_entry *entry;
	struct mdp_rotation_item *item;
	struct mdss_rot_perf *perf;
	struct mdss_data_type *mdata;
	u32 format;

@@ -413,6 +414,7 @@ static int mdss_mdp_writeback_prepare_rot(struct mdss_mdp_ctl *ctl, void *arg)
		return -ENODEV;
	}
	item = &entry->item;
	perf = entry->perf;
	mdata = ctl->mdata;
	if (!mdata) {
		pr_err("no mdata attached to ctl=%d", ctl->num);
@@ -433,6 +435,7 @@ static int mdss_mdp_writeback_prepare_rot(struct mdss_mdp_ctl *ctl, void *arg)
	ctx->height = ctx->dst_rect.h = item->dst_rect.h;
	ctx->dst_rect.x = item->dst_rect.x;
	ctx->dst_rect.y = item->dst_rect.y;
	ctx->frame_rate = perf->config.frame_rate;
	ctx->dnsc_factor_w = entry->dnsc_factor_w;
	ctx->dnsc_factor_h = entry->dnsc_factor_h;

+1 −0
Original line number Diff line number Diff line
@@ -2152,6 +2152,7 @@ static void mdss_mdp_set_ot_limit_pipe(struct mdss_mdp_pipe *pipe)
	ot_params.is_rot = pipe->mixer_left->rotator_mode;
	ot_params.is_wb = ctl->intf_num == MDSS_MDP_NO_INTF;
	ot_params.is_yuv = pipe->src_fmt->is_yuv;
	ot_params.frame_rate = pipe->frame_rate;

	/* rotator read uses nrt vbif */
	if (mdss_mdp_is_nrt_vbif_base_defined(ctl->mdata) &&
+3 −0
Original line number Diff line number Diff line
@@ -1701,11 +1701,13 @@ static int mdss_rotator_config_hw(struct mdss_rot_hw_resource *hw,
{
	struct mdss_mdp_pipe *pipe;
	struct mdp_rotation_item *item;
	struct mdss_rot_perf *perf;
	int ret;

	ATRACE_BEGIN(__func__);
	pipe = hw->pipe;
	item = &entry->item;
	perf = entry->perf;

	pipe->flags = mdss_rotator_translate_flags(item->flags);
	pipe->src_fmt = mdss_mdp_get_format_params(item->input.format);
@@ -1714,6 +1716,7 @@ static int mdss_rotator_config_hw(struct mdss_rot_hw_resource *hw,
	mdss_rotator_translate_rect(&pipe->src, &item->src_rect);
	mdss_rotator_translate_rect(&pipe->dst, &item->src_rect);
	pipe->scaler.enable = 0;
	pipe->frame_rate = perf->config.frame_rate;

	pipe->params_changed++;