diff options
author | Liu Ying <gnuiyl@gmail.com> | 2016-07-08 05:41:01 -0400 |
---|---|---|
committer | Philipp Zabel <p.zabel@pengutronix.de> | 2016-07-12 12:24:12 -0400 |
commit | f6e396e5096dec2523fade421bc27f3fae38e31d (patch) | |
tree | 34c6a4cb3fc8d716679bd7316ff9bf63552eacad /drivers/gpu/drm/imx/imx-ldb.c | |
parent | 6b7279e13e3ac15b9f4fbcc3a7c93caa94a5ea04 (diff) |
drm/imx: atomic phase 3 step 2: Legacy callback fixups
Now that we can use atomic configurations, all the legacy callbacks
of CRTCs, encoders and connectors can be switched to the atomic version.
For the imx-ldb driver, there is a clock parent setting mismatch bewteen
->enable and ->disable after the switch, so a fixup is added. For the
imx-tve driver, since the encoder's callback ->dpms is replaced by
->disable, we need to move the setting for the IPU_CLK_EN bit(in register
TVE_COM_CONF_REG) from ->enable/->disable to ->mode_set, otherwise, the
relevant CRTC cannot be disabled correctly with a warning on DC stop timeout.
Signed-off-by: Liu Ying <gnuiyl@gmail.com>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Diffstat (limited to 'drivers/gpu/drm/imx/imx-ldb.c')
-rw-r--r-- | drivers/gpu/drm/imx/imx-ldb.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/gpu/drm/imx/imx-ldb.c b/drivers/gpu/drm/imx/imx-ldb.c index 6e110bba35cb..9c48c4b23a8c 100644 --- a/drivers/gpu/drm/imx/imx-ldb.c +++ b/drivers/gpu/drm/imx/imx-ldb.c | |||
@@ -172,10 +172,6 @@ static struct drm_encoder *imx_ldb_connector_best_encoder( | |||
172 | return &imx_ldb_ch->imx_encoder.encoder; | 172 | return &imx_ldb_ch->imx_encoder.encoder; |
173 | } | 173 | } |
174 | 174 | ||
175 | static void imx_ldb_encoder_dpms(struct drm_encoder *encoder, int mode) | ||
176 | { | ||
177 | } | ||
178 | |||
179 | static void imx_ldb_set_clock(struct imx_ldb *ldb, int mux, int chno, | 175 | static void imx_ldb_set_clock(struct imx_ldb *ldb, int mux, int chno, |
180 | unsigned long serial_clk, unsigned long di_clk) | 176 | unsigned long serial_clk, unsigned long di_clk) |
181 | { | 177 | { |
@@ -204,7 +200,7 @@ static void imx_ldb_set_clock(struct imx_ldb *ldb, int mux, int chno, | |||
204 | chno); | 200 | chno); |
205 | } | 201 | } |
206 | 202 | ||
207 | static void imx_ldb_encoder_commit(struct drm_encoder *encoder) | 203 | static void imx_ldb_encoder_enable(struct drm_encoder *encoder) |
208 | { | 204 | { |
209 | struct imx_drm_encoder *imx_encoder = enc_to_imx_enc(encoder); | 205 | struct imx_drm_encoder *imx_encoder = enc_to_imx_enc(encoder); |
210 | struct imx_ldb_channel *imx_ldb_ch = imx_enc_to_imx_ldb_ch(imx_encoder); | 206 | struct imx_ldb_channel *imx_ldb_ch = imx_enc_to_imx_ldb_ch(imx_encoder); |
@@ -215,8 +211,13 @@ static void imx_ldb_encoder_commit(struct drm_encoder *encoder) | |||
215 | drm_panel_prepare(imx_ldb_ch->panel); | 211 | drm_panel_prepare(imx_ldb_ch->panel); |
216 | 212 | ||
217 | if (dual) { | 213 | if (dual) { |
214 | clk_set_parent(ldb->clk_sel[mux], ldb->clk[0]); | ||
215 | clk_set_parent(ldb->clk_sel[mux], ldb->clk[1]); | ||
216 | |||
218 | clk_prepare_enable(ldb->clk[0]); | 217 | clk_prepare_enable(ldb->clk[0]); |
219 | clk_prepare_enable(ldb->clk[1]); | 218 | clk_prepare_enable(ldb->clk[1]); |
219 | } else { | ||
220 | clk_set_parent(ldb->clk_sel[mux], ldb->clk[imx_ldb_ch->chno]); | ||
220 | } | 221 | } |
221 | 222 | ||
222 | if (imx_ldb_ch == &ldb->channel[0] || dual) { | 223 | if (imx_ldb_ch == &ldb->channel[0] || dual) { |
@@ -356,7 +357,7 @@ static void imx_ldb_encoder_disable(struct drm_encoder *encoder) | |||
356 | } | 357 | } |
357 | 358 | ||
358 | static const struct drm_connector_funcs imx_ldb_connector_funcs = { | 359 | static const struct drm_connector_funcs imx_ldb_connector_funcs = { |
359 | .dpms = drm_helper_connector_dpms, | 360 | .dpms = drm_atomic_helper_connector_dpms, |
360 | .fill_modes = drm_helper_probe_single_connector_modes, | 361 | .fill_modes = drm_helper_probe_single_connector_modes, |
361 | .detect = imx_ldb_connector_detect, | 362 | .detect = imx_ldb_connector_detect, |
362 | .destroy = imx_drm_connector_destroy, | 363 | .destroy = imx_drm_connector_destroy, |
@@ -375,9 +376,8 @@ static const struct drm_encoder_funcs imx_ldb_encoder_funcs = { | |||
375 | }; | 376 | }; |
376 | 377 | ||
377 | static const struct drm_encoder_helper_funcs imx_ldb_encoder_helper_funcs = { | 378 | static const struct drm_encoder_helper_funcs imx_ldb_encoder_helper_funcs = { |
378 | .dpms = imx_ldb_encoder_dpms, | ||
379 | .commit = imx_ldb_encoder_commit, | ||
380 | .mode_set = imx_ldb_encoder_mode_set, | 379 | .mode_set = imx_ldb_encoder_mode_set, |
380 | .enable = imx_ldb_encoder_enable, | ||
381 | .disable = imx_ldb_encoder_disable, | 381 | .disable = imx_ldb_encoder_disable, |
382 | }; | 382 | }; |
383 | 383 | ||