[Intel-gfx] [PATCH 2/2] drm/i915/skl+: Pipe scaling not supported in IF-ID Interlace mode

Mahesh Kumar mahesh1.kumar at intel.com
Thu Jun 29 08:57:40 UTC 2017


GEN9+ Interlace fetch mode doesn't support pipe scaling,
This patch adds check to fail the flip if pipe scaling is requested in
Interlace fetch mode.

Signed-off-by: Mahesh Kumar <mahesh1.kumar at intel.com>
---
 drivers/gpu/drm/i915/intel_atomic.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/gpu/drm/i915/intel_atomic.c b/drivers/gpu/drm/i915/intel_atomic.c
index 36d4e635e4ce..a1206d4f9a23 100644
--- a/drivers/gpu/drm/i915/intel_atomic.c
+++ b/drivers/gpu/drm/i915/intel_atomic.c
@@ -224,6 +224,7 @@ int intel_atomic_setup_scalers(struct drm_i915_private *dev_priv,
 	struct intel_crtc_scaler_state *scaler_state =
 		&crtc_state->scaler_state;
 	struct drm_atomic_state *drm_state = crtc_state->base.state;
+	const struct drm_display_mode *mode = &crtc_state->base.adjusted_mode;
 	int num_scalers_need;
 	int i, j;
 
@@ -248,6 +249,13 @@ int intel_atomic_setup_scalers(struct drm_i915_private *dev_priv,
 		return -EINVAL;
 	}
 
+	/* Scaling/fitting not supported in IF-ID mode in GEN9+ */
+	if (INTEL_GEN(dev_priv) >=9 && mode->flags & DRM_MODE_FLAG_INTERLACE &&
+			scaler_state->scaler_users & (1 << SKL_CRTC_INDEX)) {
+		DRM_DEBUG_KMS("Pipe Scaling not supported with IF-ID mode\n");
+		return -EINVAL;
+	}
+
 	/* walkthrough scaler_users bits and start assigning scalers */
 	for (i = 0; i < sizeof(scaler_state->scaler_users) * 8; i++) {
 		int *scaler_id;
-- 
2.13.0



More information about the Intel-gfx mailing list