<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/include/uapi/drm/panfrost_drm.h, branch linux-6.14.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.</subtitle>
<id>https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-6.14.y</id>
<link rel='self' href='https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-6.14.y'/>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/'/>
<updated>2024-09-02T09:13:38Z</updated>
<entry>
<title>drm/panfrost: Add cycle counter job requirement</title>
<updated>2024-09-02T09:13:38Z</updated>
<author>
<name>Mary Guillemard</name>
<email>mary.guillemard@collabora.com</email>
</author>
<published>2024-08-19T08:02:23Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=3a8d97611b564b5b25f68c90b543056fc9ae0bec'/>
<id>urn:sha1:3a8d97611b564b5b25f68c90b543056fc9ae0bec</id>
<content type='text'>
Extend the uAPI with a new job requirement flag for cycle
counters. This requirement is used by userland to indicate that a job
requires cycle counters or system timestamp to be propagated. (for use
with write value timestamp jobs)

We cannot enable cycle counters unconditionally as this would result in
an increase of GPU power consumption. As a result, they should be left
off unless required by the application.

If a job requires cycle counters or system timestamps propagation, we
must enable cycle counting before issuing a job and disable it right
after the job completes.

Since this extends the uAPI and because userland needs a way to advertise
features like VK_KHR_shader_clock conditionally, we bumps the driver
minor version.

v2:
- Rework commit message
- Squash uAPI changes and implementation in this commit
- Simplify changes based on Steven Price comments

v3:
- Add Steven Price r-b
- Fix a codestyle issue

Signed-off-by: Mary Guillemard &lt;mary.guillemard@collabora.com&gt;
Reviewed-by: Steven Price &lt;steven.price@arm.com&gt;
Tested-by: Heiko Stuebner &lt;heiko@sntech.de&gt;
Signed-off-by: Steven Price &lt;steven.price@arm.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20240819080224.24914-3-mary.guillemard@collabora.com
</content>
</entry>
<entry>
<title>drm/panfrost: Add SYSTEM_TIMESTAMP and SYSTEM_TIMESTAMP_FREQUENCY parameters</title>
<updated>2024-09-02T09:13:38Z</updated>
<author>
<name>Mary Guillemard</name>
<email>mary.guillemard@collabora.com</email>
</author>
<published>2024-08-19T08:02:22Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=9c75b16cabc69adbbfdc9d219df87c9173f0da0a'/>
<id>urn:sha1:9c75b16cabc69adbbfdc9d219df87c9173f0da0a</id>
<content type='text'>
Expose system timestamp and frequency supported by the GPU.

Mali uses an external timer as GPU system time. On ARM, this is wired to
the generic arch timer so we wire cntfrq_el0 as device frequency.

This new uAPI will be used in Mesa to implement timestamp queries and
VK_KHR_calibrated_timestamps.

v2:
- Rewrote to use GPU timestamp register
- Add missing include for arch_timer_get_cntfrq
- Rework commit message

v3:
- Move panfrost_cycle_counter_get and panfrost_cycle_counter_put to
  panfrost_ioctl_query_timestamp
- Handle possible overflow in panfrost_timestamp_read

Signed-off-by: Mary Guillemard &lt;mary.guillemard@collabora.com&gt;
Tested-by: Heiko Stuebner &lt;heiko@sntech.de&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/20240819080224.24914-2-mary.guillemard@collabora.com
</content>
</entry>
<entry>
<title>drm/panfrost: Remove type name from internal struct again</title>
<updated>2022-11-07T15:35:43Z</updated>
<author>
<name>Steven Price</name>
<email>steven.price@arm.com</email>
</author>
<published>2022-11-03T11:40:36Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=c4299907c09a638c0a30f029338d07941c049d73'/>
<id>urn:sha1:c4299907c09a638c0a30f029338d07941c049d73</id>
<content type='text'>
Commit 72655fb942c1 ("drm/panfrost: replace endian-specific types with
native ones") accidentally reverted part of the parent commit
7228d9d79248 ("drm/panfrost: Remove type name from internal structs")
leading to the situation that the Panfrost UAPI header still doesn't
compile correctly in C++.

Revert the accidental revert and pass me a brown paper bag.

Reported-by: Alyssa Rosenzweig &lt;alyssa@collabora.com&gt;
Fixes: 72655fb942c1 ("drm/panfrost: replace endian-specific types with native ones")
Signed-off-by: Steven Price &lt;steven.price@arm.com&gt;
Reviewed-by: Alyssa Rosenzweig &lt;alyssa@collabora.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20221103114036.1581854-1-steven.price@arm.com
</content>
</entry>
<entry>
<title>drm/panfrost: replace endian-specific types with native ones</title>
<updated>2022-10-20T10:02:11Z</updated>
<author>
<name>Steven Price</name>
<email>steven.price@arm.com</email>
</author>
<published>2022-10-17T10:46:02Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=72655fb942c1e3d9e71e48e87ee439abe52f3a90'/>
<id>urn:sha1:72655fb942c1e3d9e71e48e87ee439abe52f3a90</id>
<content type='text'>
__le32 and __le64 types aren't portable and are not available on
FreeBSD (which uses the same uAPI).

Instead of attempting to always output little endian, just use native
endianness in the dumps. Tools can detect the endianness in use by
looking at the 'magic' field, but equally we don't expect big-endian to
be used with Mali (there are no known implementations out there).

Bug: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7252
Fixes: 730c2bf4ad39 ("drm/panfrost: Add support for devcoredump")
Reviewed-by: Alyssa Rosenzweig &lt;alyssa.rosenzweig@collabora.com&gt;
Signed-off-by: Steven Price &lt;steven.price@arm.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20221017104602.142992-3-steven.price@arm.com
</content>
</entry>
<entry>
<title>drm/panfrost: Remove type name from internal structs</title>
<updated>2022-10-20T10:02:01Z</updated>
<author>
<name>Steven Price</name>
<email>steven.price@arm.com</email>
</author>
<published>2022-10-17T10:46:01Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=7228d9d79248bd0c8af56a7667a88a875c674e0c'/>
<id>urn:sha1:7228d9d79248bd0c8af56a7667a88a875c674e0c</id>
<content type='text'>
The two structs internal to struct panfrost_dump_object_header were
named, but sadly that is incompatible with C++, causing an error: "an
anonymous union may only have public non-static data members".

However nothing refers to struct pan_reg_hdr and struct pan_bomap_hdr
and there's no need to export these definitions, so lets drop them. This
fixes the C++ build error with the minimum change in userspace API.

Reported-by: Adrián Larumbe &lt;adrian.larumbe@collabora.com&gt;
Fixes: 730c2bf4ad39 ("drm/panfrost: Add support for devcoredump")
Reviewed-by: Alyssa Rosenzweig &lt;alyssa.rosenzweig@collabora.com&gt;
Signed-off-by: Steven Price &lt;steven.price@arm.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20221017104602.142992-2-steven.price@arm.com
</content>
</entry>
<entry>
<title>drm/panfrost: Add support for devcoredump</title>
<updated>2022-08-08T11:39:55Z</updated>
<author>
<name>Adrián Larumbe</name>
<email>adrian.larumbe@collabora.com</email>
</author>
<published>2022-07-29T14:46:10Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=730c2bf4ad395acf0aa0820535fdb8ea6abe5df1'/>
<id>urn:sha1:730c2bf4ad395acf0aa0820535fdb8ea6abe5df1</id>
<content type='text'>
In the event of a job timeout, debug dump information will be written into
/sys/class/devcoredump.

Inspired by etnaviv's similar feature.

Signed-off-by: Adrián Larumbe &lt;adrian.larumbe@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/20220729144610.2105223-3-adrian.larumbe@collabora.com
</content>
</entry>
<entry>
<title>drm/panfrost: Update create_bo flags comment</title>
<updated>2022-01-10T16:39:46Z</updated>
<author>
<name>Alyssa Rosenzweig</name>
<email>alyssa.rosenzweig@collabora.com</email>
</author>
<published>2022-01-09T16:37:04Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=a9e4fb51425f680f191bb65c2778cea31bf058c7'/>
<id>urn:sha1:a9e4fb51425f680f191bb65c2778cea31bf058c7</id>
<content type='text'>
Update a comment stating create_bo took no flags, since it now takes a
bit mask of optional flags NOEXEC and HEAP.

Signed-off-by: Alyssa Rosenzweig &lt;alyssa.rosenzweig@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/20220109163704.2564-1-alyssa.rosenzweig@collabora.com
</content>
</entry>
<entry>
<title>drm/panfrost: Add AFBC_FEATURES parameter</title>
<updated>2021-06-04T15:16:04Z</updated>
<author>
<name>Alyssa Rosenzweig</name>
<email>alyssa.rosenzweig@collabora.com</email>
</author>
<published>2021-06-04T13:00:11Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=3e2926f8753dac1ded56c8ef3e91f56ee763dafd'/>
<id>urn:sha1:3e2926f8753dac1ded56c8ef3e91f56ee763dafd</id>
<content type='text'>
The value of the AFBC_FEATURES register is required by userspace to
determine AFBC support on Bifrost. A user on our IRC channel (#panfrost)
reported a workload that raised a fault on one system's Mali G31 but
worked flawlessly with another system's Mali G31. We determined the
cause to be missing AFBC support on one vendor's Mali implementation --
it turns out AFBC is optional on Bifrost!

Whether AFBC is supported or not is exposed in the AFBC_FEATURES
register on Bifrost, which reads back as 0 on Midgard. A zero value
indicates AFBC is fully supported, provided the architecture itself
supports AFBC, allowing backwards-compatibility with Midgard. Bits 0 and
15 indicate that AFBC support is absent for texturing and rendering
respectively.

The user experiencing the fault reports that AFBC_FEATURES reads back
0x10001 on their system, confirming the architectural lack of AFBC.
Userspace needs this parameter to know to disable AFBC on that
chip, and perhaps others.

v2: Fix typo from copy-paste fail.

v3: Bump the UABI version. This commit was cherry-picked from another
series so chalking this up to a rebase fail.

Signed-off-by: Alyssa Rosenzweig &lt;alyssa.rosenzweig@collabora.com&gt;
Reviewed-by: Steven Price &lt;steven.price@arm.com&gt;
Cc: Rob Herring &lt;robh@kernel.org&gt;
Cc: Tomeu Vizoso &lt;tomeu.vizoso@collabora.com&gt;
Signed-off-by: Steven Price &lt;steven.price@arm.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20210604130011.3203-1-alyssa.rosenzweig@collabora.com
</content>
</entry>
<entry>
<title>drm/panfrost: Add support for GPU heap allocations</title>
<updated>2019-08-12T20:21:37Z</updated>
<author>
<name>Rob Herring</name>
<email>robh@kernel.org</email>
</author>
<published>2019-07-26T22:09:43Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=187d2929206e6b098312c174ea873e4cedf5420d'/>
<id>urn:sha1:187d2929206e6b098312c174ea873e4cedf5420d</id>
<content type='text'>
The midgard/bifrost GPUs need to allocate GPU heap memory which is
allocated on GPU page faults and not pinned in memory. The vendor driver
calls this functionality GROW_ON_GPF.

This implementation assumes that BOs allocated with the
PANFROST_BO_NOEXEC flag are never mmapped or exported. Both of those may
actually work, but I'm unsure if there's some interaction there. It
would cause the whole object to be pinned in memory which would defeat
the point of this.

On faults, we map in 2MB at a time in order to utilize huge pages (if
enabled). Currently, once we've mapped pages in, they are only unmapped
if the BO is freed. Once we add shrinker support, we can unmap pages
with the shrinker.

Cc: Tomeu Vizoso &lt;tomeu.vizoso@collabora.com&gt;
Cc: Boris Brezillon &lt;boris.brezillon@collabora.com&gt;
Cc: Robin Murphy &lt;robin.murphy@arm.com&gt;
Acked-by: Alyssa Rosenzweig &lt;alyssa.rosenzweig@collabora.com&gt;
Reviewed-by: Steven Price &lt;steven.price@arm.com&gt;
Signed-off-by: Rob Herring &lt;robh@kernel.org&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20190808222200.13176-9-robh@kernel.org
</content>
</entry>
<entry>
<title>drm/panfrost: Add a no execute flag for BO allocations</title>
<updated>2019-08-12T20:20:06Z</updated>
<author>
<name>Rob Herring</name>
<email>robh@kernel.org</email>
</author>
<published>2019-07-11T21:56:14Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=203270c025be02d52feca729d9193860317c2e82'/>
<id>urn:sha1:203270c025be02d52feca729d9193860317c2e82</id>
<content type='text'>
Executable buffers have an alignment restriction that they can't cross
16MB boundary as the GPU program counter is 24-bits. This restriction is
currently not handled and we just get lucky. As current userspace
assumes all BOs are executable, that has to remain the default. So add a
new PANFROST_BO_NOEXEC flag to allow userspace to indicate which BOs are
not executable.

There is also a restriction that executable buffers cannot start or end
on a 4GB boundary. This is mostly avoided as there is only 4GB of space
currently and the beginning is already blocked out for NULL ptr
detection. Add support to handle this restriction fully regardless of
the current constraints.

For existing userspace, all created BOs remain executable, but the GPU
VA alignment will be increased to the size of the BO. This shouldn't
matter as there is plenty of GPU VA space.

Cc: Tomeu Vizoso &lt;tomeu.vizoso@collabora.com&gt;
Cc: Boris Brezillon &lt;boris.brezillon@collabora.com&gt;
Cc: Robin Murphy &lt;robin.murphy@arm.com&gt;
Reviewed-by: Steven Price &lt;steven.price@arm.com&gt;
Acked-by: Alyssa Rosenzweig &lt;alyssa.rosenzweig@collabora.com&gt;
Signed-off-by: Rob Herring &lt;robh@kernel.org&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20190808222200.13176-6-robh@kernel.org
</content>
</entry>
</feed>
