]> git.karo-electronics.de Git - linux-beck.git/commitdiff
drm/imx: ipuv3-plane: request modeset if plane offsets changed
authorPhilipp Zabel <p.zabel@pengutronix.de>
Tue, 18 Oct 2016 10:13:15 +0000 (12:13 +0200)
committerPhilipp Zabel <p.zabel@pengutronix.de>
Thu, 20 Oct 2016 12:39:52 +0000 (14:39 +0200)
If the framebuffer pixel format is planar YUV and unchanged, but the U
or V plane offsets change, do not return an error, but request a modeset
instead.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Acked-by: Liu Ying <gnuiyl@gmail.com>
drivers/gpu/drm/imx/ipuv3-plane.c

index d5864ed4d772fdd2f4d5dfd0be9a13e372e27569..737f085eafac5b158c8f021a3726a1633239f0da 100644 (file)
@@ -356,13 +356,11 @@ static int ipu_plane_atomic_check(struct drm_plane *plane,
                if ((ubo > 0xfffff8) || (vbo > 0xfffff8))
                        return -EINVAL;
 
-               if (old_fb &&
-                   (old_fb->pixel_format == DRM_FORMAT_YUV420 ||
-                    old_fb->pixel_format == DRM_FORMAT_YVU420)) {
+               if (old_fb && (fb->pixel_format == old_fb->pixel_format)) {
                        old_ubo = drm_plane_state_to_ubo(old_state);
                        old_vbo = drm_plane_state_to_vbo(old_state);
                        if (ubo != old_ubo || vbo != old_vbo)
-                               return -EINVAL;
+                               crtc_state->mode_changed = true;
                }
 
                if (fb->pitches[1] != fb->pitches[2])