<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/gpu/drm/tests, branch v6.13.6</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v6.13.6</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v6.13.6'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2025-02-21T13:10:47+00:00</updated>
<entry>
<title>drm/tests: hdmi: Fix WW_MUTEX_SLOWPATH failures</title>
<updated>2025-02-21T13:10:47+00:00</updated>
<author>
<name>Maxime Ripard</name>
<email>mripard@kernel.org</email>
</author>
<published>2025-01-29T14:21:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=456878e28d33860b09b7ff04d8c8cdc52896ed2d'/>
<id>urn:sha1:456878e28d33860b09b7ff04d8c8cdc52896ed2d</id>
<content type='text'>
[ Upstream commit fb97bc2e47f694f79d6358d981ae0428db8e8088 ]

The light_up_connector helper function in the HDMI infrastructure unit
tests uses drm_atomic_set_crtc_for_connector(), but fails when it
returns an error.

This function can return EDEADLK though if the sequence needs to be
restarted, and WW_MUTEX_SLOWPATH is meant to test that we handle it
properly.

Let's handle EDEADLK and restart the sequence in our tests as well.

Fixes: eb66d34d793e ("drm/tests: Add output bpc tests")
Reported-by: Dave Airlie &lt;airlied@gmail.com&gt;
Closes: https://lore.kernel.org/r/CAPM=9tzJ4-ERDxvuwrCyUPY0=+P44orhp1kLWVGL7MCfpQjMEQ@mail.gmail.com/
Link: https://lore.kernel.org/r/20241031091558.2435850-1-mripard@kernel.org
Reviewed-by: Simona Vetter &lt;simona.vetter@ffwll.ch&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20250129-test-kunit-v2-1-fe59c43805d5@kernel.org
Signed-off-by: Maxime Ripard &lt;mripard@kernel.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>drm/tests: hdmi: return meaningful value from set_connector_edid()</title>
<updated>2025-02-17T10:35:56+00:00</updated>
<author>
<name>Dmitry Baryshkov</name>
<email>dmitry.baryshkov@linaro.org</email>
</author>
<published>2024-11-30T01:52:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=89c122aa89a1dd188ac411ce8d7de821327ff6ec'/>
<id>urn:sha1:89c122aa89a1dd188ac411ce8d7de821327ff6ec</id>
<content type='text'>
[ Upstream commit a8403be6eea91e4f5d8ad5dbc463dd08339eaece ]

The set_connector_edid() function returns a bogus 0, performing the
check on the connector-&gt;funcs-&gt;fill_modes() result internally. Make the
function pass the fill_modes()'s return value to the caller and move
corresponding checks to the caller site.

Reviewed-by: Maxime Ripard &lt;mripard@kernel.org&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20241130-hdmi-mode-valid-v5-3-742644ec3b1f@linaro.org
Signed-off-by: Dmitry Baryshkov &lt;dmitry.baryshkov@linaro.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>drm/tests: hdmi: handle empty modes in find_preferred_mode()</title>
<updated>2025-02-17T10:35:56+00:00</updated>
<author>
<name>Dmitry Baryshkov</name>
<email>dmitry.baryshkov@linaro.org</email>
</author>
<published>2024-11-30T01:52:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=ba52ab3e3ad5974ce41bec4cd2d17f1296b7ccf8'/>
<id>urn:sha1:ba52ab3e3ad5974ce41bec4cd2d17f1296b7ccf8</id>
<content type='text'>
[ Upstream commit d3314efd6ebf335a3682b1d6b1b81cdab3d8254a ]

If the connector-&gt;modes list is empty, then list_first_entry() returns a
bogus entry. Change that to use list_first_entry_or_null().

Reviewed-by: Maxime Ripard &lt;mripard@kernel.org&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20241130-hdmi-mode-valid-v5-1-742644ec3b1f@linaro.org
Signed-off-by: Dmitry Baryshkov &lt;dmitry.baryshkov@linaro.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>drm/tests: connector: Add ycbcr_420_allowed tests</title>
<updated>2025-01-13T09:18:20+00:00</updated>
<author>
<name>Cristian Ciocaltea</name>
<email>cristian.ciocaltea@collabora.com</email>
</author>
<published>2024-12-24T18:22:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=93801b8c2d18546fdf807c8e3075e6df93960446'/>
<id>urn:sha1:93801b8c2d18546fdf807c8e3075e6df93960446</id>
<content type='text'>
Extend HDMI connector output format tests to verify its registration
succeeds only when the presence of YUV420 in the supported formats
matches the state of ycbcr_420_allowed flag.

Signed-off-by: Cristian Ciocaltea &lt;cristian.ciocaltea@collabora.com&gt;
Reviewed-by: Dmitry Baryshkov &lt;dmitry.baryshkov@linaro.org&gt;
Reviewed-by: Maxime Ripard &lt;mripard@kernel.org&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20241224-bridge-conn-fmt-prio-v4-4-a9ceb5671379@collabora.com
Signed-off-by: Dmitry Baryshkov &lt;dmitry.baryshkov@linaro.org&gt;
</content>
</entry>
<entry>
<title>drm/tests: helpers: Fix compiler warning</title>
<updated>2025-01-06T08:57:44+00:00</updated>
<author>
<name>Yu-Chun Lin</name>
<email>eleanor15x@gmail.com</email>
</author>
<published>2025-01-04T16:51:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=b9097e4c8bf3934e4e07e6f9b88741957fef351e'/>
<id>urn:sha1:b9097e4c8bf3934e4e07e6f9b88741957fef351e</id>
<content type='text'>
Delete one line break to make the format correct, resolving the
following warning during a W=1 build:

&gt;&gt; drivers/gpu/drm/tests/drm_kunit_helpers.c:324: warning: bad line: for a KUnit test

Fixes: caa714f86699 ("drm/tests: helpers: Add helper for drm_display_mode_from_cea_vic()")
Reported-by: kernel test robot &lt;lkp@intel.com&gt;
Closes: https://lore.kernel.org/oe-kbuild-all/202501032001.O6WY1VCW-lkp@intel.com/
Reviewed-by: Kuan-Wei Chiu &lt;visitorckw@gmail.com&gt;
Tested-by: Kuan-Wei Chiu &lt;visitorckw@gmail.com&gt;
Reviewed-by: Dmitry Baryshkov &lt;dmitry.baryshkov@linaro.org&gt;
Signed-off-by: Yu-Chun Lin &lt;eleanor15x@gmail.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20250104165134.1695864-1-eleanor15x@gmail.com
Signed-off-by: Maxime Ripard &lt;mripard@kernel.org&gt;
</content>
</entry>
<entry>
<title>Backmerge v6.12-rc6 of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux into drm-next</title>
<updated>2024-11-04T04:25:33+00:00</updated>
<author>
<name>Dave Airlie</name>
<email>airlied@redhat.com</email>
</author>
<published>2024-11-04T04:25:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=30169bb64580bd7bce9290c1952bf0aa6cc37fe5'/>
<id>urn:sha1:30169bb64580bd7bce9290c1952bf0aa6cc37fe5</id>
<content type='text'>
Backmerge Linus tree for some drm-fixes needed for msm and xe merges.

Signed-off-by: Dave Airlie &lt;airlied@redhat.com&gt;
</content>
</entry>
<entry>
<title>drm/tests: hdmi: Fix memory leaks in drm_display_mode_from_cea_vic()</title>
<updated>2024-10-31T09:31:35+00:00</updated>
<author>
<name>Jinjie Ruan</name>
<email>ruanjinjie@huawei.com</email>
</author>
<published>2024-10-30T02:35:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=add4163aca0d4a86e9fe4aa513865e4237db8aef'/>
<id>urn:sha1:add4163aca0d4a86e9fe4aa513865e4237db8aef</id>
<content type='text'>
modprobe drm_hdmi_state_helper_test and then rmmod it, the following
memory leak occurs.

The `mode` allocated in drm_mode_duplicate() called by
drm_display_mode_from_cea_vic() is not freed, which cause the memory leak:

	unreferenced object 0xffffff80ccd18100 (size 128):
	  comm "kunit_try_catch", pid 1851, jiffies 4295059695
	  hex dump (first 32 bytes):
	    57 62 00 00 80 02 90 02 f0 02 20 03 00 00 e0 01  Wb........ .....
	    ea 01 ec 01 0d 02 00 00 0a 00 00 00 00 00 00 00  ................
	  backtrace (crc c2f1aa95):
	    [&lt;000000000f10b11b&gt;] kmemleak_alloc+0x34/0x40
	    [&lt;000000001cd4cf73&gt;] __kmalloc_cache_noprof+0x26c/0x2f4
	    [&lt;00000000f1f3cffa&gt;] drm_mode_duplicate+0x44/0x19c
	    [&lt;000000008cbeef13&gt;] drm_display_mode_from_cea_vic+0x88/0x98
	    [&lt;0000000019daaacf&gt;] 0xffffffedc11ae69c
	    [&lt;000000000aad0f85&gt;] kunit_try_run_case+0x13c/0x3ac
	    [&lt;00000000a9210bac&gt;] kunit_generic_run_threadfn_adapter+0x80/0xec
	    [&lt;000000000a0b2e9e&gt;] kthread+0x2e8/0x374
	    [&lt;00000000bd668858&gt;] ret_from_fork+0x10/0x20
	......

Free `mode` by using drm_kunit_display_mode_from_cea_vic()
to fix it.

Cc: stable@vger.kernel.org
Fixes: 4af70f19e559 ("drm/tests: Add RGB Quantization tests")
Acked-by: Maxime Ripard &lt;mripard@kernel.org&gt;
Signed-off-by: Jinjie Ruan &lt;ruanjinjie@huawei.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20241030023504.530425-4-ruanjinjie@huawei.com
Signed-off-by: Maxime Ripard &lt;mripard@kernel.org&gt;
</content>
</entry>
<entry>
<title>drm/connector: hdmi: Fix memory leak in drm_display_mode_from_cea_vic()</title>
<updated>2024-10-31T09:31:34+00:00</updated>
<author>
<name>Jinjie Ruan</name>
<email>ruanjinjie@huawei.com</email>
</author>
<published>2024-10-30T02:35:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=926163342a2e7595d950e84c17c693b1272bd491'/>
<id>urn:sha1:926163342a2e7595d950e84c17c693b1272bd491</id>
<content type='text'>
modprobe drm_connector_test and then rmmod drm_connector_test,
the following memory leak occurs.

The `mode` allocated in drm_mode_duplicate() called by
drm_display_mode_from_cea_vic() is not freed, which cause the memory leak:

	unreferenced object 0xffffff80cb0ee400 (size 128):
	  comm "kunit_try_catch", pid 1948, jiffies 4294950339
	  hex dump (first 32 bytes):
	    14 44 02 00 80 07 d8 07 04 08 98 08 00 00 38 04  .D............8.
	    3c 04 41 04 65 04 00 00 05 00 00 00 00 00 00 00  &lt;.A.e...........
	  backtrace (crc 90e9585c):
	    [&lt;00000000ec42e3d7&gt;] kmemleak_alloc+0x34/0x40
	    [&lt;00000000d0ef055a&gt;] __kmalloc_cache_noprof+0x26c/0x2f4
	    [&lt;00000000c2062161&gt;] drm_mode_duplicate+0x44/0x19c
	    [&lt;00000000f96c74aa&gt;] drm_display_mode_from_cea_vic+0x88/0x98
	    [&lt;00000000d8f2c8b4&gt;] 0xffffffdc982a4868
	    [&lt;000000005d164dbc&gt;] kunit_try_run_case+0x13c/0x3ac
	    [&lt;000000006fb23398&gt;] kunit_generic_run_threadfn_adapter+0x80/0xec
	    [&lt;000000006ea56ca0&gt;] kthread+0x2e8/0x374
	    [&lt;000000000676063f&gt;] ret_from_fork+0x10/0x20
	......

Free `mode` by using drm_kunit_display_mode_from_cea_vic()
to fix it.

Cc: stable@vger.kernel.org
Fixes: abb6f74973e2 ("drm/tests: Add HDMI TDMS character rate tests")
Acked-by: Maxime Ripard &lt;mripard@kernel.org&gt;
Signed-off-by: Jinjie Ruan &lt;ruanjinjie@huawei.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20241030023504.530425-3-ruanjinjie@huawei.com
Signed-off-by: Maxime Ripard &lt;mripard@kernel.org&gt;
</content>
</entry>
<entry>
<title>drm/tests: helpers: Add helper for drm_display_mode_from_cea_vic()</title>
<updated>2024-10-31T09:31:34+00:00</updated>
<author>
<name>Jinjie Ruan</name>
<email>ruanjinjie@huawei.com</email>
</author>
<published>2024-10-30T02:35:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=caa714f86699bcfb01aa2d698db12d91af7d0d81'/>
<id>urn:sha1:caa714f86699bcfb01aa2d698db12d91af7d0d81</id>
<content type='text'>
As Maxime suggested, add a new helper
drm_kunit_display_mode_from_cea_vic(), it can replace the direct call
of drm_display_mode_from_cea_vic(), and it will help solving
the `mode` memory leaks.

Acked-by: Maxime Ripard &lt;mripard@kernel.org&gt;
Suggested-by: Maxime Ripard &lt;mripard@kernel.org&gt;
Signed-off-by: Jinjie Ruan &lt;ruanjinjie@huawei.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20241030023504.530425-2-ruanjinjie@huawei.com
Signed-off-by: Maxime Ripard &lt;mripard@kernel.org&gt;
</content>
</entry>
<entry>
<title>drm/tests: Add test for drm_framebuffer_free()</title>
<updated>2024-09-11T12:17:11+00:00</updated>
<author>
<name>Carlos Eduardo Gallo Filho</name>
<email>gcarlos@disroot.org</email>
</author>
<published>2024-09-11T00:15:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=d2194256049910d286cd6c308c2689df521d8842'/>
<id>urn:sha1:d2194256049910d286cd6c308c2689df521d8842</id>
<content type='text'>
Add a single KUnit test case for the drm_framebuffer_free function.

Signed-off-by: Carlos Eduardo Gallo Filho &lt;gcarlos@disroot.org&gt;
Acked-by: Maxime Ripard &lt;mripard@kernel.org&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20240911001559.28284-10-gcarlos@disroot.org
Signed-off-by: Maxime Ripard &lt;mripard@kernel.org&gt;
</content>
</entry>
</feed>
