[igt-dev] [PATCH i-g-t] tests/kms_addfb_basic: Skip tiling subtests on device without hw tiling
Imre Deak
imre.deak at intel.com
Wed Sep 8 10:20:34 UTC 2021
On Tue, Sep 07, 2021 at 05:04:00PM -0700, Ashutosh Dixit wrote:
> From: Vanshidhar Konda <vanshidhar.r.konda at intel.com>
>
> Skip subtests that are testing interoperability of FB modifiers and
> hardware tiling if the device does not support HW tiling.
>
> v2: Don't skip basic-y-tiled-legacy even on platforms w/o fences (Imre)
>
> Cc: Imre Deak <imre.deak at intel.com>
> Signed-off-by: Vanshidhar Konda <vanshidhar.r.konda at intel.com>
> Signed-off-by: Ashutosh Dixit <ashutosh.dixit at intel.com>
Reviewed-by: Imre Deak <imre.deak at intel.com>
> ---
> tests/kms_addfb_basic.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/tests/kms_addfb_basic.c b/tests/kms_addfb_basic.c
> index 082f10ee9ee..0f641e7dd78 100644
> --- a/tests/kms_addfb_basic.c
> +++ b/tests/kms_addfb_basic.c
> @@ -138,6 +138,7 @@ static void invalid_tests(int fd)
> igt_describe("Check if addfb2 call works for clobbered modifier");
> igt_subtest("clobberred-modifier") {
> igt_require_intel(fd);
> + igt_require(gem_available_fences(fd) > 0);
> f.flags = 0;
> f.modifier[0] = 0;
> gem_set_tiling(fd, gem_bo, I915_TILING_X, 512*4);
> @@ -358,6 +359,7 @@ static void tiling_tests(int fd)
> f.pitches[0] = 1024*4;
> igt_describe("Check if addfb2 and rmfb call works for basic x-tiling test");
> igt_subtest("basic-x-tiled-legacy") {
> + igt_require(gem_available_fences(fd) > 0);
> f.handles[0] = tiled_x_bo;
>
> igt_assert(drmIoctl(fd, DRM_IOCTL_MODE_ADDFB2, &f) == 0);
> @@ -367,6 +369,7 @@ static void tiling_tests(int fd)
>
> igt_describe("Check if addfb2 call works for x and y tiling");
> igt_subtest("framebuffer-vs-set-tiling") {
> + igt_require(gem_available_fences(fd) > 0);
> f.handles[0] = gem_bo;
>
> gem_set_tiling(fd, gem_bo, I915_TILING_X, 1024*4);
> @@ -380,6 +383,7 @@ static void tiling_tests(int fd)
> igt_describe("Test that addfb2 call fails correctly for pitches mismatch");
> f.pitches[0] = 512*4;
> igt_subtest("tile-pitch-mismatch") {
> + igt_require(gem_available_fences(fd) > 0);
> f.handles[0] = tiled_x_bo;
>
> igt_assert(drmIoctl(fd, DRM_IOCTL_MODE_ADDFB2, &f) == -1 &&
> @@ -516,6 +520,7 @@ static void size_tests(int fd)
> igt_describe("Test that addfb2 call fails correctly with small buffer object after changing tile");
> igt_subtest("bo-too-small-due-to-tiling") {
> igt_require_intel(fd);
> + igt_require(gem_available_fences(fd) > 0);
> gem_set_tiling(fd, gem_bo_small, I915_TILING_X, 1024*4);
> igt_assert(drmIoctl(fd, DRM_IOCTL_MODE_ADDFB2, &f) == -1 &&
> errno == EINVAL);
> @@ -570,6 +575,7 @@ static void addfb25_tests(int fd)
> igt_subtest_group {
> igt_fixture {
> igt_require_intel(fd);
> + igt_require(gem_available_fences(fd) > 0);
> gem_set_tiling(fd, gem_bo, I915_TILING_X, 1024*4);
> igt_require_fb_modifiers(fd);
> }
> --
> 2.31.1
>
More information about the igt-dev
mailing list