drm/i915/display: remove explicit CNL handling from skl_universal_plane.c
authorLucas De Marchi <lucas.demarchi@intel.com>
Wed, 28 Jul 2021 21:59:33 +0000 (14:59 -0700)
committerLucas De Marchi <lucas.demarchi@intel.com>
Fri, 30 Jul 2021 17:11:33 +0000 (10:11 -0700)
The only real platform with DISPLAY_VER == 10 is GLK. We don't need to
handle CNL explicitly in skl_universal_plane.c.

Remove code and rename functions/macros accordingly to use ICL prefix.

Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210728215946.1573015-13-lucas.demarchi@intel.com
drivers/gpu/drm/i915/display/skl_universal_plane.c

index 3ad04bf..0f40f8b 100644 (file)
@@ -835,7 +835,7 @@ static u32 skl_plane_ctl_rotate(unsigned int rotate)
        return 0;
 }
 
-static u32 cnl_plane_ctl_flip(unsigned int reflect)
+static u32 icl_plane_ctl_flip(unsigned int reflect)
 {
        switch (reflect) {
        case 0:
@@ -917,8 +917,8 @@ static u32 skl_plane_ctl(const struct intel_crtc_state *crtc_state,
        plane_ctl |= skl_plane_ctl_tiling(fb->modifier);
        plane_ctl |= skl_plane_ctl_rotate(rotation & DRM_MODE_ROTATE_MASK);
 
-       if (DISPLAY_VER(dev_priv) >= 11 || IS_CANNONLAKE(dev_priv))
-               plane_ctl |= cnl_plane_ctl_flip(rotation &
+       if (DISPLAY_VER(dev_priv) >= 11)
+               plane_ctl |= icl_plane_ctl_flip(rotation &
                                                DRM_MODE_REFLECT_MASK);
 
        if (key->flags & I915_SET_COLORKEY_DESTINATION)
@@ -1828,7 +1828,7 @@ static bool skl_plane_has_ccs(struct drm_i915_private *dev_priv,
        if (plane_id == PLANE_CURSOR)
                return false;
 
-       if (DISPLAY_VER(dev_priv) >= 11 || IS_CANNONLAKE(dev_priv))
+       if (DISPLAY_VER(dev_priv) >= 11)
                return true;
 
        if (IS_GEMINILAKE(dev_priv))
@@ -2144,7 +2144,7 @@ skl_universal_plane_create(struct drm_i915_private *dev_priv,
                        DRM_MODE_ROTATE_0 | DRM_MODE_ROTATE_90 |
                        DRM_MODE_ROTATE_180 | DRM_MODE_ROTATE_270;
 
-       if (DISPLAY_VER(dev_priv) >= 11 || IS_CANNONLAKE(dev_priv))
+       if (DISPLAY_VER(dev_priv) >= 11)
                supported_rotations |= DRM_MODE_REFLECT_X;
 
        drm_plane_create_rotation_property(&plane->base,
@@ -2174,7 +2174,7 @@ skl_universal_plane_create(struct drm_i915_private *dev_priv,
        if (DISPLAY_VER(dev_priv) >= 12)
                drm_plane_enable_fb_damage_clips(&plane->base);
 
-       if (DISPLAY_VER(dev_priv) >= 11 || IS_CANNONLAKE(dev_priv))
+       if (DISPLAY_VER(dev_priv) >= 11)
                drm_plane_create_scaling_filter_property(&plane->base,
                                                BIT(DRM_SCALING_FILTER_DEFAULT) |
                                                BIT(DRM_SCALING_FILTER_NEAREST_NEIGHBOR));
@@ -2295,7 +2295,7 @@ skl_get_initial_plane_config(struct intel_crtc *crtc,
                break;
        }
 
-       if ((DISPLAY_VER(dev_priv) >= 11 || IS_CANNONLAKE(dev_priv)) && val & PLANE_CTL_FLIP_HORIZONTAL)
+       if (DISPLAY_VER(dev_priv) >= 11 && val & PLANE_CTL_FLIP_HORIZONTAL)
                plane_config->rotation |= DRM_MODE_REFLECT_X;
 
        /* 90/270 degree rotation would require extra work */