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

Commit 02a5d144 authored by Yashwanth's avatar Yashwanth Committed by Gerrit - the friendly Code Review server
Browse files

msm/sde/rotator: update rotator max clk rate based on target



This change updates max clock rate for rotator based
on target check instead of pre-defined maximum clk rate.

Change-Id: I3523262a7dbe652156c7832dcfc9b5a1e216288e
Signed-off-by: default avatarYashwanth <yvulapu@codeaurora.org>
parent 3917b70f
Loading
Loading
Loading
Loading
+12 −9
Original line number Diff line number Diff line
@@ -3173,16 +3173,19 @@ int sde_rotator_core_init(struct sde_rot_mgr **pmgr,
		mgr->ops_hw_init = sde_rotator_r3_init;
		mgr->min_rot_clk = ROT_MIN_ROT_CLK;

		/*
		 * on platforms where the maxlinewidth is greater than
		 * default we need to have a max clock rate check to
		 * ensure we do not cross the max allowed clock for rotator
		 */
		if (IS_SDE_MAJOR_SAME(mdata->mdss_version,
		if (IS_SDE_MAJOR_MINOR_SAME(mdata->mdss_version,
				SDE_MDP_HW_REV_500) ||
		IS_SDE_MAJOR_MINOR_SAME(mdata->mdss_version,
				SDE_MDP_HW_REV_620))
			mgr->max_rot_clk = ROT_R3_MAX_ROT_CLK;
			mgr->max_rot_clk = 460000000UL;
		else if (IS_SDE_MAJOR_MINOR_SAME(mdata->mdss_version,
					SDE_MDP_HW_REV_520))
			mgr->max_rot_clk = 430000000UL;
		else if (IS_SDE_MAJOR_MINOR_SAME(mdata->mdss_version,
				SDE_MDP_HW_REV_530) ||
			IS_SDE_MAJOR_MINOR_SAME(mdata->mdss_version,
				SDE_MDP_HW_REV_540))
			mgr->max_rot_clk = 307200000UL;

		if (!(IS_SDE_MAJOR_SAME(mdata->mdss_version,
					SDE_MDP_HW_REV_500) ||