<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/gpu/drm/tests, branch v6.6.36</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v6.6.36</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v6.6.36'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2024-01-25T23:35:31+00:00</updated>
<entry>
<title>drm/dp_mst: Fix fractional DSC bpp handling</title>
<updated>2024-01-25T23:35:31+00:00</updated>
<author>
<name>Ville Syrjälä</name>
<email>ville.syrjala@linux.intel.com</email>
</author>
<published>2023-10-24T01:08:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=4e042f022255604c68ab5d5f73c8f437d24d651e'/>
<id>urn:sha1:4e042f022255604c68ab5d5f73c8f437d24d651e</id>
<content type='text'>
[ Upstream commit 7707dd6022593f3edd8e182e7935870cf326f874 ]

The current code does '(bpp &lt;&lt; 4) / 16' in the MST PBN
calculation, but that is just the same as 'bpp' so the
DSC codepath achieves absolutely nothing. Fix it up so that
the fractional part of the bpp value is actually used instead
of truncated away. 64*1006 has enough zero lsbs that we can
just shift that down in the dividend and thus still manage
to stick to a 32bit divisor.

And while touching this, let's just make the whole thing more
straightforward by making the passed in bpp value .4 binary
fixed point always, instead of having to pass in different
things based on whether DSC is enabled or not.

v2:
- Fix DSC kunit test cases.

Cc: Manasi Navare &lt;manasi.d.navare@intel.com&gt;
Cc: Lyude Paul &lt;lyude@redhat.com&gt;
Cc: Harry Wentland &lt;harry.wentland@amd.com&gt;
Cc: David Francis &lt;David.Francis@amd.com&gt;
Cc: Mikita Lipski &lt;mikita.lipski@amd.com&gt;
Cc: Alex Deucher &lt;alexander.deucher@amd.com&gt;
Fixes: dc48529fb14e ("drm/dp_mst: Add PBN calculation for DSC modes")
Signed-off-by: Ville Syrjälä &lt;ville.syrjala@linux.intel.com&gt;
[Imre: Fix kunit test cases]
Acked-by: Maxime Ripard &lt;mripard@kernel.org&gt;
Reviewed-by: Lyude Paul &lt;lyude@redhat.com&gt;
Acked-by: Harry Wentland &lt;harry.wentland@amd.com&gt;
Signed-off-by: Imre Deak &lt;imre.deak@intel.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20231030155843.2251023-3-imre.deak@intel.com
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>drm/tests: Fix kunit_release_action ctx argument</title>
<updated>2023-09-30T15:13:05+00:00</updated>
<author>
<name>Arthur Grillo</name>
<email>arthurgrillo@riseup.net</email>
</author>
<published>2023-09-20T06:11:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=885291ab687e83085b9f450ec1efaed44a8a7ab6'/>
<id>urn:sha1:885291ab687e83085b9f450ec1efaed44a8a7ab6</id>
<content type='text'>
The kunit_action_platform_driver_unregister is added with
&amp;fake_platform_driver as ctx, but the kunit_release_action is called
pdev as ctx. Fix that by replacing it with &amp;fake_platform_driver.

Fixes: 4f2b0b583baa ("drm/tests: helpers: Switch to kunit actions")
Signed-off-by: Arthur Grillo &lt;arthurgrillo@riseup.net&gt;
Reviewed-by: Maíra Canal &lt;mairacanal@riseup.net&gt;
Acked-by: Maxime Ripard &lt;mripard@kernel.org&gt;
Signed-off-by: Maíra Canal &lt;mairacanal@riseup.net&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20230920-kunit-kasan-fixes-v1-1-1a0fc261832d@riseup.net
</content>
</entry>
<entry>
<title>drm/tests: Fix incorrect argument in drm_test_mm_insert_range</title>
<updated>2023-09-15T14:39:48+00:00</updated>
<author>
<name>Janusz Krzysztofik</name>
<email>janusz.krzysztofik@linux.intel.com</email>
</author>
<published>2023-09-11T13:03:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=2ba157983974ae1b6aaef7d4953812020d6f1eb5'/>
<id>urn:sha1:2ba157983974ae1b6aaef7d4953812020d6f1eb5</id>
<content type='text'>
While drm_mm test was converted form igt selftest to kunit, unexpected
value of "end" argument equal "start" was introduced to one of calls to a
function that executes the drm_test_mm_insert_range for specific start/end
pair of arguments.  As a consequence, DRM_MM_BUG_ON(end &lt;= start) is
triggered.  Fix it by restoring the original value.

Fixes: fc8d29e298cf ("drm: selftest: convert drm_mm selftest to KUnit")
Signed-off-by: Janusz Krzysztofik &lt;janusz.krzysztofik@linux.intel.com&gt;
Cc: "Maíra Canal" &lt;mairacanal@riseup.net&gt;
Cc: Arthur Grillo &lt;arthurgrillo@riseup.net&gt;
Cc: Javier Martinez Canillas &lt;javierm@redhat.com&gt;
Cc: Daniel Latypov &lt;dlatypov@google.com&gt;
Cc: stable@vger.kernel.org # v6.1+
Reviewed-by: Maíra Canal &lt;mairacanal@riseup.net&gt;
Signed-off-by: Maíra Canal &lt;mairacanal@riseup.net&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20230911130323.7037-2-janusz.krzysztofik@linux.intel.com
</content>
</entry>
<entry>
<title>drm/tests/drm_kunit_helpers: Place correct function name in the comment header</title>
<updated>2023-08-24T08:52:59+00:00</updated>
<author>
<name>Lee Jones</name>
<email>lee@kernel.org</email>
</author>
<published>2023-08-24T07:36:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=91dc52151c9b3c955589e1ab3a008f341803f8cf'/>
<id>urn:sha1:91dc52151c9b3c955589e1ab3a008f341803f8cf</id>
<content type='text'>
Fixes the following W=1 kernel build warning(s):

 drivers/gpu/drm/tests/drm_kunit_helpers.c:172: warning: expecting prototype for drm_kunit_helper_context_alloc(). Prototype was for drm_kunit_helper_acquire_ctx_alloc() instead

Signed-off-by: Lee Jones &lt;lee@kernel.org&gt;
Link: https://lore.kernel.org/r/20230824073710.2677348-10-lee@kernel.org
Link: https://lore.kernel.org/r/20230824073710.2677348-14-lee@kernel.org
[mripard: Squashed the two patches together]
Signed-off-by: Maxime Ripard &lt;mripard@kernel.org&gt;
</content>
</entry>
<entry>
<title>drm/test: drm_exec: fix memory leak on object prepare</title>
<updated>2023-08-10T07:01:00+00:00</updated>
<author>
<name>Danilo Krummrich</name>
<email>dakr@redhat.com</email>
</author>
<published>2023-08-09T22:50:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=806fd6d005ad7aa9e217d47063e5b12b25143402'/>
<id>urn:sha1:806fd6d005ad7aa9e217d47063e5b12b25143402</id>
<content type='text'>
drm_exec_prepare_obj() and drm_exec_prepare_array() both reserve
dma-fence slots and hence a dma_resv_list without ever freeing it.

Make sure to call drm_gem_private_object_fini() for each GEM object
passed to drm_exec_prepare_obj()/drm_exec_prepare_array() throughout the
test to fix this up.

While at it, remove some trailing empty lines.

Fixes: 9710631cc8f3 ("drm: add drm_exec selftests v4")
Signed-off-by: Danilo Krummrich &lt;dakr@redhat.com&gt;
Reviewed-by: Christian König &lt;christian.koenig@amd.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20230809225034.8803-1-dakr@redhat.com
Signed-off-by: Christian König &lt;christian.koenig@amd.com&gt;
</content>
</entry>
<entry>
<title>drm/exec: add test case for using a drm_exec multiple times</title>
<updated>2023-08-10T06:38:57+00:00</updated>
<author>
<name>Christian König</name>
<email>christian.koenig@amd.com</email>
</author>
<published>2023-07-31T12:36:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=991eb531f482a4ebf2265028add882f149ef1bdc'/>
<id>urn:sha1:991eb531f482a4ebf2265028add882f149ef1bdc</id>
<content type='text'>
Not really a common use case, but let's make sure that we don't
accidentially break that somehow.

CC: Boris Brezillon &lt;boris.brezillon@collabora.com&gt;
Signed-off-by: Christian König &lt;christian.koenig@amd.com&gt;
Reviewed-by: Boris Brezillon &lt;boris.brezillon@collabora.com&gt;
Signed-off-by: Boris Brezillon &lt;boris.brezillon@collabora.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20230731123625.3766-2-christian.koenig@amd.com
</content>
</entry>
<entry>
<title>drm/tests: Alloc drm_device on drm_exec tests</title>
<updated>2023-08-01T07:30:13+00:00</updated>
<author>
<name>Arthur Grillo</name>
<email>arthurgrillo@riseup.net</email>
</author>
<published>2023-07-31T18:22:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=0f249678fef4332d26178d264620c2437003dd09'/>
<id>urn:sha1:0f249678fef4332d26178d264620c2437003dd09</id>
<content type='text'>
The drm_exec tests where crashing[0] because of a null dereference. This
is caused by a new access of the `driver` attribute of `struct
drm_driver` on drm_gem_private_object_init(). Alloc the drm_device to
fix that.

[0]
[15:05:24] ================== drm_exec (6 subtests) ===================
[15:05:24] [PASSED] sanitycheck
^CERROR:root:Build interruption occurred. Cleaning console.
[15:05:50] [ERROR] Test: drm_exec: missing expected subtest!
[15:05:50] BUG: kernel NULL pointer dereference, address: 00000000000000b0
[15:05:50] #PF: supervisor read access in kernel mode
[15:05:50] #PF: error_code(0x0000) - not-present page
[15:05:50] PGD 0 P4D 0
[15:05:50] Oops: 0000 [#1] PREEMPT NOPTI
[15:05:50] CPU: 0 PID: 23 Comm: kunit_try_catch Tainted: G                 N 6.4.0-rc7-02032-ge6303f323b1a #69
[15:05:50] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.2-1.fc37 04/01/2014
[15:05:50] RIP: 0010:drm_gem_private_object_init+0x60/0xc0

Fixes: e6303f323b1a ("drm: manager to keep track of GPUs VA mappings")
Signed-off-by: Arthur Grillo &lt;arthurgrillo@riseup.net&gt;
Tested-by: Danilo Krummrich &lt;dakr@redhat.com&gt;
Acked-by: Danilo Krummrich &lt;dakr@redhat.com&gt;
Reviewed-by: Maíra Canal &lt;mcanal@igalia.com&gt;
Signed-off-by: Maxime Ripard &lt;mripard@kernel.org&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20230731182241.240556-1-arthurgrillo@riseup.net
</content>
</entry>
<entry>
<title>drm/tests: helpers: Create a helper to allocate an atomic state</title>
<updated>2023-07-31T12:19:57+00:00</updated>
<author>
<name>Maxime Ripard</name>
<email>mripard@kernel.org</email>
</author>
<published>2023-07-28T09:06:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=394ba10e476d092111ebb3419f771bde419a037e'/>
<id>urn:sha1:394ba10e476d092111ebb3419f771bde419a037e</id>
<content type='text'>
As we gain more tests, boilerplate to allocate an atomic state and free
it starts to be there more and more as well.

In order to reduce the allocation boilerplate, we can create a helper
to create that atomic state, and call an action when the test is done.
This will also clean up the exit path.

Reviewed-by: Javier Martinez Canillas &lt;javierm@redhat.com&gt;
Reviewed-by: Maíra Canal &lt;mairacanal@riseup.net&gt;
Link: https://lore.kernel.org/r/20230728-kms-kunit-actions-rework-v3-6-952565ccccfe@kernel.org
Signed-off-by: Maxime Ripard &lt;mripard@kernel.org&gt;
</content>
</entry>
<entry>
<title>drm/tests: helpers: Create a helper to allocate a locking ctx</title>
<updated>2023-07-31T12:19:57+00:00</updated>
<author>
<name>Maxime Ripard</name>
<email>mripard@kernel.org</email>
</author>
<published>2023-07-28T09:06:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=6e193f9fbbb02e1bde88510a71823e5bf83c2010'/>
<id>urn:sha1:6e193f9fbbb02e1bde88510a71823e5bf83c2010</id>
<content type='text'>
As we get more and more tests, the locking context initialisation
creates more and more boilerplate, both at creation and destruction.

Let's create a helper that will allocate, initialise a context, and
register kunit actions to clean up once the test is done.

Reviewed-by: Javier Martinez Canillas &lt;javierm@redhat.com&gt;
Reviewed-by: Maíra Canal &lt;mairacanal@riseup.net&gt;
Link: https://lore.kernel.org/r/20230728-kms-kunit-actions-rework-v3-5-952565ccccfe@kernel.org
Signed-off-by: Maxime Ripard &lt;mripard@kernel.org&gt;
</content>
</entry>
<entry>
<title>drm/tests: probe-helper: Remove call to drm_kunit_helper_free_device()</title>
<updated>2023-07-31T12:19:57+00:00</updated>
<author>
<name>Maxime Ripard</name>
<email>mripard@kernel.org</email>
</author>
<published>2023-07-28T09:06:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=2ecf5a9ec3afa74cf49ab3c0211ba11f3dd9e881'/>
<id>urn:sha1:2ecf5a9ec3afa74cf49ab3c0211ba11f3dd9e881</id>
<content type='text'>
Calling drm_kunit_helper_free_device() to clean up the resources
allocated by drm_kunit_helper_alloc_device() is now optional and not
needed in most cases.

Remove it.

Reviewed-by: Javier Martinez Canillas &lt;javierm@redhat.com&gt;
Reviewed-by: Maíra Canal &lt;mairacanal@riseup.net&gt;
Link: https://lore.kernel.org/r/20230728-kms-kunit-actions-rework-v3-4-952565ccccfe@kernel.org
Signed-off-by: Maxime Ripard &lt;mripard@kernel.org&gt;
</content>
</entry>
</feed>
