]> git.baikalelectronics.ru Git - kernel.git/commit
drm/format-helper: Add KUnit tests for drm_fb_xrgb8888_to_rgb332()
authorJosé Expósito <jose.exposito89@gmail.com>
Mon, 20 Jun 2022 16:06:39 +0000 (18:06 +0200)
committerJosé Expósito <jose.exposito89@gmail.com>
Mon, 27 Jun 2022 11:45:53 +0000 (13:45 +0200)
commit4beea18a1516733b4a42b33a945ce7cbdefdfb56
treef242ee187a37f07139d5bcb4cef4ead2c81004f2
parent531349318bfcd1b57148076bedda43dd1a46b7ea
drm/format-helper: Add KUnit tests for drm_fb_xrgb8888_to_rgb332()

Test the conversion from XRGB8888 to RGB332.

What is tested?

 - Different values for the X in XRGB8888 to make sure it is ignored
 - Different clip values: Single pixel and full and partial buffer
 - Well known colors: White, black, red, green, blue, magenta, yellow
   and cyan
 - Other colors: Randomly picked
 - Destination pitch

How to run the tests?

 $ ./tools/testing/kunit/kunit.py run --kunitconfig=drivers/gpu/drm/tests \
         --kconfig_add CONFIG_VIRTIO_UML=y \
         --kconfig_add CONFIG_UML_PCI_OVER_VIRTIO=y

Suggested-by: Javier Martinez Canillas <javierm@redhat.com>
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Reviewed-by: David Gow <davidgow@google.com>
Acked-by: Thomas Zimmermann <tzimmermann@suse.de>
Signed-off-by: José Expósito <jose.exposito89@gmail.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220620160640.3790-3-jose.exposito89@gmail.com
drivers/gpu/drm/Kconfig
drivers/gpu/drm/Makefile
drivers/gpu/drm/tests/.kunitconfig [new file with mode: 0644]
drivers/gpu/drm/tests/Makefile [new file with mode: 0644]
drivers/gpu/drm/tests/drm_format_helper_test.c [new file with mode: 0644]