drm/exynos: atomic check only enabled crtc states
authorAndrzej Hajda <a.hajda@samsung.com>
Fri, 27 Nov 2015 06:57:31 +0000 (07:57 +0100)
committerInki Dae <daeinki@gmail.com>
Sat, 19 Dec 2015 16:39:10 +0000 (01:39 +0900)
Since atomic check is called also for disabled crtcs it should skip
mode checking as it can be uninitialized. The patch fixes it.

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Suggested-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Tested-by: Javier Martinez Canillas <javier@osg.samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
drivers/gpu/drm/exynos/exynos_drm_crtc.c

index b3ba27fd9a6bc880d7e061039e61ca42babc148f..e69357172ffb56d2e5f5e86ff551b599196079ba 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);