OSDN Git Service

Revert "msm: mdss: hdmi: check clk state before power on"
authorTatenda Chipeperekwa <tatendac@codeaurora.org>
Sat, 28 May 2016 00:20:01 +0000 (17:20 -0700)
committerKyle Yan <kyan@codeaurora.org>
Wed, 1 Jun 2016 22:26:40 +0000 (15:26 -0700)
This reverts commit 05f3cbbe5cc481141434a90e606ff9fc92da5e0d
("msm: mdss: hdmi: check clk state before power on"). The check
for clock state was required for earlier target's fast hot plug
use cases, and uses the clock framework for check for clock rates.
This approach does not work on msmcobalt and causes the power on
sequence for HDMI to fail.

CRs-Fixed: 1022772
Change-Id: I320427f810fd35b11335685bae95b3c5fb9c8fee
Signed-off-by: Tatenda Chipeperekwa <tatendac@codeaurora.org>
drivers/video/fbdev/msm/mdss_hdmi_tx.c

index ac839be..81770aa 100644 (file)
@@ -21,7 +21,6 @@
 #include <linux/of_platform.h>
 #include <linux/types.h>
 #include <linux/hdcp_qseecom.h>
-#include <linux/clk.h>
 
 #define REG_DUMP 0
 
@@ -2390,53 +2389,6 @@ exit:
        return rc;
 } /* hdmi_tx_config_power */
 
-static int hdmi_tx_check_clk_state(struct hdmi_tx_ctrl *hdmi_ctrl,
-       enum hdmi_tx_power_module_type module)
-{
-       int i;
-       int rc = 0;
-       struct dss_module_power *pd = NULL;
-
-       if (!hdmi_ctrl || module >= HDMI_TX_MAX_PM) {
-               DEV_ERR("%s: Error: invalid input\n", __func__);
-               rc = -EINVAL;
-               goto error;
-       }
-
-       pd = &hdmi_ctrl->pdata.power_data[module];
-       if (!pd) {
-               DEV_ERR("%s: Error: invalid power data\n", __func__);
-               rc = -EINVAL;
-               goto error;
-       }
-
-       for (i = 0; i < pd->num_clk; i++) {
-               struct clk *clk = pd->clk_config[i].clk;
-
-               if (clk) {
-                       u32 rate = clk_get_rate(clk);
-
-                       DEV_DBG("%s: clk %s: rate %d\n", __func__,
-                               pd->clk_config[i].clk_name, rate);
-
-                       if (!rate) {
-                               rc = -EINVAL;
-                               goto error;
-                       }
-               } else {
-                       DEV_ERR("%s: clk %s: not configured\n", __func__,
-                               pd->clk_config[i].clk_name);
-
-                       rc = -EINVAL;
-                       goto error;
-               }
-       }
-
-       return 0;
-error:
-       return rc;
-}
-
 static int hdmi_tx_enable_power(struct hdmi_tx_ctrl *hdmi_ctrl,
        enum hdmi_tx_power_module_type module, int enable)
 {
@@ -2929,12 +2881,6 @@ static int hdmi_tx_power_on(struct hdmi_tx_ctrl *hdmi_ctrl)
        void *pdata = hdmi_tx_get_fd(HDMI_TX_FEAT_PANEL);
        void *edata = hdmi_tx_get_fd(HDMI_TX_FEAT_EDID);
 
-       ret = hdmi_tx_check_clk_state(hdmi_ctrl, HDMI_TX_HPD_PM);
-       if (ret) {
-               DEV_ERR("%s: clocks not on\n", __func__);
-               return -EINVAL;
-       }
-
        if (hdmi_ctrl->panel_ops.get_vic)
                hdmi_ctrl->vic = hdmi_ctrl->panel_ops.get_vic(
                        &panel_data->panel_info, &hdmi_ctrl->ds_data);