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

Commit b0d8274e authored by Jayant Shekhar's avatar Jayant Shekhar Committed by Gerrit - the friendly Code Review server
Browse files

msm: mdss: Ensure secure restore cfg before first secure session



Currently secure restore cfg is called in LK and then after every
resume or after MDSS comes out of power collapse. As per TZ
recommendation, ensure restore cfg is called before first secure
session and first suspend resume.

Change-Id: I0cc820636da4f4a137bdaadc737ed71d78940b10
Signed-off-by: default avatarJayant Shekhar <jshekhar@codeaurora.org>
parent 8ca03863
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -1826,6 +1826,10 @@ static int mdss_mdp_probe(struct platform_device *pdev)
	mdss_mdp_footswitch_ctrl_splash(true);
	mdss_hw_init(mdata);

	/* Restoring Secure configuration during boot-up */
	if (mdss_mdp_req_init_restore_cfg(mdata))
		__mdss_restore_sec_cfg(mdata);

	if (mdss_has_quirk(mdata, MDSS_QUIRK_BWCPANIC)) {
		mdata->default_panic_lut0 = readl_relaxed(mdata->mdp_base +
			MMSS_MDP_PANIC_LUT0);
+13 −0
Original line number Diff line number Diff line
@@ -821,6 +821,19 @@ static inline u32 get_panel_width(struct mdss_mdp_ctl *ctl)
	return width;
}

static inline bool mdss_mdp_req_init_restore_cfg(struct mdss_data_type *mdata)
{
	if (IS_MDSS_MAJOR_MINOR_SAME(mdata->mdp_rev,
				MDSS_MDP_HW_REV_106) ||
	    IS_MDSS_MAJOR_MINOR_SAME(mdata->mdp_rev,
				MDSS_MDP_HW_REV_108) ||
	    IS_MDSS_MAJOR_MINOR_SAME(mdata->mdp_rev,
				MDSS_MDP_HW_REV_112))
		return true;

	return false;
}

static inline int mdss_mdp_panic_signal_support_mode(
	struct mdss_data_type *mdata)
{