All of lore.kernel.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 06/15] tests/kms_rotation_crc: Use for_each_crtc*()
Date: Fri, 30 Jan 2026 16:11:14 +0200	[thread overview]
Message-ID: <88da86635bad54d7710f83cd87fb513cbcf70c2d@intel.com> (raw)
In-Reply-To: <20260130105237.14481-7-ville.syrjala@linux.intel.com>

On Fri, 30 Jan 2026, Ville Syrjala <ville.syrjala@linux.intel.com> wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
> Convert tests/kms_rotation_crc to use the new crtc based
> iteratros (over the old pipe based stuff).

*iterators

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

> The conversion was done manually due to coccinelle not
> wanting to cooperate with me for whatever random reason.
>
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
>  tests/kms_rotation_crc.c | 25 +++++++++++--------------
>  1 file changed, 11 insertions(+), 14 deletions(-)
>
> diff --git a/tests/kms_rotation_crc.c b/tests/kms_rotation_crc.c
> index abd87508045e..4ba6a19b5862 100644
> --- a/tests/kms_rotation_crc.c
> +++ b/tests/kms_rotation_crc.c
> @@ -587,7 +587,7 @@ static void test_plane_rotation(data_t *data, int plane_type, bool test_bad_form
>  	igt_display_t *display = &data->display;
>  	drmModeModeInfo *mode;
>  	igt_output_t *output;
> -	enum pipe pipe;
> +	igt_crtc_t *crtc;
>  	int pipe_count = 0, connected_outputs = 0;
>  	bool found = false;
>  
> @@ -603,14 +603,13 @@ static void test_plane_rotation(data_t *data, int plane_type, bool test_bad_form
>  	for_each_connected_output(&data->display, output)
>  		connected_outputs++;
>  
> -	for_each_pipe_with_valid_output(display, pipe, output) {
> +	for_each_crtc_with_valid_output(display, crtc, output) {
>  		igt_plane_t *plane;
>  		int i, j, c;
>  
>  		igt_display_reset(display);
>  
> -		igt_output_set_crtc(output,
> -				    igt_crtc_for_pipe(output->display, pipe));
> +		igt_output_set_crtc(output, crtc);
>  		if (!intel_pipe_output_combo_valid(display))
>  			continue;
>  
> @@ -648,13 +647,12 @@ static void test_plane_rotation(data_t *data, int plane_type, bool test_bad_form
>  			break;
>  		pipe_count++;
>  
> -		igt_output_set_crtc(output,
> -				    igt_crtc_for_pipe(output->display, pipe));
> +		igt_output_set_crtc(output, crtc);
>  
>  		plane = igt_output_get_plane_type(output, plane_type);
>  		igt_require(plane_rotation_requirements(data, plane));
>  
> -		prepare_crtc(data, output, pipe, plane, true);
> +		prepare_crtc(data, output, crtc->pipe, plane, true);
>  
>  		for (i = 0; i < num_rectangle_types; i++) {
>  			/* Unsupported on intel */
> @@ -686,13 +684,13 @@ static void test_plane_rotation(data_t *data, int plane_type, bool test_bad_form
>  					if (!test_format(data, &tested_formats, format))
>  						continue;
>  
> -					test_single_case(data, pipe, output, plane, i,
> +					test_single_case(data, crtc->pipe, output, plane, i,
>  							 format, test_bad_format);
>  				}
>  
>  				igt_vec_fini(&tested_formats);
>  			} else {
> -				test_single_case(data, pipe, output, plane, i,
> +				test_single_case(data, crtc->pipe, output, plane, i,
>  						 data->override_fmt, test_bad_format);
>  			}
>  		}
> @@ -1349,17 +1347,16 @@ int igt_main_args("", long_opts, help_str, opt_handler, &data)
>  	 */
>  	igt_describe("This test intends to check for fence leaks exhaustively");
>  	igt_subtest_f("exhaust-fences") {
> -		enum pipe pipe;
> +		igt_crtc_t *crtc;
>  		igt_output_t *output;
>  
>  		igt_require_intel(data.gfx_fd);
>  		igt_display_require_output(&data.display);
>  
> -		for_each_pipe_with_valid_output(&data.display, pipe, output) {
> -			igt_plane_t *primary = &igt_crtc_for_pipe(&data.display,
> -								  pipe)->planes[0];
> +		for_each_crtc_with_valid_output(&data.display, crtc, output) {
> +			igt_plane_t *primary = &crtc->planes[0];
>  
> -			test_plane_rotation_exhaust_fences(&data, pipe, output, primary);
> +			test_plane_rotation_exhaust_fences(&data, crtc->pipe, output, primary);
>  			break;
>  		}
>  	}

-- 
Jani Nikula, Intel

  reply	other threads:[~2026-01-30 14:11 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-30 10:52 [PATCH i-g-t 00/15] lib/kms: Start introducing for_each_crtc*() Ville Syrjala
2026-01-30 10:52 ` [PATCH i-g-t 01/15] lib/kms: Introduce for_each_crtc*() Ville Syrjala
2026-01-30 13:38   ` Jani Nikula
2026-01-30 15:36     ` Ville Syrjälä
2026-02-02 11:10       ` Jani Nikula
2026-02-02 15:31         ` Ville Syrjälä
2026-01-30 10:52 ` [PATCH i-g-t 02/15] tests/drm_read: Use for_each_crtc*() Ville Syrjala
2026-01-30 13:39   ` Jani Nikula
2026-01-30 10:52 ` [PATCH i-g-t 03/15] tests/kms_plane_scaling: " Ville Syrjala
2026-01-30 12:03   ` Jani Nikula
2026-01-30 15:41     ` Ville Syrjälä
2026-02-02 11:04       ` Jani Nikula
2026-01-30 14:07   ` Jani Nikula
2026-01-30 10:52 ` [PATCH i-g-t 04/15] tests/kms_color: Convert to for_each_crtc*() Ville Syrjala
2026-01-30 14:08   ` Jani Nikula
2026-01-30 10:52 ` [PATCH i-g-t 05/15] tests/intel/kms_pm_dc: Use for_each_crtc*() Ville Syrjala
2026-01-30 14:10   ` Jani Nikula
2026-01-30 10:52 ` [PATCH i-g-t 06/15] tests/kms_rotation_crc: " Ville Syrjala
2026-01-30 14:11   ` Jani Nikula [this message]
2026-01-30 10:52 ` [PATCH i-g-t 07/15] lib/kms: Use for_each_crtc_with_single_output() and for_each_crtc() Ville Syrjala
2026-01-30 14:15   ` Jani Nikula
2026-01-30 10:52 ` [PATCH i-g-t 08/15] lib/kms: Use for_each_crtc_with_single_output(), part 1 Ville Syrjala
2026-01-30 14:16   ` Jani Nikula
2026-01-30 10:52 ` [PATCH i-g-t 09/15] lib/kms: Use for_each_crtc_with_single_output(), part 2 Ville Syrjala
2026-01-30 14:19   ` Jani Nikula
2026-01-30 10:52 ` [PATCH i-g-t 10/15] lib/kms: Use for_each_crtc_with_single_output(), part 3 Ville Syrjala
2026-01-30 14:22   ` Jani Nikula
2026-01-30 10:52 ` [PATCH i-g-t 11/15] lib/kms: Use for_each_crtc_with_valid_output(), part 1 Ville Syrjala
2026-01-30 14:24   ` Jani Nikula
2026-01-30 10:52 ` [PATCH i-g-t 12/15] lib/kms: Use for_each_crtc_with_valid_output(), part 2 Ville Syrjala
2026-01-30 14:26   ` Jani Nikula
2026-02-02 15:38     ` [PATCH i-g-t v2 " Ville Syrjala
2026-01-30 10:52 ` [PATCH i-g-t 13/15] lib/kms: Use for_each_crtc_with_valid_output(), part 3 Ville Syrjala
2026-01-30 14:27   ` Jani Nikula
2026-01-30 10:52 ` [PATCH i-g-t 14/15] lib/kms: Use for_each_crtc_with_valid_output(), part 4 Ville Syrjala
2026-01-30 14:30   ` Jani Nikula
2026-01-30 10:52 ` [PATCH i-g-t 15/15] lib/kms: Nuke for_each_pipe_with_*_output() Ville Syrjala
2026-01-30 14:35   ` Jani Nikula
2026-02-03  2:58 ` ✓ i915.CI.BAT: success for lib/kms: Start introducing for_each_crtc*() (rev2) Patchwork
2026-02-03  3:12 ` ✓ Xe.CI.BAT: " Patchwork
2026-02-03 13:48 ` ✗ i915.CI.Full: failure " Patchwork
2026-02-03 14:33 ` ✗ Xe.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=88da86635bad54d7710f83cd87fb513cbcf70c2d@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 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.