[igt-dev] [PATCH i-g-t 2/4] tests/kms_rotation_crc: use DRM_FORMAT_MOD_LINEAR as default modifier

Kamil Konieczny kamil.konieczny at linux.intel.com
Mon May 22 13:40:00 UTC 2023


Hi Maíra,

On 2023-04-03 at 10:01:22 -0300, Maíra Canal wrote:
> If the rotation is 90 or 270 degrees, the function prepare_fbs() uses a
> i915-specific modifier, I915_FORMAT_MOD_Y_TILED. In order to make the
> function more generic, use a i915-specific modifier only if the device
> is i915. Otherwise, use the DRM_FORMAT_MOD_LINEAR modifier.
> 
> Signed-off-by: Maíra Canal <mcanal at igalia.com>
> ---
>  tests/kms_rotation_crc.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/tests/kms_rotation_crc.c b/tests/kms_rotation_crc.c
> index 0d7b3962..cf02306f 100644
> --- a/tests/kms_rotation_crc.c
> +++ b/tests/kms_rotation_crc.c
> @@ -296,7 +296,8 @@ static void prepare_fbs(data_t *data, igt_output_t *output,
>  	 * frame can fit in
>  	 */
>  	if (igt_rotation_90_or_270(data->rotation)) {
> -		modifier = data->override_modifier ?: I915_FORMAT_MOD_Y_TILED;
> +		if (is_i915_device(data->gfx_fd))
---------------------- ^
is_intel_device

Regards,
Kamil

> +			modifier = data->override_modifier ?: I915_FORMAT_MOD_Y_TILED;
>  
>  		igt_swap(w, h);
>  	}
> -- 
> 2.39.2
> 


More information about the igt-dev mailing list