[Intel-gfx] [PATCH] drm/i915/gen9: Disable FBC on planes which have an unsupported config.

Gwan-gyeong Mun gwan-gyeong.mun at intel.com
Tue Jan 29 12:57:29 UTC 2019


Enabling FBC on a plane which has a combination of a 180-degree rotation
with having a Height that isn't divisible by 4 causes FIFO underrun,
so disable FBC on such a config.

Testcase: igt/kms_rotation_crc/multiplane-rotation-cropping-top
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105604

Signed-off-by: Gwan-gyeong Mun <gwan-gyeong.mun at intel.com>
---
 drivers/gpu/drm/i915/intel_fbc.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/drivers/gpu/drm/i915/intel_fbc.c b/drivers/gpu/drm/i915/intel_fbc.c
index ccd5e110a19c..de4b5781922c 100644
--- a/drivers/gpu/drm/i915/intel_fbc.c
+++ b/drivers/gpu/drm/i915/intel_fbc.c
@@ -793,6 +793,18 @@ static bool intel_fbc_can_activate(struct intel_crtc *crtc)
 		return false;
 	}
 
+	/*
+	 * Work around a problem on GEN9 HW, where enabling FBC on a plane
+	 * which has a combination of a 180-degree rotation with having a Height
+	 * that isn't divisible by 4 causes FIFO underrun.
+	 */
+	if (IS_GEN(dev_priv, 9) &&
+	    (cache->plane.rotation == DRM_MODE_ROTATE_180) &&
+	    (fbc->state_cache.plane.src_h & 3)) {
+		fbc->no_fbc_reason = "plane has a combination of a 180-degree rotation with a misaligned Height";
+		return false;
+	}
+
 	return true;
 }
 
-- 
2.20.1



More information about the Intel-gfx mailing list