<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-dev/include/uapi/drm/panfrost_drm.h, branch master</title>
<subtitle>Linux kernel development work - see feature branches</subtitle>
<id>https://git.zx2c4.com/linux-dev/atom/include/uapi/drm/panfrost_drm.h?h=master</id>
<link rel='self' href='https://git.zx2c4.com/linux-dev/atom/include/uapi/drm/panfrost_drm.h?h=master'/>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/'/>
<updated>2022-11-07T15:35:43Z</updated>
<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://git.zx2c4.com/linux-dev/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://git.zx2c4.com/linux-dev/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://git.zx2c4.com/linux-dev/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://git.zx2c4.com/linux-dev/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://git.zx2c4.com/linux-dev/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://git.zx2c4.com/linux-dev/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://git.zx2c4.com/linux-dev/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://git.zx2c4.com/linux-dev/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>
<entry>
<title>drm/panfrost: Add madvise and shrinker support</title>
<updated>2019-08-08T21:57:36Z</updated>
<author>
<name>Rob Herring</name>
<email>robh@kernel.org</email>
</author>
<published>2019-08-05T14:33:58Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=013b6510131568ce4e01856d5360bfdfe9c3632f'/>
<id>urn:sha1:013b6510131568ce4e01856d5360bfdfe9c3632f</id>
<content type='text'>
Add support for madvise and a shrinker similar to other drivers. This
allows userspace to mark BOs which can be freed when there is memory
pressure.

Unlike other implementations, we don't depend on struct_mutex. The
driver maintains a list of BOs which can be freed when the shrinker
is called. Access to the list is serialized with the shrinker_lock.

Cc: Tomeu Vizoso &lt;tomeu.vizoso@collabora.com&gt;
Cc: David Airlie &lt;airlied@linux.ie&gt;
Cc: Daniel Vetter &lt;daniel@ffwll.ch&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/20190805143358.21245-2-robh@kernel.org
</content>
</entry>
<entry>
<title>drm/panfrost: Export all GPU feature registers</title>
<updated>2019-07-25T22:10:52Z</updated>
<author>
<name>Steven Price</name>
<email>steven.price@arm.com</email>
</author>
<published>2019-07-24T10:56:26Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=4bced8bea0943bb3c4b97012d2221d3aca5b9384'/>
<id>urn:sha1:4bced8bea0943bb3c4b97012d2221d3aca5b9384</id>
<content type='text'>
Midgard/Bifrost GPUs have a bunch of feature registers providing details
of what the hardware supports. Panfrost already reads these, this patch
exports them all to user space so that the jobs created by the user space
driver can be tuned for the particular hardware implementation.

Signed-off-by: Steven Price &lt;steven.price@arm.com&gt;
Reviewed-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/20190724105626.53552-1-steven.price@arm.com
</content>
</entry>
</feed>
