From 491dfd8a15b9e550863d46746353540826656f79 Mon Sep 17 00:00:00 2001 From: Lionel Landwerlin Date: Thu, 8 Aug 2019 17:55:43 +0300 Subject: [PATCH] isl: add pitch requirement for CCS display surface > 3840 Signed-off-by: Lionel Landwerlin Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=111306 --- src/intel/isl/isl.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/intel/isl/isl.c b/src/intel/isl/isl.c index 1b033cb6aac..bee13113c3c 100644 --- a/src/intel/isl/isl.c +++ b/src/intel/isl/isl.c @@ -1431,6 +1431,22 @@ isl_calc_row_pitch(const struct isl_device *dev, !pitch_in_range(row_pitch_B, stencil_pitch_bits)) return false; + /* WaLosslessCompressionSurfaceStride/#0531: + * + * "When the render compression is enabled with plane width greater than + * 3840 and horizontal panning (Start X Position in the PLANE_OFFSET + * register is not 0), the stride programmed in the PLANE_STRIDE register + * must be multiple of 4." + * + * i915 enforces this requirement regardless of PLANE_OFFSET so we must + * too. + */ + if (ISL_DEV_GEN(dev) == 9 && + /* (surf_info->usage & ISL_SURF_USAGE_DISPLAY_BIT) && */ + (surf_info->usage & ISL_SURF_USAGE_CCS_BIT) && + surf_info->width > 3840) + row_pitch_B *= 4; + done: *out_row_pitch_B = row_pitch_B; return true; -- 2.23.0.rc1