[Intel-gfx] [PATCH i-g-t 1/4] tests: improve pipe enumeration
Daniel Vetter
daniel at ffwll.ch
Mon Feb 23 15:47:11 PST 2015
On Wed, Feb 18, 2015 at 05:06:13PM +0000, Thomas Wood wrote:
> Signed-off-by: Thomas Wood <thomas.wood at intel.com>
> ---
> tests/kms_flip_event_leak.c | 2 +-
> tests/kms_plane.c | 2 +-
> tests/kms_universal_plane.c | 2 +-
> 3 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/tests/kms_flip_event_leak.c b/tests/kms_flip_event_leak.c
> index 8a5e6db..ea4ce4c 100644
> --- a/tests/kms_flip_event_leak.c
> +++ b/tests/kms_flip_event_leak.c
> @@ -119,7 +119,7 @@ igt_simple_main
>
> igt_display_init(&data.display, data.drm_fd);
>
> - for (pipe = 0; pipe < 3; pipe++) {
> + for_each_pipe(&data.display, pipe) {
> for_each_connected_output(&data.display, output) {
> if (test(&data, pipe, output))
> valid_tests++;
> diff --git a/tests/kms_plane.c b/tests/kms_plane.c
> index c94eac0..8a08f20 100644
> --- a/tests/kms_plane.c
> +++ b/tests/kms_plane.c
> @@ -399,7 +399,7 @@ igt_main
> igt_display_init(&data.display, data.drm_fd);
> }
>
> - for (int pipe = 0; pipe < 3; pipe++)
> + for (int pipe = 0; pipe < I915_MAX_PIPES; pipe++)
Should we maybe add a for_each_possible_pipe for this kind of stuff?
Just an idea, but should be quick to implement if we also add a new
semantic patch to lib/igt.cocci to match it.
-Daniel
> run_tests_for_pipe(&data, pipe);
>
> igt_fixture {
> diff --git a/tests/kms_universal_plane.c b/tests/kms_universal_plane.c
> index 04ff840..6a05584 100644
> --- a/tests/kms_universal_plane.c
> +++ b/tests/kms_universal_plane.c
> @@ -569,7 +569,7 @@ igt_main
> igt_require(data.display.has_universal_planes);
> }
>
> - for (int pipe = 0; pipe < 3; pipe++)
> + for (int pipe = 0; pipe < I915_MAX_PIPES; pipe++)
> run_tests_for_pipe(&data, pipe);
>
> igt_fixture {
> --
> 2.1.0
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
More information about the Intel-gfx
mailing list