Commit c988d2dc authored by Lucas De Marchi's avatar Lucas De Marchi

drm/i915/display: remove explicit CNL handling from skl_universal_plane.c

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: default avatarLucas De Marchi <lucas.demarchi@intel.com>
Reviewed-by: default avatarRodrigo Vivi <rodrigo.vivi@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210728215946.1573015-13-lucas.demarchi@intel.com
parent f1be52cb
...@@ -835,7 +835,7 @@ static u32 skl_plane_ctl_rotate(unsigned int rotate) ...@@ -835,7 +835,7 @@ static u32 skl_plane_ctl_rotate(unsigned int rotate)
return 0; return 0;
} }
static u32 cnl_plane_ctl_flip(unsigned int reflect) static u32 icl_plane_ctl_flip(unsigned int reflect)
{ {
switch (reflect) { switch (reflect) {
case 0: case 0:
...@@ -917,8 +917,8 @@ static u32 skl_plane_ctl(const struct intel_crtc_state *crtc_state, ...@@ -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_tiling(fb->modifier);
plane_ctl |= skl_plane_ctl_rotate(rotation & DRM_MODE_ROTATE_MASK); plane_ctl |= skl_plane_ctl_rotate(rotation & DRM_MODE_ROTATE_MASK);
if (DISPLAY_VER(dev_priv) >= 11 || IS_CANNONLAKE(dev_priv)) if (DISPLAY_VER(dev_priv) >= 11)
plane_ctl |= cnl_plane_ctl_flip(rotation & plane_ctl |= icl_plane_ctl_flip(rotation &
DRM_MODE_REFLECT_MASK); DRM_MODE_REFLECT_MASK);
if (key->flags & I915_SET_COLORKEY_DESTINATION) if (key->flags & I915_SET_COLORKEY_DESTINATION)
...@@ -1828,7 +1828,7 @@ static bool skl_plane_has_ccs(struct drm_i915_private *dev_priv, ...@@ -1828,7 +1828,7 @@ static bool skl_plane_has_ccs(struct drm_i915_private *dev_priv,
if (plane_id == PLANE_CURSOR) if (plane_id == PLANE_CURSOR)
return false; return false;
if (DISPLAY_VER(dev_priv) >= 11 || IS_CANNONLAKE(dev_priv)) if (DISPLAY_VER(dev_priv) >= 11)
return true; return true;
if (IS_GEMINILAKE(dev_priv)) if (IS_GEMINILAKE(dev_priv))
...@@ -2144,7 +2144,7 @@ skl_universal_plane_create(struct drm_i915_private *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_0 | DRM_MODE_ROTATE_90 |
DRM_MODE_ROTATE_180 | DRM_MODE_ROTATE_270; 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; supported_rotations |= DRM_MODE_REFLECT_X;
drm_plane_create_rotation_property(&plane->base, drm_plane_create_rotation_property(&plane->base,
...@@ -2174,7 +2174,7 @@ skl_universal_plane_create(struct drm_i915_private *dev_priv, ...@@ -2174,7 +2174,7 @@ skl_universal_plane_create(struct drm_i915_private *dev_priv,
if (DISPLAY_VER(dev_priv) >= 12) if (DISPLAY_VER(dev_priv) >= 12)
drm_plane_enable_fb_damage_clips(&plane->base); 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, drm_plane_create_scaling_filter_property(&plane->base,
BIT(DRM_SCALING_FILTER_DEFAULT) | BIT(DRM_SCALING_FILTER_DEFAULT) |
BIT(DRM_SCALING_FILTER_NEAREST_NEIGHBOR)); BIT(DRM_SCALING_FILTER_NEAREST_NEIGHBOR));
...@@ -2295,7 +2295,7 @@ skl_get_initial_plane_config(struct intel_crtc *crtc, ...@@ -2295,7 +2295,7 @@ skl_get_initial_plane_config(struct intel_crtc *crtc,
break; 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; plane_config->rotation |= DRM_MODE_REFLECT_X;
/* 90/270 degree rotation would require extra work */ /* 90/270 degree rotation would require extra work */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment