aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrzej Hajda <a.hajda@samsung.com>2017-05-19 04:27:08 -0400
committerInki Dae <inki.dae@samsung.com>2017-06-01 03:21:36 -0400
commit625e63e27c5bec5bbcec8aeaea82d0b1975d2cf4 (patch)
treeb9b8584d8fa1ebfdbcba15b902f6e82a40028e95
parentb2adc5307514abe5872185351f772b95cfdce2ff (diff)
drm/exynos/hdmi: fix pipeline disable order
Hardware require that MIXER(crtc) should be disabled prior to HDMI(encoder). It was achieved by disabling crtc from encoder disable callback, bypassing drm core. As a result drm core tried to call vblank related routines on disabled crtc. The patch fixes it by simplifying hdmi_disable routine - now it only cancels hotplug worker. Hardware will be disabled in proper moment during pipe clock disable. Signed-off-by: Andrzej Hajda <a.hajda@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
-rw-r--r--drivers/gpu/drm/exynos/exynos_hdmi.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/drivers/gpu/drm/exynos/exynos_hdmi.c b/drivers/gpu/drm/exynos/exynos_hdmi.c
index 1ff6ab6371e8..06bfbe400cf1 100644
--- a/drivers/gpu/drm/exynos/exynos_hdmi.c
+++ b/drivers/gpu/drm/exynos/exynos_hdmi.c
@@ -1486,8 +1486,6 @@ static void hdmi_enable(struct drm_encoder *encoder)
1486static void hdmi_disable(struct drm_encoder *encoder) 1486static void hdmi_disable(struct drm_encoder *encoder)
1487{ 1487{
1488 struct hdmi_context *hdata = encoder_to_hdmi(encoder); 1488 struct hdmi_context *hdata = encoder_to_hdmi(encoder);
1489 struct drm_crtc *crtc = encoder->crtc;
1490 const struct drm_crtc_helper_funcs *funcs = NULL;
1491 1489
1492 if (!hdata->powered) 1490 if (!hdata->powered)
1493 return; 1491 return;
@@ -1498,16 +1496,11 @@ static void hdmi_disable(struct drm_encoder *encoder)
1498 * to disable TV Subsystem should be as following, 1496 * to disable TV Subsystem should be as following,
1499 * VP -> Mixer -> HDMI 1497 * VP -> Mixer -> HDMI
1500 * 1498 *
1501 * Below codes will try to disable Mixer and VP(if used) 1499 * To achieve such sequence HDMI is disabled together with HDMI PHY, via
1502 * prior to disabling HDMI. 1500 * pipe clock callback.
1503 */ 1501 */
1504 if (crtc)
1505 funcs = crtc->helper_private;
1506 if (funcs && funcs->disable)
1507 (*funcs->disable)(crtc);
1508
1509 cec_notifier_set_phys_addr(hdata->notifier, CEC_PHYS_ADDR_INVALID);
1510 cancel_delayed_work(&hdata->hotplug_work); 1502 cancel_delayed_work(&hdata->hotplug_work);
1503 cec_notifier_set_phys_addr(hdata->notifier, CEC_PHYS_ADDR_INVALID);
1511 1504
1512 hdmiphy_disable(hdata); 1505 hdmiphy_disable(hdata);
1513} 1506}