Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@intel.com>
To: Kamil Konieczny <kamil.konieczny@linux.intel.com>
Cc: igt-dev@lists.freedesktop.org, ville.syrjala@linux.intel.com,
	Karthik B S <karthik.b.s@intel.com>,
	Swati Sharma <swati2.sharma@intel.com>
Subject: Re: [PATCH i-g-t 2/4] tests/intel/kms_joiner_helper: iterate CRTCs instead of pipes
Date: Thu, 03 Sep 2026 00:40:54 +0300	[thread overview]
Message-ID: <0b75f984893404cd108db3e21001242e7e107d64@intel.com> (raw)
In-Reply-To: <20260902144516.2zpativ7ii32zsdv@kamilkon-DESK.igk.intel.com>

On Wed, 02 Sep 2026, Kamil Konieczny <kamil.konieczny@linux.intel.com> wrote:
> Hi Jani,
> On 2026-09-01 at 11:46:38 +0300, Jani Nikula wrote:
>> Reduce the direct pipe usage.
>> 
>> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
>> ---
>>  tests/intel/kms_joiner_helper.c | 11 ++++++-----
>>  1 file changed, 6 insertions(+), 5 deletions(-)
>> 
>> diff --git a/tests/intel/kms_joiner_helper.c b/tests/intel/kms_joiner_helper.c
>> index da0ac7f624f3..5bacf6cb9e27 100644
>> --- a/tests/intel/kms_joiner_helper.c
>> +++ b/tests/intel/kms_joiner_helper.c
>> @@ -101,13 +101,14 @@ static enum pipe get_next_master_pipe(uint32_t pipe_mask)
>>   */
>>  void igt_set_all_master_pipes_for_platform(igt_display_t *display, uint32_t *master_pipes)
>>  {
>> -	enum pipe pipe;
>> +	igt_crtc_t *crtc;
>>  
>>  	*master_pipes = 0;
>> -	for (pipe = PIPE_A; pipe < IGT_MAX_PIPES - 1; pipe++) {
>> -		if (igt_crtc_for_pipe(display, pipe) && igt_crtc_for_pipe(display, pipe + 1)) {
>> -			*master_pipes |= BIT(pipe);
>> -			igt_info("Found master pipe %s\n", kmstest_pipe_name(pipe));
>> +
>> +	for_each_crtc(display, crtc) {
>> +		if (igt_crtc_for_pipe(display, crtc->pipe + 1)) {
>
> I am not sure here as this is not 1:1, original code has two
> conditions. +cc Swati and Karthik.

The original had igt_crtc_for_pipe(display, pipe) to ensure there's a
valid CRTC for that pipe, but for_each_crtc() iterates valid CRTCs
only. Only need to check pipe + 1.

BR,
Jani.

>
>
> Regards,
> Kamil
>
>> +			*master_pipes |= BIT(crtc->pipe);
>> +			igt_info("Found master pipe %s\n", igt_crtc_name(crtc));
>>  		}
>>  	}
>>  }
>> -- 
>> 2.47.3
>> 

-- 
Jani Nikula, Intel

  reply	other threads:[~2026-09-02 21:41 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-01  8:46 [PATCH i-g-t 0/4] igt: rename pipe to hardware_pipe Jani Nikula
2026-09-01  8:46 ` [PATCH i-g-t 1/4] tests/kms_chamelium_color_pipeline: prefer igt_crtc_name() over kmstest_pipe_name() Jani Nikula
2026-09-02 14:34   ` Kamil Konieczny
2026-09-01  8:46 ` [PATCH i-g-t 2/4] tests/intel/kms_joiner_helper: iterate CRTCs instead of pipes Jani Nikula
2026-09-02 14:45   ` Kamil Konieczny
2026-09-02 21:40     ` Jani Nikula [this message]
2026-09-03 11:31       ` Kamil Konieczny
2026-09-01  8:46 ` [PATCH i-g-t 3/4] lib/kms: rename enum pipe to hardware_pipe, crtc->pipe to crtc->hardware_pipe Jani Nikula
2026-09-02 17:33   ` Kamil Konieczny
2026-09-01  8:46 ` [PATCH i-g-t 4/4] lib/kms: use enum hardware_pipe for __intel_get_pipe_from_crtc_index() return type Jani Nikula
2026-09-03 11:39   ` Kamil Konieczny
2026-09-01 23:01 ` ✓ i915.CI.BAT: success for igt: rename pipe to hardware_pipe Patchwork
2026-09-02  7:15 ` ✓ Xe.CI.BAT: " Patchwork
2026-09-02 13:29 ` ✓ Xe.CI.FULL: " Patchwork
2026-09-02 14:21 ` ✗ i915.CI.Full: failure " Patchwork
2026-09-07  8:09 ` [PATCH i-g-t 0/4] " Jani Nikula

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=0b75f984893404cd108db3e21001242e7e107d64@intel.com \
    --to=jani.nikula@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=kamil.konieczny@linux.intel.com \
    --cc=karthik.b.s@intel.com \
    --cc=swati2.sharma@intel.com \
    --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