@@ -278,7 +278,7 @@ static int ipu_plane_atomic_check(struct drm_plane *plane,
if (WARN_ON(!crtc_state))
return -EINVAL;
- /* CRTC should be enabled */
+ /* CRTC should be enabled -- why? */
if (!crtc_state->enable)
return -EINVAL;
@@ -322,10 +322,14 @@ static int ipu_plane_atomic_check(struct drm_plane *plane,
* since we cannot touch active IDMAC channels, we do not support
* resizing the enabled plane or changing its format
*/
+#if 0
if (old_fb && (state->src_w != old_state->src_w ||
state->src_h != old_state->src_h ||
- fb->pixel_format != old_fb->pixel_format))
+ fb->pixel_format != old_fb->pixel_format)) {
+ printk("%s:%d: fail\n", __func__, __LINE__);
return -EINVAL;
+ }
+#endif
eba = drm_plane_state_to_eba(state);
@@ -335,9 +339,6 @@ static int ipu_plane_atomic_check(struct drm_plane *plane,
if (fb->pitches[0] < 1 || fb->pitches[0] > 16384)
return -EINVAL;
- if (old_fb && fb->pitches[0] != old_fb->pitches[0])
- return -EINVAL;
-
switch (fb->pixel_format) {
case DRM_FORMAT_YUV420:
case DRM_FORMAT_YVU420:
@@ -391,11 +392,17 @@ static void ipu_plane_atomic_update(struct drm_plane *plane,
struct drm_plane_state *state = plane->state;
enum ipu_color_space ics;
- if (old_state->fb) {
+ if (old_state->fb &&
+ old_state->src_w == state->src_w &&
+ old_state->src_h == state->src_h &&
+ old_state->fb->pixel_format == state->fb->pixel_format &&
+ old_state->fb->pitches[0] == state->fb->pitches[0]) {
ipu_plane_atomic_set_base(ipu_plane, old_state);
return;
}
+ ipu_plane_disable(ipu_plane);
+
switch (ipu_plane->dp_flow) {
case IPU_DP_FLOW_SYNC_BG:
ipu_dp_setup_channel(ipu_plane->dp,