<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/gpu/drm/panthor, branch linux-6.14.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-6.14.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-6.14.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2025-04-10T12:44:18Z</updated>
<entry>
<title>drm/panthor: Clean up FW version information display</title>
<updated>2025-04-10T12:44:18Z</updated>
<author>
<name>Steven Price</name>
</author>
<published>2025-02-13T16:12:48Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=8f6c920ca38609360c3fea5c51d84063463fb343'/>
<id>urn:sha1:8f6c920ca38609360c3fea5c51d84063463fb343</id>
<content type='text'>
[ Upstream commit 3b87886bfb038de2c62e627079472ba612e89410 ]

Assigning a string to an array which is too small to include the NUL
byte at the end causes a warning on some compilers. But this function
also has some other oddities like the 'header' array which is only ever
used within sizeof().

Tidy up the function by removing the 'header' array, allow the NUL byte
to be present in git_sha_header, and calculate the length directly from
git_sha_header.

Reported-by: Will Deacon &lt;will@kernel.org&gt;
Closes: https://lore.kernel.org/all/20250213154237.GA11897@willie-the-truck/
Fixes: 9d443deb0441 ("drm/panthor: Display FW version information")
Signed-off-by: Steven Price &lt;steven.price@arm.com&gt;
Acked-by: Will Deacon &lt;will@kernel.org&gt;
Reviewed-by: Boris Brezillon &lt;boris.brezillon@collabora.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20250213161248.1642392-1-steven.price@arm.com
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>drm/panthor: Avoid sleep locking in the internal BO size path</title>
<updated>2025-04-10T12:44:18Z</updated>
<author>
<name>Adrián Larumbe</name>
</author>
<published>2025-03-03T19:08:46Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ab9cb310823ed0f3df7e6f86d514f391a3007544'/>
<id>urn:sha1:ab9cb310823ed0f3df7e6f86d514f391a3007544</id>
<content type='text'>
[ Upstream commit c63c3bfdde2656a3ead50ac3ce4a51a634e22dab ]

Commit 434e5ca5b5d7 ("drm/panthor: Expose size of driver internal BO's over
fdinfo") locks the VMS xarray, to avoid UAF errors when the same VM is
being concurrently destroyed by another thread. However, that puts the
current thread in atomic context, which means taking the VMS' heap locks
will trigger a warning as the thread is no longer allowed to sleep.

Because in this case replacing the heap mutex with a spinlock isn't
feasible, the fdinfo handler no longer traverses the list of heaps for
every single VM associated with an open DRM file. Instead, when a new heap
chunk is allocated, its size is accumulated into a pool-wide tally, which
also makes the atomic context code path somewhat faster.

Signed-off-by: Adrián Larumbe &lt;adrian.larumbe@collabora.com&gt;
Fixes: 434e5ca5b5d7 ("drm/panthor: Expose size of driver internal BO's over fdinfo")
Reviewed-by: Boris Brezillon &lt;boris.brezillon@collabora.com&gt;
Reviewed-by: Steven Price &lt;steven.price@arm.com&gt;
Signed-off-by: Steven Price &lt;steven.price@arm.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20250303190923.1639985-2-adrian.larumbe@collabora.com
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>drm/panthor: Replace sleep locks with spinlocks in fdinfo path</title>
<updated>2025-04-10T12:44:18Z</updated>
<author>
<name>Adrián Larumbe</name>
</author>
<published>2025-03-03T19:08:45Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=446311aa801cbf21a9c22f7174fd1716ea6aefe9'/>
<id>urn:sha1:446311aa801cbf21a9c22f7174fd1716ea6aefe9</id>
<content type='text'>
[ Upstream commit e379856b428acafb8ed689f31d65814da6447b2e ]

Commit 0590c94c3596 ("drm/panthor: Fix race condition when gathering fdinfo
group samples") introduced an xarray lock to deal with potential
use-after-free errors when accessing groups fdinfo figures. However, this
toggles the kernel's atomic context status, so the next nested mutex lock
will raise a warning when the kernel is compiled with mutex debug options:

CONFIG_DEBUG_RT_MUTEXES=y
CONFIG_DEBUG_MUTEXES=y

Replace Panthor's group fdinfo data mutex with a guarded spinlock.

Signed-off-by: Adrián Larumbe &lt;adrian.larumbe@collabora.com&gt;
Fixes: 0590c94c3596 ("drm/panthor: Fix race condition when gathering fdinfo group samples")
Reviewed-by: Liviu Dudau &lt;liviu.dudau@arm.com&gt;
Reviewed-by: Boris Brezillon &lt;boris.brezillon@collabora.com&gt;
Reviewed-by: Steven Price &lt;steven.price@arm.com&gt;
Signed-off-by: Steven Price &lt;steven.price@arm.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20250303190923.1639985-1-adrian.larumbe@collabora.com
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>drm/panthor: Expose size of driver internal BO's over fdinfo</title>
<updated>2025-04-10T12:44:18Z</updated>
<author>
<name>Adrián Larumbe</name>
</author>
<published>2025-01-30T17:28:11Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=097a87319ef1bd0d227406e2d686bfcada826ac0'/>
<id>urn:sha1:097a87319ef1bd0d227406e2d686bfcada826ac0</id>
<content type='text'>
[ Upstream commit 434e5ca5b5d7ea415670d4fcb399d90d355a1e38 ]

This will display the sizes of kenrel BO's bound to an open file, which are
otherwise not exposed to UM through a handle.

The sizes recorded are as follows:
 - Per group: suspend buffer, protm-suspend buffer, syncobjcs
 - Per queue: ringbuffer, profiling slots, firmware interface
 - For all heaps in all heap pools across all VM's bound to an open file,
 record size of all heap chuks, and for each pool the gpu_context BO too.

This does not record the size of FW regions, as these aren't bound to a
specific open file and remain active through the whole life of the driver.

Reviewed-by: Liviu Dudau &lt;liviu.dudau@arm.com&gt;
Reviewed-by: Mihail Atanassov &lt;mihail.atanassov@arm.com&gt;
Reviewed-by: Steven Price &lt;steven.price@arm.com&gt;
Reviewed-by: Boris Brezillon &lt;boris.brezillon@collabora.com&gt;
Signed-off-by: Adrián Larumbe &lt;adrian.larumbe@collabora.com&gt;
Signed-off-by: Boris Brezillon &lt;boris.brezillon@collabora.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20250130172851.941597-4-adrian.larumbe@collabora.com
Stable-dep-of: e379856b428a ("drm/panthor: Replace sleep locks with spinlocks in fdinfo path")
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>drm/panthor: Update CS_STATUS_ defines to correct values</title>
<updated>2025-04-10T12:44:18Z</updated>
<author>
<name>Ashley Smith</name>
</author>
<published>2025-03-03T18:04:32Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3d659dc2f9a02f0e140a3d5287709f2263e5e863'/>
<id>urn:sha1:3d659dc2f9a02f0e140a3d5287709f2263e5e863</id>
<content type='text'>
[ Upstream commit c82734fbdc50dc9e568e8686622eaa4498acb81e ]

Values for SC_STATUS_BLOCKED_REASON_ are documented in the G610 "Odin"
GPU specification (CS_STATUS_BLOCKED_REASON register).

This change updates the defines to the correct values.

Fixes: 2718d91816ee ("drm/panthor: Add the FW logical block")
Signed-off-by: Ashley Smith &lt;ashley.smith@collabora.com&gt;
Reviewed-by: Liviu Dudau &lt;liviu.dudau@arm.com&gt;
Reviewed-by: Adrián Larumbe &lt;adrian.larumbe@collabora.com&gt;
Reviewed-by: Boris Brezillon &lt;boris.brezillon@collabora.com&gt;
Reviewed-by: Steven Price &lt;steven.price@arm.com&gt;
Signed-off-by: Steven Price &lt;steven.price@arm.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20250303180444.3768993-1-ashley.smith@collabora.com
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>drm/panthor: Fix race condition when gathering fdinfo group samples</title>
<updated>2025-04-10T12:44:15Z</updated>
<author>
<name>Adrián Larumbe</name>
</author>
<published>2025-01-30T17:28:13Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e9d45f42a64a400adba59ee83d03e6db662530b4'/>
<id>urn:sha1:e9d45f42a64a400adba59ee83d03e6db662530b4</id>
<content type='text'>
[ Upstream commit 0590c94c3596d6c1a3d549ae611366f2ad4e1d8d ]

Commit e16635d88fa0 ("drm/panthor: add DRM fdinfo support") failed to
protect access to groups with an xarray lock, which could lead to
use-after-free errors.

Fixes: e16635d88fa0 ("drm/panthor: add DRM fdinfo support")
Reviewed-by: Boris Brezillon &lt;boris.brezillon@collabora.com&gt;
Reviewed-by: Steven Price &lt;steven.price@arm.com&gt;
Signed-off-by: Adrián Larumbe &lt;adrian.larumbe@collabora.com&gt;
Signed-off-by: Boris Brezillon &lt;boris.brezillon@collabora.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20250130172851.941597-6-adrian.larumbe@collabora.com
Link: https://patchwork.freedesktop.org/patch/msgid/20250107173310.88329-1-florent.tomasin@arm.com
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>drm/panthor: Fix a race between the reset and suspend path</title>
<updated>2025-04-10T12:44:15Z</updated>
<author>
<name>Boris Brezillon</name>
</author>
<published>2024-12-17T09:24:57Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=8d70fa5d83c7aaa787edd8f3d23110dbed4f683c'/>
<id>urn:sha1:8d70fa5d83c7aaa787edd8f3d23110dbed4f683c</id>
<content type='text'>
[ Upstream commit 57e233c3bd63f32d2c7e937db2e16b98f723ce2f ]

If a reset is scheduled when the suspend happens, we drop the
reset-pending info on the floor assuming the resume will fix things,
but the resume logic might try a fast reset. If we're lucky, the
fast reset fails and we fallback to a slow reset, but if the FW was
corrupted in a way that makes it partially functional (it boots but
doesn't quite do what it's expected to do), we won't notice immediately
that things are not working correctly, leading to a new reset further
down the road.

Fixes: 5fe909cae118 ("drm/panthor: Add the device logical block")
Signed-off-by: Boris Brezillon &lt;boris.brezillon@collabora.com&gt;
Reviewed-by: Liviu Dudau &lt;liviu.dudau@arm.com&gt;
Reviewed-by: Steven Price &lt;steven.price@arm.com&gt;
Signed-off-by: Steven Price &lt;steven.price@arm.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20241217092457.1582053-1-boris.brezillon@collabora.com
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>drm/panthor: avoid garbage value in panthor_ioctl_dev_query()</title>
<updated>2025-02-07T16:31:59Z</updated>
<author>
<name>Su Hui</name>
</author>
<published>2025-01-19T02:58:29Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3b32b7f638fe61e9d29290960172f4e360e38233'/>
<id>urn:sha1:3b32b7f638fe61e9d29290960172f4e360e38233</id>
<content type='text'>
'priorities_info' is uninitialized, and the uninitialized value is copied
to user object when calling PANTHOR_UOBJ_SET(). Using memset to initialize
'priorities_info' to avoid this garbage value problem.

Fixes: f70000ef2352 ("drm/panthor: Add DEV_QUERY_GROUP_PRIORITIES_INFO dev query")
Signed-off-by: Su Hui &lt;suhui@nfschina.com&gt;
Reviewed-by: Dan Carpenter &lt;dan.carpenter@linaro.org&gt;
Reviewed-by: Boris Brezillon &lt;boris.brezillon@collabora.com&gt;
Reviewed-by: Steven Price &lt;steven.price@arm.com&gt;
Signed-off-by: Boris Brezillon &lt;boris.brezillon@collabora.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20250119025828.1168419-1-suhui@nfschina.com
</content>
</entry>
<entry>
<title>drm/panthor: Report innocent group kill</title>
<updated>2024-12-17T09:56:12Z</updated>
<author>
<name>Boris Brezillon</name>
</author>
<published>2024-12-11T08:05:00Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=4181576d85c64224ae4b21f7754448d7bbfd5c4b'/>
<id>urn:sha1:4181576d85c64224ae4b21f7754448d7bbfd5c4b</id>
<content type='text'>
Groups can be killed during a reset even though they did nothing wrong.
That usually happens when the FW is put in a bad state by other groups,
resulting in group suspension failures when the reset happens.

If we end up in that situation, flag the group innocent and report
innocence through a new DRM_PANTHOR_GROUP_STATE flag.

Bump the minor driver version to reflect the uAPI change.

Changes in v4:
- Add an entry to the driver version changelog
- Add R-bs

Changes in v3:
- Actually report innocence to userspace

Changes in v2:
- New patch

Signed-off-by: Boris Brezillon &lt;boris.brezillon@collabora.com&gt;
Reviewed-by: Liviu Dudau &lt;liviu.dudau@arm.com&gt;
Reviewed-by: Steven Price &lt;steven.price@arm.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20241211080500.2349505-1-boris.brezillon@collabora.com
</content>
</entry>
<entry>
<title>drm/panthor: Fix the fast-reset logic</title>
<updated>2024-12-11T09:04:12Z</updated>
<author>
<name>Boris Brezillon</name>
</author>
<published>2024-12-11T07:54:19Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ec62d37d2c0d9981da8df0f272a724f5b76181dc'/>
<id>urn:sha1:ec62d37d2c0d9981da8df0f272a724f5b76181dc</id>
<content type='text'>
If we do a GPU soft-reset, that's no longer fast reset. This also means
the slow reset fallback doesn't work because the MCU state is only reset
after a GPU soft-reset.

Let's move the retry logic to panthor_device_resume() to issue a
soft-reset between the fast and slow attempts, and patch
panthor_gpu_suspend() to only power-off the L2 when a fast reset is
requested.

v3:
- No changes

v2:
- Add R-b

Signed-off-by: Boris Brezillon &lt;boris.brezillon@collabora.com&gt;
Reviewed-by: Steven Price &lt;steven.price@arm.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20241211075419.2333731-6-boris.brezillon@collabora.com
</content>
</entry>
</feed>
