Re: [PATCH i-g-t] tests/kms_plane: Optimize modifier check for unsupported platforms

Karthik B S
2026-02-18T03:57:47Z

On 2/17/2026 11:26 AM, Pranay Samala wrote:
> Optimize the modifier check by moving it outside the CRTC/Output loop.
> This avoids redundancy and ensures the test is cleanly skipped.
>
> Fixes: a4805b36cf23 ("tests/kms_plane: Skip unsupported modifiers")
> Signed-off-by: Pranay Samala <pranay.samala@intel.com>
Reviewed-by: Karthik B S <karthik.b.s@intel.com>
> ---
> tests/kms_plane.c | 18 +++++++-----------
> 1 file changed, 7 insertions(+), 11 deletions(-)
>
> diff --git a/tests/kms_plane.c b/tests/kms_plane.c
> index 362748cdb..f37b019d1 100644
> --- a/tests/kms_plane.c
> +++ b/tests/kms_plane.c
> @@ -1489,18 +1489,14 @@ static void run_test(data_t *data, void (*test)(data_t *, enum pipe))
> igt_crtc_t *crtc;
> int count = 0;
>
> + igt_skip_on_f(((data->flags & TEST_PIXEL_FORMAT) &&
> + !igt_display_has_format_mod(&data->display,
> + DRM_FORMAT_XBGR8888, data->mod)),
> + "Skipping: Modifier " IGT_MODIFIER_FMT
> + " is not supported on this platform\n",
> + IGT_MODIFIER_ARGS(data->mod));
> +
> for_each_crtc_with_single_output(&data->display, crtc, data->output) {
> - if ((data->flags & TEST_PIXEL_FORMAT) &&
> - !igt_display_has_format_mod(&data->display,
> - DRM_FORMAT_XBGR8888,
> - data->mod)) {
> - igt_info("Skipping: Modifier " IGT_MODIFIER_FMT
> - " is not supported on pipe %s, output %s\n",
> - IGT_MODIFIER_ARGS(data->mod),
> - kmstest_pipe_name(crtc->pipe),
> - igt_output_name(data->output));
> - continue;
> - }
>
> igt_display_reset(&data->display);
>