public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
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 16/23] tests/kms_tiled_display: Use igt_crtc_t instead of enum pipe
Date: Tue, 24 Feb 2026 15:48:58 +0200	[thread overview]
Message-ID: <7a1d05a59def000ed81b3afbee68c1ff8fae1ef9@intel.com> (raw)
In-Reply-To: <20260221032003.30936-17-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_tiled_display from 'enum pipe' to 'igt_crtc_t'.
>
> The data.pipe member gets directly replaced with data.crtc.

Reviewed-by: Jani Nikula <jani.nikula@intel.com>


>
>  #include "scripts/iterators.cocci"
>
> @find_data@
> typedef igt_crtc_t;
> typedef igt_display_t;
> identifier PIPE;
> type T;
> @@
> T {
>   ...
> - enum pipe PIPE;
> + igt_crtc_t *crtc;
>   ...
> };
>
> @depends on find_data@
> identifier find_data.PIPE;
> identifier DISPLAY;
> find_data.T S;
> find_data.T *P;
> expression _PIPE;
> @@
> igt_display_t *DISPLAY = ...;
> <...
> (
> - S.PIPE = _PIPE;
> + S.crtc = igt_crtc_for_pipe(display, _PIPE);
> |
> - P->PIPE = _PIPE;
> + P->crtc = igt_crtc_for_pipe(display, _PIPE);
> )
> ...>
>
> @depends on find_data@
> identifier find_data.PIPE;
> identifier DISPLAY;
> find_data.T S;
> find_data.T *P;
> expression E;
> @@
> igt_display_t *DISPLAY = ...;
> <...
> (
> - S.PIPE = E
> + S.crtc = igt_crtc_for_pipe(DISPLAY, E)
> |
> - P->PIPE = E
> + P->crtc = igt_crtc_for_pipe(DISPLAY, E)
> )
> ...>
>
> @depends on find_data@
> identifier find_data.PIPE;
> find_data.T S;
> find_data.T *P;
> expression E;
> @@
> (
> - igt_crtc_for_pipe(..., S.PIPE)
> + S.crtc
> |
> - igt_crtc_for_pipe(..., P->PIPE)
> + P->crtc
> |
> - kmstest_pipe_name(S.PIPE)
> + igt_crtc_name(S.crtc)
> |
> - kmstest_pipe_name(P->PIPE)
> + igt_crtc_name(P->crtc)
> )
>
> @depends on find_data@
> find_data.T S;
> find_data.T *P;
> @@
> (
> - S.crtc = S.crtc;
> |
> - P->crtc = P->crtc;
> )
>
> @depends on find_data@
> identifier find_data.PIPE;
> find_data.T S;
> find_data.T *P;
> @@
> (
> - S.PIPE
> + S.crtc->pipe
> |
> - P->PIPE
> + P->crtc->pipe
> )
>
> @depends on find_data@
> find_data.T S;
> find_data.T *P;
> binary operator OP = { ==, != };
> @@
> (
> - S.crtc->pipe OP PIPE_NONE
> + S.crtc OP NULL
> |
> - P->crtc->pipe OP PIPE_NONE
> + P->crtc OP NULL
> )
>
> @@
> igt_crtc_t *CRTC;
> @@
> - igt_crtc_for_pipe(..., CRTC->pipe)
> + CRTC
>
> @@
> typedef igt_display_t;
> identifier DISPLAY;
> @@
> - igt_display_t *DISPLAY = ...;
> ... when != DISPLAY
>
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
>  tests/kms_tiled_display.c | 14 ++++++--------
>  1 file changed, 6 insertions(+), 8 deletions(-)
>
> diff --git a/tests/kms_tiled_display.c b/tests/kms_tiled_display.c
> index f587704eebe1..374ea0bf6a85 100644
> --- a/tests/kms_tiled_display.c
> +++ b/tests/kms_tiled_display.c
> @@ -65,7 +65,7 @@ IGT_TEST_DESCRIPTION("Test for genlocked CRTCs with tiled displays");
>  typedef struct {
>  	igt_output_t *output;
>  	igt_tile_info_t tile;
> -	enum pipe pipe;
> +	igt_crtc_t *crtc;
>  	drmModeConnectorPtr connector;
>  	bool got_page_flip;
>  } data_connector_t;
> @@ -213,7 +213,6 @@ static int mode_linetime_us(const drmModeModeInfo *mode)
>  
>  static void setup_mode(data_t *data)
>  {
> -	igt_display_t *display = &data->display;
>  	int count = 0, prev = 0, i = 0;
>  	bool pipe_in_use = false, found = false;
>  	igt_crtc_t *crtc;
> @@ -238,7 +237,7 @@ static void setup_mode(data_t *data)
>  
>  			if (count > 0) {
>  				for (prev = count - 1; prev >= 0; prev--) {
> -					if (crtc->pipe == conns[prev].pipe) {
> +					if (crtc->pipe == conns[prev].crtc->pipe) {
>  						pipe_in_use = true;
>  						break;
>  					}
> @@ -248,15 +247,15 @@ static void setup_mode(data_t *data)
>  			}
>  
>  			if (igt_pipe_connector_valid(crtc->pipe, output)) {
> -				conns[count].pipe = crtc->pipe;
> +				conns[count].crtc = crtc;
>  				conns[count].output = output;
>  
>  				igt_output_set_crtc(conns[count].output,
> -						    igt_crtc_for_pipe(display, conns[count].pipe));
> +						    conns[count].crtc);
>  				break;
>  			}
>  		}
> -		igt_require(conns[count].pipe != PIPE_NONE);
> +		igt_require(conns[count].crtc != NULL);
>  
>  		for (i = 0; i < conns[count].connector->count_modes; i++) {
>  			mode = &conns[count].connector->modes[i];
> @@ -326,11 +325,10 @@ static void setup_framebuffer(data_t *data)
>  
>  static data_connector_t *conn_for_crtc(data_t *data, unsigned int crtc_id)
>  {
> -	igt_display_t *display = &data->display;
>  	for (int i = 0; i < data->num_h_tiles; i++) {
>  		data_connector_t *conn = &data->conns[i];
>  
> -		if (igt_crtc_for_pipe(display, conn->pipe)->crtc_id == crtc_id)
> +		if (conn->crtc->crtc_id == crtc_id)
>  			return conn;
>  	}

-- 
Jani Nikula, Intel

  reply	other threads:[~2026-02-24 13:49 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
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 [this message]
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=7a1d05a59def000ed81b3afbee68c1ff8fae1ef9@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