drm/rockchip: dw-mipi-dsi: only request HS clock when required
[firefly-linux-kernel-4.4.55.git] / drivers / gpu / drm / exynos / exynos_drm_crtc.c
index b3ba27fd9a6bc880d7e061039e61ca42babc148f..8f5ac535d8098137642afffec532b27d8eecbb57 100644 (file)
@@ -55,6 +55,9 @@ static int exynos_crtc_atomic_check(struct drm_crtc *crtc,
 {
        struct exynos_drm_crtc *exynos_crtc = to_exynos_crtc(crtc);
 
+       if (!state->enable)
+               return 0;
+
        if (exynos_crtc->ops->atomic_check)
                return exynos_crtc->ops->atomic_check(exynos_crtc, state);
 
@@ -93,7 +96,7 @@ static void exynos_crtc_atomic_flush(struct drm_crtc *crtc,
        }
 }
 
-static struct drm_crtc_helper_funcs exynos_crtc_helper_funcs = {
+static const struct drm_crtc_helper_funcs exynos_crtc_helper_funcs = {
        .enable         = exynos_drm_crtc_enable,
        .disable        = exynos_drm_crtc_disable,
        .mode_set_nofb  = exynos_drm_crtc_mode_set_nofb,
@@ -113,7 +116,7 @@ static void exynos_drm_crtc_destroy(struct drm_crtc *crtc)
        kfree(exynos_crtc);
 }
 
-static struct drm_crtc_funcs exynos_crtc_funcs = {
+static const struct drm_crtc_funcs exynos_crtc_funcs = {
        .set_config     = drm_atomic_helper_set_config,
        .page_flip      = drm_atomic_helper_page_flip,
        .destroy        = exynos_drm_crtc_destroy,
@@ -150,7 +153,7 @@ struct exynos_drm_crtc *exynos_drm_crtc_create(struct drm_device *drm_dev,
        private->crtc[pipe] = crtc;
 
        ret = drm_crtc_init_with_planes(drm_dev, crtc, plane, NULL,
-                                       &exynos_crtc_funcs);
+                                       &exynos_crtc_funcs, NULL);
        if (ret < 0)
                goto err_crtc;