Revert "drm/vc4: Relax VEC modeline requirements and add progressive mode support"
authorDave Stevenson <dave.stevenson@raspberrypi.com>
Thu, 25 Jan 2024 17:59:52 +0000 (17:59 +0000)
committerDom Cobley <popcornmix@gmail.com>
Mon, 19 Feb 2024 11:35:32 +0000 (11:35 +0000)
This reverts commit 2ef74e9687c92e26d4b047c2499c96b215ec7f00.

The mode that is now generated by the DRM core doesn't validate against
these criteria

drivers/gpu/drm/vc4/vc4_vec.c

index c57df20..a958f04 100644 (file)
@@ -757,18 +757,6 @@ static int vc4_vec_encoder_atomic_check(struct drm_encoder *encoder,
                if ((mode->crtc_vtotal - mode->crtc_vsync_end) < 4)
                        return -EINVAL;
 
-               if ((mode->flags & DRM_MODE_FLAG_INTERLACE) &&
-                   (mode->vdisplay % 2 != 0 ||
-                    mode->vsync_start % 2 != 1 ||
-                    mode->vsync_end % 2 != 1 ||
-                    mode->vtotal % 2 != 1))
-                       return -EINVAL;
-
-               /* progressive mode is hard-wired to 262 total lines */
-               if (!(mode->flags & DRM_MODE_FLAG_INTERLACE) &&
-                   mode->crtc_vtotal != 262)
-                       return -EINVAL;
-
                break;
 
        /* PAL/SECAM */
@@ -788,18 +776,6 @@ static int vc4_vec_encoder_atomic_check(struct drm_encoder *encoder,
                if ((mode->crtc_vtotal - mode->crtc_vsync_end) < 2)
                        return -EINVAL;
 
-               if ((mode->flags & DRM_MODE_FLAG_INTERLACE) &&
-                   (mode->vdisplay % 2 != 0 ||
-                    mode->vsync_start % 2 != 0 ||
-                    mode->vsync_end % 2 != 0 ||
-                    mode->vtotal % 2 != 1))
-                       return -EINVAL;
-
-               /* progressive mode is hard-wired to 312 total lines */
-               if (!(mode->flags & DRM_MODE_FLAG_INTERLACE) &&
-                   mode->crtc_vtotal != 312)
-                       return -EINVAL;
-
                break;
 
        default: