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

Commit ff19fe24e621ae5dc90f7e45fe4cfe159a647d15 ("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: Dhaval Patel <pdhaval@codeaurora.org>
This commit is contained in:
Dhaval Patel 2016-04-19 11:45:56 -07:00 committed by Harsh Sahu
parent 5d2b103d52
commit a42b1f1045
4 changed files with 23 additions and 5 deletions

View file

@ -459,7 +459,11 @@ the fps window.
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.
@ -647,6 +651,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";

View file

@ -1960,6 +1960,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) {

View file

@ -761,6 +761,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;

View file

@ -960,13 +960,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)
return;
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;
@ -1003,7 +1012,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)