Commit Graph

152988 Commits

Author SHA1 Message Date
Guilherme Gallo e3f71aaa37 ci/lava: Fix shebang in deqp-runner.sh
Now, every rootfs based device has bash installed, so we can use bash
shebang instead of dash to enforce the use of bash's echo, not dash's
one.

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15938>
2022-04-28 06:33:46 +00:00
Guilherme Gallo e9aef19e2b ci/lava: Trap init-stage2.sh background processes
Any daemon executed in init-stage2.sh may interfere with LAVA signals,
since any threaded output to console may clutter the signals, which are
based on the log output.
E.g: This job
https://gitlab.freedesktop.org/gallo/mesa/-/jobs/20779120#L2102
has failed because capture-devcoredump.sh was alive and emitting kernel
messages to the console during the LAVA signal handling, mangling the
output and making the LAVA to fail to check the results of the job.

Another problem is that CONFIG_DEBUG_STACK_USAGE Kconfig is enabled.
This causes process exit to dump a `RESULT=[  246.756067] lava-test-case
(156) used greatest stack depth: ... bytes left` kernel message to the
logs corrupting LAVA signal message. Empirically, it happens one in
every 280 jobs. To solve that, compose the lava-test-case custom script
with a short sleep to give time for kernel to dump the message clearly
and a exit command to keep the return code from init-stage2.sh script.

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15938>
2022-04-28 06:33:46 +00:00
Guilherme Gallo 09236d9607 ci/lava: Use lava-test-case to run custom scripts in LAVA
The exit code is automatically parsed to fail/pass the job, so this
commit removes the `hwci.*pass|fail` regex and printings.

Add mesa-job-name parameter to get the CI_JOB_NAME easily to serve as
test name.

Besides, there is the treatment for the mesa job naeme, as LAVA does not
like whitespace character inside the test case/suite name, since it
interprets it as a LAVA signal parameter and it can make the job fail
when the script looks for the results from the LAVA RPC.

And the slash character seems to break gitlab log sectioning, so
removing every character after the first whitespace.

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15938>
2022-04-28 06:33:46 +00:00
Guilherme Gallo 33a1c51e3e ci/lava: Always validate the lava job
Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15938>
2022-04-28 06:33:46 +00:00
Guilherme Gallo 805de830c9 ci/lava: Set lava-signal to kmsg
By default, LAVA emit signals as specific lines of message to the
console serial for subsequent parsing. However, this is prone to be
interleaved with the dmesg messages, particularly with debug messages
that can happen just after the process exit, such as the ones set by
CONFIG_STACK_DEBUG_USAGE Kconfig.

Setting the `lava-signal` to `kmsg` will make those special messages to
be dumped to /dev/kmsg, where the each line is printed atomically

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15938>
2022-04-28 06:33:46 +00:00
Guilherme Gallo 75410c3d76 ci/lava: Fix LAVA job validation
When jobs.validate returns something, it means that there is a dict
filled with the error message, so we were running the job with some
validation errors for a quite while

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15938>
2022-04-28 06:33:46 +00:00
Guilherme Gallo 6a3ee3ea32 ci/lava: Return test-suite result as exit code
Makes it easier for external observers.

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15938>
2022-04-28 06:33:46 +00:00
Guilherme Gallo 43d8ed840e ci/lava: Filter log lines from LAVA return
Start to differentiate between the different types of LAVA log message;
the only visible change right now is that we make warnings and errors
bold and red to match bare-metal, but it comes in useful later as we
will use the results markers to watch us step through the different
stages of job execution.

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15938>
2022-04-28 06:33:46 +00:00
Guilherme Gallo 84a5ea4228 ci/lava: Encapsulate job data in a class
Less free-form passing stuff around, and also makes it easier to
implement log-based following in future.

The new class has:
- job log polling: This allows us to get rid of some more function-local
  state; the job now contains where we are, and the timeout etc is
  localised within the thing polling it.
- has-started detection into job class
- heartbeat logic to update the job instance state with the start time
  when the submitter begins to track the logs from the LAVA device

Besides:

- Split LAVA jobs and Mesa CI policy
- Update unit tests with LAVAJob class

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15938>
2022-04-28 06:33:46 +00:00
Daniel Stone b3ba448ba5 ci/lava: Sleep before, not after, API calls
We rate-limit LAVA API calls as they are standard polling calls rather
than blocking for changes. However when we sleep after making the calls
rather than before, we can block when we want to exit - e.g. after
getting the final logs, we will still sleep even though we can drop out.

Fix this by moving the calls to before the API calls, rather than after.
This means that the first calls (when we're waiting to be scheduled, or
haven't got our first log lines yet), will be delayed compared to
previously, but that's not going to slow us down as even in the best
case we won't be executing in a device within the first 15 seconds.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15938>
2022-04-28 06:33:46 +00:00
Tapani Pälli d3ef3657b2 isl: disable mcs (and mcs+ccs) for color msaa on DG2
Fixes lots of various test failures in:
   dEQP-VK.pipeline.multisample.min_sample_shading_disabled.*
   dEQP-GLES3.functional*multisample.*
   KHR-GL*sample_variables.*

Cc: mesa-stable
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Acked-by: Kenneth Graunke <kenneth@whitecape.org>
Acked-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13991>
2022-04-28 05:31:52 +00:00
Jordan Justen 212fb25b26 vulkan/wsi/x11: Use atomic_int with sent_image_count
Without this being atomically incremented and decremented, I observed
this assert triggering in debug builds:

  src/vulkan/wsi/wsi_common_x11.c:x11_present_to_x11_dri3():

  assert(chain->sent_image_count <= chain->base.image_count);

I think this was happening since,

  src/vulkan/wsi/wsi_common_x11.c:x11_handle_dri3_present_event()

which decrements chain->sent_image_count may be run in a separate
thread.

Fixes: d0bc1ad377 ("vulkan/wsi/x11: add sent image counter")
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15908>
2022-04-27 20:52:53 -07:00
Dave Airlie b4bbf9d1ac llvmpipe: add user memory resources to the debug global list.
Otherwise things will crash on destruction.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Fixes: 9a57dceeb7 ("llvmpipe: add support for user memory pointers")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16207>
2022-04-28 11:06:01 +10:00
Rob Clark 6a3dc4e370 freedreno: Use staging transfer if mmap fails
With externaly imported resources, we can have situations where we can't
mmap and directly access linear buffers.  So use the staging blit path
for this case.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16086>
2022-04-27 23:10:00 +00:00
Rob Clark a6be0cc12d freedreno: Split out helper for staging blit
We are also going to want to use this for fallback when mmap fails.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16086>
2022-04-27 23:10:00 +00:00
Rob Clark 0b7d910b2c freedreno/a6xx: A couple more FD_BO_NOMAP
A couple other buffers that we don't need to mmap.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16086>
2022-04-27 23:10:00 +00:00
Rob Clark e42cea4db6 freedreno/drm/virtio: Split up large uploads
Might be useful if host cached mmaps.. but OTOH we don't want to burn up
address space.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16086>
2022-04-27 23:10:00 +00:00
Rob Clark 0aab310439 freedreno/drm/virtio: Async ccmd batching
This could be a bit more clever an avoid extra memcpy.. but that seems
to be in the noise at this point.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16086>
2022-04-27 23:10:00 +00:00
Rob Clark 528fa581c1 freedreno/drm/virtio: Pass guest handles to execbuf
This is needed for the VIRTGPU_WAIT ioctl to work.

TODO we could perhaps limit this, since it is not needed for residency,
but only fencing.  Ie. we could omit cmdstream, and probably anything
that has FD_BO_NOMAP flag.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16086>
2022-04-27 23:10:00 +00:00
Rob Clark cb5f25ea71 freedreno/drm/virtio: Protocol updates
This syncs up with the protocol of what eventually landed in virglrender.

1) Move all static params to capset to avoid having to query host
   (reduce synchronous round trips at startup)
2) Use res_id instead of host_handle.. costs extra hashtable lookups in
   host during submit, but this lets us (with userspace allocated IOVA)
   make bo alloc and import completely async.
3) Require userspace allocated IOVA to simplify the protocol and not
   have to deal with GEM_NEW/GEM_INFO potentially being synchronous.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16086>
2022-04-27 23:10:00 +00:00
Rob Clark fa23ddf258 freedreno/drm/virtio: Fix SHAREABLE+MAPPABLE
A shareable bo should also be mappable if FD_BO_NOMAP is not set.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16086>
2022-04-27 23:10:00 +00:00
Rob Clark 441f01e778 freedreno/drm/virtio: Drop blocking in host
These paths should be corner cases, but still it is a bad idea to block
in the host (because it is single threaded), so instead just turn waits
in the host into polling in the guest.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16086>
2022-04-27 23:10:00 +00:00
Rob Clark e6b2785811 freedreno/drm/virtio: Use userspace IOVA allocation
If supported by host virglrenderer and host kernel, use userspace
allocated GPU virtual addresses.  This lets us avoid stalling on
waiting for response from host kernel until we need to know the
host handle (which is usually not until submit time).

Handling the async response from host to get host_handle is done
thru the submit_queue, so that in the submit path (hot) we do not
need any additional synchronization to know that the host_handle
is valid.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16086>
2022-04-27 23:10:00 +00:00
Rob Clark ae01c27ac0 freedreno/drm/virtio: Support ring_idx
ring_idx zero is the CPU ring, others map to the priority level, as each
priority level for a given drm_file on the host kernel side maps to a
single fence timeline.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16086>
2022-04-27 23:10:00 +00:00
Rob Clark 122cedf98c freedreno/drm: Move bo common init
We'll need this to happen before virtio_bo_new() returns in the next
patch.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16086>
2022-04-27 23:10:00 +00:00
Rob Clark d52455a962 freedreno/drm: Close bo handle after bo->destroy()
For userspace allocated iova, we want to give the backend a chance to
release the iova before the handle is closed.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16086>
2022-04-27 23:10:00 +00:00
Rob Clark 4ed346c6fb freedreno/drm: Drop FD_PP_PGTABLE
Unused.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16086>
2022-04-27 23:10:00 +00:00
Rob Clark 0004cae638 freedreno/drm/virtio: Appease valgrind
Valgrind isn't seeing that the kernel is initializing the caps (or
returning an error).

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16086>
2022-04-27 23:10:00 +00:00
Rob Clark d79c71c705 freedreno: Misc indent fixes
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16086>
2022-04-27 23:10:00 +00:00
Adam Jackson c865416f44 glx/kopper: Wire up a way for SwapBuffers to fail
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16038>
2022-04-27 21:50:16 +00:00
Mike Blumenkrantz 0394f35424 zink/kopper: add a mechanism for checking swapchain status
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16038>
2022-04-27 21:50:16 +00:00
Mike Blumenkrantz 4af98df955 zink: flag swapchain resources as swapchains
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16038>
2022-04-27 21:50:16 +00:00
Mike Blumenkrantz 625457caaf zink: handle swapchain acquire failures more directly
if acquire fails, the pending operation cannot be completed, so just
drop it

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16038>
2022-04-27 21:50:16 +00:00
Mike Blumenkrantz 494d02eacf zink: fix return for zink_kopper_acquire
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16038>
2022-04-27 21:50:16 +00:00
Mike Blumenkrantz ce9cbeee33 zink: rework swapchain object check for acquires
this is more accurate

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16038>
2022-04-27 21:50:16 +00:00
Mike Blumenkrantz a2c9cc7200 zink: unset image layout when killing swapchain
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16038>
2022-04-27 21:50:16 +00:00
Mike Blumenkrantz 5cb9e5db72 zink: handle dead swapchains in acquire
this is a no-op failure

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16038>
2022-04-27 21:50:16 +00:00
Mike Blumenkrantz 651b71a6ca zink: flag swapchains when updating fails
these are dead, they just don't know it yet

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16038>
2022-04-27 21:50:16 +00:00
Mike Blumenkrantz b86c814347 zink: add a util function for finding swapchain resource
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16038>
2022-04-27 21:50:16 +00:00
Charmaine Lee 8d73315bce draw: fix double free of NIR IR
Check the shader IR type first before freeing the NIR IR in
draw_delete_xxx_shader() in case the IR has been converted to TGSI
and the NIR IR has already been freed.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Neha Bhende <bhenden@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16199>
2022-04-27 21:01:54 +00:00
Lionel Landwerlin f4f350a06c anv: reemit 3DSTATE_STREAMOUT after memcpy
This doesn't fix anything because memcpy is only used before secondary
buffer execution and we dirty everything after that.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16189>
2022-04-27 18:43:00 +00:00
Sathishkumar S f17d3a1251 radeon/vcn: skip create and destroy message for jpeg
JPEG does not require create and destroy codec messages.
It is not firmware based, so these messages are redundant.

Signed-off-by: Sathishkumar S <sathishkumar.sundararaju@amd.com>
Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16160>
2022-04-27 17:13:36 +00:00
Mike Blumenkrantz de3890daa5 zink: add supported present modes to kopper displaytarget
for use later

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16193>
2022-04-27 16:52:25 +00:00
Cristian Ciocaltea d89b95b247 ci: Limit Intel CPU scaling frequency for performance tests
As an additional measure to mitigate thermal throttling, set the upper
limit for the CPU scaling frequency to 65% of maximum allowed by the
hardware.

The impact on the overall tests duration should be minimal since the
performance tests do not really put high load on the CPU.

Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
Reviewed-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Acked-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16164>
2022-04-27 18:46:05 +03:00
Cristian Ciocaltea 99b04cbb73 ci: Add CPU frequency adjustment capability
Update intel-gpu-freq.sh script to offer the possibility to adjust CPU
operating frequencies in addition to GPU.

Note this is currently limited to just setting the maximum scaling
frequency as percentage of the maximum frequency allowed by the
hardware.

Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
Reviewed-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Acked-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16164>
2022-04-27 18:46:05 +03:00
Icecream95 76cea8e27b panfrost: Fix pack_32_2x16 implementation
Fixes: 6f0eff548c ("pan/bi: Implement packing ops between 32-bit vec1 and 16-bit vec2")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16181>
2022-04-27 15:30:09 +00:00
Samuel Pitoiset 92e5eee39e radv: use correct push constants range for internal operations
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16131>
2022-04-27 15:08:59 +00:00
Juan A. Suarez Romero 031bcf686b v3d/simulator: add support for AMD cards
Dumb buffers do not work with AMD gpus. So use AMD ioctl to create
proper buffers.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16187>
2022-04-27 14:42:23 +00:00
Juan A. Suarez Romero 9c3144d2ef v3dv: store device_id on device init
Instead of calling later an ioctl to get the device id, let's store it
while initializing the physical device.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16187>
2022-04-27 14:42:23 +00:00
Jason Ekstrand 3f824e0e85 panvk: Eliminate unused vertex attributes
We use nir_assign_io_var_locations() which compacts the varyings and
eliminates any unused input slots.  We need to do the same thing when
processing pVertexAttributeDescriptions[] or else we'll end up with
mismatches between the shader and the state setup code.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16183>
2022-04-27 14:18:25 +00:00