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

Commit 095022b9 authored by Srinivas Kandagatla's avatar Srinivas Kandagatla Committed by Rob Clark
Browse files

drm/msm: add calls to prepare and unprepare panel



Prepare the panel before it's enabled and un-prepare after disable, this
will make sure that the regulators are switched on and off correctly.

Tested it on APQ8064 based IFC6410 with panel.

Signed-off-by: default avatarSrinivas Kandagatla <srinivas.kandagatla@linaro.org>
Signed-off-by: default avatarRob Clark <robdclark@gmail.com>
parent 09992e4d
Loading
Loading
Loading
Loading
+6 −2
Original line number Original line Diff line number Diff line
@@ -346,8 +346,10 @@ static void mdp4_lcdc_encoder_disable(struct drm_encoder *encoder)


	mdp4_write(mdp4_kms, REG_MDP4_LCDC_ENABLE, 0);
	mdp4_write(mdp4_kms, REG_MDP4_LCDC_ENABLE, 0);


	if (panel)
	if (panel) {
		drm_panel_disable(panel);
		drm_panel_disable(panel);
		drm_panel_unprepare(panel);
	}


	/*
	/*
	 * Wait for a vsync so we know the ENABLE=0 latched before
	 * Wait for a vsync so we know the ENABLE=0 latched before
@@ -412,8 +414,10 @@ static void mdp4_lcdc_encoder_enable(struct drm_encoder *encoder)
	if (ret)
	if (ret)
		dev_err(dev->dev, "failed to enable lcdc_clk: %d\n", ret);
		dev_err(dev->dev, "failed to enable lcdc_clk: %d\n", ret);


	if (panel)
	if (panel) {
		drm_panel_prepare(panel);
		drm_panel_enable(panel);
		drm_panel_enable(panel);
	}


	setup_phy(encoder);
	setup_phy(encoder);