Make the queue entry points forward to the implementations
appropriate for the queue's type.
Rename panvk_queue to panvk_gpu_queue.
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35692>
We will soon have a panvk_bind_queue object to expose bind queues,
so let's modify the code to make this reasonably clean by letting
the CSF/JM backing keep their queue object opaque.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-By: Caterina Shablia <caterina.shablia@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35692>
It was absent when initialising a panfrost_resource from a winsys handle.
Signed-off-by: Adrián Larumbe <adrian.larumbe@collabora.com>
Fixes: 7da251fc72 ("panfrost: Check in sources for command stream")
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34224>
Extend the panfrost resource screen interface with a function that lets
the pipe resource the BO belongs to share a label pointer for debugging
purposes.
Then append this resource label to the existing driver tag and label the
backing kernel BO accordingly.
A panfrost_resource::user_label field was added to store the argument
user label. Because in the case of an AFBC-packed resource, user tagging
can happen before the packed BO is created, we need to store it
separately, so that all the necessary label fields are available before
a complete label can be given to the kernel driver.
Signed-off-by: Adrián Larumbe <adrian.larumbe@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34224>
At the moment, the string passed to glObjectLabel() stays only within the
confines of GL objects. It would be nice if that textual description could
be made known to the underlying drivers somehow.
Expand the pipe screen function interface to allow passing GL object labels
down to the UM driver that handles a particular pipe screen.
Not all GL objects have an associated GL resources, so this behaviour has
been implemented for those which are associated with at least one.
Signed-off-by: Adrián Larumbe <adrian.larumbe@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34224>
When creating a BO that backs a panfrost resource, append additional
information. To this end, add a new helper that composes it from
a base resource label and some parameters of interest.
To avoid dealing with situations in which a BO is referenced by multiple
resources, we only allow the BO creator to claim ownership at resource
creation time. There are, however, code paths in which a panfrost
resource's BO is assigned from an existing resource. In those cases, we
transfer ownership between resources.
In those cases, we assign the old BO a label in static memory without
passing it down to the kernel, because in a majority of times that BO
will immediately reach a refcnt of 0, leading to its destruction. That
way we avoid a useless round-trip to the kernel through the BO labelling
ioctl().
Signed-off-by: Adrián Larumbe <adrian.larumbe@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34224>
In preparation of a future commit in which UM will be able to pass
down a label from the GL layer and append it to the existing BO's driver
label, we want to disallow resource handling of imported BO labels.
To this end, add a boolean flag to the panfrost_resource definition so
that future commits can take this into account when managing resource
labels.
Signed-off-by: Adrián Larumbe <adrian.larumbe@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34224>
To this end, provide a helper that passes the label to the kmod layer
upon demand. Helper returns the old label, in preparation for future
commits in which the label might not be in static RO memory, but
dynamically alocated instead, and its lifetime managed by the resource
layer.
Signed-off-by: Adrián Larumbe <adrian.larumbe@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34224>
When panfrost_resource_init_afbc_headers() fails, freeing the newly
created resource is not enough, because we need to unreference its BOs.
This will also take care of freeing its resource label.
Also replace instances of FREE() in error-handling paths with
panfrost_resource_destroy(), as it is capable of handling partially
initialised resources.
Signed-off-by: Adrián Larumbe <adrian.larumbe@collabora.com>
Fixes: e3f2bc7963 ("panfrost: handle mmap failures")
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34224>
Both Panfrost and Panthor are expected to implement these in a
device-specific way.
Signed-off-by: Adrián Larumbe <adrian.larumbe@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34224>
bi_emit_alu needs to fully set the vector of bi_index pass to
bi_make_vec_to, as it is expected by the callee.
Fixes: 3cc6a4c5 ("pan/bi: Handle swizzles in i2i8")
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35642>
Without it, BGR8 gets a NULL entry, and it trips out the GPU when it
gets passed a blend descriptor with RGB8 as a format to convert to.
Fixes: bba4785f60 ("pan/format: Add render target support for R8G8B8/B8G8R8 formats")
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35715>
These generator scripts use the `write` function that, unlike `print`,
doesn't print a trailing newline. So let's add one to the template.
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35697>
This generator scripts uses the `write` function that, unlike `print`,
doesn't print a trailing newline. So let's add one to the template.
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35697>
These generator scripts use the `write` function that, unlike `print`,
doesn't print a trailing newline. So let's add one to the template.
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35697>
This is similar to radv-build-id which is mainly used on SteamOS for
shaders pre-compilation.
For RadeonSI, it also useful to have this option to force the disk
cache key to be uniq for redistributed shaders accross machines when
it's safe.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35629>
These tests are all failing on t760 after enabling 8x and 16x MSAA.
Let's mark them as expected until the issue has been root-caused.
Acked-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35689>
I already marked these as expected fails on G57, but missed the
corresponding failures on G52 because those were moved to post-merge
while the feature here was in development.
Fixes: 350eccd032 ("Uprev Piglit to a0a27e528f643dfeb785350a1213bfff09681950")
Fixes: 423f3fd485 ("panfrost: enable 8x and 16x msaa modes when supported")
Acked-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35689>
The aapt package form Debian might not be recent enough to install the
packages from Android CTS.
Resulting in an error like:
```
03:12:09.302: Module(s) with run failure(s):
03:12:09.302: x86_64 CtsGraphicsTestCases: com.android.tradefed.targetprep.TargetSetupError[AAPT_PARSER_FAILED|520050|DEPENDENCY_ISSUE]: AaptParser failed for file CtsGraphicsTestCases.apk. The APK won't be installed
```
So get aapt from the build-tools matching the ANDROID_SDK_VERSION
corresponding to the Android version and CTS version used in the tests,
to ensure compatibility.
This effectively reverts the changes from commit b3c07fe722
(ci/android: Use aapt from Debian packages, 2025-04-21), but moving the
code around a bit.
The build-tools are not taken as LAVA overlay because LAVA is not able
to handle zip files, and the file in not big enough to be worth any
repacking effort.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35688>
If an Android CTS module does not even start the amount of `FAILED`
tests in the invocation summary could still show up as 0, passing the
sanity check on the completion status, and `cts-tradefed` would not
reflect the module-level failure in the return value either.
So explicitly check that all included modules completed and, in case
they didn't, propagate this kind of failure to `EXIT_CODE`.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35688>
Add render target support to the existing R8G8B8/B8G8R8 formats
and add the B8G8R8_UNORM format.
Signed-off-by: Ryan Mckeever <ryan.mckeever@collabora.com>
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34889>
We want to make sure that EGL doesn't de-duplicate configs with
'identical' properties but different visual IDs. This way clients can
explicitly select which format they want to use (e.g., XRGB vs. RGB).
Signed-off-by: Ryan Mckeever <ryan.mckeever@collabora.com>
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34889>
PIPE_FORMAT_R8G8B8X8_UNORM is already the first format in
DEFAULT_RGB_FORMATS, so removing it should make no difference.
Signed-off-by: Ryan Mckeever <ryan.mckeever@collabora.com>
Reviewed-by: Eric R. Smith <eric.smith@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34889>