Skip to content

Commit

Permalink
drm/imx: ipuv3-plane: request modeset if plane offsets changed
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Philipp Zabel committed Oct 20, 2016
1 parent 8612674 commit 181c9bf
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions drivers/gpu/drm/imx/ipuv3-plane.c
Original file line number Diff line number Diff line change
Expand Up @@ -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])
Expand Down

0 comments on commit 181c9bf

Please sign in to comment.