mesa/src/intel/ds
José Roberto de Souza 8092bc2158 intel/ds: Fix crash when allocating more intel_ds_queues than u_vector was initialized
u_vector_add() don't keep the returned pointers valid.
After the initial size allocated in u_vector_init() is reached it will
allocate a bigger buffer and copy data from older buffer to the new
one and free the old buffer, making all the previous pointers returned
by u_vector_add() invalid and crashing the application when trying to
access it.

This is reproduced when running
dEQP-VK.synchronization.signal_order.timeline_semaphore.* in DG2 SKUs
that has 4 CCS engines, INTEL_COMPUTE_CLASS=1 is set and of course
perfetto build is enabled.

To fix this issue here I'm moving the storage/allocation of
struct intel_ds_queue to struct anv_queue/iris_batch and using
struct list_head to maintain a chain of intel_ds_queue of the
intel_ds_device.
This allows us to append or remove queues dynamically in future if
necessary.

Fixes: e760c5b37b ("anv: add perfetto source")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20977>
2023-02-01 18:31:29 +00:00
..
.clang-format
intel_driver_ds.cc intel/ds: Fix crash when allocating more intel_ds_queues than u_vector was initialized 2023-02-01 18:31:29 +00:00
intel_driver_ds.h intel/ds: Fix crash when allocating more intel_ds_queues than u_vector was initialized 2023-02-01 18:31:29 +00:00
intel_pps_driver.cc intel: Add kmd_type parameter to necessary intel_gem.h functions 2023-01-25 09:17:15 -08:00
intel_pps_driver.h intel/ds: allow user to select metric set at start time 2022-01-14 20:17:44 +00:00
intel_pps_perf.cc intel: Convert i915 engine type to intel in tools/ common/ and ds/ 2022-10-15 20:04:51 +00:00
intel_pps_perf.h intel/ds: allow user to select metric set at start time 2022-01-14 20:17:44 +00:00
intel_pps_priv.h intel/ds: use a per GPU clock ID 2022-01-14 20:17:44 +00:00
intel_tracepoints.py intel/utrace: document tracepoints 2023-01-13 01:22:15 +00:00
meson.build meson: do not use source_root() when possible 2022-11-22 06:11:07 +00:00