drm/exynos/mixer: enable HDMI-PHY before configuring MIXER
authorAndrzej Hajda <a.hajda@samsung.com>
Tue, 26 Jul 2016 08:45:55 +0000 (10:45 +0200)
committerAndrzej Hajda <a.hajda@samsung.com>
Tue, 26 Jul 2016 09:05:50 +0000 (11:05 +0200)
Mixer similarly to DECON-TV requires enabled clock generated
by HDMI-PHY to proper work.
The patch fixes hang on Odroid (X)U3 during console blank/unblank.

Change-Id: I9fa14fe02e54d2981fa06b43654f9616cd7074a8
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
drivers/gpu/drm/exynos/exynos5433_drm_decon.c
drivers/gpu/drm/exynos/exynos_drm_drv.h
drivers/gpu/drm/exynos/exynos_mixer.c

index fb32d662dd5d75f9093344b6d65eee66271cc821..77c8d576be03f742f33d45e457cd5fbfe5691452 100644 (file)
@@ -494,13 +494,6 @@ static void decon_reset(struct decon_context *ctx)
                       CRCCTRL_CRCEN | CRCCTRL_CRCSTART_F | CRCCTRL_CRCCLKEN);
 }
 
-/* this function will be replaced by clk API call */
-#ifdef CONFIG_DRM_EXYNOS_HDMI
-void exynos_hdmiphy_enable(struct exynos_drm_crtc *crtc);
-#else
-static void exynos_hdmiphy_enable(struct exynos_drm_crtc *crtc) {}
-#endif
-
 static void decon_dpms_on(struct decon_context *ctx)
 {
        int ret;
index 937893449f748f5bc9c79cf4118c97798e3571be..d0d77bdb1f207fb42d94f7699d4038707890777c 100644 (file)
@@ -314,6 +314,12 @@ static inline int exynos_dpi_remove(struct exynos_drm_display *display)
 }
 #endif
 
+#ifdef CONFIG_DRM_EXYNOS_HDMI
+void exynos_hdmiphy_enable(struct exynos_drm_crtc *crtc);
+#else
+static void exynos_hdmiphy_enable(struct exynos_drm_crtc *crtc) {}
+#endif
+
 /* This function creates a encoder and a connector, and initializes them. */
 int exynos_drm_create_enc_conn(struct drm_device *dev,
                                struct exynos_drm_display *display);
index 930ed9ce018ff60910f55b524a91eee6d60af087..4180f5f607f20bfa69e8b8de27d59a6e286456d0 100644 (file)
@@ -1079,6 +1079,8 @@ static void mixer_poweron(struct mixer_context *ctx)
        ctx->powered = true;
        mutex_unlock(&ctx->mixer_mutex);
 
+       exynos_hdmiphy_enable(ctx->crtc);
+
        mixer_reg_writemask(res, MXR_STATUS, ~0, MXR_STATUS_SOFT_RESET);
 
        mixer_reg_write(res, MXR_INT_EN, ctx->int_en);