drm/exynos/decon5433: replace old method of enabling PHY with pipe clk 14/124514/4
authorAndrzej Hajda <a.hajda@samsung.com>
Tue, 11 Apr 2017 11:20:24 +0000 (13:20 +0200)
committerAndrzej Hajda <a.hajda@samsung.com>
Tue, 18 Apr 2017 06:09:08 +0000 (08:09 +0200)
DECON requires clock provided by HDMI-PHY prior to its configuration,
and the clock should be off after DECON disable.
Since introduction of pipe_clk DECON can fully control PHY clock.
It obsoletes exynos_hdmiphy_enable workaround.
The patch adds also missing code to disable HDMI-PHY on DECON disable.

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

index 6842c1c970b646e0830e8f1b46c0205857859d67..d34b14b22e002a6d03583783a4e63ddb53d92d01 100644 (file)
@@ -537,8 +537,7 @@ static void decon_dpms_on(struct decon_context *ctx)
 
        decon_reset(ctx);
 
-       if (ctx->drv_data->type == EXYNOS_DISPLAY_TYPE_HDMI)
-               exynos_hdmiphy_enable(ctx->crtc);
+       exynos_drm_pipe_clk_enable(ctx->crtc, true);
 
        decon_window_resume(ctx);
        decon_apply(ctx);
@@ -576,6 +575,8 @@ static void decon_dpms_off(struct decon_context *ctx)
        decon_window_suspend(ctx);
        decon_swreset(ctx);
 
+       exynos_drm_pipe_clk_enable(ctx->crtc, false);
+
        for (i = ARRAY_SIZE(decon_clks_name) - 1; i >= 0; i--)
                clk_disable_unprepare(ctx->clks[i]);