<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/gpu/drm/lima, branch v6.6.132</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v6.6.132</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v6.6.132'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2024-08-29T15:33:34+00:00</updated>
<entry>
<title>drm/lima: set gp bus_stop bit before hard reset</title>
<updated>2024-08-29T15:33:34+00:00</updated>
<author>
<name>Erico Nunes</name>
<email>nunes.erico@gmail.com</email>
</author>
<published>2024-01-24T02:59:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=932490268c44318ce7c20c99438b397a830de5a7'/>
<id>urn:sha1:932490268c44318ce7c20c99438b397a830de5a7</id>
<content type='text'>
[ Upstream commit 27aa58ec85f973d98d336df7b7941149308db80f ]

This is required for reliable hard resets. Otherwise, doing a hard reset
while a task is still running (such as a task which is being stopped by
the drm_sched timeout handler) may result in random mmu write timeouts
or lockups which cause the entire gpu to hang.

Signed-off-by: Erico Nunes &lt;nunes.erico@gmail.com&gt;
Signed-off-by: Qiang Yu &lt;yuq825@gmail.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20240124025947.2110659-5-nunes.erico@gmail.com
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>drm/lima: Mark simple_ondemand governor as softdep</title>
<updated>2024-08-14T11:59:01+00:00</updated>
<author>
<name>Dragan Simic</name>
<email>dsimic@manjaro.org</email>
</author>
<published>2024-06-17T20:22:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=b3aa563f213574d90328294da2691a0cb96437a5'/>
<id>urn:sha1:b3aa563f213574d90328294da2691a0cb96437a5</id>
<content type='text'>
commit 0c94f58cef319ad054fd909b3bf4b7d09c03e11c upstream.

Lima DRM driver uses devfreq to perform DVFS, while using simple_ondemand
devfreq governor by default.  This causes driver initialization to fail on
boot when simple_ondemand governor isn't built into the kernel statically,
as a result of the missing module dependency and, consequently, the
required governor module not being included in the initial ramdisk.  Thus,
let's mark simple_ondemand governor as a softdep for Lima, to have its
kernel module included in the initial ramdisk.

This is a rather longstanding issue that has forced distributions to build
devfreq governors statically into their kernels, [1][2] or may have forced
some users to introduce unnecessary workarounds.

Having simple_ondemand marked as a softdep for Lima may not resolve this
issue for all Linux distributions.  In particular, it will remain
unresolved for the distributions whose utilities for the initial ramdisk
generation do not handle the available softdep information [3] properly
yet.  However, some Linux distributions already handle softdeps properly
while generating their initial ramdisks, [4] and this is a prerequisite
step in the right direction for the distributions that don't handle them
properly yet.

[1] https://gitlab.manjaro.org/manjaro-arm/packages/core/linux-pinephone/-/blob/6.7-megi/config?ref_type=heads#L5749
[2] https://gitlab.com/postmarketOS/pmaports/-/blob/7f64e287e7732c9eaa029653e73ca3d4ba1c8598/main/linux-postmarketos-allwinner/config-postmarketos-allwinner.aarch64#L4654
[3] https://git.kernel.org/pub/scm/utils/kernel/kmod/kmod.git/commit/?id=49d8e0b59052999de577ab732b719cfbeb89504d
[4] https://github.com/archlinux/mkinitcpio/commit/97ac4d37aae084a050be512f6d8f4489054668ad

Cc: Philip Muller &lt;philm@manjaro.org&gt;
Cc: Oliver Smith &lt;ollieparanoid@postmarketos.org&gt;
Cc: Daniel Smith &lt;danct12@disroot.org&gt;
Cc: stable@vger.kernel.org
Fixes: 1996970773a3 ("drm/lima: Add optional devfreq and cooling device support")
Signed-off-by: Dragan Simic &lt;dsimic@manjaro.org&gt;
Signed-off-by: Qiang Yu &lt;yuq825@gmail.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/fdaf2e41bb6a0c5118ff9cc21f4f62583208d885.1718655070.git.dsimic@manjaro.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>drm/lima: fix shared irq handling on driver remove</title>
<updated>2024-07-11T10:49:03+00:00</updated>
<author>
<name>Erico Nunes</name>
<email>nunes.erico@gmail.com</email>
</author>
<published>2024-04-01T22:43:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=04d531b9a1875846d4f89953b469ad463aa7a770'/>
<id>urn:sha1:04d531b9a1875846d4f89953b469ad463aa7a770</id>
<content type='text'>
[ Upstream commit a6683c690bbfd1f371510cb051e8fa49507f3f5e ]

lima uses a shared interrupt, so the interrupt handlers must be prepared
to be called at any time. At driver removal time, the clocks are
disabled early and the interrupts stay registered until the very end of
the remove process due to the devm usage.
This is potentially a bug as the interrupts access device registers
which assumes clocks are enabled. A crash can be triggered by removing
the driver in a kernel with CONFIG_DEBUG_SHIRQ enabled.
This patch frees the interrupts at each lima device finishing callback
so that the handlers are already unregistered by the time we fully
disable clocks.

Signed-off-by: Erico Nunes &lt;nunes.erico@gmail.com&gt;
Signed-off-by: Qiang Yu &lt;yuq825@gmail.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20240401224329.1228468-2-nunes.erico@gmail.com
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>drm/lima: mask irqs in timeout path before hard reset</title>
<updated>2024-06-27T11:49:03+00:00</updated>
<author>
<name>Erico Nunes</name>
<email>nunes.erico@gmail.com</email>
</author>
<published>2024-04-05T15:29:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=bdbc4ca77f5eaac15de7230814253cddfed273b1'/>
<id>urn:sha1:bdbc4ca77f5eaac15de7230814253cddfed273b1</id>
<content type='text'>
[ Upstream commit a421cc7a6a001b70415aa4f66024fa6178885a14 ]

There is a race condition in which a rendering job might take just long
enough to trigger the drm sched job timeout handler but also still
complete before the hard reset is done by the timeout handler.
This runs into race conditions not expected by the timeout handler.
In some very specific cases it currently may result in a refcount
imbalance on lima_pm_idle, with a stack dump such as:

[10136.669170] WARNING: CPU: 0 PID: 0 at drivers/gpu/drm/lima/lima_devfreq.c:205 lima_devfreq_record_idle+0xa0/0xb0
...
[10136.669459] pc : lima_devfreq_record_idle+0xa0/0xb0
...
[10136.669628] Call trace:
[10136.669634]  lima_devfreq_record_idle+0xa0/0xb0
[10136.669646]  lima_sched_pipe_task_done+0x5c/0xb0
[10136.669656]  lima_gp_irq_handler+0xa8/0x120
[10136.669666]  __handle_irq_event_percpu+0x48/0x160
[10136.669679]  handle_irq_event+0x4c/0xc0

We can prevent that race condition entirely by masking the irqs at the
beginning of the timeout handler, at which point we give up on waiting
for that job entirely.
The irqs will be enabled again at the next hard reset which is already
done as a recovery by the timeout handler.

Signed-off-by: Erico Nunes &lt;nunes.erico@gmail.com&gt;
Reviewed-by: Qiang Yu &lt;yuq825@gmail.com&gt;
Signed-off-by: Qiang Yu &lt;yuq825@gmail.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20240405152951.1531555-4-nunes.erico@gmail.com
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>drm/lima: add mask irq callback to gp and pp</title>
<updated>2024-06-27T11:49:03+00:00</updated>
<author>
<name>Erico Nunes</name>
<email>nunes.erico@gmail.com</email>
</author>
<published>2024-04-05T15:29:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=022db5d6a8bddbbb4644f2d8d1632ab6f19b8d56'/>
<id>urn:sha1:022db5d6a8bddbbb4644f2d8d1632ab6f19b8d56</id>
<content type='text'>
[ Upstream commit 49c13b4d2dd4a831225746e758893673f6ae961c ]

This is needed because we want to reset those devices in device-agnostic
code such as lima_sched.
In particular, masking irqs will be useful before a hard reset to
prevent race conditions.

Signed-off-by: Erico Nunes &lt;nunes.erico@gmail.com&gt;
Signed-off-by: Qiang Yu &lt;yuq825@gmail.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20240405152951.1531555-2-nunes.erico@gmail.com
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>drm/lima: fix a memleak in lima_heap_alloc</title>
<updated>2024-03-26T22:19:43+00:00</updated>
<author>
<name>Zhipeng Lu</name>
<email>alexious@zju.edu.cn</email>
</author>
<published>2024-01-17T07:13:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=8e25c0ee5665e8a768b8e21445db1f86e9156eb7'/>
<id>urn:sha1:8e25c0ee5665e8a768b8e21445db1f86e9156eb7</id>
<content type='text'>
[ Upstream commit 04ae3eb470e52a3c41babe85ff8cee195e4dcbea ]

When lima_vm_map_bo fails, the resources need to be deallocated, or
there will be memleaks.

Fixes: 6aebc51d7aef ("drm/lima: support heap buffer creation")
Signed-off-by: Zhipeng Lu &lt;alexious@zju.edu.cn&gt;
Signed-off-by: Qiang Yu &lt;yuq825@gmail.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20240117071328.3811480-1-alexious@zju.edu.cn
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>drm: Explicitly include correct DT includes</title>
<updated>2023-07-21T07:12:43+00:00</updated>
<author>
<name>Rob Herring</name>
<email>robh@kernel.org</email>
</author>
<published>2023-07-14T17:45:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=722d4f06e560ae8eee84fbd63035356592a37dd1'/>
<id>urn:sha1:722d4f06e560ae8eee84fbd63035356592a37dd1</id>
<content type='text'>
The DT of_device.h and of_platform.h date back to the separate
of_platform_bus_type before it as merged into the regular platform bus.
As part of that merge prepping Arm DT support 13 years ago, they
"temporarily" include each other. They also include platform_device.h
and of.h. As a result, there's a pretty much random mix of those include
files used throughout the tree. In order to detangle these headers and
replace the implicit includes with struct declarations, users need to
explicitly include the correct includes.

Signed-off-by: Rob Herring &lt;robh@kernel.org&gt;
Acked-by: Sam Ravnborg &lt;sam@ravnborg.org&gt;
Reviewed-by: Steven Price &lt;steven.price@arm.com&gt;
Acked-by: Liviu Dudau &lt;liviu.dudau@arm.com&gt;
Reviewed-by: Kieran Bingham &lt;kieran.bingham+renesas@ideasonboard.com&gt;
Acked-by: Robert Foss &lt;rfoss@kernel.org&gt;
Signed-off-by: Thierry Reding &lt;treding@nvidia.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20230714174545.4056287-1-robh@kernel.org
</content>
</entry>
<entry>
<title>drm: Clear fd/handle callbacks in struct drm_driver</title>
<updated>2023-06-26T09:08:41+00:00</updated>
<author>
<name>Thomas Zimmermann</name>
<email>tzimmermann@suse.de</email>
</author>
<published>2023-06-20T07:59:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=71e801b9b44f86ce8c816b06960c705f901c50e5'/>
<id>urn:sha1:71e801b9b44f86ce8c816b06960c705f901c50e5</id>
<content type='text'>
Clear all assignments of struct drm_driver's fd/handle callbacks to
drm_gem_prime_fd_to_handle() and drm_gem_prime_handle_to_fd(). These
functions are called by default. Add a TODO item to convert vmwgfx
to the defaults as well.

v2:
	* remove TODO item (Zack)
	* also update amdgpu's amdgpu_partition_driver

Signed-off-by: Thomas Zimmermann &lt;tzimmermann@suse.de&gt;
Reviewed-by: Simon Ser &lt;contact@emersion.fr&gt;
Acked-by: Alex Deucher &lt;alexander.deucher@amd.com&gt;
Acked-by: Jeffrey Hugo &lt;quic_jhugo@quicinc.com&gt; # qaic
Link: https://patchwork.freedesktop.org/patch/msgid/20230620080252.16368-3-tzimmermann@suse.de
</content>
</entry>
<entry>
<title>drm/shmem-helper: Switch to reservation lock</title>
<updated>2023-06-21T17:22:20+00:00</updated>
<author>
<name>Dmitry Osipenko</name>
<email>dmitry.osipenko@collabora.com</email>
</author>
<published>2023-05-29T22:39:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=21aa27ddc58269349597c6d243212bcc4065d277'/>
<id>urn:sha1:21aa27ddc58269349597c6d243212bcc4065d277</id>
<content type='text'>
Replace all drm-shmem locks with a GEM reservation lock. This makes locks
consistent with dma-buf locking convention where importers are responsible
for holding reservation lock for all operations performed over dma-bufs,
preventing deadlock between dma-buf importers and exporters.

Suggested-by: Daniel Vetter &lt;daniel@ffwll.ch&gt;
Acked-by: Thomas Zimmermann &lt;tzimmermann@suse.de&gt;
Reviewed-by: Emil Velikov &lt;emil.l.velikov@gmail.com&gt;
Signed-off-by: Dmitry Osipenko &lt;dmitry.osipenko@collabora.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20230529223935.2672495-7-dmitry.osipenko@collabora.com
</content>
</entry>
<entry>
<title>Merge drm/drm-next into drm-misc-next</title>
<updated>2023-06-19T14:33:14+00:00</updated>
<author>
<name>Thomas Zimmermann</name>
<email>tzimmermann@suse.de</email>
</author>
<published>2023-06-19T14:33:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=de8a334f215c5a5c5bb070df4325af824d7eaaf1'/>
<id>urn:sha1:de8a334f215c5a5c5bb070df4325af824d7eaaf1</id>
<content type='text'>
Backmerging into drm-misc-next to get commit 2c1c7ba457d4
("drm/amdgpu: support partition drm devices"), which is required to fix
commit 0adec22702d4 ("drm: Remove struct drm_driver.gem_prime_mmap").

Signed-off-by: Thomas Zimmermann &lt;tzimmermann@suse.de&gt;
</content>
</entry>
</feed>
