[igt-dev] [RFC v2 5/5] tests/kms_plane_scaling: Skip testing unsupported fp16 features

Ville Syrjälä ville.syrjala at linux.intel.com
Fri Apr 5 19:38:04 UTC 2019


On Tue, Mar 05, 2019 at 06:18:37PM -0800, Kevin Strasser wrote:
> Disallow Yf tiling and Y-tiled 90/270 rotation for fp16 on Intel hardware.
> 
> rfc2:
> - Move check into can_rotate (Maarten)
> - Use igt_plane_has_format_mod (Maarten)
> 
> Signed-off-by: Kevin Strasser <kevin.strasser at intel.com>
> ---
>  tests/kms_plane_scaling.c | 15 +++++++++++++--
>  1 file changed, 13 insertions(+), 2 deletions(-)
> 
> diff --git a/tests/kms_plane_scaling.c b/tests/kms_plane_scaling.c
> index 1015c80..29b28cb 100644
> --- a/tests/kms_plane_scaling.c
> +++ b/tests/kms_plane_scaling.c
> @@ -167,12 +167,19 @@ static const igt_rotation_t rotations[] = {
>  	IGT_ROTATION_270,
>  };
>  
> -static bool can_rotate(data_t *d, unsigned format)
> +static bool can_rotate(data_t *d, unsigned format, uint64_t tiling,
> +		       igt_rotation_t rot)
>  {
>  	if (format == DRM_FORMAT_C8 ||
>  	    (intel_gen(d->devid) < 11 && format == DRM_FORMAT_RGB565))
>  		return false;
>  
> +	// Y-tiled 90/270 rotation isn't supported for fp16 on Intel
> +	if (is_i915_device(d->drm_fd) && igt_format_is_fp16(format) &&
> +	    tiling == LOCAL_I915_FORMAT_MOD_Y_TILED &&

We can drop the Y tile check here. No way to do 90/270 rotation
w/o Y tiling anyway.

With that
Reviewed-by: Ville Syrjälä <ville.syrjala at linux.intel.com>

> +	    (rot == IGT_ROTATION_90 || rot == IGT_ROTATION_270))
> +		return false;
> +
>  	return true;
>  }
>  
> @@ -193,8 +200,9 @@ static void test_scaler_with_rotation_pipe(data_t *d, enum pipe pipe,
>  			igt_rotation_t rot = rotations[i];
>  			for (int j = 0; j < plane->drm_plane->count_formats; j++) {
>  				unsigned format = plane->drm_plane->formats[j];
> +
>  				if (igt_fb_supported_format(format) &&
> -				    can_rotate(d, format))
> +				    can_rotate(d, format, tiling, rot))
>  					check_scaling_pipe_plane_rot(d, plane, format,
>  								     tiling, pipe,
>  								     output, rot);
> @@ -227,6 +235,9 @@ static void test_scaler_with_pixel_format_pipe(data_t *d, enum pipe pipe, igt_ou
>  			for (int j = 0; j < plane->drm_plane->count_formats; j++) {
>  				uint32_t format = plane->drm_plane->formats[j];
>  
> +				if (!igt_plane_has_format_mod(plane, format, tiling))
> +					continue;
> +
>  				if (igt_fb_supported_format(format))
>  					check_scaling_pipe_plane_rot(d, plane,
>  								     format, tiling,
> -- 
> 2.7.4

-- 
Ville Syrjälä
Intel


More information about the igt-dev mailing list