Commit graph

246 commits

Author SHA1 Message Date
Philipp Zabel
5aadea47fa etnaviv: update headers from rnndb
Update to etna_viv commit a2ee3de27b38.

This extends the VIVS_NFE_GENERIC_ATTRIB_CONFIG0_STREAM field to 4 bits,
to fix vertex shaders with 9 or more ttribute streams.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29694>
2024-06-12 16:34:30 +00:00
David Heidelberg
fdc483df25 ci/etnaviv: remove duplicated line from skips
Fixes: fb1068c668 ("ci/etnaviv: skip Vulkan tests on GC2000")
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29503>
2024-05-31 07:36:59 -07:00
David Heidelberg
fb1068c668 ci/etnaviv: skip Vulkan tests on GC2000
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29491>
2024-05-30 21:22:30 +00:00
Eric Engestrom
21138f418c etnaviv/ci: skip VK piglit tests
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29488>
2024-05-30 18:08:45 +00:00
David Heidelberg
f55c51a343 ci/etnaviv: add flakes from nightly runs
Acked-by: Christian Gmeiner <cgmeiner@igalia.com>
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29254>
2024-05-17 19:29:40 +00:00
David Heidelberg
1232bcc470 etnaviv: migrate from piglit include to generic deqp and toml spec
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29150>
2024-05-12 16:12:52 -07:00
Philipp Zabel
0554d11f1e etnaviv/nn: Pipe through input/accumulation buffer depth from hwdb
Stop hard coding accumulation buffer depth and input buffer depth to the
values for VIPNano-QI. This is allows to calculate correct tile sizes
for other cores.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Reviewed-by: Tomeu Vizoso <tomeu@tomeuvizoso.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28956>
2024-05-02 19:17:58 +00:00
Christian Gmeiner
5aede1a157 etnaviv: isa: Do src swizzle with isaspec
Remove this logic from the gallium driver and just use the src's as
provided by nir. The special cases, where there is no 1:1 mapping, do
still exist.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28922>
2024-05-02 07:44:00 +00:00
Christian Gmeiner
2cb8e9a856 etnaviv: isa: Add name for full writemask
Is needed to generate a nicer code.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28929>
2024-04-29 13:02:28 +00:00
Christian Gmeiner
cb69595037 etnaviv: isa: Rework modeling of left shift for store/load
This makes is easier for the parser to process.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28929>
2024-04-29 13:02:27 +00:00
Christian Gmeiner
f8c38ec648 etnaviv: isa: Add more flags to etna_inst
Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28929>
2024-04-29 13:02:27 +00:00
Christian Gmeiner
a0dad2e705 etnaviv: isa: Switch to enum isa_thread
Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28929>
2024-04-29 13:02:27 +00:00
Christian Gmeiner
87e5ad3930 etnaviv: isa: Print dst_full for ALU
Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28929>
2024-04-29 13:02:27 +00:00
Christian Gmeiner
0c70dcd6f7 etnaviv: isa: Add clang-format special comments
We want to keep the defines as formated as they are.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28929>
2024-04-29 13:02:27 +00:00
Christian Gmeiner
8c2a749f67 etnaviv: isa: Drop capturing of python output
Is nicer for meson.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28875>
2024-04-29 11:26:03 +00:00
Philipp Zabel
06683288e0 etnaviv: drm: Stop after model query failure
Calling etna_gpu_new() with a nonexisting core can happen when iterating
all cores. Bail immediately if querying the model failed, there is no
use in also failing to query the revision.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28921>
2024-04-26 19:30:08 +00:00
Philipp Zabel
ba59882212 etnaviv: drm: Suppress get-param error message for non-existent core
The -ENXIO return value isn't necessarily an error condition.
When iterating over cores, this signals that there are no more
cores to be found.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28921>
2024-04-26 19:30:08 +00:00
Philipp Zabel
db2d5a0103 etnaviv: hwdb: Add VIP_V7 and NN_XYDP0 feature bits
These can be used to detect the NN core architecture version [1].

[1] https://github.com/nxp-imx/linux-imx/blob/lf-6.1.36-2.1.0/drivers/mxc/gpu-viv/hal/kernel/arch/gc_hal_kernel_hardware_func.c#L5464-L5465

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28878>
2024-04-24 15:26:37 +00:00
Philipp Zabel
4f123a7951 etnaviv: common: Add PIPE_3D feature bit
With this, we can drop the duplicated ETNA_GPU_FEATURES_0 query in
screen_create().

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28877>
2024-04-24 12:13:49 +00:00
Tomeu Vizoso
0c0d62ba70 etnaviv/nn: Implement zero run length encoding of weights
Check how much smaller can the weight+bias buffers be with different
amount of bits to encode runs of zeroes and choose the smallest one.

This reduces the bandwidth considerably, which is at present the
bottleneck with useful models.

On a Libre Computer Alta AML-A311D-CC, I see these improvements:

MobileNetV1: 15.650ms -> 9.991ms
SSDLite MobileDet: 56.149ms -> 32.692ms

Acked-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27513>
2024-04-23 10:55:24 +02:00
Christian Gmeiner
1fb9e67f7e etnaviv: drm: Drop NPU-related params
All of the NPU related DRM_ETNAVIV_GET_PARAM values, which got introduced in
6.9-rc1 of the kernel got removed before the 6.9 release. Clean-up our code base.

NPU support _NEEDS_ hwdb support and a recent stable kernel.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Tomeu Vizoso <tomeu@tomeuvizoso.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28837>
2024-04-23 05:39:57 +00:00
Eric Engestrom
7350b65669 etnaviv: avoid re-defining prog_python
It's already defined to the exact same thing in the root `meson.build`

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28801>
2024-04-18 10:03:08 +00:00
Lucas Stach
7ffd85d85c etnaviv: flip the switch on MSAA support
Enable MSAA by default and update CI expectation.

The spec@ext_framebuffer_multisample test is buggy and switches from fail
to skip once we actually expose multisample capabilities, while it should
also have skipped before.

Some of the *copyteximage and spec@!opengl 1.1@depthstencil-default_fb*
tests require multisample resolve blits with parameters that can not be
supported natively with the RS engine and can also not be emulated by
u_blitter without texture multisampling, which is not available in the
GC2000 hardware. Accept those failures on this HW generation.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22439>
2024-04-16 10:35:41 +00:00
Christian Gmeiner
8d2f83ce98 etnaviv: hwdb: Drop stdint.h dependency
This seems to cause some troubles for distro builds.

Fixes: 394652e5a0 ("etnaviv: hwdb: Generate hwdb.h")
Closes: #11012
Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Tested-by: Mikhail Gavrilov <mikhail.v.gavrilov@gmail.com>
Acked-by: Lucas Stach <l.stach@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28745>
2024-04-15 16:57:29 +00:00
Lucas Stach
83c40aa3f4 ci/etnaviv: update expectation after piglit uprev
7e82c59fa4 ("Uprev Piglit to dd6f7eaf82e8dd442da28b346c236141cbcce0b1") pulled
in fixes to the testsuite, which makes two more tests pass on GC2000.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Acked-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28744>
2024-04-15 14:08:00 +02:00
Lucas Stach
fc0d65e54f etnaviv: ci: update expectation with fixed depth/stencil clears
Now that we properly switch between fast/regular clears for depth/stencil
surfaces as needed and fixed the resulting corner-case issues, there are
two more passing dEQP tests.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28696>
2024-04-15 10:24:22 +00:00
Christian Gmeiner
b9c80ee59e etnaviv: drm: Remove fallback value for ETNA_GPU_NUM_CONSTANTS
The kernel commit a8c21a5451d8 ("drm/etnaviv: add initial etnaviv DRM driver") has this
fallback logic already.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28574>
2024-04-13 12:43:52 +00:00
Christian Gmeiner
e60e045b89 etnaviv: drm: Fill limits
Note: etna_gpu_get_param(..) will only fail if a wrong enum etna_param_id
param value is passed.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28574>
2024-04-13 12:43:52 +00:00
Christian Gmeiner
def32f8668 etnaviv: hwdb: Fill limits
Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28574>
2024-04-13 12:43:52 +00:00
Christian Gmeiner
b68e868d31 etnaviv: common: Add some limit values
These are loosely based on struct etna_specs.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28574>
2024-04-13 12:43:52 +00:00
Christian Gmeiner
ef19966e38 etnaviv: common: Add enum etna_core_type
We support the following two core types: GPU and NPU.

Both are using the 3d pipe to submit work so the only way to
differentiate is the nn core count.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28574>
2024-04-13 12:43:52 +00:00
Christian Gmeiner
aaccc25a4d etnaviv: drm: Make use of hwdb
If the kernel provides correct ID values query the hwdb.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28574>
2024-04-13 12:43:52 +00:00
Christian Gmeiner
2192e620bb etnaviv: hwdb: Add etna_query_feature_db(..)
This function is used to
 - find a database entry
 - fill our etna_device_info struct

If no database entry is found we just return false.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28574>
2024-04-13 12:43:52 +00:00
Christian Gmeiner
394652e5a0 etnaviv: hwdb: Generate hwdb.h
This python script does the following work:
 - For all gc_feature_database.h files
   - Translate the C Struct to Python
   - Store database entries
 - Create a merged struct
 - Transform all entires to the merged struct
 - Write a header that contains the merged struct and all entries

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28574>
2024-04-13 12:43:52 +00:00
Christian Gmeiner
d9e490c2f4 etnaviv: hwdb: Import gc_feature_database from ST
This commit imports the gc_feature_database.h file from
https://github.com/STMicroelectronics/gcnano-binaries/blob/gcnano-6.4.13-binaries/gcnano-driver-stm32mp/hal/kernel/inc/gc_feature_database.h

git commit: 5d02efd5cb4cfa85307633891f3cf87550a8bc1d

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28574>
2024-04-13 12:43:52 +00:00
Christian Gmeiner
5c5dc646ed etnaviv: hwdb: Import gc_feature_database from Amlogic
This commit imports the gc_feature_database.h from
https://github.com/khadas/android_vendor_amlogic_common_npu/blob/khadas-vim4-r-64bit/hal/kernel/inc/gc_feature_database.h

git commit: 9d81096a001af8a099ca767855d548983d037dd8

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28574>
2024-04-13 12:43:52 +00:00
Christian Gmeiner
775eff3046 etnaviv: hwdb: Import gc_feature_database from NXP
This commit imports the gc_feature_database.h file from
https://github.com/nxp-imx/linux-imx/blob/lf-6.6.y/drivers/mxc/gpu-viv/hal/kernel/inc/gc_feature_database.h

git commit: ccf0a99701a701fb48a04e31ffe3f9d585a8374a

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28574>
2024-04-13 12:43:52 +00:00
Christian Gmeiner
e1c6748cf4 etnaviv: drm: Query some id values in etna_gpu_new(..)
We want to fully initialise etna_device_info. We only query the kernel
for these values if the drm driver is recent enough.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28574>
2024-04-13 12:43:52 +00:00
Christian Gmeiner
358e1f10c5 etnaviv: drm: Initialize etna_core_info based on kernel features
Query all the gpu features in etna_gpu_new(..) and update the feature
bitset in etna_core_info accordingly.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28574>
2024-04-13 12:43:52 +00:00
Christian Gmeiner
8639367f55 etnaviv: common: Add feature bitset
Extend struct etna_core_info with a feature bitset and some helper
functions.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28574>
2024-04-13 12:43:52 +00:00
Christian Gmeiner
df198d21f9 etnaviv: Introduce etna_feature enum
This etna_feature enum will be used as abstraction layer. We will add
support for a hardware database - borrowed from the binary blob.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28574>
2024-04-13 12:43:52 +00:00
Christian Gmeiner
9eede9ba0b etnaviv: Move hw header to common place
I am planning to make use of these headers outside of the gallium
driver.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28574>
2024-04-13 12:43:52 +00:00
Christian Gmeiner
d3f8e3ee42 etnaviv: drm: Add etna_gpu_get_core_info(..)
Makes it possible to access etna_core_info.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28574>
2024-04-13 12:43:52 +00:00
Christian Gmeiner
ad4b6cce30 etnaviv: drm: Make use of etna_core_info
Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28574>
2024-04-13 12:43:52 +00:00
Christian Gmeiner
3b150bcba8 etnaviv: Introduce common etna_core_info
This struct will be used in different places outside of the gallium
driver.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28574>
2024-04-13 12:43:52 +00:00
Christian Gmeiner
5028a9ede3 ci/etnaviv: Do not skip tex-miplevel piglits
Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Acked-by: David Heidelberg <david.heidelberg@collabora.com>
Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28631>
2024-04-09 12:55:21 +00:00
Sergi Blanch Torne
35a9e8577c ci: Nightly run expectations update
Reviewer the results from the last nightly run completed using ci-collate tool
(gl.fd.o/gfx-ci/ci-collate) with the 'patch' feature and a bit of human
intervention, these are the changes in the expectations.

Signed-off-by: Sergi Blanch Torne <sergi.blanch.torne@collabora.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28350>
2024-04-02 07:52:42 +00:00
Christian Gmeiner
dac3b9ac26 ci/etnaviv: Remove duplicates
cat src/etnaviv/ci/etnaviv-gc2000-flakes.txt | sed 's/[ \t]*$//' | sort | uniq -d

spec@arb_depth_texture@depth-level-clamp
spec@arb_depth_texture@fbo-depth-gl_depth_component24-blit
spec@arb_pixel_buffer_object@texsubimage-depth-formats pbo
spec@arb_texture_storage@texture-storage
spec@arb_texture_storage@texture-storage@2D mipmap rendering
spec@ext_packed_depth_stencil@fbo-depth-gl_depth24_stencil8-copypixels
spec@nv_copy_image@nv_copy_image-simple --tex-to-tex
spec@!opengl 1.1@depthstencil-default_fb-copypixels

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28416>
2024-03-27 13:12:16 +00:00
Christian Gmeiner
8e0f2c2539 etnaviv: Move swizzle related macros to scr/etnaviv
Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28183>
2024-03-25 10:27:50 +00:00
Christian Gmeiner
520886817e etnaviv: isa: Add isa_assemble_instruction(..)
Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28183>
2024-03-25 10:27:50 +00:00