<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/gpu/drm/tests/drm_buddy_test.c, branch v6.3.2</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v6.3.2</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v6.3.2'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2023-03-29T15:14:15+00:00</updated>
<entry>
<title>drm: test: Fix 32-bit issue in drm_buddy_test</title>
<updated>2023-03-29T15:14:15+00:00</updated>
<author>
<name>David Gow</name>
<email>davidgow@google.com</email>
</author>
<published>2023-03-29T06:55:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=25bbe844ef5c4fb4d7d8dcaa0080f922b7cd3a16'/>
<id>urn:sha1:25bbe844ef5c4fb4d7d8dcaa0080f922b7cd3a16</id>
<content type='text'>
The drm_buddy_test KUnit tests verify that returned blocks have sizes
which are powers of two using is_power_of_2(). However, is_power_of_2()
operations on a 'long', but the block size is a u64. So on systems where
long is 32-bit, this can sometimes fail even on correctly sized blocks.

This only reproduces randomly, as the parameters passed to the buddy
allocator in this test are random. The seed 0xb2e06022 reproduced it
fine here.

For now, just hardcode an is_power_of_2() implementation using
x &amp; (x - 1).

Signed-off-by: David Gow &lt;davidgow@google.com&gt;
Acked-by: Christian König &lt;christian.koenig@amd.com&gt;
Reviewed-by: Maíra Canal &lt;mcanal@igalia.com&gt;
Reviewed-by: Arunpravin Paneer Selvam &lt;arunpravin.paneerselvam@amd.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20230329065532.2122295-2-davidgow@google.com
Signed-off-by: Christian König &lt;christian.koenig@amd.com&gt;
</content>
</entry>
<entry>
<title>drm/tests: Add back seed value information</title>
<updated>2022-11-02T12:22:47+00:00</updated>
<author>
<name>Arthur Grillo</name>
<email>arthurgrillo@riseup.net</email>
</author>
<published>2022-10-28T22:17:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=ce28ab1380e823e0afdff06a59a04375ef9d9a29'/>
<id>urn:sha1:ce28ab1380e823e0afdff06a59a04375ef9d9a29</id>
<content type='text'>
As reported by Michał, the drm_mm and drm_buddy unit tests lost the
printk with seed value after they were refactored into KUnit.

Add kunit_info with seed value information to assure reproducibility.

Reported-by: Michał Winiarski &lt;michal.winiarski@intel.com&gt;
Signed-off-by: Arthur Grillo &lt;arthurgrillo@riseup.net&gt;
Signed-off-by: Maíra Canal &lt;mairacanal@riseup.net&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20221028221755.340487-1-arthurgrillo@riseup.net
</content>
</entry>
<entry>
<title>treewide: use get_random_u32() when possible</title>
<updated>2022-10-11T23:42:58+00:00</updated>
<author>
<name>Jason A. Donenfeld</name>
<email>Jason@zx2c4.com</email>
</author>
<published>2022-10-05T15:43:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=a251c17aa558d8e3128a528af5cf8b9d7caae4fd'/>
<id>urn:sha1:a251c17aa558d8e3128a528af5cf8b9d7caae4fd</id>
<content type='text'>
The prandom_u32() function has been a deprecated inline wrapper around
get_random_u32() for several releases now, and compiles down to the
exact same code. Replace the deprecated wrapper with a direct call to
the real function. The same also applies to get_random_int(), which is
just a wrapper around get_random_u32(). This was done as a basic find
and replace.

Reviewed-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Reviewed-by: Kees Cook &lt;keescook@chromium.org&gt;
Reviewed-by: Yury Norov &lt;yury.norov@gmail.com&gt;
Reviewed-by: Jan Kara &lt;jack@suse.cz&gt; # for ext4
Acked-by: Toke Høiland-Jørgensen &lt;toke@toke.dk&gt; # for sch_cake
Acked-by: Chuck Lever &lt;chuck.lever@oracle.com&gt; # for nfsd
Acked-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
Acked-by: Mika Westerberg &lt;mika.westerberg@linux.intel.com&gt; # for thunderbolt
Acked-by: Darrick J. Wong &lt;djwong@kernel.org&gt; # for xfs
Acked-by: Helge Deller &lt;deller@gmx.de&gt; # for parisc
Acked-by: Heiko Carstens &lt;hca@linux.ibm.com&gt; # for s390
Signed-off-by: Jason A. Donenfeld &lt;Jason@zx2c4.com&gt;
</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: selftest: convert drm_buddy selftest to KUnit</title>
<updated>2022-07-11T12:00:03+00:00</updated>
<author>
<name>Maíra Canal</name>
<email>maira.canal@usp.br</email>
</author>
<published>2022-07-08T20:30:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=932da861956ac425ba4e65f7696458f96d833883'/>
<id>urn:sha1:932da861956ac425ba4e65f7696458f96d833883</id>
<content type='text'>
Considering the current adoption of the KUnit framework, convert the
DRM buddy selftest to the KUnit API.

Tested-by: David Gow &lt;davidgow@google.com&gt;
Acked-by: Daniel Latypov &lt;dlatypov@google.com&gt;
Reviewed-by: Javier Martinez Canillas &lt;javierm@redhat.com&gt;
Signed-off-by: Maíra Canal &lt;maira.canal@usp.br&gt;
Signed-off-by: Javier Martinez Canillas &lt;javierm@redhat.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20220708203052.236290-9-maira.canal@usp.br
</content>
</entry>
</feed>
