public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@intel.com>
To: igt-dev@lists.freedesktop.org
Cc: jani.nikula@intel.com,
	"Aurabindo Pillai" <aurabindo.pillai@amd.com>,
	"Harry Wentland" <harry.wentland@amd.com>,
	"Vitaly Prosyak" <vitaly.prosyak@amd.com>,
	"Alex Hung" <alex.hung@amd.com>,
	"Ville Syrjälä" <ville.syrjala@linux.intel.com>
Subject: [PATCH i-g-t v2 01/11] tests/amdgpu/amd_multidisplay_modeset: Prepare for returning NULL from igt_crtc_for_pipe()
Date: Fri, 20 Mar 2026 12:39:21 +0200	[thread overview]
Message-ID: <28eded249f6309cc7fc82425007ecd414996b5d2.1774002591.git.jani.nikula@intel.com> (raw)
In-Reply-To: <cover.1774002591.git.jani.nikula@intel.com>

AMD should always have enough CRTCs for the test. Assert this is the
case by checking the CRTC returned from igt_crtc_for_pipe() is valid.

This prepares for returning NULL for invalid pipes from
igt_crtc_for_pipe() by ensuring the test logic is sound. The follow-up
can change the check from crtc->valid to crtc != NULL with no functional
change here.

Cc: Aurabindo Pillai <aurabindo.pillai@amd.com>
Cc: Harry Wentland <harry.wentland@amd.com>
Cc: Vitaly Prosyak <vitaly.prosyak@amd.com>
Cc: Alex Hung <alex.hung@amd.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
 tests/amdgpu/amd_multidisplay_modeset.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/tests/amdgpu/amd_multidisplay_modeset.c b/tests/amdgpu/amd_multidisplay_modeset.c
index 40d1e5d7f42b..ebcfea8ee35f 100644
--- a/tests/amdgpu/amd_multidisplay_modeset.c
+++ b/tests/amdgpu/amd_multidisplay_modeset.c
@@ -327,6 +327,8 @@ static void multiple_display_test(struct data_t *data, enum sub_test test_mode)
 
 			crtc = igt_crtc_for_pipe(display, j);
 
+			igt_assert_f(crtc->valid, "There is no pipe %s\n", kmstest_pipe_name(j));
+
 			igt_create_pattern_fb(data->fd, kmode->hdisplay,
 					kmode->vdisplay, DRM_FORMAT_XRGB8888,
 					0, (buf + j));
-- 
2.47.3


  reply	other threads:[~2026-03-20 10:39 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-20 10:39 [PATCH i-g-t v2 00/11] Prepare for returning NULL from igt_crtc_for_pipe() Jani Nikula
2026-03-20 10:39 ` Jani Nikula [this message]
2026-03-20 10:39 ` [PATCH i-g-t v2 02/11] tests/intel/kms_cdclk: use igt_next_crtc() Jani Nikula
2026-03-20 10:39 ` [PATCH i-g-t v2 03/11] tests/intel/kms_joiner: Prepare for returning NULL from igt_crtc_for_pipe() Jani Nikula
2026-03-20 10:39 ` [PATCH i-g-t v2 04/11] tests/intel/kms_joiner_helper: " Jani Nikula
2026-03-20 10:39 ` [PATCH i-g-t v2 05/11] tests/intel/kms_pipe_b_c_ivb: " Jani Nikula
2026-03-20 10:39 ` [PATCH i-g-t v2 06/11] tests/intel/kms_pipe_stress: " Jani Nikula
2026-03-20 10:39 ` [PATCH i-g-t v2 07/11] tests/kms_bw: fix misleading indent Jani Nikula
2026-03-20 10:39 ` [PATCH i-g-t v2 08/11] tests/kms_bw: clarify what's going on with proper variable naming Jani Nikula
2026-03-20 10:39 ` [PATCH i-g-t v2 09/11] tests/kms_bw: avoid igt_crtc_for_pipe() and crtc->pipe usage Jani Nikula
2026-03-20 10:39 ` [PATCH i-g-t v2 10/11] tests/kms_explicit_fence: store igt_crtc_t* instead of pipe in data Jani Nikula
2026-03-20 10:39 ` [PATCH i-g-t v2 11/11] lib/kms: convert igt_crtc_for_pipe() into a proper function Jani Nikula
2026-03-20 14:24 ` ✓ Xe.CI.BAT: success for Prepare for returning NULL from igt_crtc_for_pipe() (rev2) Patchwork
2026-03-20 14:38 ` ✗ i915.CI.BAT: failure " Patchwork
2026-03-20 15:17   ` Jani Nikula
2026-03-23 10:16     ` Ravali, JupallyX
2026-03-21 14:20 ` ✗ Xe.CI.FULL: " Patchwork
2026-03-23  9:54 ` ✓ i915.CI.BAT: success " Patchwork
2026-03-23 14:00 ` ✓ 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=28eded249f6309cc7fc82425007ecd414996b5d2.1774002591.git.jani.nikula@intel.com \
    --to=jani.nikula@intel.com \
    --cc=alex.hung@amd.com \
    --cc=aurabindo.pillai@amd.com \
    --cc=harry.wentland@amd.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=ville.syrjala@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox