<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/gpu/drm/tests/drm_format_helper_test.c, branch v6.2.2</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v6.2.2</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v6.2.2'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2022-10-27T08:40:14+00:00</updated>
<entry>
<title>kunit: Use KUNIT_EXPECT_MEMEQ macro</title>
<updated>2022-10-27T08:40:14+00:00</updated>
<author>
<name>Maíra Canal</name>
<email>mairacanal@riseup.net</email>
</author>
<published>2022-10-25T23:10:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=a52a5451f43bb76743c51dd46788008837243f29'/>
<id>urn:sha1:a52a5451f43bb76743c51dd46788008837243f29</id>
<content type='text'>
Use KUNIT_EXPECT_MEMEQ to compare memory blocks in replacement of the
KUNIT_EXPECT_EQ macro. Therefor, the statement

    KUNIT_EXPECT_EQ(test, memcmp(foo, bar, size), 0);

is replaced by:

    KUNIT_EXPECT_MEMEQ(test, foo, bar, size);

Signed-off-by: Maíra Canal &lt;mairacanal@riseup.net&gt;
Acked-by: Daniel Latypov &lt;dlatypov@google.com&gt;
Reviewed-by: David Gow &lt;davidgow@google.com&gt;
Signed-off-by: Shuah Khan &lt;skhan@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>drm: tests: Fix a buffer overflow in format_helper_test</title>
<updated>2022-10-20T07:56:05+00:00</updated>
<author>
<name>David Gow</name>
<email>davidgow@google.com</email>
</author>
<published>2022-10-19T07:32:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=7089003304c67658caead22f841840fc4a26b198'/>
<id>urn:sha1:7089003304c67658caead22f841840fc4a26b198</id>
<content type='text'>
The xrgb2101010 format conversion test (unlike for other formats) does
an endianness conversion on the results. However, it always converts
TEST_BUF_SIZE 32-bit integers, which results in reading from (and
writing to) more memory than in present in the result buffer. Instead,
use the buffer size, divided by sizeof(u32).

The issue could be reproduced with KASAN:
./tools/testing/kunit/kunit.py run --kunitconfig drivers/gpu/drm/tests \
	--kconfig_add CONFIG_KASAN=y --kconfig_add CONFIG_KASAN_VMALLOC=y \
	--kconfig_add CONFIG_KASAN_KUNIT_TEST=y \
	drm_format_helper_test.*xrgb2101010

Reported-by: Linux Kernel Functional Testing &lt;lkft@linaro.org&gt;
Fixes: 453114319699 ("drm/format-helper: Add KUnit tests for drm_fb_xrgb8888_to_xrgb2101010()")
Signed-off-by: David Gow &lt;davidgow@google.com&gt;
Reviewed-by: Maíra Canal &lt;mairacanal@riseup.net&gt;
Reviewed-by: Javier Martinez Canillas &lt;javierm@redhat.com&gt;
Reviewed-by: José Expósito &lt;jose.exposito89@gmail.com&gt;
Signed-off-by: Javier Martinez Canillas &lt;javierm@redhat.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20221019073239.3779180-1-davidgow@google.com
</content>
</entry>
<entry>
<title>drm/format-helper: Add KUnit tests for drm_fb_xrgb8888_to_gray8()</title>
<updated>2022-09-27T17:41:52+00:00</updated>
<author>
<name>José Expósito</name>
<email>jose.exposito89@gmail.com</email>
</author>
<published>2022-09-26T08:08:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=45eb009f8d1d3cc38de9c3b5be20301a2aa9cec0'/>
<id>urn:sha1:45eb009f8d1d3cc38de9c3b5be20301a2aa9cec0</id>
<content type='text'>
Extend the existing test cases to test the conversion from XRGB8888 to
grayscale.

Tested-by: Maíra Canal &lt;mairacanal@riseup.net&gt;
Reviewed-by: David Gow &lt;davidgow@google.com&gt;
Acked-by: Maxime Ripard &lt;maxime@cerno.tech&gt;
Signed-off-by: José Expósito &lt;jose.exposito89@gmail.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20220926080837.65734-4-jose.exposito89@gmail.com
</content>
</entry>
<entry>
<title>drm/format-helper: Add KUnit tests for drm_fb_xrgb8888_to_xrgb2101010()</title>
<updated>2022-09-27T17:41:51+00:00</updated>
<author>
<name>José Expósito</name>
<email>jose.exposito89@gmail.com</email>
</author>
<published>2022-09-26T08:08:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=453114319699b6bec2f2ab9bd87617ba25f6215e'/>
<id>urn:sha1:453114319699b6bec2f2ab9bd87617ba25f6215e</id>
<content type='text'>
Extend the existing test cases to test the conversion from XRGB8888 to
XRGB2101010.

In order to be able to call drm_fb_xrgb8888_to_xrgb2101010() when
compiling CONFIG_DRM_KMS_HELPER as a module export the symbol.

Tested-by: Maíra Canal &lt;mairacanal@riseup.net&gt;
Reviewed-by: David Gow &lt;davidgow@google.com&gt;
Acked-by: Maxime Ripard &lt;maxime@cerno.tech&gt;
Signed-off-by: José Expósito &lt;jose.exposito89@gmail.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20220926080837.65734-3-jose.exposito89@gmail.com
</content>
</entry>
<entry>
<title>drm/format-helper: Add KUnit tests for drm_fb_xrgb8888_to_rgb888()</title>
<updated>2022-09-27T17:41:50+00:00</updated>
<author>
<name>José Expósito</name>
<email>jose.exposito89@gmail.com</email>
</author>
<published>2022-09-26T08:08:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=f3f716ae5d827fbbdf994c9d5b05d05fe33c8ced'/>
<id>urn:sha1:f3f716ae5d827fbbdf994c9d5b05d05fe33c8ced</id>
<content type='text'>
Extend the existing test cases to test the conversion from XRGB8888 to
RGB888.

Tested-by: Maíra Canal &lt;mairacanal@riseup.net&gt;
Reviewed-by: David Gow &lt;davidgow@google.com&gt;
Acked-by: Maxime Ripard &lt;maxime@cerno.tech&gt;
Signed-off-by: José Expósito &lt;jose.exposito89@gmail.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20220926080837.65734-2-jose.exposito89@gmail.com
</content>
</entry>
<entry>
<title>drm/tests: Change "igt_" prefix to "drm_test_"</title>
<updated>2022-09-14T16:53:33+00:00</updated>
<author>
<name>Maíra Canal</name>
<email>mairacanal@riseup.net</email>
</author>
<published>2022-09-11T19:17:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=961bcdf956a4645745407a5d919be8757549b062'/>
<id>urn:sha1:961bcdf956a4645745407a5d919be8757549b062</id>
<content type='text'>
With the introduction of KUnit, IGT is no longer the only option to run
the DRM unit tests, as the tests can be run through kunit-tool or on
real hardware with CONFIG_KUNIT.

Therefore, remove the "igt_" prefix from the tests and replace it with
the "drm_test_" prefix, making the tests' names independent from the tool
used.

Signed-off-by: Maíra Canal &lt;mairacanal@riseup.net&gt;
Acked-by: David Gow &lt;davidgow@google.com&gt;
Acked-by: Maxime Ripard &lt;maxime@cerno.tech&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20220911191756.203118-2-mairacanal@riseup.net
</content>
</entry>
<entry>
<title>drm/format-helper: Rework XRGB8888-to-RGBG565 conversion</title>
<updated>2022-08-10T07:18:45+00:00</updated>
<author>
<name>Thomas Zimmermann</name>
<email>tzimmermann@suse.de</email>
</author>
<published>2022-08-08T12:53:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=ab298c29d414a5a94ed3039b0e97bc325bf45272'/>
<id>urn:sha1:ab298c29d414a5a94ed3039b0e97bc325bf45272</id>
<content type='text'>
Update XRGB8888-to-RGB565 conversion to support struct iosys_map
and convert all users. Although these are single-plane color formats,
the new interface supports multi-plane formats for consistency with
drm_fb_blit().

v2:
	* update new Kunit tests
	* update documentation (Sam)
	* add TODO on vaddr location (Sam)

Signed-off-by: Thomas Zimmermann &lt;tzimmermann@suse.de&gt;
Tested-by: Noralf Trønnes &lt;noralf@tronnes.org&gt;
Reviewed-by: Sam Ravnborg &lt;sam@ravnborg.org&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20220808125406.20752-7-tzimmermann@suse.de
</content>
</entry>
<entry>
<title>drm/format-helper: Rework XRGB8888-to-RGBG332 conversion</title>
<updated>2022-08-10T07:18:36+00:00</updated>
<author>
<name>Thomas Zimmermann</name>
<email>tzimmermann@suse.de</email>
</author>
<published>2022-08-08T12:53:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=e13140a06283141318319aaae7dfa348b06bdd6c'/>
<id>urn:sha1:e13140a06283141318319aaae7dfa348b06bdd6c</id>
<content type='text'>
Update XRGB8888-to-RGB332 conversion to support struct iosys_map
and convert all users. Although these are single-plane color formats,
the new interface supports multi-plane formats for consistency with
drm_fb_blit().

v2:
	* rebase onto refactored Kunit tests
	* update documentation (Sam)
	* add TODO on vaddr location (Sam)

Signed-off-by: Thomas Zimmermann &lt;tzimmermann@suse.de&gt;
Tested-by: Noralf Trønnes &lt;noralf@tronnes.org&gt;
Reviewed-by: Sam Ravnborg &lt;sam@ravnborg.org&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20220808125406.20752-6-tzimmermann@suse.de
</content>
</entry>
<entry>
<title>drm/format-helper: Add KUnit tests for drm_fb_xrgb8888_to_rgb565()</title>
<updated>2022-07-28T16:36:45+00:00</updated>
<author>
<name>José Expósito</name>
<email>jose.exposito89@gmail.com</email>
</author>
<published>2022-07-26T23:09:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=5d2f2e8b3a36328a3981996bb20c32d8a0e53b46'/>
<id>urn:sha1:5d2f2e8b3a36328a3981996bb20c32d8a0e53b46</id>
<content type='text'>
Extend the existing test cases to test the conversion from XRGB8888 to
RGB565.

The documentation and the color picker available on [1] are useful
resources to understand this patch and validate the values returned by
the conversion function.

Tested-by: Tales L. Aparecida &lt;tales.aparecida@gmail.com&gt;
Acked-by: Thomas Zimmermann &lt;tzimmermann@suse.de&gt;
Reviewed-by: David Gow &lt;davidgow@google.com&gt;
Signed-off-by: José Expósito &lt;jose.exposito89@gmail.com&gt;
Link: http://www.barth-dev.de/online/rgb565-color-picker/ # [1]
Link: https://patchwork.freedesktop.org/patch/msgid/20220726230916.390575-5-jose.exposito89@gmail.com
</content>
</entry>
<entry>
<title>drm/format-helper: Support multiple target formats results</title>
<updated>2022-07-28T16:36:44+00:00</updated>
<author>
<name>José Expósito</name>
<email>jose.exposito89@gmail.com</email>
</author>
<published>2022-07-26T23:09:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=4d09017aec4f2aa5f6109b32f9a037f35c17a9e0'/>
<id>urn:sha1:4d09017aec4f2aa5f6109b32f9a037f35c17a9e0</id>
<content type='text'>
In order to support multiple destination format conversions, store the
destination pitch and the expected result in its own structure.

Tested-by: Tales L. Aparecida &lt;tales.aparecida@gmail.com&gt;
Acked-by: Thomas Zimmermann &lt;tzimmermann@suse.de&gt;
Reviewed-by: David Gow &lt;davidgow@google.com&gt;
Signed-off-by: José Expósito &lt;jose.exposito89@gmail.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20220726230916.390575-4-jose.exposito89@gmail.com
</content>
</entry>
</feed>
