[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <h4t3rsxz6yez5fosi6lyvob5mbngkjb7ad5e4euddhokcjimn6@dif2qzr2xjhc>
Date: Thu, 23 May 2024 12:18:18 +0300
From: Dmitry Baryshkov <dmitry.baryshkov@...aro.org>
To: Maxime Ripard <mripard@...nel.org>
Cc: Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>,
Thomas Zimmermann <tzimmermann@...e.de>, David Airlie <airlied@...il.com>,
Daniel Vetter <daniel@...ll.ch>, Jonathan Corbet <corbet@....net>,
Sandy Huang <hjc@...k-chips.com>, Heiko Stübner <heiko@...ech.de>,
Chen-Yu Tsai <wens@...e.org>, Jernej Skrabec <jernej.skrabec@...il.com>,
Samuel Holland <samuel@...lland.org>, Andy Yan <andy.yan@...k-chips.com>,
Hans Verkuil <hverkuil@...all.nl>, Sebastian Wick <sebastian.wick@...hat.com>,
Ville Syrjälä <ville.syrjala@...ux.intel.com>, dri-devel@...ts.freedesktop.org,
linux-arm-kernel@...ts.infradead.org, linux-doc@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-media@...r.kernel.org, linux-rockchip@...ts.infradead.org, linux-sunxi@...ts.linux.dev,
Dave Stevenson <dave.stevenson@...pberrypi.com>
Subject: Re: [PATCH v14 08/28] drm/tests: Add output formats tests
On Tue, May 21, 2024 at 12:13:41PM +0200, Maxime Ripard wrote:
> Now that we track the HDMI output format as part of the connector state,
> let's add a few tests to make sure it works as expected.
>
> Reviewed-by: Dave Stevenson <dave.stevenson@...pberrypi.com>
> Signed-off-by: Maxime Ripard <mripard@...nel.org>
> ---
> drivers/gpu/drm/tests/drm_connector_test.c | 99 +++++++++++++++++++++-
> drivers/gpu/drm/tests/drm_hdmi_state_helper_test.c | 32 +++++++
> 2 files changed, 130 insertions(+), 1 deletion(-)
>
> +
> +KUNIT_ARRAY_PARAM(drm_hdmi_connector_get_output_format_name_valid,
> + drm_hdmi_connector_get_output_format_name_valid_tests,
> + drm_hdmi_connector_get_output_format_name_valid_desc);
> +
> +static void drm_test_drm_hdmi_connector_get_output_format_name_invalid(struct kunit *test)
> +{
> + KUNIT_EXPECT_NULL(test, drm_hdmi_connector_get_output_format_name(4));
Nit: it might be better to use a bigger value here. It's easier to miss
this if other formats get added for whatever reason.
Nevertheless:
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@...aro.org>
> +};
> +
> +static struct kunit_case drm_hdmi_connector_get_output_format_name_tests[] = {
> + KUNIT_CASE_PARAM(drm_test_drm_hdmi_connector_get_output_format_name,
> + drm_hdmi_connector_get_output_format_name_valid_gen_params),
> + KUNIT_CASE(drm_test_drm_hdmi_connector_get_output_format_name_invalid),
> + { }
> +};
> +
--
With best wishes
Dmitry
Powered by blists - more mailing lists