Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
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 02/15] tests/drm_read: Use for_each_crtc*()
Date: Fri, 30 Jan 2026 15:39:18 +0200	[thread overview]
Message-ID: <a7d1c4e07b761b9ff2d5ff2f456053377433e996@intel.com> (raw)
In-Reply-To: <20260130105237.14481-3-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 tests/drm_read to use the crtc based iterators
> (as opposed to the old pipe based ones).
>
> This one was done manually due to coccinelle refusing
> to cooperate with me.
>
> I left the old 'pipe' variable around since its final value
> gets used in a bunch of places after the loop. I'll probably
> need further cleanup later, but this seems sufficient for now.
>
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

Reviewed-by: Jani Nikula <jani.nikula@intel.com>

> ---
>  tests/drm_read.c | 8 +++++---
>  1 file changed, 5 insertions(+), 3 deletions(-)
>
> diff --git a/tests/drm_read.c b/tests/drm_read.c
> index c44e207f7dd8..e745e98534bd 100644
> --- a/tests/drm_read.c
> +++ b/tests/drm_read.c
> @@ -280,6 +280,7 @@ int igt_main()
>  	igt_fixture() {
>  		struct sigaction alarm_action = {};
>  		igt_output_t *output;
> +		igt_crtc_t *crtc;
>  
>  		igt_assert_neq(sigaction(SIGALRM, NULL, &alarm_action), -1);
>  		alarm_action.sa_flags &= ~SA_RESTART;
> @@ -292,16 +293,17 @@ int igt_main()
>  		igt_display_require(&display, fd);
>  		igt_display_require_output(&display);
>  
> -		for_each_pipe_with_valid_output(&display, pipe, output) {
> +		for_each_crtc_with_valid_output(&display, crtc, output) {
>  			drmModeModeInfo *mode = igt_output_get_mode(output);
>  
>  			igt_create_pattern_fb(fd, mode->hdisplay, mode->vdisplay,
>  					      DRM_FORMAT_XRGB8888,
>  					      DRM_FORMAT_MOD_LINEAR, &fb);
>  
> -			igt_output_set_crtc(output,
> -				            igt_crtc_for_pipe(output->display, pipe));
> +			igt_output_set_crtc(output, crtc);
>  			igt_plane_set_fb(igt_output_get_plane_type(output, DRM_PLANE_TYPE_PRIMARY), &fb);
> +
> +			pipe = crtc->pipe;
>  			break;
>  		}

-- 
Jani Nikula, Intel

  reply	other threads:[~2026-01-30 13:39 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 [this message]
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
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=a7d1c4e07b761b9ff2d5ff2f456053377433e996@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox