Skip to content

Commit

Permalink
drm/msm: add calls to prepare and unprepare panel
Browse files Browse the repository at this point in the history
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: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Signed-off-by: Rob Clark <robdclark@gmail.com>
  • Loading branch information
Srinivas Kandagatla authored and Rob Clark committed Aug 15, 2015
1 parent 09992e4 commit 095022b
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions drivers/gpu/drm/msm/mdp/mdp4/mdp4_lcdc_encoder.c
Original file line number Diff line number Diff line change
Expand Up @@ -346,8 +346,10 @@ static void mdp4_lcdc_encoder_disable(struct drm_encoder *encoder)

mdp4_write(mdp4_kms, REG_MDP4_LCDC_ENABLE, 0);

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

/*
* Wait for a vsync so we know the ENABLE=0 latched before
Expand Down Expand Up @@ -412,8 +414,10 @@ static void mdp4_lcdc_encoder_enable(struct drm_encoder *encoder)
if (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);
}

setup_phy(encoder);

Expand Down

0 comments on commit 095022b

Please sign in to comment.