From 9ef6769366222bc1c272336378d802737a5e9026 Mon Sep 17 00:00:00 2001 From: Ben Widawsky Date: Wed, 13 Nov 2013 13:28:17 -0800 Subject: [PATCH] gem_evict_*: Fix batch lengths, broken on gen8 integration Signed-off-by: Ben Widawsky --- tests/gem_evict_alignment.c | 4 +++- tests/gem_evict_everything.c | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/gem_evict_alignment.c b/tests/gem_evict_alignment.c index f3a17e4..15c4707 100644 --- a/tests/gem_evict_alignment.c +++ b/tests/gem_evict_alignment.c @@ -60,7 +60,9 @@ copy(int fd, uint32_t dst, uint32_t src, uint32_t *all_bo, int n_bo, int alignme batch[i++] = (XY_SRC_COPY_BLT_CMD | XY_SRC_COPY_BLT_WRITE_ALPHA | - XY_SRC_COPY_BLT_WRITE_RGB); + XY_SRC_COPY_BLT_WRITE_RGB | 6); + if (intel_gen(intel_get_drm_devid(fd)) >= 8) + batch[i - 1] += 2; batch[i++] = (3 << 24) | /* 32 bits */ (0xcc << 16) | /* copy ROP */ WIDTH*4; diff --git a/tests/gem_evict_everything.c b/tests/gem_evict_everything.c index 762aef1..41abef7 100644 --- a/tests/gem_evict_everything.c +++ b/tests/gem_evict_everything.c @@ -60,7 +60,9 @@ copy(int fd, uint32_t dst, uint32_t src, uint32_t *all_bo, int n_bo, int error) batch[i++] = (XY_SRC_COPY_BLT_CMD | XY_SRC_COPY_BLT_WRITE_ALPHA | - XY_SRC_COPY_BLT_WRITE_RGB); + XY_SRC_COPY_BLT_WRITE_RGB | 6); + if (intel_gen(intel_get_drm_devid(fd)) >= 8) + batch[i - 1] += 2; batch[i++] = (3 << 24) | /* 32 bits */ (0xcc << 16) | /* copy ROP */ WIDTH*4; -- 2.7.4