[igt-dev] [PATCH i-g-t v2 1/2] i915/gem_tiled_pread_*: Add check for FENCE based tiling support

Ayaz A Siddiqui
2020-02-03T07:22:10Z

These tests are verifying integrity of the tiled data read and write operation
on platforms which supports FENCE based tiling.

A check has been added to skip these tests if FENCES are not available
in platform.
Tests updated in this patch :
1. gem_tiled_pread_basic
2. gem_tiled_pread_pwrite

Signed-off-by: Ayaz A Siddiqui <ayaz.siddiqui@intel.com>
---
tests/i915/gem_tiled_pread_basic.c | 2 +-
tests/i915/gem_tiled_pread_pwrite.c | 1 +
2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/tests/i915/gem_tiled_pread_basic.c b/tests/i915/gem_tiled_pread_basic.c
index 1ac9eccd..7cb64410 100644
--- a/tests/i915/gem_tiled_pread_basic.c
+++ b/tests/i915/gem_tiled_pread_basic.c
@@ -124,7 +124,7 @@ igt_simple_main
uint32_t devid;

fd = drm_open_driver(DRIVER_INTEL);
-
+ igt_require(gem_available_fences(fd) > 0);
handle = create_bo(fd);
igt_require(gem_get_tiling(fd, handle, &tiling, &swizzle));

diff --git a/tests/i915/gem_tiled_pread_pwrite.c b/tests/i915/gem_tiled_pread_pwrite.c
index 0988a4e8..0bbb3a20 100644
--- a/tests/i915/gem_tiled_pread_pwrite.c
+++ b/tests/i915/gem_tiled_pread_pwrite.c
@@ -113,6 +113,7 @@ igt_simple_main
int fd;

fd = drm_open_driver(DRIVER_INTEL);
+ igt_require(gem_available_fences(fd) > 0);
count = SLOW_QUICK(intel_get_total_ram_mb() * 9 / 10, 8) ;

for (int i = 0; i < count/2; i++) {