summaryrefslogtreecommitdiff
path: root/src/etnaviv
AgeCommit message (Collapse)AuthorFilesLines
2024-08-29etnaviv/ci: fix gc2000_piglit test timeoutEric Engestrom1-1/+1
Setting it to the same value as (or higher than) the job timeout effectively bypasses the safety mechanism. Let's change it to `job timeout - 5min`. Fixes: f39ffc69110d1da0d87f ("ci/etnaviv: Get the gc2000_piglit manual job mostly working.") Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30800> (cherry picked from commit b978d3eb54b081228d040e58f722d2007f331e84)
2024-08-27etnaviv: build dependency for the etnaviv testsDavid Heidelberg2-1/+6
Resolves failures as: ... -o src/etnaviv/isa/tests/etnaviv_disasm.p/disasm.cpp.o -c ../src/etnaviv/isa/tests/disasm.cpp In file included from ../src/etnaviv/isa/tests/disasm.cpp:12: ../src/etnaviv/isa/asm.h:15:10: fatal error: etnaviv/isa/enums.h: No such file or directory 15 | #include "etnaviv/isa/enums.h" | ^~~~~~~~~~~~~~~~~~~~~ Cc: mesa-stable Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11740 Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com> Signed-off-by: David Heidelberg <david@ixit.cz> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30829> (cherry picked from commit 8f8a51ac5c110145b77f66c585c35f2d6b4997d6)
2024-08-27etnaviv: rename enums_h appropriatelyDavid Heidelberg1-2/+2
Needed for the follow-up change. Cc: mesa-stable Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com> Signed-off-by: David Heidelberg <david@ixit.cz> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30829> (cherry picked from commit 43bff3b9ebe230311ea40a639e98acc01f30d09a)
2024-07-19format: Generate endian-independent format aliasesDaniel Stone1-0/+1
Instead of having a hardcoded list of endian-independent format aliases in the header, generate them from the format definitions. Signed-off-by: Daniel Stone <daniels@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29649>
2024-07-09etnaviv: isa: Rework branch instructionChristian Gmeiner2-36/+64
Introduce unary and binary versions of the branch instruction. This will give more ISA_OPC_BRANCH_XXX opcodes to work with. This helps to get rid of these 'maybe' bitsets and is needed for the assembler. Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30030>
2024-07-09etnaviv: isa: Add support for bitset's displaynameChristian Gmeiner2-1/+7
In isaspec the displayname of a bitset defines what is shown in dissassembly. The assembler only sees this representation and needs to be able to handle it. Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30030>
2024-07-08etnaviv: drm: don't skip flush when there are active PMRsLucas Stach1-1/+2
When there are active PMRs attached to the command buffer we can not optimize the flush away, as that results in the queries never reaching their expected sequence number, livelocking readers waiting for the query result. Fixes: 148658638e7f ("etnaviv: drm: Be able to mark end of context init") 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/30055>
2024-07-07ci: simplify setting .no-auto-retry now that it isn't bundled with unrelated ↵Eric Engestrom1-1/+1
rules: Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30004>
2024-07-07ci: split .no-auto-retry out of .scheduled_pipeline-rulesEric Engestrom1-1/+1
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30004>
2024-07-05etnaviv: isa: Add support for extended instructionsChristian Gmeiner2-1/+52
An extended instruction uses 0x7f as opcode and stores the extended opcode in the IMMED of src2. Reverse engineered with the following dEQPs: - dEQP-GLES31.functional.shaders.builtin_functions.integer.findmsb.int_lowp_vertex - dEQP-GLES31.functional.shaders.builtin_functions.integer.findlsb.uvec3_lowp_fragment Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com> Acked-by: Lucas Stach <l.stach@pengutronix.de> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30010>
2024-07-05etnaviv: isa: Drop 1:1 mapping of opc to bitsChristian Gmeiner1-7/+5
As we switched to an isaspec powered encoder there is no need for this strict mapping of opc to instruction bits. Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com> Acked-by: Lucas Stach <l.stach@pengutronix.de> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30010>
2024-07-03ci/etnaviv: Drop shaders@glsl-bug-110796 lineChristian Gmeiner1-1/+0
Piglit has been fixed to skip this test when no GLES 3.2 support is present. Fixes: dfabed2fc9c ("Uprev Piglit to cf8daaf5ba90fc9b8a0e144355026e2a14c79944") 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/30020>
2024-07-03etnaviv: isa: Extend disasm testChristian Gmeiner3-26/+71
With libetnaviv_parser we are able to parse the resulting string representation into an etna_inst and assemble that to binary. As we are not able to parse and/or assemble we need to mark some test cases with special flags. This allows us to test: bin -> disasm -> parsing -> assemble If isa_parse_str(..) is not available we skip this part of the unit test. Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28869>
2024-07-03etnaviv: isa: Add cli assemblerChristian Gmeiner2-0/+134
Nothing too fancy. Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28869>
2024-07-03etnaviv: isa: Add C function implChristian Gmeiner3-0/+83
Implement the following C API's: - isa_parse_str(..) - isa_parse_file(..) - isa_asm_result_destroy(..) Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com> Reviewed-by: @LingMan Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28869>
2024-07-03etnaviv: isa: Add parser moduleChristian Gmeiner4-2/+341
This commit adds the actual parser, which makes use of the IsaParser derive proc macro. It provides two public functions: - asm_process_str(..) Parse the provided isa representation and return an etna_asm_result. This will be used by our unit tests. - asm_process_file(..) Parse a whole file full of isa and return an etna_asm_result. This will be used by our cli assembler. Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com> Reviewed-by: @LingMan Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28869>
2024-07-03etnaviv: isa: Add EtnaAsmResultExt traitChristian Gmeiner3-0/+72
The impl of this trait provides some helpers to work with struct etna_asm_result in Rust. Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com> Reviewed-by: @LingMan Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28869>
2024-07-03etnaviv: isa: Make etna_asm_result usable in RustChristian Gmeiner1-0/+1
Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com> Reviewed-by: @LingMan Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28869>
2024-07-03etnaviv: isa: Add struct etna_asm_resultChristian Gmeiner1-0/+9
This struct contains the result of an assembler run and will be filled in Rust and consumed via a C API. Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com> Reviewed-by: @LingMan Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28869>
2024-07-03etnaviv: isa: Add IsaParser proc_macro_deriveChristian Gmeiner3-0/+797
This proc derive macro does the following magic: - read static rules file - parse isaspec xml file - generate valid pest PEG grammar and attaches it as grammar_inline to the ast - calls pest_generator::derive_parser(..) to generate the parser - creates FromPestRule trait - creates FromPestRule impl for enums and opcodes This is the fundation of our assembler. Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com> Reviewed-by: @LingMan Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28869>
2024-07-03etnaviv: isa: Add meson version checkChristian Gmeiner1-0/+4
meson had an issue [1] with proc_macro that got fixed in 1.4.0 and newer. [1] https://github.com/mesonbuild/meson/issues/12758 Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com> Reviewed-by: @LingMan Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28869>
2024-07-03etnaviv: isa: Make header C++ safeChristian Gmeiner1-0/+8
Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28869>
2024-07-03etnaviv: isa: Generate Rust FFI bindings for asm.hChristian Gmeiner2-0/+37
We will work with etna_inst_* structs in Rust. Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com> Reviewed-by: @LingMan Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28869>
2024-07-03etnaviv: isa: Add meta elements to instructionsChristian Gmeiner1-0/+31
This commits adds a meta elements with the following attributes: - has_dest: does the instruction has a dest register? - valid_srcs: which sources need to be valid? Is used to generate PEST grammar and defines which of the three source registers needs to be != void. - type: which <template> shall be used? Must match a known template name by the last part. E.g.: <meta type=tex"/> --> <template name="INSTR_TEX"> Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28869>
2024-06-29build: pass licensing information in SPDX formDavid Heidelberg8-81/+4
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Acked-by: Dylan Baker <dylan.c.baker@intel.com> Acked-by: Eric Engestrom <eric@igalia.com> Acked-by: Daniel Stone <daniels@collabora.com> Signed-off-by: David Heidelberg <david@ixit.cz> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29972>
2024-06-12etnaviv: update headers from rnndbPhilipp Zabel7-50/+90
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-05-31ci/etnaviv: remove duplicated line from skipsDavid Heidelberg1-3/+0
Fixes: fb1068c668464 ("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-30ci/etnaviv: skip Vulkan tests on GC2000David Heidelberg1-0/+3
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29491>
2024-05-30etnaviv/ci: skip VK piglit testsEric Engestrom1-0/+8
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29488>
2024-05-17ci/etnaviv: add flakes from nightly runsDavid Heidelberg1-0/+7
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-12etnaviv: migrate from piglit include to generic deqp and toml specDavid Heidelberg2-3/+10
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-02etnaviv/nn: Pipe through input/accumulation buffer depth from hwdbPhilipp Zabel2-0/+4
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-02etnaviv: isa: Do src swizzle with isaspecChristian Gmeiner1-0/+29
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-04-29etnaviv: isa: Add name for full writemaskChristian Gmeiner1-1/+1
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-29etnaviv: isa: Rework modeling of left shift for store/loadChristian Gmeiner1-22/+22
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-29etnaviv: isa: Add more flags to etna_instChristian Gmeiner2-10/+13
Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28929>
2024-04-29etnaviv: isa: Switch to enum isa_threadChristian Gmeiner2-7/+6
Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28929>
2024-04-29etnaviv: isa: Print dst_full for ALUChristian Gmeiner2-3/+3
Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28929>
2024-04-29etnaviv: isa: Add clang-format special commentsChristian Gmeiner1-0/+2
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-29etnaviv: isa: Drop capturing of python outputChristian Gmeiner2-6/+15
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-26etnaviv: drm: Stop after model query failurePhilipp Zabel1-3/+3
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-26etnaviv: drm: Suppress get-param error message for non-existent corePhilipp Zabel1-1/+3
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-24etnaviv: hwdb: Add VIP_V7 and NN_XYDP0 feature bitsPhilipp Zabel2-0/+5
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-24etnaviv: common: Add PIPE_3D feature bitPhilipp Zabel3-0/+3
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-23etnaviv/nn: Implement zero run length encoding of weightsTomeu Vizoso2-0/+2
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-23etnaviv: drm: Drop NPU-related paramsChristian Gmeiner2-62/+20
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-18etnaviv: avoid re-defining prog_pythonEric Engestrom1-1/+0
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-16etnaviv: flip the switch on MSAA supportLucas Stach1-16/+24
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-15etnaviv: hwdb: Drop stdint.h dependencyChristian Gmeiner1-2/+2
This seems to cause some troubles for distro builds. Fixes: 394652e5a02 ("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-15ci/etnaviv: update expectation after piglit uprevLucas Stach1-4/+0
7e82c59fa4b5 ("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>