diff options
author | Liu Ying <gnuiyl@gmail.com> | 2016-07-08 17:41:01 +0800 |
---|---|---|
committer | Philipp Zabel <p.zabel@pengutronix.de> | 2016-07-12 18:24:12 +0200 |
commit | f6e396e5096dec2523fade421bc27f3fae38e31d (patch) | |
tree | 34c6a4cb3fc8d716679bd7316ff9bf63552eacad /drivers/gpu/drm/imx/parallel-display.c | |
parent | 6b7279e13e3ac15b9f4fbcc3a7c93caa94a5ea04 (diff) | |
download | linux-stable-f6e396e5096dec2523fade421bc27f3fae38e31d.tar.gz linux-stable-f6e396e5096dec2523fade421bc27f3fae38e31d.tar.bz2 linux-stable-f6e396e5096dec2523fade421bc27f3fae38e31d.zip |
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/parallel-display.c')
-rw-r--r-- | drivers/gpu/drm/imx/parallel-display.c | 18 |
1 files changed, 3 insertions, 15 deletions
diff --git a/drivers/gpu/drm/imx/parallel-display.c b/drivers/gpu/drm/imx/parallel-display.c index 7374d824a6d1..bb5dbd66fea7 100644 --- a/drivers/gpu/drm/imx/parallel-display.c +++ b/drivers/gpu/drm/imx/parallel-display.c @@ -92,18 +92,7 @@ static struct drm_encoder *imx_pd_connector_best_encoder( return &imxpd->imx_encoder.encoder; } -static void imx_pd_encoder_dpms(struct drm_encoder *encoder, int mode) -{ - struct imx_drm_encoder *imx_encoder = enc_to_imx_enc(encoder); - struct imx_parallel_display *imxpd = imx_enc_to_imxpd(imx_encoder); - - if (mode != DRM_MODE_DPMS_ON) - drm_panel_disable(imxpd->panel); - else - drm_panel_enable(imxpd->panel); -} - -static void imx_pd_encoder_commit(struct drm_encoder *encoder) +static void imx_pd_encoder_enable(struct drm_encoder *encoder) { struct imx_drm_encoder *imx_encoder = enc_to_imx_enc(encoder); struct imx_parallel_display *imxpd = imx_enc_to_imxpd(imx_encoder); @@ -128,7 +117,7 @@ static void imx_pd_encoder_disable(struct drm_encoder *encoder) } static const struct drm_connector_funcs imx_pd_connector_funcs = { - .dpms = drm_helper_connector_dpms, + .dpms = drm_atomic_helper_connector_dpms, .fill_modes = drm_helper_probe_single_connector_modes, .detect = imx_pd_connector_detect, .destroy = imx_drm_connector_destroy, @@ -147,9 +136,8 @@ static const struct drm_encoder_funcs imx_pd_encoder_funcs = { }; static const struct drm_encoder_helper_funcs imx_pd_encoder_helper_funcs = { - .dpms = imx_pd_encoder_dpms, - .commit = imx_pd_encoder_commit, .mode_set = imx_pd_encoder_mode_set, + .enable = imx_pd_encoder_enable, .disable = imx_pd_encoder_disable, }; |