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

Commit 194bccf7 authored by Sandeep Panda's avatar Sandeep Panda Committed by Gerrit - the friendly Code Review server
Browse files

msm: mdss: update DSI PHY panel timing dt parsing logic



In current implementation there are two entries in DSI
panel specific dt file for specifying panel timing parameters.
But in case only one entry is specified in panel dt, then if the
first entry is not there in dt, driver is returning failure
and because of this the second entry is not getting parsed at all.
Update the parsing logic so that driver parses both the entries
to get proper dsi panel timing parameters.

Change-Id: I1774421fd9686de123cb669a745ac110fe8667da
Signed-off-by: default avatarSandeep Panda <spanda@codeaurora.org>
parent a3883c35
Loading
Loading
Loading
Loading
+11 −4
Original line number Diff line number Diff line
@@ -1957,6 +1957,7 @@ static int mdss_dsi_panel_timing_from_dt(struct device_node *np,
	const char *data;
	struct mdss_dsi_ctrl_pdata *ctrl_pdata;
	struct mdss_panel_info *pinfo;
	bool phy_timings_present;

	pinfo = &panel_data->panel_info;

@@ -2024,12 +2025,13 @@ static int mdss_dsi_panel_timing_from_dt(struct device_node *np,

	data = of_get_property(np, "qcom,mdss-dsi-panel-timings", &len);
	if ((!data) || (len != 12)) {
		pr_err("%s:%d, Unable to read Phy timing settings",
		pr_debug("%s:%d, Unable to read Phy timing settings",
		       __func__, __LINE__);
		return -EINVAL;
	}
	} else {
		for (i = 0; i < len; i++)
			pt->phy_timing[i] = data[i];
		phy_timings_present = true;
	}

	data = of_get_property(np, "qcom,mdss-dsi-panel-timings-8996", &len);
	if ((!data) || (len != 40)) {
@@ -2038,6 +2040,11 @@ static int mdss_dsi_panel_timing_from_dt(struct device_node *np,
	} else {
		for (i = 0; i < len; i++)
			pt->phy_timing_8996[i] = data[i];
		phy_timings_present = true;
	}
	if (!phy_timings_present) {
		pr_err("%s: phy timing settings not present\n", __func__);
		return -EINVAL;
	}

	rc = of_property_read_u32(np, "qcom,mdss-dsi-t-clk-pre", &tmp);