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

Commit d00e1795 authored by Dhaval Patel's avatar Dhaval Patel
Browse files

msm: mdss: turn off the phy during idle pc only if panel supports



Commit ff19fe24 ("mdss:
dsi: turn off phy power supply during static screen")
turns off the dsi phy during idle pc for phy rev 2.0. DSI
lanes are in floating state after dsi phy power off and
all panels may not be able to handle it. This change
allows to turn on the feature based on panel capability.

Change-Id: I9b166df254128a8a53c567f88971779b9ad0f36c
Signed-off-by: default avatarDhaval Patel <pdhaval@codeaurora.org>
parent e80f64ee
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -416,7 +416,11 @@ Optional properties:
					fields in the supply entry, refer to the qcom,ctrl-supply-entries
					binding above.
- qcom,config-select:			Optional property to select default configuration.

- qcom,panel-allow-phy-poweroff:	A boolean property indicates that panel allows to turn off the phy power
					supply during idle screen. A panel should able to handle the dsi lanes
					in floating state(not LP00 or LP11) to turn on this property. Software
					turns off PHY pmic power supply, phy ldo and DSI Lane ldo during
					idle screen (footswitch control off) when this property is enabled.
[[Optional config sub-nodes]]		These subnodes provide different configurations for a given same panel.
					Default configuration can be chosen by specifying phandle of the
					selected subnode in the qcom,config-select.
@@ -602,6 +606,7 @@ Example:
		qcom,suspend-ulps-enabled;
		qcom,panel-roi-alignment = <4 4 2 2 20 20>;
		qcom,esd-check-enabled;
		qcom,panel-allow-phy-poweroff;
		qcom,mdss-dsi-panel-status-command = [06 01 00 01 05 00 02 0A 08];
		qcom,mdss-dsi-panel-status-command-state = "dsi_lp_mode";
		qcom,mdss-dsi-panel-status-check-mode = "reg_read";
+3 −0
Original line number Diff line number Diff line
@@ -1771,6 +1771,9 @@ static int mdss_dsi_parse_panel_features(struct device_node *np,
	pinfo->panel_ack_disabled = pinfo->sim_panel_mode ?
		1 : of_property_read_bool(np, "qcom,panel-ack-disabled");

	pinfo->allow_phy_power_off = of_property_read_bool(np,
		"qcom,panel-allow-phy-poweroff");

	mdss_dsi_parse_esd_params(np, ctrl);

	if (pinfo->panel_ack_disabled && pinfo->esd_check_enabled) {
+1 −0
Original line number Diff line number Diff line
@@ -606,6 +606,7 @@ struct mdss_panel_info {
	bool ulps_suspend_enabled;
	bool panel_ack_disabled;
	bool esd_check_enabled;
	bool allow_phy_power_off;
	char dfps_update;
	/* new requested fps before it is updated in hw */
	int new_fps;
+12 −3
Original line number Diff line number Diff line
@@ -912,13 +912,22 @@ static void mdss_dsi_8996_phy_power_off(
static void mdss_dsi_phy_power_off(
	struct mdss_dsi_ctrl_pdata *ctrl)
{
	struct mdss_panel_info *pinfo;

	if (ctrl->phy_power_off)
		return;

	/* supported for phy rev 2.0 */
	if (ctrl->shared_data->phy_rev != DSI_PHY_REV_20)
	pinfo = &ctrl->panel_data.panel_info;

	if ((ctrl->shared_data->phy_rev != DSI_PHY_REV_20) ||
		!pinfo->allow_phy_power_off) {
		pr_debug("%s: ctrl%d phy rev:%d panel support for phy off:%d\n",
			__func__, ctrl->ndx, ctrl->shared_data->phy_rev,
			pinfo->allow_phy_power_off);
		return;
	}

	/* supported for phy rev 2.0 and if panel allows it*/
	mdss_dsi_8996_phy_power_off(ctrl);

	ctrl->phy_power_off = true;
@@ -955,7 +964,7 @@ static void mdss_dsi_8996_phy_power_on(
static void mdss_dsi_phy_power_on(
	struct mdss_dsi_ctrl_pdata *ctrl, bool mmss_clamp)
{
	if (mmss_clamp && (ctrl->shared_data->phy_rev != DSI_PHY_REV_20))
	if (mmss_clamp && !ctrl->phy_power_off)
		mdss_dsi_phy_init(ctrl);
	else if ((ctrl->shared_data->phy_rev == DSI_PHY_REV_20) &&
	    ctrl->phy_power_off)