public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@intel.com>
To: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
Cc: igt-dev@lists.freedesktop.org
Subject: Re: [PATCH i-g-t 00/12] Prepare for returning NULL from igt_crtc_for_pipe()
Date: Tue, 17 Mar 2026 09:50:38 +0200	[thread overview]
Message-ID: <a81b695d7c028a82b826bb8c12dd677a18d6cd5f@intel.com> (raw)
In-Reply-To: <abgZwkJhe3g3q2N5@intel.com>

On Mon, 16 Mar 2026, Ville Syrjälä <ville.syrjala@linux.intel.com> wrote:
> On Mon, Mar 16, 2026 at 01:19:02PM +0200, Jani Nikula wrote:
>> We want to return NULL for invalid pipes from igt_crtc_for_pipe(), so
>> that we don't need to have igt_crtc_t objects with crtc->valid == false
>> around.
>> 
>> The primary way to prepare for this is to avoid using
>> igt_crtc_for_pipe() altogether. We've done a *lot* of that already, and
>> continue to do so here.
>> 
>> For the remaining ones, start off by ensuring crtc->valid == true, one
>> way or other. This ensures the test logic is sane and actually operates
>> on valid CRTCs. Once this prep is done, we can actually return NULL from
>> igt_crtc_for_pipe(), and check for crtc != NULL instead of crtc->valid
>> == true.
>
> I was hoping to make igt_crtc_for_pipe() just skip if the CRTC
> doesn't exist. But maybe there are still too many places that
> assume they can ask for any pipe and not skip?

At the very least the joiner logic has to gracefully check if a pipe
exists or not, without impacting test execution status.

The alternative would be to have igt_crtc_for_pipe() skip, but introduce
igt_pipe_exists() or somesuch for the check. That might lead to some
places requiring both, though.

Partially I'm also interested in the test results here; are there tests
that have been using invalid CRTCs...


BR,
Jani.


>
>> 
>> BR,
>> Jani.
>> 
>> 
>> Jani Nikula (12):
>>   tests/amdgpu/amd_mode_switch: Prepare for returning NULL from
>>     igt_crtc_for_pipe()
>>   tests/amdgpu/amd_multidisplay_modeset: Prepare for returning NULL from
>>     igt_crtc_for_pipe()
>>   tests/intel/kms_cdclk: use igt_next_crtc()
>>   tests/intel/kms_joiner: Prepare for returning NULL from
>>     igt_crtc_for_pipe()
>>   tests/intel/kms_joiner_helper: Prepare for returning NULL from
>>     igt_crtc_for_pipe()
>>   tests/intel/kms_pipe_b_c_ivb: Prepare for returning NULL from
>>     igt_crtc_for_pipe()
>>   tests/intel/kms_pipe_stress: Prepare for returning NULL from
>>     igt_crtc_for_pipe()
>>   tests/kms_bw: fix misleading indent
>>   tests/kms_bw: clarify what's going on with proper variable naming
>>   tests/kms_bw: avoid igt_crtc_for_pipe() and crtc->pipe usage
>>   tests/kms_explicit_fence: store igt_crtc_t* instead of pipe in data
>>   lib/kms: convert igt_crtc_for_pipe() into a proper function
>> 
>>  lib/igt_kms.c                           |  8 +++
>>  lib/igt_kms.h                           |  8 +--
>>  tests/amdgpu/amd_mode_switch.c          |  2 +
>>  tests/amdgpu/amd_multidisplay_modeset.c |  2 +
>>  tests/intel/kms_cdclk.c                 | 10 ++--
>>  tests/intel/kms_joiner.c                | 66 ++++++++++++++++++-------
>>  tests/intel/kms_joiner_helper.c         | 16 +++---
>>  tests/intel/kms_pipe_b_c_ivb.c          | 28 +++++++----
>>  tests/intel/kms_pipe_stress.c           |  4 ++
>>  tests/kms_bw.c                          | 48 +++++++++---------
>>  tests/kms_explicit_fence.c              | 14 +++---
>>  11 files changed, 131 insertions(+), 75 deletions(-)
>> 
>> -- 
>> 2.47.3

-- 
Jani Nikula, Intel

  reply	other threads:[~2026-03-17  7:50 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
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 [this message]
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=a81b695d7c028a82b826bb8c12dd677a18d6cd5f@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