<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/gpu/drm/radeon, branch v6.1.70</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v6.1.70</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v6.1.70'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2023-11-28T17:06:58+00:00</updated>
<entry>
<title>drm/radeon: fix a possible null pointer dereference</title>
<updated>2023-11-28T17:06:58+00:00</updated>
<author>
<name>Ma Ke</name>
<email>make_ruc2021@163.com</email>
</author>
<published>2023-10-11T01:21:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=16fa59e273f8eb20ececeb570ab41c9d3d791429'/>
<id>urn:sha1:16fa59e273f8eb20ececeb570ab41c9d3d791429</id>
<content type='text'>
[ Upstream commit 2c1fe3c480f9e1deefd50d4b18be4a046011ee1f ]

In radeon_tv_get_modes(), the return value of drm_cvt_mode()
is assigned to mode, which will lead to a NULL pointer
dereference on failure of drm_cvt_mode(). Add a check to
avoid null point dereference.

Signed-off-by: Ma Ke &lt;make_ruc2021@163.com&gt;
Signed-off-by: Alex Deucher &lt;alexander.deucher@amd.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>drm/radeon: possible buffer overflow</title>
<updated>2023-11-20T10:51:58+00:00</updated>
<author>
<name>Konstantin Meskhidze</name>
<email>konstantin.meskhidze@huawei.com</email>
</author>
<published>2023-08-17T11:33:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=341e79f8aec6af6b0061b8171d77b085835c6a58'/>
<id>urn:sha1:341e79f8aec6af6b0061b8171d77b085835c6a58</id>
<content type='text'>
[ Upstream commit dd05484f99d16715a88eedfca363828ef9a4c2d4 ]

Buffer 'afmt_status' of size 6 could overflow, since index 'afmt_idx' is
checked after access.

Fixes: 5cc4e5fc293b ("drm/radeon: Cleanup HDMI audio interrupt handling for evergreen")
Co-developed-by: Ivanov Mikhail &lt;ivanov.mikhail1@huawei-partners.com&gt;
Signed-off-by: Konstantin Meskhidze &lt;konstantin.meskhidze@huawei.com&gt;
Signed-off-by: Alex Deucher &lt;alexander.deucher@amd.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>drm/radeon: Use RMW accessors for changing LNKCTL</title>
<updated>2023-09-13T07:42:47+00:00</updated>
<author>
<name>Ilpo Järvinen</name>
<email>ilpo.jarvinen@linux.intel.com</email>
</author>
<published>2023-07-17T12:04:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=433330fb1296119d74cc5c8f1e05b5829ddc52f9'/>
<id>urn:sha1:433330fb1296119d74cc5c8f1e05b5829ddc52f9</id>
<content type='text'>
[ Upstream commit 7189576e8a829130192b33c5b64e8a475369c776 ]

Don't assume that only the driver would be accessing LNKCTL. ASPM policy
changes can trigger write to LNKCTL outside of driver's control.  And in
the case of upstream bridge, the driver does not even own the device it's
changing the registers for.

Use RMW capability accessors which do proper locking to avoid losing
concurrent updates to the register value.

Suggested-by: Lukas Wunner &lt;lukas@wunner.de&gt;
Fixes: 8a7cd27679d0 ("drm/radeon/cik: add support for pcie gen1/2/3 switching")
Fixes: b9d305dfb66c ("drm/radeon: implement pcie gen2/3 support for SI")
Link: https://lore.kernel.org/r/20230717120503.15276-7-ilpo.jarvinen@linux.intel.com
Signed-off-by: Ilpo Järvinen &lt;ilpo.jarvinen@linux.intel.com&gt;
Signed-off-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;
Acked-by: Alex Deucher &lt;alexander.deucher@amd.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>drm/radeon: Fix integer overflow in radeon_cs_parser_init</title>
<updated>2023-07-27T06:50:31+00:00</updated>
<author>
<name>hackyzh002</name>
<email>hackyzh002@gmail.com</email>
</author>
<published>2023-04-19T12:20:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=2e1be420b86980c25a75325e90dfc3fc73126f61'/>
<id>urn:sha1:2e1be420b86980c25a75325e90dfc3fc73126f61</id>
<content type='text'>
[ Upstream commit f828b681d0cd566f86351c0b913e6cb6ed8c7b9c ]

The type of size is unsigned, if size is 0x40000000, there will be an
integer overflow, size will be zero after size *= sizeof(uint32_t),
will cause uninitialized memory to be referenced later

Reviewed-by: Christian König &lt;christian.koenig@amd.com&gt;
Signed-off-by: hackyzh002 &lt;hackyzh002@gmail.com&gt;
Signed-off-by: Alex Deucher &lt;alexander.deucher@amd.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>drm/radeon: fix possible division-by-zero errors</title>
<updated>2023-07-19T14:21:28+00:00</updated>
<author>
<name>Nikita Zhandarovich</name>
<email>n.zhandarovich@fintech.ru</email>
</author>
<published>2023-05-19T15:33:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=1420545b8a155416b8bc2bb86a7709e9ca0c620c'/>
<id>urn:sha1:1420545b8a155416b8bc2bb86a7709e9ca0c620c</id>
<content type='text'>
[ Upstream commit 1becc57cd1a905e2aa0e1eca60d2a37744525c4a ]

Function rv740_get_decoded_reference_divider() may return 0 due to
unpredictable reference divider value calculated in
radeon_atom_get_clock_dividers(). This will lead to
division-by-zero error once that value is used as a divider
in calculating 'clk_s'.
While unlikely, this issue should nonetheless be prevented so add a
sanity check for such cases by testing 'decoded_ref' value against 0.

Found by Linux Verification Center (linuxtesting.org) with static
analysis tool SVACE.

v2: minor coding style fixes (Alex)
In practice this should actually happen as the vbios should be
properly populated.

Fixes: 66229b200598 ("drm/radeon/kms: add dpm support for rv7xx (v4)")
Signed-off-by: Nikita Zhandarovich &lt;n.zhandarovich@fintech.ru&gt;
Signed-off-by: Alex Deucher &lt;alexander.deucher@amd.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>radeon: avoid double free in ci_dpm_init()</title>
<updated>2023-07-19T14:21:14+00:00</updated>
<author>
<name>Nikita Zhandarovich</name>
<email>n.zhandarovich@fintech.ru</email>
</author>
<published>2023-04-13T15:12:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=cb86b0e3d9d38ba351dd10caef483529653dd481'/>
<id>urn:sha1:cb86b0e3d9d38ba351dd10caef483529653dd481</id>
<content type='text'>
[ Upstream commit 20c3dffdccbd494e0dd631d1660aeecbff6775f2 ]

Several calls to ci_dpm_fini() will attempt to free resources that
either have been freed before or haven't been allocated yet. This
may lead to undefined or dangerous behaviour.

For instance, if r600_parse_extended_power_table() fails, it might
call r600_free_extended_power_table() as will ci_dpm_fini() later
during error handling.

Fix this by only freeing pointers to objects previously allocated.

Found by Linux Verification Center (linuxtesting.org) with static
analysis tool SVACE.

Fixes: cc8dbbb4f62a ("drm/radeon: add dpm support for CI dGPUs (v2)")
Co-developed-by: Natalia Petrova &lt;n.petrova@fintech.ru&gt;
Signed-off-by: Nikita Zhandarovich &lt;n.zhandarovich@fintech.ru&gt;
Signed-off-by: Alex Deucher &lt;alexander.deucher@amd.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>drm/radeon: fix race condition UAF in radeon_gem_set_domain_ioctl</title>
<updated>2023-06-28T09:12:39+00:00</updated>
<author>
<name>Min Li</name>
<email>lm0963hack@gmail.com</email>
</author>
<published>2023-06-03T07:43:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=1af1cd7be370b08694d8752c97325fe51fdab6aa'/>
<id>urn:sha1:1af1cd7be370b08694d8752c97325fe51fdab6aa</id>
<content type='text'>
[ Upstream commit 982b173a6c6d9472730c3116051977e05d17c8c5 ]

Userspace can race to free the gobj(robj converted from), robj should not
be accessed again after drm_gem_object_put, otherwith it will result in
use-after-free.

Reviewed-by: Christian König &lt;christian.koenig@amd.com&gt;
Signed-off-by: Min Li &lt;lm0963hack@gmail.com&gt;
Signed-off-by: Alex Deucher &lt;alexander.deucher@amd.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>drm/radeon: reintroduce radeon_dp_work_func content</title>
<updated>2023-05-30T13:03:19+00:00</updated>
<author>
<name>Alex Deucher</name>
<email>alexander.deucher@amd.com</email>
</author>
<published>2023-05-18T16:38:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=8756863c7fe0f94b23a2e0f0a0d2a79d58e2a329'/>
<id>urn:sha1:8756863c7fe0f94b23a2e0f0a0d2a79d58e2a329</id>
<content type='text'>
commit a34fc1bcd2c4d8b09dcfc0b95ac65bca1e579bd7 upstream.

Put back the radeon_dp_work_func logic.  It seems that
handling DP RX interrupts is necessary to make some
panels work.  This was removed with the MST support,
but it regresses some systems so add it back.  While
we are here, add the proper mutex locking.

Link: https://gitlab.freedesktop.org/drm/amd/-/issues/2567
Fixes: 01ad1d9c2888 ("drm/radeon: Drop legacy MST support")
Reviewed-by: Lyude Paul &lt;lyude@redhat.com&gt;
Signed-off-by: Alex Deucher &lt;alexander.deucher@amd.com&gt;
Cc: Lyude Paul &lt;lyude@redhat.com&gt;
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>drm/radeon: Fix eDP for single-display iMac11,2</title>
<updated>2023-03-10T08:34:33+00:00</updated>
<author>
<name>Mark Hawrylak</name>
<email>mark.hawrylak@gmail.com</email>
</author>
<published>2023-02-19T05:02:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=8551ddbff0c3cd9e68a58649820754f471ca49a7'/>
<id>urn:sha1:8551ddbff0c3cd9e68a58649820754f471ca49a7</id>
<content type='text'>
commit 05eacc198c68cbb35a7281ce4011f8899ee1cfb8 upstream.

Apple iMac11,2 (mid 2010) also with Radeon HD-4670 that has the same
issue as iMac10,1 (late 2009) where the internal eDP panel stays dark on
driver load.  This patch treats iMac11,2 the same as iMac10,1,
so the eDP panel stays active.

Additional steps:
Kernel boot parameter radeon.nomodeset=0 required to keep the eDP
panel active.

This patch is an extension of
commit 564d8a2cf3ab ("drm/radeon: Fix eDP for single-display iMac10,1 (v2)")
Link: https://lore.kernel.org/all/lsq.1507553064.833262317@decadent.org.uk/
Signed-off-by: Mark Hawrylak &lt;mark.hawrylak@gmail.com&gt;
Signed-off-by: Alex Deucher &lt;alexander.deucher@amd.com&gt;
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>drm/radeon: free iio for atombios when driver shutdown</title>
<updated>2023-03-10T08:33:55+00:00</updated>
<author>
<name>Liwei Song</name>
<email>liwei.song@windriver.com</email>
</author>
<published>2023-01-06T09:47:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=107b8b542bb9dab4cbdc3276c85fbdd7f6782313'/>
<id>urn:sha1:107b8b542bb9dab4cbdc3276c85fbdd7f6782313</id>
<content type='text'>
[ Upstream commit 4773fadedca918faec443daaca5e4ea1c0ced144 ]

Fix below kmemleak when unload radeon driver:

unreferenced object 0xffff9f8608ede200 (size 512):
  comm "systemd-udevd", pid 326, jiffies 4294682822 (age 716.338s)
  hex dump (first 32 bytes):
    00 00 00 00 c4 aa ec aa 14 ab 00 00 00 00 00 00  ................
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
  backtrace:
    [&lt;0000000062fadebe&gt;] kmem_cache_alloc_trace+0x2f1/0x500
    [&lt;00000000b6883cea&gt;] atom_parse+0x117/0x230 [radeon]
    [&lt;00000000158c23fd&gt;] radeon_atombios_init+0xab/0x170 [radeon]
    [&lt;00000000683f672e&gt;] si_init+0x57/0x750 [radeon]
    [&lt;00000000566cc31f&gt;] radeon_device_init+0x559/0x9c0 [radeon]
    [&lt;0000000046efabb3&gt;] radeon_driver_load_kms+0xc1/0x1a0 [radeon]
    [&lt;00000000b5155064&gt;] drm_dev_register+0xdd/0x1d0
    [&lt;0000000045fec835&gt;] radeon_pci_probe+0xbd/0x100 [radeon]
    [&lt;00000000e69ecca3&gt;] pci_device_probe+0xe1/0x160
    [&lt;0000000019484b76&gt;] really_probe.part.0+0xc1/0x2c0
    [&lt;000000003f2649da&gt;] __driver_probe_device+0x96/0x130
    [&lt;00000000231c5bb1&gt;] driver_probe_device+0x24/0xf0
    [&lt;0000000000a42377&gt;] __driver_attach+0x77/0x190
    [&lt;00000000d7574da6&gt;] bus_for_each_dev+0x7f/0xd0
    [&lt;00000000633166d2&gt;] driver_attach+0x1e/0x30
    [&lt;00000000313b05b8&gt;] bus_add_driver+0x12c/0x1e0

iio was allocated in atom_index_iio() called by atom_parse(),
but it doesn't got released when the dirver is shutdown.
Fix this kmemleak by free it in radeon_atombios_fini().

Signed-off-by: Liwei Song &lt;liwei.song@windriver.com&gt;
Signed-off-by: Alex Deucher &lt;alexander.deucher@amd.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
</feed>
