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

Commit 3ac71a42 authored by Krishna Srinivas's avatar Krishna Srinivas Committed by Gerrit - the friendly Code Review server
Browse files

msm: mdss: check for split display enable in multiple displays



commit 3bf808d3 ("msm:
fb: add mdp foot switch for multiple splash displays"
considers DSI0 and DSI1 as separate displays even if
split display is enabled. So the number of displays
are calculated as 2 whereas the driver considers this
as a single display. This causes MDP clocks to remain
ON. This change corrects number of displays calculated
by checking for split display.

Change-Id: I444a9e9e34eb7f6fe1b9d93b7f15aaf81986b607
Signed-off-by: default avatarKrishna Srinivas <krisrini@codeaurora.org>
parent cc957303
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -2522,6 +2522,7 @@ static int mdss_mdp_probe(struct platform_device *pdev)
	int rc;
	struct mdss_data_type *mdata;
	uint32_t intf_sel = 0;
	uint32_t split_display = 0;
	int num_of_display_on = 0;
	int i = 0;

@@ -2714,9 +2715,19 @@ static int mdss_mdp_probe(struct platform_device *pdev)
	 */
	intf_sel = readl_relaxed(mdata->mdp_base +
		MDSS_MDP_REG_DISP_INTF_SEL);
	split_display = readl_relaxed(mdata->mdp_base +
		MDSS_MDP_REG_SPLIT_DISPLAY_EN);
	if (intf_sel != 0) {
		for (i = 0; i < 4; i++)
			num_of_display_on += ((intf_sel >> i*8) & 0x000000FF);

		/*
		 * For split display enabled - DSI0, DSI1 interfaces are
		 * considered as single display. So decrement
		 * 'num_of_display_on' by 1
		 */
		if (split_display)
			num_of_display_on--;
	}
	if (!num_of_display_on)
		mdss_mdp_footswitch_ctrl_splash(false);