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

Commit 97a45312 authored by Jeykumar Sankaran's avatar Jeykumar Sankaran
Browse files

drm/msm/sde: enable dsi core clk before updating backlight



This change enables the dsi core clks before sending backlight
DSC commands ensuring that the DRM locks are acquired before
the DSI locks to prevent any potential deadlocks.

Change-Id: I99ddca461b046478d9a87c5eaed28e68dfed0783
Signed-off-by: default avatarJeykumar Sankaran <jsanka@codeaurora.org>
parent 6d6d60c0
Loading
Loading
Loading
Loading
+18 −0
Original line number Diff line number Diff line
@@ -95,10 +95,28 @@ int dsi_display_set_backlight(void *display, u32 bl_lvl)

	pr_debug("bl_scale = %u, bl_scale_ad = %u, bl_lvl = %u\n",
		bl_scale, bl_scale_ad, (u32)bl_temp);

	rc = dsi_display_clk_ctrl(dsi_display->dsi_clk_handle,
			DSI_CORE_CLK, DSI_CLK_ON);
	if (rc) {
		pr_err("[%s] failed to enable DSI core clocks, rc=%d\n",
		       dsi_display->name, rc);
		goto error;
	}

	rc = dsi_panel_set_backlight(panel, (u32)bl_temp);
	if (rc)
		pr_err("unable to set backlight\n");

	rc = dsi_display_clk_ctrl(dsi_display->dsi_clk_handle,
			DSI_CORE_CLK, DSI_CLK_OFF);
	if (rc) {
		pr_err("[%s] failed to disable DSI core clocks, rc=%d\n",
		       dsi_display->name, rc);
		goto error;
	}

error:
	return rc;
}