[igt-dev] [PATCH i-g-t v5 1/2] tests/kms_async_flips: Convert tests to dynamic

André Almeida andrealmeid at igalia.com
Mon May 30 19:27:10 UTC 2022


Hi Karthik,

Às 03:29 de 30/05/22, Karthik B S escreveu:

[...]

>  
>  		igt_describe("Wait for page flip events in between successive asynchronous flips");
> -		igt_subtest("async-flip-with-page-flip-events")
> -			test_async_flip(&data, false);
> +		igt_subtest_with_dynamic("async-flip-with-page-flip-events") {
> +			for_each_pipe(&data.display, pipe) {
> +				for_each_valid_output_on_pipe(&data.display, pipe, output) {
> +					igt_dynamic_f("pipe-%s-%s", kmstest_pipe_name(pipe), output->name) {
> +						data.output = output;
> +						data.pipe = pipe;
> +						test_async_flip(&data, false);
> +					}
> +
> +					if (!data.extended)
> +						break;
> +				}
> +			}
> +		}
>  
>  		igt_describe("Alternate between sync and async flips");
> -		igt_subtest("alternate-sync-async-flip")
> -			test_async_flip(&data, true);
> +		igt_subtest_with_dynamic("alternate-sync-async-flip") {
> +			for_each_pipe(&data.display, pipe) {
> +				for_each_valid_output_on_pipe(&data.display, pipe, output) {
> +					igt_dynamic_f("pipe-%s-%s", kmstest_pipe_name(pipe), output->name) {
> +						data.output = output;
> +						data.pipe = pipe;
> +						test_async_flip(&data, true);
> +					}
> +
> +					if (!data.extended)
> +						break;
> +				}
> +			}
> +		}
>  
>  		igt_describe("Verify that the async flip timestamp does not coincide with either previous or next vblank");
> -		igt_subtest("test-time-stamp")
> -			test_timestamp(&data);
> +		igt_subtest_with_dynamic("test-time-stamp") {
> +			for_each_pipe(&data.display, pipe) {
> +				for_each_valid_output_on_pipe(&data.display, pipe, output) {
> +					igt_dynamic_f("pipe-%s-%s", kmstest_pipe_name(pipe), output->name) {
> +						data.output = output;
> +						data.pipe = pipe;
> +						test_timestamp(&data);
> +					}
> +
> +					if (!data.extended)
> +						break;
> +				}
> +			}
> +		}
>  
>  		igt_describe("Verify that the DRM_IOCTL_MODE_CURSOR passes after async flip");
> -		igt_subtest("test-cursor")
> -			test_cursor(&data);
> +		igt_subtest_with_dynamic("test-cursor") {
> +			for_each_pipe(&data.display, pipe) {
> +				for_each_valid_output_on_pipe(&data.display, pipe, output) {
> +					igt_dynamic_f("pipe-%s-%s", kmstest_pipe_name(pipe), output->name) {
> +						data.output = output;
> +						data.pipe = pipe;
> +						test_cursor(&data);
> +					}
> +
> +					if (!data.extended)
> +						break;
> +				}
> +			}
> +		}
>  
>  		igt_describe("Negative case to verify if changes in fb are rejected from kernel as expected");
> -		igt_subtest("invalid-async-flip")
> -			test_invalid(&data);
> +		igt_subtest_with_dynamic("invalid-async-flip") {
> +			for_each_pipe(&data.display, pipe) {
> +				for_each_valid_output_on_pipe(&data.display, pipe, output) {
> +					igt_dynamic_f("pipe-%s-%s", kmstest_pipe_name(pipe), output->name) {
> +						data.output = output;
> +						data.pipe = pipe;
> +						test_invalid(&data);
> +					}
> +
> +					if (!data.extended)
> +						break;
> +				}
> +			}
> +		}
>  
>  		igt_describe("Use CRC to verify async flip scans out the correct framebuffer");
> -		igt_subtest("crc")
> -			test_crc(&data);
> +		igt_subtest_with_dynamic("crc") {
> +			for_each_pipe(&data.display, pipe) {
> +				for_each_valid_output_on_pipe(&data.display, pipe, output) {
> +					igt_dynamic_f("pipe-%s-%s", kmstest_pipe_name(pipe), output->name) {
> +						data.output = output;
> +						data.pipe = pipe;
> +						test_crc(&data);
> +					}
> +
> +					if (!data.extended)
> +						break;
> +				}
> +			}
> +		}
>  

I think this is too much code repetition, maybe we could have a helper
function here?


More information about the igt-dev mailing list