drm/exynos: Enable DP clock to fix display on Exynos5250 and other
[deliverable/linux.git] / drivers / gpu / drm / exynos / exynos_dp_core.c
index bf17a60b40edc88e77c2c3330c0f7dc3adee7295..1dbfba58f9091b70aac969a55e270d844ea5fb05 100644 (file)
 #include <drm/bridge/ptn3460.h>
 
 #include "exynos_dp_core.h"
+#include "exynos_drm_fimd.h"
 
 #define ctx_from_connector(c)  container_of(c, struct exynos_dp_device, \
                                        connector)
 
+static inline struct exynos_drm_crtc *dp_to_crtc(struct exynos_dp_device *dp)
+{
+       return to_exynos_crtc(dp->encoder->crtc);
+}
+
 static inline struct exynos_dp_device *
 display_to_dp(struct exynos_drm_display *d)
 {
@@ -1070,6 +1076,8 @@ static void exynos_dp_poweron(struct exynos_dp_device *dp)
                }
        }
 
+       fimd_dp_clock_enable(dp_to_crtc(dp), true);
+
        clk_prepare_enable(dp->clock);
        exynos_dp_phy_init(dp);
        exynos_dp_init_dp(dp);
@@ -1094,6 +1102,8 @@ static void exynos_dp_poweroff(struct exynos_dp_device *dp)
        exynos_dp_phy_exit(dp);
        clk_disable_unprepare(dp->clock);
 
+       fimd_dp_clock_enable(dp_to_crtc(dp), false);
+
        if (dp->panel) {
                if (drm_panel_unprepare(dp->panel))
                        DRM_ERROR("failed to turnoff the panel\n");
This page took 0.024925 seconds and 5 git commands to generate.