From: Jani Nikula <jani.nikula@intel.com>
To: Ville Syrjala <ville.syrjala@linux.intel.com>,
igt-dev@lists.freedesktop.org
Subject: Re: [PATCH i-g-t 08/15] lib/kms: Use for_each_crtc_with_single_output(), part 1
Date: Fri, 30 Jan 2026 16:16:41 +0200 [thread overview]
Message-ID: <a40a5df54628b7565ff82ee65e2ceca7b1ca8b8a@intel.com> (raw)
In-Reply-To: <20260130105237.14481-9-ville.syrjala@linux.intel.com>
On Fri, 30 Jan 2026, Ville Syrjala <ville.syrjala@linux.intel.com> wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
> Convert some uses of for_each_pipe_with_single_output()
> to for_each_crtc_with_single_output(). Take care of the
> cases where we (presumably) still have to keep some
> kind of 'data.pipe' thingy still up to date.
>
> Eventually we should probably replace 'data.pipe' with
> 'data.crtc' but I didn't want to go that far here.
>
> Done with cocci:
> #include "scripts/iterators.cocci"
>
> @change@
> iterator name for_each_pipe_with_single_output;
> iterator name for_each_crtc_with_single_output;
> typedef igt_crtc_t;
> identifier PIPE;
> expression DISPLAY, OUTPUT, X;
> @@
> - for_each_pipe_with_single_output(DISPLAY, X.PIPE, OUTPUT)
> + for_each_crtc_with_single_output(DISPLAY, crtc, OUTPUT)
> {
> + X.PIPE = crtc->pipe;
> <...
> (
> - igt_crtc_for_pipe(..., X.PIPE)
> + crtc
> |
> - kmstest_pipe_name(X.PIPE)
> + igt_crtc_name(crtc)
> |
> - X.PIPE
> + crtc->pipe
> )
> ...>
> }
>
> @depends on change@
> identifier FUNC;
> @@
> FUNC(...)
> {
> + igt_crtc_t *crtc;
> <+...
> for_each_crtc_with_single_output(...) { ... }
> ...+>
> }
>
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
> ---
> tests/kms_cursor_edge_walk.c | 14 +++++++++-----
> 1 file changed, 9 insertions(+), 5 deletions(-)
>
> diff --git a/tests/kms_cursor_edge_walk.c b/tests/kms_cursor_edge_walk.c
> index eaf4c59b8a19..86577fbc53d8 100644
> --- a/tests/kms_cursor_edge_walk.c
> +++ b/tests/kms_cursor_edge_walk.c
> @@ -344,6 +344,7 @@ static const char *help_str =
>
> int igt_main_args("", long_opts, help_str, opt_handler, &data)
> {
> + igt_crtc_t *crtc;
> struct {
> const char *name;
> unsigned flags;
> @@ -394,21 +395,24 @@ int igt_main_args("", long_opts, help_str, opt_handler, &data)
> data.curw, data.curh, tests[i].name);
> igt_subtest_with_dynamic_f("%dx%d-%s", data.curw,
> data.curh, tests[i].name) {
> - for_each_pipe_with_single_output(&data.display, data.pipe, data.output) {
> - if (!extended && data.pipe != active_pipes[0] &&
> - data.pipe != active_pipes[last_pipe])
> + for_each_crtc_with_single_output(&data.display,
> + crtc,
> + data.output) {
> + data.pipe = crtc->pipe;
> + if (!extended && crtc->pipe != active_pipes[0] &&
> + crtc->pipe != active_pipes[last_pipe])
> continue;
>
> igt_display_reset(&data.display);
> igt_output_set_crtc(data.output,
> - igt_crtc_for_pipe(data.output->display, data.pipe));
> + crtc);
> if (!intel_pipe_output_combo_valid(&data.display))
> continue;
>
> igt_output_set_crtc(data.output, NULL);
>
> igt_dynamic_f("pipe-%s-%s",
> - kmstest_pipe_name(data.pipe),
> + igt_crtc_name(crtc),
> data.output->name)
> test_crtc(&data, tests[i].flags);
> }
--
Jani Nikula, Intel
next prev parent reply other threads:[~2026-01-30 14:16 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-30 10:52 [PATCH i-g-t 00/15] lib/kms: Start introducing for_each_crtc*() Ville Syrjala
2026-01-30 10:52 ` [PATCH i-g-t 01/15] lib/kms: Introduce for_each_crtc*() Ville Syrjala
2026-01-30 13:38 ` Jani Nikula
2026-01-30 15:36 ` Ville Syrjälä
2026-02-02 11:10 ` Jani Nikula
2026-02-02 15:31 ` Ville Syrjälä
2026-01-30 10:52 ` [PATCH i-g-t 02/15] tests/drm_read: Use for_each_crtc*() Ville Syrjala
2026-01-30 13:39 ` Jani Nikula
2026-01-30 10:52 ` [PATCH i-g-t 03/15] tests/kms_plane_scaling: " Ville Syrjala
2026-01-30 12:03 ` Jani Nikula
2026-01-30 15:41 ` Ville Syrjälä
2026-02-02 11:04 ` Jani Nikula
2026-01-30 14:07 ` Jani Nikula
2026-01-30 10:52 ` [PATCH i-g-t 04/15] tests/kms_color: Convert to for_each_crtc*() Ville Syrjala
2026-01-30 14:08 ` Jani Nikula
2026-01-30 10:52 ` [PATCH i-g-t 05/15] tests/intel/kms_pm_dc: Use for_each_crtc*() Ville Syrjala
2026-01-30 14:10 ` Jani Nikula
2026-01-30 10:52 ` [PATCH i-g-t 06/15] tests/kms_rotation_crc: " Ville Syrjala
2026-01-30 14:11 ` Jani Nikula
2026-01-30 10:52 ` [PATCH i-g-t 07/15] lib/kms: Use for_each_crtc_with_single_output() and for_each_crtc() Ville Syrjala
2026-01-30 14:15 ` Jani Nikula
2026-01-30 10:52 ` [PATCH i-g-t 08/15] lib/kms: Use for_each_crtc_with_single_output(), part 1 Ville Syrjala
2026-01-30 14:16 ` Jani Nikula [this message]
2026-01-30 10:52 ` [PATCH i-g-t 09/15] lib/kms: Use for_each_crtc_with_single_output(), part 2 Ville Syrjala
2026-01-30 14:19 ` Jani Nikula
2026-01-30 10:52 ` [PATCH i-g-t 10/15] lib/kms: Use for_each_crtc_with_single_output(), part 3 Ville Syrjala
2026-01-30 14:22 ` Jani Nikula
2026-01-30 10:52 ` [PATCH i-g-t 11/15] lib/kms: Use for_each_crtc_with_valid_output(), part 1 Ville Syrjala
2026-01-30 14:24 ` Jani Nikula
2026-01-30 10:52 ` [PATCH i-g-t 12/15] lib/kms: Use for_each_crtc_with_valid_output(), part 2 Ville Syrjala
2026-01-30 14:26 ` Jani Nikula
2026-02-02 15:38 ` [PATCH i-g-t v2 " Ville Syrjala
2026-01-30 10:52 ` [PATCH i-g-t 13/15] lib/kms: Use for_each_crtc_with_valid_output(), part 3 Ville Syrjala
2026-01-30 14:27 ` Jani Nikula
2026-01-30 10:52 ` [PATCH i-g-t 14/15] lib/kms: Use for_each_crtc_with_valid_output(), part 4 Ville Syrjala
2026-01-30 14:30 ` Jani Nikula
2026-01-30 10:52 ` [PATCH i-g-t 15/15] lib/kms: Nuke for_each_pipe_with_*_output() Ville Syrjala
2026-01-30 14:35 ` Jani Nikula
2026-02-03 2:58 ` ✓ i915.CI.BAT: success for lib/kms: Start introducing for_each_crtc*() (rev2) Patchwork
2026-02-03 3:12 ` ✓ Xe.CI.BAT: " Patchwork
2026-02-03 13:48 ` ✗ i915.CI.Full: failure " Patchwork
2026-02-03 14:33 ` ✗ Xe.CI.FULL: " Patchwork
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=a40a5df54628b7565ff82ee65e2ceca7b1ca8b8a@intel.com \
--to=jani.nikula@intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=ville.syrjala@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.