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

Commit d3d63a70 authored by Ingrid Gallardo's avatar Ingrid Gallardo
Browse files

msm: mdss: fix overflow when reading pixel clock



Fix pixel clock value overflow when reading from the
dtsi. This fixes the frame rate calculations for 120 fps
panels; wrong frame rates were leading to low bandwidth
and mdp clock calculations, increasing the transfer
times and reducing the fps.

Change-Id: Ia41aae433f89e8970318224562b00cf0cb56767b
Signed-off-by: default avatarIngrid Gallardo <ingridg@codeaurora.org>
parent 5a26d717
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -2015,9 +2015,11 @@ static int mdss_dsi_panel_timing_from_dt(struct device_node *np,
	rc = of_property_read_u32(np, "qcom,mdss-dsi-panel-framerate", &tmp);
	pt->timing.frame_rate = !rc ? tmp : DEFAULT_FRAME_RATE;
	rc = of_property_read_u64(np, "qcom,mdss-dsi-panel-clockrate", &tmp64);
	if (rc == -EOVERFLOW)
	if (rc == -EOVERFLOW) {
		tmp64 = 0;
		rc = of_property_read_u32(np,
			"qcom,mdss-dsi-panel-clockrate", (u32 *)&tmp64);
	}
	pt->timing.clk_rate = !rc ? tmp64 : 0;

	data = of_get_property(np, "qcom,mdss-dsi-panel-timings", &len);