[PATCH i-g-t v4 5/8] XE3: tests/intel/kms_draw_crc: fix x-tiled tests for case when there is no x-tile

Matt Roper matthew.d.roper at intel.com
Sat Dec 7 00:01:10 UTC 2024


On Fri, Dec 06, 2024 at 01:27:45PM -0800, Clint Taylor wrote:
> From: "Heikkila, Juha-pekka" <juha-pekka.heikkila at intel.com>
> 
> On Xe3 display no more support x-tile and will disable such framebuffers
> 
> v2: Optimize display_ver check (Sai Teja)
> 
> Signed-off-by: Heikkila, Juha-pekka <juha-pekka.heikkila at intel.com>
> Signed-off-by: Clint Taylor <Clinton.A.Taylor at intel.com>
> ---
>  tests/intel/kms_draw_crc.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/tests/intel/kms_draw_crc.c b/tests/intel/kms_draw_crc.c
> index e3d1c0ba9..8af0d475c 100644
> --- a/tests/intel/kms_draw_crc.c
> +++ b/tests/intel/kms_draw_crc.c
> @@ -243,8 +243,10 @@ static void fill_fb_subtest(void)
>  	get_fill_crc(DRM_FORMAT_MOD_LINEAR, &crc);
>  	igt_assert_crc_equal(&crc, &base_crc);
>  
> -	get_fill_crc(I915_FORMAT_MOD_X_TILED, &crc);
> -	igt_assert_crc_equal(&crc, &base_crc);
> +	if (intel_display_ver(intel_get_drm_devid(drm_fd)) < 30) {

Rather than hardcoding the behavior for certain IP versions it would
probably be better if we just trust the list of modifiers the kernel
reports supporting and make our decisions based on that.  I.e., use
igt_display_has_format_mod() to test whether X-tile is supported or not.
We probably should have done that for the Y/4-tile case farther down
too.


Matt

> +		get_fill_crc(I915_FORMAT_MOD_X_TILED, &crc);
> +		igt_assert_crc_equal(&crc, &base_crc);
> +	}
>  
>  	if (intel_display_ver(intel_get_drm_devid(drm_fd)) >= 9) {
>  		get_fill_crc(has_4tile ?
> -- 
> 2.25.1
> 

-- 
Matt Roper
Graphics Software Engineer
Linux GPU Platform Enablement
Intel Corporation


More information about the igt-dev mailing list