From: Jani Nikula <jani.nikula@intel.com>
To: Ville Syrjala <ville.syrjala@linux.intel.com>,
igt-dev@lists.freedesktop.org
Subject: Re: [PATCH i-g-t v2 08/23] tests/kms_lease: Use igt_crtc_t instead of enum pipe
Date: Mon, 23 Feb 2026 13:48:33 +0200 [thread overview]
Message-ID: <a17eb7ae8eb2ffb95a94e6df8f96276f58d0eaef@intel.com> (raw)
In-Reply-To: <20260221032003.30936-9-ville.syrjala@linux.intel.com>
On Sat, 21 Feb 2026, Ville Syrjala <ville.syrjala@linux.intel.com> wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
> Convert kms_lease from 'enum pipe' to 'igt_crtc_t'.
>
> The lessor and lessee each have their own igt_display_t and
> igt_crtc_ts. Thus we have to track the igt_crtc_t in the lease_t
> structure instead of the previous approach of tracking the pipe
> in the shared data_t structure.
>
> The CRTC ID will be the same for both lessor and lessee, so
> we can use that to locate the appropriate igt_crtc_t. The
> CRTC ID is already being tracked in the data_t structure.
>
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
> ---
> tests/kms_lease.c | 22 ++++++++--------------
> 1 file changed, 8 insertions(+), 14 deletions(-)
>
> diff --git a/tests/kms_lease.c b/tests/kms_lease.c
> index 39f5e69440b4..045cd62de0d7 100644
> --- a/tests/kms_lease.c
> +++ b/tests/kms_lease.c
> @@ -126,6 +126,7 @@ typedef struct {
> uint32_t lessee_id;
> igt_display_t display;
> struct igt_fb primary_fb;
> + igt_crtc_t *crtc;
> igt_output_t *output;
> drmModeModeInfo *mode;
> } lease_t;
> @@ -133,7 +134,6 @@ typedef struct {
> typedef struct {
> lease_t lease;
> lease_t master;
> - enum pipe pipe;
> uint32_t crtc_id;
> uint32_t connector_id;
> uint32_t plane_id;
> @@ -152,8 +152,8 @@ static int prepare_crtc(data_t *data, bool is_master)
> drmModeModeInfo *mode;
> lease_t *lease = is_master ? &data->master : &data->lease;
> igt_display_t *display = &lease->display;
> + igt_crtc_t *crtc = igt_crtc_for_crtc_id(display, data->crtc_id);
> igt_output_t *output = connector_id_to_output(display, data->connector_id);
> - enum pipe pipe = igt_crtc_for_pipe(display, data->pipe)->pipe;
> igt_plane_t *primary;
> int ret;
>
> @@ -161,7 +161,7 @@ static int prepare_crtc(data_t *data, bool is_master)
> return -ENOENT;
>
> /* select the pipe we want to use */
> - igt_output_set_crtc(output, igt_crtc_for_pipe(display, pipe));
> + igt_output_set_crtc(output, crtc);
>
> /* create and set the primary plane fb */
> mode = igt_output_get_mode(output);
> @@ -179,8 +179,9 @@ static int prepare_crtc(data_t *data, bool is_master)
> if (ret)
> return ret;
>
> - igt_wait_for_vblank(igt_crtc_for_pipe(display, pipe));
> + igt_wait_for_vblank(crtc);
>
> + lease->crtc = crtc;
> lease->output = output;
> lease->mode = mode;
> return 0;
> @@ -308,8 +309,6 @@ static int paint_fb(int drm_fd, struct igt_fb *fb, const char *test_name,
>
> static void simple_lease(data_t *data)
> {
> - enum pipe pipe = data->pipe;
> -
> /* Create a valid lease */
> igt_assert_eq(make_lease(data), 0);
>
> @@ -321,7 +320,7 @@ static void simple_lease(data_t *data)
> /* Paint something attractive */
> paint_fb(data->lease.fd, &data->lease.primary_fb, "simple-lease",
> data->lease.mode->name, igt_output_name(data->lease.output),
> - kmstest_pipe_name(pipe));
> + igt_crtc_name(data->lease.crtc));
> igt_debug_wait_for_keypress("lease");
> cleanup_crtc(&data->lease,
> connector_id_to_output(&data->lease.display, data->connector_id));
> @@ -341,8 +340,6 @@ static void page_flip_implicit_plane(data_t *data)
> drmModePlaneRes *plane_resources;
> uint32_t wrong_plane_id = 0;
> int i;
> - igt_display_t *display;
> - enum pipe pipe = data->pipe;
>
> /* find a plane which isn't the primary one for us */
> plane_resources = drmModeGetPlaneResources(data->master.fd);
> @@ -374,9 +371,7 @@ static void page_flip_implicit_plane(data_t *data)
> data->master.primary_fb.fb_id,
> 0, NULL));
>
> - display = &data->master.display;
> -
> - igt_wait_for_vblank(igt_crtc_for_pipe(display, pipe));
> + igt_wait_for_vblank(data->master.crtc);
>
> do_or_die(drmModePageFlip(data->lease.fd, data->crtc_id,
> data->master.primary_fb.fb_id,
> @@ -386,7 +381,7 @@ static void page_flip_implicit_plane(data_t *data)
> object_ids[mcl.object_count++] = wrong_plane_id;
> do_or_die(create_lease(data->master.fd, &mcl, &data->lease.fd));
>
> - igt_wait_for_vblank(igt_crtc_for_pipe(display, pipe));
> + igt_wait_for_vblank(data->master.crtc);
>
> igt_assert_eq(drmModePageFlip(data->lease.fd, data->crtc_id,
> data->master.primary_fb.fb_id,
> @@ -1290,7 +1285,6 @@ int igt_main()
> igt_subtest_with_dynamic_f("%s", f->name) {
> for_each_crtc_with_valid_output(display, crtc,
> output) {
> - data.pipe = crtc->pipe;
> igt_display_reset(display);
>
> igt_output_set_crtc(output,
--
Jani Nikula, Intel
next prev parent reply other threads:[~2026-02-23 11:48 UTC|newest]
Thread overview: 64+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-21 3:19 [PATCH i-g-t v2 00/23] tests/kms: More igt_crtc_t conversions Ville Syrjala
2026-02-21 3:19 ` [PATCH i-g-t v2 01/23] tests/intel/kms_psr: Don't pass uninitialized 'pipe' to intel_fbc_supported_on_chipset() Ville Syrjala
2026-02-23 11:22 ` Jani Nikula
2026-02-24 7:28 ` Ville Syrjälä
2026-02-23 11:23 ` Jani Nikula
2026-02-23 12:01 ` Jani Nikula
2026-02-24 8:49 ` [PATCH i-g-t v3 " Ville Syrjala
2026-02-24 8:53 ` Jani Nikula
2026-02-21 3:19 ` [PATCH i-g-t v2 02/23] tests/intel/kms_psr2_sf: Don't pass zero initialized 'data.pipe' " Ville Syrjala
2026-02-24 8:51 ` [PATCH i-g-t v3 " Ville Syrjala
2026-02-24 8:56 ` Jani Nikula
2026-02-21 3:19 ` [PATCH i-g-t v2 03/23] tests/intel/kms_flip_scaled_crc: Remove unused 'enum pipe pipe' Ville Syrjala
2026-02-23 11:34 ` Jani Nikula
2026-02-21 3:19 ` [PATCH i-g-t v2 04/23] tests/kms_concurrent: Actually run the test over all connected crtcs Ville Syrjala
2026-02-23 3:09 ` Karthik B S
2026-02-21 3:19 ` [PATCH i-g-t v2 05/23] tests/amdgpu/amd_abm: Don't use uninitialized 'pipe' Ville Syrjala
2026-02-24 14:08 ` Jani Nikula
2026-02-25 9:18 ` Ville Syrjälä
2026-02-21 3:19 ` [PATCH i-g-t v2 06/23] tests/kms: Use 'enum pipe' over int' Ville Syrjala
2026-02-23 11:44 ` Jani Nikula
2026-02-21 3:19 ` [PATCH i-g-t v2 07/23] lib/kms: Add igt_crtc_for_crtc_id() Ville Syrjala
2026-02-23 11:46 ` Jani Nikula
2026-02-21 3:19 ` [PATCH i-g-t v2 08/23] tests/kms_lease: Use igt_crtc_t instead of enum pipe Ville Syrjala
2026-02-23 11:48 ` Jani Nikula [this message]
2026-02-21 3:19 ` [PATCH i-g-t v2 09/23] tests/kms_lease: Pass lease_t to prepare_crtc() Ville Syrjala
2026-02-23 11:49 ` Jani Nikula
2026-02-21 3:19 ` [PATCH i-g-t v2 10/23] tests/intel/kms_frontbuffer_tracking: Use igt_crtc_t instead of enum pipe Ville Syrjala
2026-02-23 11:52 ` Jani Nikula
2026-02-21 3:19 ` [PATCH i-g-t v2 11/23] tests/kms_plane_scaling: " Ville Syrjala
2026-02-23 14:06 ` Jani Nikula
2026-02-21 3:19 ` [PATCH i-g-t v2 12/23] tests/drm_read: " Ville Syrjala
2026-02-24 8:58 ` Jani Nikula
2026-02-21 3:19 ` [PATCH i-g-t v2 13/23] tests/intel/kms_psr2_sf: Convert pipes[] to crtcs[] Ville Syrjala
2026-02-24 9:09 ` Jani Nikula
2026-02-21 3:19 ` [PATCH i-g-t v2 14/23] tests/kms_vblank: Use igt_crtc_t instead of enum pipe Ville Syrjala
2026-02-24 13:43 ` Jani Nikula
2026-02-21 3:19 ` [PATCH i-g-t v2 15/23] tests/kms_plane_multiple: " Ville Syrjala
2026-02-24 13:48 ` Jani Nikula
2026-02-25 7:44 ` Ville Syrjälä
2026-02-21 3:19 ` [PATCH i-g-t v2 16/23] tests/kms_tiled_display: " Ville Syrjala
2026-02-24 13:48 ` Jani Nikula
2026-02-21 3:19 ` [PATCH i-g-t v2 17/23] tests/intel/kms_psr: " Ville Syrjala
2026-02-24 13:49 ` Jani Nikula
2026-02-21 3:19 ` [PATCH i-g-t v2 18/23] tests/kms_prime: " Ville Syrjala
2026-02-24 13:50 ` Jani Nikula
2026-02-21 3:19 ` [PATCH i-g-t v2 19/23] tests/chamelium: " Ville Syrjala
2026-02-24 13:51 ` Jani Nikula
2026-02-21 3:19 ` [PATCH i-g-t v2 20/23] tests/kms: Use igt_crtc_t instead of enum pipe, part 1 Ville Syrjala
2026-02-24 13:56 ` Jani Nikula
2026-02-21 3:20 ` [PATCH i-g-t v2 21/23] tests/kms: Use igt_crtc_t instead of enum pipe, part 2 Ville Syrjala
2026-02-24 13:58 ` Jani Nikula
2026-02-21 3:20 ` [PATCH i-g-t v2 22/23] tests/kms: Use igt_crtc_t instead of enum pipe, part 3 Ville Syrjala
2026-02-24 8:51 ` [PATCH i-g-t v3 " Ville Syrjala
2026-02-24 14:04 ` Jani Nikula
2026-02-21 3:20 ` [PATCH i-g-t v2 23/23] tests/kms: Use igt_crtc_t instead of enum pipe, part 4 Ville Syrjala
2026-02-24 14:06 ` Jani Nikula
2026-02-21 3:59 ` ✓ Xe.CI.BAT: success for tests/kms: More igt_crtc_t conversions (rev2) Patchwork
2026-02-21 4:13 ` ✓ i915.CI.BAT: " Patchwork
2026-02-21 16:12 ` ✗ i915.CI.Full: failure " Patchwork
2026-02-23 13:25 ` ✗ Xe.CI.FULL: " Patchwork
2026-02-24 12:43 ` ✓ Xe.CI.BAT: success for tests/kms: More igt_crtc_t conversions (rev5) Patchwork
2026-02-24 12:58 ` ✓ i915.CI.BAT: " Patchwork
2026-02-24 18:52 ` ✗ i915.CI.Full: failure " Patchwork
2026-02-24 22:57 ` ✓ Xe.CI.FULL: success " 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=a17eb7ae8eb2ffb95a94e6df8f96276f58d0eaef@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