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

Commit 57799c7a authored by Tatenda Chipeperekwa's avatar Tatenda Chipeperekwa Committed by Kyle Yan
Browse files

Revert "msm: mdss: hdmi: check clk state before power on"



This reverts commit 05f3cbbe
("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: default avatarTatenda Chipeperekwa <tatendac@codeaurora.org>
parent 7149162d
Loading
Loading
Loading
Loading
+0 −54
Original line number Diff line number Diff line
@@ -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);