All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alex Hung <alex.hung@amd.com>
To: Harry Wentland <harry.wentland@amd.com>,
	Kamil Konieczny <kamil.konieczny@linux.intel.com>,
	Jani Nikula <jani.nikula@intel.com>,
	igt-dev@lists.freedesktop.org,
	Aurabindo Pillai <aurabindo.pillai@amd.com>,
	Vitaly Prosyak <vitaly.prosyak@amd.com>
Subject: Re: [PATCH i-g-t 01/12] tests/amdgpu/amd_mode_switch: Prepare for returning NULL from igt_crtc_for_pipe()
Date: Wed, 18 Mar 2026 15:00:30 -0600	[thread overview]
Message-ID: <eeac17b5-242b-47db-a1ae-df641f6f644c@amd.com> (raw)
In-Reply-To: <475c8dc6-30b0-4013-93a8-6dcaf49cc163@amd.com>



On 3/18/26 14:01, Harry Wentland wrote:
> 
> 
> On 2026-03-18 14:01, Kamil Konieczny wrote:
>> Hi Jani,
>> On 2026-03-16 at 13:19:03 +0200, Jani Nikula wrote:
>>> After checking there are enough pipes, AMD should always have the
>>> CRTCs. Assert that the CRTC is valid.
>>>
>>> This prepares for returning NULL for invalid pipes from
>>> igt_crtc_for_pipe() by ensuring the test logic is sound.
>>>
>>> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
>>
>> +cc AMD devs
>> Cc: Aurabindo Pillai <aurabindo.pillai@amd.com>
>> Cc: Harry Wentland <harry.wentland@amd.com>
>> Cc: Vitaly Prosyak <vitaly.prosyak@amd.com>
>>
>>> ---
>>>   tests/amdgpu/amd_mode_switch.c | 2 ++
>>>   1 file changed, 2 insertions(+)
>>>
>>> diff --git a/tests/amdgpu/amd_mode_switch.c b/tests/amdgpu/amd_mode_switch.c
>>> index 4da07c412996..ffa2952bb5c2 100644
>>> --- a/tests/amdgpu/amd_mode_switch.c
>>> +++ b/tests/amdgpu/amd_mode_switch.c
>>> @@ -98,6 +98,8 @@ static void run_mode_switch_first_last(data_t *data, int num_pipes)
>>>   	for (j = 0; j < num_pipes; j++) {
>>>   		igt_crtc_t *crtc = igt_crtc_for_pipe(display, j);
>>>   
>>> +		igt_assert_f(crtc->valid, "There is no pipe %s\n", kmstest_pipe_name(j));
>>> +
> 
> Not sure I follow how this prepares for returning NULL
> from igt_crtc_for_pipe(). Wouldn't this do the opposite
> and hit a NULL pointer with crtc->valid if the function
> returns NULL?
> 
> Harry
> 


This patch may be no longer applicable because the for-loop is replaced 
by for_each_crtc(...) which already checks crtc->valid.

However, Harry's comment is still applicable to patch 2

>>>   		output = data->output[j];
>>>   		if (!igt_output_is_connected(output))
>>>   			continue;
>>> -- 
>>> 2.47.3
>>>
> 


  reply	other threads:[~2026-03-18 21:00 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-16 11:19 [PATCH i-g-t 00/12] Prepare for returning NULL from igt_crtc_for_pipe() Jani Nikula
2026-03-16 11:19 ` [PATCH i-g-t 01/12] tests/amdgpu/amd_mode_switch: " Jani Nikula
2026-03-18 18:01   ` Kamil Konieczny
2026-03-18 20:01     ` Harry Wentland
2026-03-18 21:00       ` Alex Hung [this message]
2026-03-19  8:36       ` Jani Nikula
2026-03-16 11:19 ` [PATCH i-g-t 02/12] tests/amdgpu/amd_multidisplay_modeset: " Jani Nikula
2026-03-18 18:03   ` Kamil Konieczny
2026-03-18 21:03     ` Alex Hung
2026-03-20 10:42       ` Jani Nikula
2026-03-16 11:19 ` [PATCH i-g-t 03/12] tests/intel/kms_cdclk: use igt_next_crtc() Jani Nikula
2026-03-16 11:19 ` [PATCH i-g-t 04/12] tests/intel/kms_joiner: Prepare for returning NULL from igt_crtc_for_pipe() Jani Nikula
2026-03-16 11:19 ` [PATCH i-g-t 05/12] tests/intel/kms_joiner_helper: " Jani Nikula
2026-03-16 11:19 ` [PATCH i-g-t 06/12] tests/intel/kms_pipe_b_c_ivb: " Jani Nikula
2026-03-16 11:19 ` [PATCH i-g-t 07/12] tests/intel/kms_pipe_stress: " Jani Nikula
2026-03-16 11:19 ` [PATCH i-g-t 08/12] tests/kms_bw: fix misleading indent Jani Nikula
2026-03-16 11:19 ` [PATCH i-g-t 09/12] tests/kms_bw: clarify what's going on with proper variable naming Jani Nikula
2026-03-16 11:19 ` [PATCH i-g-t 10/12] tests/kms_bw: avoid igt_crtc_for_pipe() and crtc->pipe usage Jani Nikula
2026-03-16 11:19 ` [PATCH i-g-t 11/12] tests/kms_explicit_fence: store igt_crtc_t* instead of pipe in data Jani Nikula
2026-03-16 11:19 ` [PATCH i-g-t 12/12] lib/kms: convert igt_crtc_for_pipe() into a proper function Jani Nikula
2026-03-16 14:54 ` [PATCH i-g-t 00/12] Prepare for returning NULL from igt_crtc_for_pipe() Ville Syrjälä
2026-03-17  7:50   ` Jani Nikula
2026-03-17  6:02 ` ✓ Xe.CI.BAT: success for " Patchwork
2026-03-17 11:45 ` ✗ i915.CI.BAT: failure " Patchwork
2026-03-18 11:06 ` ✗ Xe.CI.FULL: " Patchwork
2026-03-19 16:07 ` [PATCH i-g-t 00/12] " Ville Syrjälä

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=eeac17b5-242b-47db-a1ae-df641f6f644c@amd.com \
    --to=alex.hung@amd.com \
    --cc=aurabindo.pillai@amd.com \
    --cc=harry.wentland@amd.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=jani.nikula@intel.com \
    --cc=kamil.konieczny@linux.intel.com \
    --cc=vitaly.prosyak@amd.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.