From: Tomi Valkeinen Date: Fri, 10 Jun 2016 09:50:39 +0000 (+0300) Subject: drm/omap: fix plane check when crtc is disabled X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=aaf7642e98917fc95c260cbee98d2f426754b265;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git drm/omap: fix plane check when crtc is disabled I sometimes see: [drm:drm_framebuffer_remove [drm]] *ERROR* failed to reset crtc ed2a6c00 when fb was deleted: -22 which comes from drm_framebuffer_remove() when it's disabling the crtc with zeroed drm_mode_set. The problem in omap_plane_atomic_check() is that it will use those zeroed fields to verify if the setup is correct. This patch makes omap_plane_atomic_check() return 0 if the crtc is disabled. Signed-off-by: Tomi Valkeinen --- diff --git a/drivers/gpu/drm/omapdrm/omap_plane.c b/drivers/gpu/drm/omapdrm/omap_plane.c index 0ffd5b930ec0..7bd24185f33c 100644 --- a/drivers/gpu/drm/omapdrm/omap_plane.c +++ b/drivers/gpu/drm/omapdrm/omap_plane.c @@ -164,6 +164,9 @@ static int omap_plane_atomic_check(struct drm_plane *plane, if (IS_ERR(crtc_state)) return PTR_ERR(crtc_state); + if (!crtc_state->enable) + return 0; + if (state->crtc_x < 0 || state->crtc_y < 0) return -EINVAL;