[igt-dev] [PATCH i-g-t 1/2] tests/i915_fb_tiling: Check if device supports tiling

Chris Wilson chris at chris-wilson.co.uk
Tue May 19 19:37:22 UTC 2020


Quoting Ashutosh Dixit (2020-05-19 20:13:45)
> From: Vanshidhar Konda <vanshidhar.r.konda at intel.com>
> 
> Skip this test if the platform does not support setting tiling for frame
> buffer object.

This skips if there are no fences, but the frame buffer may still be
tiled, and preferentially will be. You are not describing the intent of
the test, nor how this change impacts it, very well.
 
> Cc: Imre Deak <imre.deak at intel.com>
> Cc: Uma Shankar <uma.shankar at intel.com>
> Signed-off-by: Vanshidhar Konda <vanshidhar.r.konda at intel.com>
> Signed-off-by: Ashutosh Dixit <ashutosh.dixit at intel.com>
> ---
>  tests/i915/i915_fb_tiling.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/tests/i915/i915_fb_tiling.c b/tests/i915/i915_fb_tiling.c
> index 7d5c3f1fa..02b3f4c4b 100644
> --- a/tests/i915/i915_fb_tiling.c
> +++ b/tests/i915/i915_fb_tiling.c
> @@ -32,6 +32,8 @@ igt_simple_main
>         struct igt_fb fb;
>         int ret;
>  
> +       igt_require(gem_available_fences(drm_fd) > 0);
> +
>         igt_create_fb(drm_fd, 512, 512, DRM_FORMAT_XRGB8888,
>                       LOCAL_I915_FORMAT_MOD_X_TILED, &fb);

A better patch would be to require instead of assert in the first check,
since that is the essence of what the test entails.
-Chris


More information about the igt-dev mailing list