public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Jani Nikula <jani.nikula@intel.com>
Cc: igt-dev@lists.freedesktop.org
Subject: Re: [PATCH i-g-t 07/11] lib/igt_kms: use for_each_crtc() for iterating CRTCs
Date: Tue, 10 Feb 2026 19:39:21 +0200	[thread overview]
Message-ID: <aYttSeO152W8Z-kN@intel.com> (raw)
In-Reply-To: <ffbff2701a6e818380ac04b61d455d3a277f9a9f.1770736961.git.jani.nikula@intel.com>

On Tue, Feb 10, 2026 at 05:23:48PM +0200, Jani Nikula wrote:
> The loop still figures out the pipe mask, keep using pipe here. The main
> thing is not using the loop index as pipe, as that is subject to change
> in the future.
> 
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
> ---
>  lib/igt_kms.c | 8 +++-----
>  1 file changed, 3 insertions(+), 5 deletions(-)
> 
> diff --git a/lib/igt_kms.c b/lib/igt_kms.c
> index c4be889dc696..63fd8095c551 100644
> --- a/lib/igt_kms.c
> +++ b/lib/igt_kms.c
> @@ -3622,16 +3622,14 @@ igt_output_t **__igt_pipe_populate_outputs(igt_display_t *display, igt_output_t
>  {
>  	unsigned full_pipe_mask = 0, assigned_pipes = 0;
>  	igt_output_t *output;
> +	igt_crtc_t *crtc;
>  	int i, j;
>  
>  	memset(chosen_outputs, 0,
>  	       sizeof(*chosen_outputs) * igt_display_n_crtcs(display));
>  
> -	for (i = 0; i < igt_display_n_crtcs(display); i++) {
> -		igt_crtc_t *crtc = igt_crtc_for_pipe(display, i);
> -		if (crtc->valid)
> -			full_pipe_mask |= (1 << i);
> -	}
> +	for_each_crtc(display, crtc)
> +		full_pipe_mask |= crtc->pipe;

1 << crtc->pipe

>  
>  	/*
>  	 * Try to assign all outputs to the first available CRTC for
> -- 
> 2.47.3

-- 
Ville Syrjälä
Intel

  reply	other threads:[~2026-02-10 17:39 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-10 15:23 [PATCH i-g-t 00/11] igt pipe vs crtc_index cleanups Jani Nikula
2026-02-10 15:23 ` [PATCH i-g-t 01/11] lib/igt_kms: rename igt_crtc_t crtc_offset member to crtc_index Jani Nikula
2026-02-10 15:23 ` [PATCH i-g-t 02/11] lib/igt_kms: rename the rest of crtc_offset " Jani Nikula
2026-02-10 15:23 ` [PATCH i-g-t 03/11] lib/kms: rename struct kmstest_connector_config pipe member " Jani Nikula
2026-02-10 15:23 ` [PATCH i-g-t 04/11] lib/igt_kms: rename _kmstest_connector_config_find_encoder() pipe parameter " Jani Nikula
2026-02-10 15:23 ` [PATCH i-g-t 05/11] tests/kms_flip: switch to CRTC index terminology Jani Nikula
2026-02-10 15:23 ` [PATCH i-g-t 06/11] tests/testdisplay: " Jani Nikula
2026-02-10 15:23 ` [PATCH i-g-t 07/11] lib/igt_kms: use for_each_crtc() for iterating CRTCs Jani Nikula
2026-02-10 17:39   ` Ville Syrjälä [this message]
2026-02-11  9:10     ` Jani Nikula
2026-02-11  9:16   ` [PATCH i-g-t v2] " Jani Nikula
2026-02-11 13:32     ` Ville Syrjälä
2026-02-10 15:23 ` [PATCH i-g-t 08/11] lib/igt_kms: rename kmstest_get_vblank() param to crtc_index Jani Nikula
2026-02-10 15:23 ` [PATCH i-g-t 09/11] lib/igt_kms: remove __get_crtc_mask_for_pipe() Jani Nikula
2026-02-10 15:23 ` [PATCH i-g-t 10/11] lib/igt_kms: pass crtc to igt_crtc_init() Jani Nikula
2026-02-10 15:23 ` [PATCH i-g-t 11/11] lib/igt_kms: use for_each_crtc() for cleaning up CRTCs Jani Nikula
2026-02-10 17:46 ` [PATCH i-g-t 00/11] igt pipe vs crtc_index cleanups Ville Syrjälä
2026-02-12 11:27   ` Jani Nikula
2026-02-10 18:51 ` ✓ Xe.CI.BAT: success for " Patchwork
2026-02-10 18:59 ` ✗ i915.CI.BAT: failure " Patchwork
2026-02-11  0:52 ` ✗ Xe.CI.FULL: " Patchwork
2026-02-11 10:03 ` ✓ Xe.CI.BAT: success for igt pipe vs crtc_index cleanups (rev2) Patchwork
2026-02-11 10:29 ` ✓ i915.CI.BAT: " Patchwork
2026-02-11 11:36 ` ✗ Xe.CI.FULL: failure " Patchwork
2026-02-11 17:42 ` ✗ i915.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=aYttSeO152W8Z-kN@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=jani.nikula@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