diff options
author | Daniel Vetter <daniel.vetter@ffwll.ch> | 2017-08-14 11:32:05 +0200 |
---|---|---|
committer | Petri Latvala <petri.latvala@intel.com> | 2017-08-14 13:26:15 +0300 |
commit | 229d7d27e5a24fa8e4155ada48467b16db9486e0 (patch) | |
tree | b2a010a330758a159d21d52d70d8abd2641947e0 /lib/igt_kms.h | |
parent | 2459b80b8da75f78baa681d4a878492715dd71f9 (diff) |
lib/kms: Add for_each_pipe_static
for_each_pipe cannot be used for enumerating testcases, so provide
something that can.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: Petri Latvala <petri.latvala@intel.com>
Diffstat (limited to 'lib/igt_kms.h')
-rw-r--r-- | lib/igt_kms.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/igt_kms.h b/lib/igt_kms.h index 35428f3e..b28fe8c5 100644 --- a/lib/igt_kms.h +++ b/lib/igt_kms.h @@ -463,10 +463,26 @@ static inline bool igt_output_is_connected(igt_output_t *output) /** * for_each_pipe: + * @pipe: The pipe to iterate. + * + * This for loop iterates over all pipes supported by IGT libraries. + * + * This should be used to enumerate per-pipe subtests since it has no runtime + * depencies. + */ +#define for_each_pipe_static(pipe) \ + for (pipe = 0; pipe < IGT_MAX_PIPES; pipe++) + +/** + * for_each_pipe: * @display: a pointer to an #igt_display_t structure * @pipe: The pipe to iterate. * * This for loop iterates over all pipes. + * + * Note that this cannot be used to enumerate per-pipe subtest names since it + * depends upon runtime probing of the actual kms driver that is being tested. + * Used #for_each_pipe_static instead. */ #define for_each_pipe(display, pipe) \ for (pipe = 0; pipe < igt_display_get_n_pipes(display); pipe++) |