mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "José Expósito" <jose.exposito89@gmail.com>
To: javierm@redhat.com
Cc: davidgow@google.com, dlatypov@google.com, tzimmermann@suse.de,
	mripard@kernel.org, daniel@ffwll.ch, airlied@linux.ie,
	maarten.lankhorst@linux.intel.com, jani.nikula@linux.intel.com,
	maira.canal@usp.br, isabbasso@riseup.net,
	magalilemes00@gmail.com, tales.aparecida@gmail.com,
	dri-devel@lists.freedesktop.org, kunit-dev@googlegroups.com,
	linux-kernel@vger.kernel.org,
	"José Expósito" <jose.exposito89@gmail.com>
Subject: [PATCH 1/4] drm/format-helper: Rename test cases to make them more generic
Date: Mon, 27 Jun 2022 18:11:29 +0200	[thread overview]
Message-ID: <20220627161132.33256-2-jose.exposito89@gmail.com> (raw)
In-Reply-To: <20220627161132.33256-1-jose.exposito89@gmail.com>

The tests available at the moment only check the conversion from
XRGB8888 to RGB332. However, more conversion will be tested in the
future.

In order to make the struct and functions present in the tests more
generic, rename xrgb8888_to_rgb332_* to convert_xrgb8888_*.

Signed-off-by: José Expósito <jose.exposito89@gmail.com>
---
 .../gpu/drm/tests/drm_format_helper_test.c    | 19 +++++++++----------
 1 file changed, 9 insertions(+), 10 deletions(-)

diff --git a/drivers/gpu/drm/tests/drm_format_helper_test.c b/drivers/gpu/drm/tests/drm_format_helper_test.c
index 98583bf56044..de8cf525109e 100644
--- a/drivers/gpu/drm/tests/drm_format_helper_test.c
+++ b/drivers/gpu/drm/tests/drm_format_helper_test.c
@@ -16,7 +16,7 @@
 
 #define TEST_BUF_SIZE 50
 
-struct xrgb8888_to_rgb332_case {
+struct convert_xrgb8888_case {
 	const char *name;
 	unsigned int pitch;
 	unsigned int dst_pitch;
@@ -25,7 +25,7 @@ struct xrgb8888_to_rgb332_case {
 	const u8 expected[4 * TEST_BUF_SIZE];
 };
 
-static struct xrgb8888_to_rgb332_case xrgb8888_to_rgb332_cases[] = {
+static struct convert_xrgb8888_case convert_xrgb8888_cases[] = {
 	{
 		.name = "single_pixel_source_buffer",
 		.pitch = 1 * 4,
@@ -111,18 +111,18 @@ static size_t conversion_buf_size(u32 dst_format, unsigned int dst_pitch,
 	return dst_pitch * drm_rect_height(clip);
 }
 
-static void xrgb8888_to_rgb332_case_desc(struct xrgb8888_to_rgb332_case *t,
-					 char *desc)
+static void convert_xrgb8888_case_desc(struct convert_xrgb8888_case *t,
+				       char *desc)
 {
 	strscpy(desc, t->name, KUNIT_PARAM_DESC_SIZE);
 }
 
-KUNIT_ARRAY_PARAM(xrgb8888_to_rgb332, xrgb8888_to_rgb332_cases,
-		  xrgb8888_to_rgb332_case_desc);
+KUNIT_ARRAY_PARAM(convert_xrgb8888, convert_xrgb8888_cases,
+		  convert_xrgb8888_case_desc);
 
-static void xrgb8888_to_rgb332_test(struct kunit *test)
+static void convert_xrgb8888_test(struct kunit *test)
 {
-	const struct xrgb8888_to_rgb332_case *params = test->param_value;
+	const struct convert_xrgb8888_case *params = test->param_value;
 	size_t dst_size;
 	__u8 *dst = NULL;
 
@@ -144,8 +144,7 @@ static void xrgb8888_to_rgb332_test(struct kunit *test)
 }
 
 static struct kunit_case drm_format_helper_test_cases[] = {
-	KUNIT_CASE_PARAM(xrgb8888_to_rgb332_test,
-			 xrgb8888_to_rgb332_gen_params),
+	KUNIT_CASE_PARAM(convert_xrgb8888_test, convert_xrgb8888_gen_params),
 	{}
 };
 
-- 
2.25.1


  reply	other threads:[~2022-06-27 16:13 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-27 16:11 [PATCH 0/4] KUnit tests for RGB565 conversion José Expósito
2022-06-27 16:11 ` José Expósito [this message]
2022-06-27 16:11 ` [PATCH 2/4] drm/format-helper: Transform tests to be agnostic of target format José Expósito
2022-06-27 16:11 ` [PATCH 3/4] drm/format-helper: Add support for conversion functions with swab José Expósito
2022-06-27 16:11 ` [PATCH 4/4] drm/format-helper: Add KUnit tests for drm_fb_xrgb8888_to_rgb565() José Expósito
2022-06-29  7:34   ` Thomas Zimmermann
2022-06-28 18:47 ` [PATCH 0/4] KUnit tests for RGB565 conversion Tales
2022-06-29  7:27 ` David Gow
2022-07-03 15:19   ` José Expósito
2022-06-29  7:37 ` Thomas Zimmermann

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=20220627161132.33256-2-jose.exposito89@gmail.com \
    --to=jose.exposito89@gmail.com \
    --cc=airlied@linux.ie \
    --cc=daniel@ffwll.ch \
    --cc=davidgow@google.com \
    --cc=dlatypov@google.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=isabbasso@riseup.net \
    --cc=jani.nikula@linux.intel.com \
    --cc=javierm@redhat.com \
    --cc=kunit-dev@googlegroups.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=magalilemes00@gmail.com \
    --cc=maira.canal@usp.br \
    --cc=mripard@kernel.org \
    --cc=tales.aparecida@gmail.com \
    --cc=tzimmermann@suse.de \
    /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

all inboxes | Powered by JetHome®