[PATCH v5 2/4] tests/kms_async_flips: Check for atomic async flip cap
Melissa Wen
mwen at igalia.com
Thu Apr 3 16:17:48 UTC 2025
On 03/04/2025 12:27, Melissa Wen wrote:
> On 04/01, André Almeida wrote:
>> If a driver doesn't support doing an async flip through the atomic uAPI,
>> the atomic tests fails. Instead of failing, create a function that
>> checks for this capability and skip the test if is unsupported.
>>
>> Signed-off-by: André Almeida <andrealmeid at igalia.com>
> With the previous patch accepted, this one is:
>
> Reviewed-by: Melissa Wen <mwen at igalia.com>
>
> Thanks
>
>> ---
>> tests/kms_async_flips.c | 12 ++++++++++++
>> 1 file changed, 12 insertions(+)
>>
>> diff --git a/tests/kms_async_flips.c b/tests/kms_async_flips.c
>> index da426f753..d2a1f60f9 100644
>> --- a/tests/kms_async_flips.c
>> +++ b/tests/kms_async_flips.c
>> @@ -207,6 +207,12 @@ static void require_monotonic_timestamp(int fd)
>> "Monotonic timestamps not supported\n");
>> }
>>
>> +static void require_atomic_async_cap(data_t *data)
>> +{
>> + igt_require_f(igt_has_drm_cap(data->drm_fd, DRM_CAP_ATOMIC_ASYNC_PAGE_FLIP),
>> + "Atomic flip async flip not supported\n");
Nitpick: "Atomic async flip not supported\n"
>> +}
>> +
>> static void test_init(data_t *data)
>> {
>> drmModeModeInfo *mode;
>> @@ -687,6 +693,9 @@ static void run_test(data_t *data, void (*test)(data_t *))
>> {
>> igt_display_t *display = &data->display;
>>
>> + if (data->atomic_path)
>> + require_atomic_async_cap(data);
>> +
>> for_each_pipe_with_valid_output(display, data->pipe, data->output) {
>> igt_display_reset(display);
>>
>> @@ -712,6 +721,9 @@ static void run_test(data_t *data, void (*test)(data_t *))
>>
>> static void run_test_with_modifiers(data_t *data, void (*test)(data_t *))
>> {
>> + if (data->atomic_path)
>> + require_atomic_async_cap(data);
>> +
>> for_each_pipe_with_valid_output(&data->display, data->pipe, data->output) {
>> test_init(data);
>>
>> --
>> 2.49.0
>>
More information about the igt-dev
mailing list