drm/i915: Simplify the modifier check for interlaced scanout support
authorImre Deak <imre.deak@intel.com>
Wed, 20 Oct 2021 19:51:31 +0000 (22:51 +0300)
committerImre Deak <imre.deak@intel.com>
Thu, 21 Oct 2021 18:44:36 +0000 (21:44 +0300)
Checking the modifiers that support interlacing makes the condition
simpler and avoids us having to add new modifiers to the list (presuming
all/most of the new modifiers won't support interlacing).

Cc: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
Signed-off-by: Imre Deak <imre.deak@intel.com>
Reviewed-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20211020195138.1841242-5-imre.deak@intel.com
drivers/gpu/drm/i915/display/skl_universal_plane.c

index 7ee2114..2c3d111 100644 (file)
@@ -1235,13 +1235,8 @@ static int skl_plane_check_fb(const struct intel_crtc_state *crtc_state,
        /* Y-tiling is not supported in IF-ID Interlace mode */
        if (crtc_state->hw.enable &&
            crtc_state->hw.adjusted_mode.flags & DRM_MODE_FLAG_INTERLACE &&
-           (fb->modifier == I915_FORMAT_MOD_Y_TILED ||
-            fb->modifier == I915_FORMAT_MOD_Yf_TILED ||
-            fb->modifier == I915_FORMAT_MOD_Y_TILED_CCS ||
-            fb->modifier == I915_FORMAT_MOD_Yf_TILED_CCS ||
-            fb->modifier == I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS ||
-            fb->modifier == I915_FORMAT_MOD_Y_TILED_GEN12_MC_CCS ||
-            fb->modifier == I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS_CC)) {
+           fb->modifier != DRM_FORMAT_MOD_LINEAR &&
+           fb->modifier != I915_FORMAT_MOD_X_TILED) {
                drm_dbg_kms(&dev_priv->drm,
                            "Y/Yf tiling not supported in IF-ID mode\n");
                return -EINVAL;