Re: [PATCH i-g-t 10/10] tests/kms_debugfs: use CRTC indexes instead of pipes for fb tracking

Ville Syrjälä
2026-03-10T10:08:16Z

On Mon, Mar 09, 2026 at 04:21:44PM +0200, Jani Nikula wrote:
> Store fbs in an array indexed by CRTC indexes rather than pipes, as
> pipes are irrelevant for the test.
>
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
> ---
> tests/kms_debugfs.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/tests/kms_debugfs.c b/tests/kms_debugfs.c
> index 2b0e9e6b1720..f398b54594a2 100644
> --- a/tests/kms_debugfs.c
> +++ b/tests/kms_debugfs.c
> @@ -58,12 +58,12 @@ static void igt_display_all_on(igt_display_t *display)
> mode->hdisplay, mode->vdisplay,
> DRM_FORMAT_XRGB8888,
> DRM_FORMAT_MOD_LINEAR,
> - &fb[crtc->pipe]);
> + &fb[crtc->crtc_index]);
>
> /* Set a valid fb as some debugfs like to
> * inspect it on a active pipe
> */
> - igt_plane_set_fb(primary, &fb[crtc->pipe]);
> + igt_plane_set_fb(primary, &fb[crtc->crtc_index]);

fb[] isn't even used after this. So we could just nuke the array
and have a singular 'fb' inside the loop. That's assuming we're
happy with the current "let's not bother with cleanup" approach.

> break;
> }
> }
> --
> 2.47.3

--
Ville Syrjälä
Intel