Commit Graph

4156 Commits

Author SHA1 Message Date
David Heidelberg cdedebf839 ci/freedreno: fix the a530_piglit job and switch to Weston
If we count devices which running a530 with mainline kernel and Mesa,
it's probably mostly phones and tablets running on Wayland. Adapt to it.

Fixes: 83c2b26acf ("ci/freedreno: Switch the piglit job to using a deqp-runner suite.")

Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22255>
(cherry picked from commit 2933976e78)
2023-04-16 22:37:10 +01:00
Dmitry Baryshkov fc5dd4035a freedreno/a5xx: add SP clock control register
Add GPMU_GPMU_SP_CLOCK_CONTROL register. Duplicated GPGMU is not a typo,
vendor kernel names it A5XX_GPMU_GPMU_SP_CLOCK_CONTROL.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22429>
2023-04-12 08:48:27 +00:00
Dmitry Baryshkov 05c22bdea1 freedreno/a5xx: reorder GPMU registers
Severeal GPMU registers were places out of the order. Move them to be
ordered proprely.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22429>
2023-04-12 08:48:27 +00:00
Collabora's Gfx CI Team be5db62f88 Uprev Piglit to 355ad6bcb2cb3d9e030b7c6eef2b076b0dfb4d63
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22325>
2023-04-12 08:04:55 +00:00
Daniel Schürmann 53eb3ad375 vulkan/pipeline_cache: add cache parameter to deserialize() function
This allows for secondary cache lookups during deserialization.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21967>
2023-04-10 09:14:30 +00:00
Daniel Schürmann 5daff41e27 vulkan/pipeline_cache: remove vk_device from vk_pipeline_cache_object
It is not necessary to store the extra pointer.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21967>
2023-04-10 09:14:30 +00:00
Alyssa Rosenzweig 7f6491b76d nir: Combine if_uses with instruction uses
Every nir_ssa_def is part of a chain of uses, implemented with doubly linked
lists.  That means each requires 2 * 64-bit = 16 bytes per def, which is
memory intensive. Together they require 32 bytes per def. Not cool.

To cut that memory use in half, we can combine the two linked lists into a
single use list that contains both regular instruction uses and if-uses. To do
this, we augment the nir_src with a boolean "is_if", and reimplement the
abstract if-uses operations on top of that list. That boolean should fit into
the padding already in nir_src so should not actually affect memory use, and in
the future we sneak it into the bottom bit of a pointer.

However, this creates a new inefficiency: now iterating over regular uses
separate from if-uses is (nominally) more expensive. It turns out virtually
every caller of nir_foreach_if_use(_safe) also calls nir_foreach_use(_safe)
immediately before, so we rewrite most of the callers to instead call a new
single `nir_foreach_use_including_if(_safe)` which predicates the logic based on
`src->is_if`. This should mitigate the performance difference.

There's a bit of churn, but this is largely a mechanical set of changes.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22343>
2023-04-07 23:48:03 +00:00
Alyssa Rosenzweig fd9c69218a tu: Use vk_features2_to_features
Sanitizes properties returned through GetPhysicalDeviceFormatProperties2.

Bit-31 is not valid to return in the original
vkGetPhysicalDeviceFormatProperties{2,}. Sanitize the bit returned from the
internal to ensure invalid bits aren't return to the application.

Falls in line with the other vulkan drivers.

Based on original commit by Ryan Houdek.

Closes: #8733
Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22217>
2023-04-07 18:16:43 -04:00
Emma Anholt 8e84a23697 ci/zink: Disable a630 portal-2-v2 due to kernel OOMs.
It's been popular for flakes due to oomkilling or kernel kmalloc failure
recently.  Is it ultimately the source of running out of memory?  Who
knows, but hopefully it's at least a big part of the problem.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22083>
2023-04-06 02:32:01 +00:00
Emma Anholt f2228902ed ir3: Move turnip's nir_lower_frexp to the shared compiler.
We had NIR lowering for Vulkan, and rely on GLSL's lowering in the
frontend, but this will let us drop the GLSL lowering.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22083>
2023-04-06 02:32:01 +00:00
Emma Anholt a1277b89a1 ci/zink: Disable godot-tps-gles3 on a630.
This trace used too much memory to be run in parallel with our other
traces.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22279>
2023-04-04 15:37:14 +00:00
Collabora's Gfx CI Team 91b06ea8b2 Uprev Piglit to 2391a83d1639a7ab7bbea02853b922878687b0e5
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22279>
2023-04-04 15:37:14 +00:00
Connor Abbott df9694e98e tu: Use vk_pipeline_get_renderpass_flags()
With this we can remove usage of VkSelfDependencyInfoMESA.

Reviewed-by: Emma Anholt <emma@anholt.net>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22191>
2023-04-03 18:13:01 +00:00
Connor Abbott b123ee707d freedreno: Fix or/and'ing two BitmaskEnums
Previously when there was an & or | with two BitmaskEnums, the compiler
would try to cast the RHS and find a matching overload, but there were
many different casts (to the enum itself, to an integer, to a boolean,
etc.) each with a matching overload which meant that it couldn't pick
one and errored out due to an ambiguous overload. Fix this by
explicitly providing an overload that takes a BitmaskEnum on the RHS.
It has to also provide a BitmaskEnum output, so that subsequent
operators with the result on the LHS (e.g. when or'ing together three
BitmaskEnums without any parentheses tricks) also get the right
overload.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22224>
2023-04-01 13:53:31 +00:00
Danylo Piliaiev 9f43bc73da freedreno/computerator: Add support for a7xx
Not everything works correctly, e.g. stib seems flakey while stg
seems alright.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22148>
2023-03-30 23:40:48 +00:00
Danylo Piliaiev f32eb48095 freedreno/computerator: Templatize a6xx backend
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22148>
2023-03-30 23:40:48 +00:00
Danylo Piliaiev 8558d07014 freedreno: Add dummy a730/a740 definition
Needed for assembly/disassembly.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22148>
2023-03-30 23:40:48 +00:00
Danylo Piliaiev 3389c3b84c freedreno: Move fd6_pack.h to common code accessible by computerator
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22148>
2023-03-30 23:40:48 +00:00
Danylo Piliaiev 48ad485d1c freedreno/computerator: Convert to C++
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22148>
2023-03-30 23:40:48 +00:00
Danylo Piliaiev 1ae595873f freedreno: C++ fixes for computerator to compile
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22148>
2023-03-30 23:40:48 +00:00
Danylo Piliaiev 6826a0ab14 freedreno/computerator: C++ proofing
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22148>
2023-03-30 23:40:48 +00:00
Danylo Piliaiev 5d2ddce99f freedreno/registers: More a7xx regs
Based on 011c54b0 from Jonathan Marek.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22148>
2023-03-30 23:40:48 +00:00
Danylo Piliaiev 899d142336 freedreno/registers: Document new CP_EVENT_WRITE::SEQNO
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22148>
2023-03-30 23:40:48 +00:00
Rob Clark 8416bc1c60 freedreno/drm: Disable threaded-submit for msm
We've had drm/sched support on the kernel side for more than a year and
a half.  This makes submit ioctl async by handling fence waits from the
sched's kthread, which is what threaded submit was originally working
around.  For now, threaded submit is only used for virtgpu, which does
not (yet?) have drm/sched support.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22098>
2023-03-30 19:42:01 +00:00
Rob Clark a16533c43e freedreno/drm: Make threaded-submit optional
We've had gpu-sched support in the kernel for a while now, so our fence
waits are not synchronous in the ioctl path.  The only reason this path
still exists is that virtgpu does not have gpu-sched.  So lets disable
it on msm.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22098>
2023-03-30 19:42:01 +00:00
Rob Clark c2194552e7 freedreno/drm: Stop cleanup at first active BO
Buffers are added to the deferred freelist at the tail.  And frequently
the last reference is dropped immediately after the submit.  So almost
always, once we see a still-busy BO, the remaining in the list will also
still be busy.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22098>
2023-03-30 19:42:01 +00:00
Rob Clark 712c26e2b6 freedreno/drm: Fast path for idle check
If already idle, no need to cleanup_fences() (and take related lock).

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22098>
2023-03-30 19:42:00 +00:00
Danylo Piliaiev 2cc9364c20 tu/drm: Support cached non-coherent memory
Requires some hand rolled assembly:
- DC CVAC / DC CIVAC for aarch64
- DCCMVAC / DCCIMVAC for arm32, unfortunately it seems that it is
  illegal to call them from userspace.
- clflush for x86-64

We handle x86-64 case because Turnip may run in x86-64 guest
e.g. in FEX-Emu or Box64.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20550>
2023-03-30 15:50:47 +00:00
Danylo Piliaiev 5a59410962 turnip: add cached and cached-coherent memory types
vkd3d requires cached memory type.

MSM backend doesn't have a special ioctl for memory
flushing/invalidation, we'd have to use cvac and civac
arm assembly instructions (would be done in following commit).

KGSL has an the ioctl for this, which is used in this commit.

Note, CTS tests doesn't seem good at testing flushing and
invalidating, the ones I found passed on KGSL with both
functions being no-op.

Based on the old patch from Jonathan Marek.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7636

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20550>
2023-03-30 15:50:47 +00:00
Emma Anholt 9c364a346f perfetto: Deduplicate clock sync packet emit from renderstage sources.
This is way more horrifying than I hoped -- I can't figure out a way to
have the method be on TraceContext, so it's a static method of the
datasource, but then you have to name the templated types over and over.
You have to pass in a TraceContext because intel emits the clock sync
packet within a Trace(), and perfetto just silently corrupts the trace if
you Trace() in a Trace().

Reviewed-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22157>
2023-03-30 02:19:35 +00:00
Emma Anholt 3fd825d3e2 perfetto: Make a MesaRenderpassDataSource with common setup/start/stop.
Deduplicates some code from intel/tu/freedreno, and will be a common place
to put other shared code.

The downside I can see is this logging:

[013.129]      tu_perfetto.cc:122 Tracing started
[013.129]  intel_driver_ds.cc:133 Tracing started

("oh, huh, apparently data sources for both drivers are registered?  wild")

becomes:

[142.906] erfetto_renderpass.h:50 Tracing started
[142.907] erfetto_renderpass.h:50 Tracing started

("huh, why is my driver's data source being started twice?").
Unfortunately we can't easily get a string for the data source type due to
not having rtti.

Reviewed-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22157>
2023-03-30 02:19:34 +00:00
Eric Anholt ae0aae797f ci/freedreno: Flake KHR-GL45.shader_image_load_store.basic-allTargets-store
It has UnexpectedPassed a couple of times recently.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22177>
2023-03-29 17:36:53 +00:00
Rob Clark 102445d2c3 freedreno/registers: Add control reg for zap fw base
The zap shader knows the offset of the embedded shader within the zap
sqe instructions, but uses this control reg to get it's own address in
memory, in order to calculate the address of the compute shader part of
the zap shader.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21748>
2023-03-25 16:21:28 +00:00
Rob Clark c3ed8d0e7b freedreno/afuc: Add raw mode for disasm
Add a mode which doesn't try to find/process a jmptable.  Useful for
looking at zap shaders.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21748>
2023-03-25 16:21:28 +00:00
Guilherme Gallo 7f04fa7364 ci/zink: Add zink-tu-a618-traces-performance job
It will be needed to compare the performance of zink+turnip against
turnip only jobs.

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22065>
2023-03-24 21:58:22 +00:00
Guilherme Gallo 2bb917282a ci/zink: Add zink-a618 trace jobs
May be used as replacement for zink-a630-traces job, since a618 is similar
to a630.

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22065>
2023-03-24 21:58:22 +00:00
Guilherme Gallo bbfc9b517d ci/freedreno: create a618-traces and perf jobs
Performance jobs should work better if we fix the device under test to
be the same in every test, instead of using any device from a group of
devices of the same type.

We can do it quickly in LAVA, but it seems more
complicated on Google's farm. So, let's replace the a630 (in Google
farm) with a fixed a618 device to test freedreno traces performance.

Add a618-traces job as well, as we need to confirm that a618 is
generating stable traces with good results before proceeding to track
its performance

Co-authored-by: David Heidelberg <david.heidelberg@collabora.com>
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22065>
2023-03-24 21:58:22 +00:00
David Heidelberg cadceac2a7 ci/freedreno: Make traces work on LAVA caching proxy
Explicitily define the caching proxy via piglit
`--download-caching-proxy-url` argument.
We have different URLs for caching proxy for LAVA and freedreno farms.

Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22065>
2023-03-24 21:58:22 +00:00
David Heidelberg a114bf1cd2 ci/freedreno: define Google farm specific includes
This should prevent mixing them with LAVA freedreno devices.

Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22065>
2023-03-24 21:58:22 +00:00
David Heidelberg 748c02f86c ci/freedreno: split deqp from other jobs
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22065>
2023-03-24 21:58:22 +00:00
Danylo Piliaiev b30f2bf790 tu: Generate entrypoints for each gen
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21931>
2023-03-24 15:49:26 +00:00
Danylo Piliaiev 3db70be04b freedreno/regs: Include assert.h in generated headers
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21931>
2023-03-24 15:49:26 +00:00
Danylo Piliaiev c82ddf4f98 tu: compile as C++
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21931>
2023-03-24 15:49:26 +00:00
Danylo Piliaiev ae47b4e937 tu: C++-proofing: misc fixes
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21931>
2023-03-24 15:49:25 +00:00
Danylo Piliaiev 903072ea03 tu: C++-proofing: cast result when extracting field from reg value
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21931>
2023-03-24 15:49:25 +00:00
Danylo Piliaiev 28a703ea43 tu: C++-proofing: prevent taking address from rvalue
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21931>
2023-03-24 15:49:25 +00:00
Danylo Piliaiev aec1e9ecf7 tu: C++-proofing: ease access to global bo struct
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21931>
2023-03-24 15:49:25 +00:00
Danylo Piliaiev 40b7e5c48a tu: C++-proofing: fix casting from void * fpermissive warnings
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21931>
2023-03-24 15:49:25 +00:00
Danylo Piliaiev c618e2a2d4 tu: C++-proofing: Initialize tu_reg_value in-order by pack funcs
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21931>
2023-03-24 15:49:25 +00:00
Danylo Piliaiev 685dbce850 tu: C++-proofing: fix extension table initialization
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21931>
2023-03-24 15:49:25 +00:00