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

Commit 8ef51a8f authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: mdss: dsi: reset phy during idle screen"

parents c999d51f 1a582ab5
Loading
Loading
Loading
Loading
+10 −1
Original line number Diff line number Diff line
/* Copyright (c) 2015-2016, The Linux Foundation. All rights reserved.
/* Copyright (c) 2015-2017, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -115,4 +115,13 @@ int mdss_dsi_phy_v3_wait_for_lanes_stop_state(struct mdss_dsi_ctrl_pdata *ctrl,
 * assumes that the link and core clocks are already on.
 */
int mdss_dsi_phy_v3_ulps_config(struct mdss_dsi_ctrl_pdata *ctrl, bool enable);

/**
 * mdss_dsi_phy_v3_idle_pc_exit() - Called after Idle Power Collapse exit
 * @ctrl: pointer to DSI controller structure
 *
 * This function is called after Idle Power Collapse, so driver
 * can perform any sequence required after the Idle PC exit.
 */
void mdss_dsi_phy_v3_idle_pc_exit(struct mdss_dsi_ctrl_pdata *ctrl);
#endif /* MDSS_DSI_PHY_H */
+16 −1
Original line number Diff line number Diff line
/*
 * Copyright (c) 2016, The Linux Foundation. All rights reserved.
 * Copyright (c) 2016-2017, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -327,6 +327,7 @@ int mdss_dsi_phy_v3_ulps_config(struct mdss_dsi_ctrl_pdata *ctrl, bool enable)
		 */
		DSI_PHY_W32(ctrl->phy_io.base, CMN_DSI_LANE_CTRL3,
			active_lanes);
		usleep_range(5, 15);

		DSI_PHY_W32(ctrl->phy_io.base, CMN_DSI_LANE_CTRL3, 0);

@@ -340,6 +341,20 @@ error:
	return rc;
}

void mdss_dsi_phy_v3_idle_pc_exit(struct mdss_dsi_ctrl_pdata *ctrl)
{
	u32 val = BIT(5);
	u32 data;

	/* Reset phy pll after idle pc exit */
	data = DSI_PHY_R32(ctrl->phy_io.base, CMN_CTRL_1);
	DSI_PHY_W32(ctrl->phy_io.base, CMN_CTRL_1, data | val);
	usleep_range(10, 15);

	data = DSI_PHY_R32(ctrl->phy_io.base, CMN_CTRL_1);
	data &= ~(BIT(5));
	DSI_PHY_W32(ctrl->phy_io.base, CMN_CTRL_1, data);
}

int mdss_dsi_phy_v3_shutdown(struct mdss_dsi_ctrl_pdata *ctrl)
{
+19 −0
Original line number Diff line number Diff line
@@ -2136,6 +2136,20 @@ error:
	return ret;
}

/**
 * mdss_dsi_phy_idle_pc_exit() - Called after exit Idle PC
 * @ctrl: pointer to DSI controller structure
 *
 * Perform any programming needed after Idle PC exit.
 */
static int mdss_dsi_phy_idle_pc_exit(struct mdss_dsi_ctrl_pdata *ctrl)
{
	if (ctrl->shared_data->phy_rev == DSI_PHY_REV_30)
		mdss_dsi_phy_v3_idle_pc_exit(ctrl);

	return 0;
}

/**
 * mdss_dsi_clamp_ctrl_default() - Program DSI clamps
 * @ctrl: pointer to DSI controller structure
@@ -2700,5 +2714,10 @@ int mdss_dsi_pre_clkon_cb(void *priv,
		}
	}

	if ((clk_type & MDSS_DSI_LINK_CLK) &&
		(new_state == MDSS_DSI_CLK_ON) &&
		!ctrl->panel_data.panel_info.cont_splash_enabled)
		mdss_dsi_phy_idle_pc_exit(ctrl);

	return rc;
}