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

Commit 3e539fed authored by Veera Sundaram Sankaran's avatar Veera Sundaram Sankaran
Browse files

msm: sde: fix VBIF_ROT OT limit configuration for rotator



Fix register offset and bit settings related to rotator
OT limiting to support old and new targets. And add checks
to avoid configuring VBIF_ROT during inline rotation.

Change-Id: Ie1c5efd258ab958f3642723227f147ce2ac073d2
Signed-off-by: default avatarVeera Sundaram Sankaran <veeras@codeaurora.org>
parent f13fb321
Loading
Loading
Loading
Loading
+4 −3
Original line number Original line Diff line number Diff line
@@ -227,9 +227,10 @@ void sde_mdp_set_ot_limit(struct sde_mdp_set_ot_params *params)
{
{
	struct sde_rot_data_type *mdata = sde_rot_get_mdata();
	struct sde_rot_data_type *mdata = sde_rot_get_mdata();
	u32 ot_lim;
	u32 ot_lim;
	u32 reg_off_vbif_lim_conf = (params->xin_id / 4) * 4 +
	u32 reg_off_vbif_lim_conf = ((params->xin_id / mdata->npriority_lvl)
		params->reg_off_vbif_lim_conf;
					* mdata->npriority_lvl)
	u32 bit_off_vbif_lim_conf = (params->xin_id % 4) * 8;
					+ params->reg_off_vbif_lim_conf;
	u32 bit_off_vbif_lim_conf = (params->xin_id % mdata->npriority_lvl) * 8;
	u32 reg_val;
	u32 reg_val;
	u32 sts;
	u32 sts;
	bool forced_on;
	bool forced_on;
+4 −3
Original line number Original line Diff line number Diff line
@@ -2395,7 +2395,7 @@ static int sde_hw_rotator_config(struct sde_rot_hw_resource *hw,
			item->input.format, item->output.format,
			item->input.format, item->output.format,
			entry->perf->config.frame_rate);
			entry->perf->config.frame_rate);


	if (mdata->default_ot_rd_limit) {
	if (!ctx->sbuf_mode && mdata->default_ot_rd_limit) {
		struct sde_mdp_set_ot_params ot_params;
		struct sde_mdp_set_ot_params ot_params;


		memset(&ot_params, 0, sizeof(struct sde_mdp_set_ot_params));
		memset(&ot_params, 0, sizeof(struct sde_mdp_set_ot_params));
@@ -2417,7 +2417,7 @@ static int sde_hw_rotator_config(struct sde_rot_hw_resource *hw,
		sde_mdp_set_ot_limit(&ot_params);
		sde_mdp_set_ot_limit(&ot_params);
	}
	}


	if (mdata->default_ot_wr_limit) {
	if (!ctx->sbuf_mode && mdata->default_ot_wr_limit) {
		struct sde_mdp_set_ot_params ot_params;
		struct sde_mdp_set_ot_params ot_params;


		memset(&ot_params, 0, sizeof(struct sde_mdp_set_ot_params));
		memset(&ot_params, 0, sizeof(struct sde_mdp_set_ot_params));
@@ -2449,6 +2449,7 @@ static int sde_hw_rotator_config(struct sde_rot_hw_resource *hw,
	}
	}


	/* VBIF QoS and other settings */
	/* VBIF QoS and other settings */
	if (!ctx->sbuf_mode)
		sde_hw_rotator_vbif_setting(rot);
		sde_hw_rotator_vbif_setting(rot);


	return 0;
	return 0;