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

Commit d1431ba1 authored by Kuogee Hsieh's avatar Kuogee Hsieh Committed by Matt Wagantall
Browse files

msm: mdss: fix command mode panel support for msm8996



Left panel stays in sleep-in mode if clocks are not
turned on for both controllers. Enable clock
before sending commands and skip clamp controller
for command mode panel support on msm8996.

Change-Id: I8d6c6f9253407d1b6fd8001a00be4876a006deea
Signed-off-by: default avatarDhaval Patel <pdhaval@codeaurora.org>
parent 967fbb8e
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -833,6 +833,7 @@ static int mdss_dsi_unblank(struct mdss_panel_data *pdata)
	int ret = 0;
	struct mipi_panel_info *mipi;
	struct mdss_dsi_ctrl_pdata *ctrl_pdata = NULL;
	struct mdss_dsi_ctrl_pdata *sctrl = NULL;

	if (pdata == NULL) {
		pr_err("%s: Invalid input data\n", __func__);
@@ -846,7 +847,12 @@ static int mdss_dsi_unblank(struct mdss_panel_data *pdata)
	pr_debug("%s+: ctrl=%p ndx=%d cur_blank_state=%d\n", __func__,
		ctrl_pdata, ctrl_pdata->ndx, pdata->panel_info.blank_state);

	if (mdss_dsi_is_ctrl_clk_master(ctrl_pdata))
		sctrl = mdss_dsi_get_ctrl_clk_slave();

	mdss_dsi_clk_ctrl(ctrl_pdata, DSI_ALL_CLKS, 1);
	if (sctrl)
		mdss_dsi_clk_ctrl(sctrl, DSI_ALL_CLKS, 1);

	if (pdata->panel_info.blank_state == MDSS_PANEL_BLANK_LOW_POWER) {
		pr_debug("%s: dsi_unblank with panel always on\n", __func__);
@@ -876,6 +882,8 @@ static int mdss_dsi_unblank(struct mdss_panel_data *pdata)

error:
	mdss_dsi_clk_ctrl(ctrl_pdata, DSI_ALL_CLKS, 0);
	if (sctrl)
		mdss_dsi_clk_ctrl(sctrl, DSI_ALL_CLKS, 0);
	pr_debug("%s-:\n", __func__);

	return ret;
+5 −0
Original line number Diff line number Diff line
@@ -1324,6 +1324,11 @@ static int mdss_dsi_clamp_ctrl(struct mdss_dsi_ctrl_pdata *ctrl, int enable)
		return -EINVAL;
	}

	if (ctrl->hw_rev == MDSS_DSI_HW_REV_104) {
		pr_debug("%s: clamp ctrl configuration is skipped\n", __func__);
		return 0;
	}

	clamp_reg_off = ctrl->ulps_clamp_ctrl_off;
	phyrst_reg_off = ctrl->ulps_phyrst_ctrl_off;
	mipi = &ctrl->panel_data.panel_info.mipi;