[PATCH i-g-t v2] tests/kms_async_flips: Replace hard coded modifiers with async modifiers

Reddy Guddati, Santhosh santhosh.reddy.guddati at intel.com
Thu Jul 17 04:30:24 UTC 2025



On 17-07-2025 09:54, Murthy, Arun R wrote:
>> -----Original Message-----
>> From: Reddy Guddati, Santhosh <santhosh.reddy.guddati at intel.com>
>> Sent: Wednesday, July 16, 2025 9:43 PM
>> To: igt-dev at lists.freedesktop.org
>> Cc: B S, Karthik <karthik.b.s at intel.com>; Borah, Chaitanya Kumar
>> <chaitanya.kumar.borah at intel.com>; Murthy, Arun R
>> <arun.r.murthy at intel.com>; Reddy Guddati, Santhosh
>> <santhosh.reddy.guddati at intel.com>
>> Subject: [PATCH i-g-t v2] tests/kms_async_flips: Replace hard coded modifiers
>> with async modifiers
>>
>> Use the IN_FORMATS_ASYNC uAPI to get the list of async supported modifiers.
>> select the 2 unique modifiers from this list to test invalid async test, removing
>> the hard coded dependency across platforms.
>>
>> v2: Use first and last modifier from the async supported format list for invalid
>> subtest.
>>
>> closes: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/3768
>> Signed-off-by: Santhosh Reddy Guddati <santhosh.reddy.guddati at intel.com>
>> ---
>>   tests/kms_async_flips.c | 16 +++++++++-------
>>   1 file changed, 9 insertions(+), 7 deletions(-)
>>
>> diff --git a/tests/kms_async_flips.c b/tests/kms_async_flips.c index
>> ddac904ce..1d4684c51 100644
>> --- a/tests/kms_async_flips.c
>> +++ b/tests/kms_async_flips.c
>> @@ -598,6 +598,7 @@ static void test_invalid(data_t *data)
>>   	struct igt_fb fb[2];
>>   	drmModeModeInfo *mode;
>>   	int flags;
>> +	uint64_t mod1, mod2;
>>
>>   	igt_display_commit2(&data->display, data->display.is_atomic ?
>> COMMIT_ATOMIC : COMMIT_LEGACY);
>>
>> @@ -607,10 +608,16 @@ static void test_invalid(data_t *data)
>>
>>   	flags = DRM_MODE_PAGE_FLIP_ASYNC |
>> DRM_MODE_PAGE_FLIP_EVENT;
>>
>> +	mod1 = data->plane->async_modifiers[0];
>> +	mod2 =
>> +data->plane->async_modifiers[(data->plane->async_format_mod_count) -
>> +1];
> I think we need to check for IN_FORMATS_ASYNC and then assign. There are other vendors who are still not using this IN_FORMATS_ASYNC so for them data->plane->async_modifiers will be NULL. So in case on NULL use the existing static modifiers.

Currently the test is intel-specific and will not run on non-intel 
platforms.

igt_subtest_with_dynamic("invalid-async-flip") {
		test_init_ops(&data);
		/* TODO: support more vendors */
		igt_require(is_intel_device(data.drm_fd));

Thanks,
Santhosh>
> Thanks and Regards,
> Arun R Murthy
> --------------------
>> +
>> +	igt_info("using modifier1 %s and modifier2 %s\n",
>> +		 igt_fb_modifier_name(mod1), igt_fb_modifier_name(mod2));
>> +
>>   	igt_create_fb(data->drm_fd, width, height, DRM_FORMAT_XRGB8888,
>> -		      I915_FORMAT_MOD_X_TILED, &fb[0]);
>> +		      mod1, &fb[0]);
>>   	igt_create_fb(data->drm_fd, width, height, DRM_FORMAT_XRGB8888,
>> -		      I915_FORMAT_MOD_Y_TILED, &fb[1]);
>> +		      mod2, &fb[1]);
>>
>>   	igt_plane_set_fb(data->plane, &fb[0]);
>>   	igt_display_commit2(&data->display, data->display.is_atomic ?
>> COMMIT_ATOMIC : COMMIT_LEGACY); @@ -1113,11 +1120,6 @@ igt_main
>>   		test_init_ops(&data);
>>   		/* TODO: support more vendors */
>>   		igt_require(is_intel_device(data.drm_fd));
>> -		igt_require(igt_display_has_format_mod(&data.display,
>> DRM_FORMAT_XRGB8888,
>> -
>> I915_FORMAT_MOD_X_TILED));
>> -		igt_require(igt_display_has_format_mod(&data.display,
>> DRM_FORMAT_XRGB8888,
>> -
>> I915_FORMAT_MOD_Y_TILED));
>> -
>>   		run_test(&data, test_invalid);
>>   	}
>>
>> --
>> 2.34.1
> 



More information about the igt-dev mailing list