summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/intel_atomic_plane.c
diff options
context:
space:
mode:
authorVille Syrjälä2018-09-07 17:24:10 +0200
committerVille Syrjälä2018-09-12 17:00:38 +0200
commite21c2d33101871b85fe9fbb2fc6ef365b2773b67 (patch)
treef3d1793efe3406440db1e2bbac8d81fb31da2512 /drivers/gpu/drm/i915/intel_atomic_plane.c
parentdrm/i915: Extract per-platform plane->check() functions (diff)
downloadkernel-qcow2-linux-e21c2d33101871b85fe9fbb2fc6ef365b2773b67.tar.gz
kernel-qcow2-linux-e21c2d33101871b85fe9fbb2fc6ef365b2773b67.tar.xz
kernel-qcow2-linux-e21c2d33101871b85fe9fbb2fc6ef365b2773b67.zip
drm/i915: Move skl plane fb related checks into a better place
Move the skl+ specific framebuffer related checks from intel_plane_atomic_check_with_state() into a new function (skl_plane_check_fb()) which we'll simply call from the skl plane->check() hook. v2: Split out the Y/Yf+CCS vs. interlaced change (José) Reviewed-by: José Roberto de Souza <jose.souza@intel.com> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20180907152413.15761-11-ville.syrjala@linux.intel.com
Diffstat (limited to 'drivers/gpu/drm/i915/intel_atomic_plane.c')
-rw-r--r--drivers/gpu/drm/i915/intel_atomic_plane.c44
1 files changed, 0 insertions, 44 deletions
diff --git a/drivers/gpu/drm/i915/intel_atomic_plane.c b/drivers/gpu/drm/i915/intel_atomic_plane.c
index fa7df5fe154b..7c0873060934 100644
--- a/drivers/gpu/drm/i915/intel_atomic_plane.c
+++ b/drivers/gpu/drm/i915/intel_atomic_plane.c
@@ -116,40 +116,11 @@ int intel_plane_atomic_check_with_state(const struct intel_crtc_state *old_crtc_
struct drm_i915_private *dev_priv = to_i915(plane->dev);
struct drm_plane_state *state = &intel_state->base;
struct intel_plane *intel_plane = to_intel_plane(plane);
- const struct drm_display_mode *adjusted_mode =
- &crtc_state->base.adjusted_mode;
int ret;
if (!intel_state->base.crtc && !old_plane_state->base.crtc)
return 0;
- if (state->fb && drm_rotation_90_or_270(state->rotation)) {
- struct drm_format_name_buf format_name;
-
- if (state->fb->modifier != I915_FORMAT_MOD_Y_TILED &&
- state->fb->modifier != I915_FORMAT_MOD_Yf_TILED) {
- DRM_DEBUG_KMS("Y/Yf tiling required for 90/270!\n");
- return -EINVAL;
- }
-
- /*
- * 90/270 is not allowed with RGB64 16:16:16:16,
- * RGB 16-bit 5:6:5, and Indexed 8-bit.
- * TBD: Add RGB64 case once its added in supported format list.
- */
- switch (state->fb->format->format) {
- case DRM_FORMAT_C8:
- case DRM_FORMAT_RGB565:
- DRM_DEBUG_KMS("Unsupported pixel format %s for 90/270!\n",
- drm_get_format_name(state->fb->format->format,
- &format_name));
- return -EINVAL;
-
- default:
- break;
- }
- }
-
/* CHV ignores the mirror bit when the rotate bit is set :( */
if (IS_CHERRYVIEW(dev_priv) &&
state->rotation & DRM_MODE_ROTATE_180 &&
@@ -163,21 +134,6 @@ int intel_plane_atomic_check_with_state(const struct intel_crtc_state *old_crtc_
if (ret)
return ret;
- /*
- * Y-tiling is not supported in IF-ID Interlace mode in
- * GEN9 and above.
- */
- if (state->fb && INTEL_GEN(dev_priv) >= 9 && crtc_state->base.enable &&
- adjusted_mode->flags & DRM_MODE_FLAG_INTERLACE) {
- if (state->fb->modifier == I915_FORMAT_MOD_Y_TILED ||
- state->fb->modifier == I915_FORMAT_MOD_Yf_TILED ||
- state->fb->modifier == I915_FORMAT_MOD_Y_TILED_CCS ||
- state->fb->modifier == I915_FORMAT_MOD_Yf_TILED_CCS) {
- DRM_DEBUG_KMS("Y/Yf tiling not supported in IF-ID mode\n");
- return -EINVAL;
- }
- }
-
/* FIXME pre-g4x don't work like this */
if (state->visible)
crtc_state->active_planes |= BIT(intel_plane->id);