summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDhaval Patel <pdhaval@codeaurora.org>2016-04-19 11:45:56 -0700
committerHarsh Sahu <hsahu@codeaurora.org>2016-11-11 12:07:41 -0800
commita42b1f1045e66dc13b38e1c00a75fe1859d7745d (patch)
tree75225f4c5bccc8b2b57ee2f03267e93d67505973
parent5d2b103d523f4651e9f7101d003ba1377f699206 (diff)
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>
-rw-r--r--Documentation/devicetree/bindings/fb/mdss-dsi-panel.txt7
-rw-r--r--drivers/video/fbdev/msm/mdss_dsi_panel.c3
-rw-r--r--drivers/video/fbdev/msm/mdss_panel.h1
-rw-r--r--drivers/video/fbdev/msm/msm_mdss_io_8974.c15
4 files changed, 22 insertions, 4 deletions
diff --git a/Documentation/devicetree/bindings/fb/mdss-dsi-panel.txt b/Documentation/devicetree/bindings/fb/mdss-dsi-panel.txt
index 56ad8c361219..0174306135c1 100644
--- a/Documentation/devicetree/bindings/fb/mdss-dsi-panel.txt
+++ b/Documentation/devicetree/bindings/fb/mdss-dsi-panel.txt
@@ -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";
diff --git a/drivers/video/fbdev/msm/mdss_dsi_panel.c b/drivers/video/fbdev/msm/mdss_dsi_panel.c
index 7c36bb627043..8fbf2544f487 100644
--- a/drivers/video/fbdev/msm/mdss_dsi_panel.c
+++ b/drivers/video/fbdev/msm/mdss_dsi_panel.c
@@ -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) {
diff --git a/drivers/video/fbdev/msm/mdss_panel.h b/drivers/video/fbdev/msm/mdss_panel.h
index 0483e3d42873..238b26eec769 100644
--- a/drivers/video/fbdev/msm/mdss_panel.h
+++ b/drivers/video/fbdev/msm/mdss_panel.h
@@ -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;
diff --git a/drivers/video/fbdev/msm/msm_mdss_io_8974.c b/drivers/video/fbdev/msm/msm_mdss_io_8974.c
index 0c43a2642ede..fdd888edc2fb 100644
--- a/drivers/video/fbdev/msm/msm_mdss_io_8974.c
+++ b/drivers/video/fbdev/msm/msm_mdss_io_8974.c
@@ -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)
+ 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)