[igt-dev] [PATCH i-g-t] tests/kms_ccs: Remove unnecessary defines

Mika Kahola mika.kahola at intel.com
Tue Feb 18 09:23:08 UTC 2020


We have defined different unit sizes for GEN12+ platforms. These
are not needed anymore so let's just get rid of these.

Signed-off-by: Mika Kahola <mika.kahola at intel.com>
---
 tests/kms_ccs.c | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)

diff --git a/tests/kms_ccs.c b/tests/kms_ccs.c
index 7130054a..86681a26 100644
--- a/tests/kms_ccs.c
+++ b/tests/kms_ccs.c
@@ -181,15 +181,9 @@ static void generate_fb(data_t *data, struct igt_fb *fb,
 	uint32_t format;
 	uint64_t modifier;
 	cairo_t *cr;
-	int unit;
 	int index;
 	int ret;
 
-	if (intel_gen(intel_get_drm_devid(data->drm_fd)) >= 12)
-		unit = 64;
-	else
-		unit = 128;
-
 	/* Use either compressed or Y-tiled to test. However, given the lack of
 	 * available bandwidth, we use linear for the primary plane when
 	 * testing sprites, since we cannot fit two CCS planes into the
@@ -218,13 +212,13 @@ static void generate_fb(data_t *data, struct igt_fb *fb,
 		if (fb_flags & FB_MISALIGN_AUX_STRIDE) {
 			igt_skip_on_f(width <= 1024,
 				      "FB already has the smallest possible stride\n");
-			f.pitches[index] -= (unit/2);
+			f.pitches[index] -= 64;
 		}
 
 		if (fb_flags & FB_SMALL_AUX_STRIDE) {
 			igt_skip_on_f(width <= 1024,
 				      "FB already has the smallest possible stride\n");
-			f.pitches[index] = ALIGN(f.pitches[1]/2, unit);
+			f.pitches[index] = ALIGN(f.pitches[1]/2, 128);
 		}
 
 		if (fb_flags & FB_ZERO_AUX_STRIDE)
-- 
2.17.1



More information about the igt-dev mailing list