mesa/src/intel
José Roberto de Souza 58a320186d 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>
(cherry picked from commit 8092bc2158)
2023-02-08 20:34:42 +00:00
..
blorp intel: Fix a hang caused by invalid dispatch enables on gfx6/7 2023-01-01 17:07:04 +00:00
ci Revert "glx: Fix drawable refcounting for naked Windows" 2022-11-30 21:12:43 +00:00
common utils: Merge util/debug.* into util/u_debug.* and remove util/debug.* 2022-11-02 07:25:39 +00:00
compiler intel/fs: Fix src and dst types of LOAD_PAYLOAD ACP entries during copy propagation. 2023-01-26 15:40:35 +00:00
dev utils: Merge util/debug.* into util/u_debug.* and remove util/debug.* 2022-11-02 07:25:39 +00:00
ds intel/ds: Fix crash when allocating more intel_ds_queues than u_vector was initialized 2023-02-08 20:34:42 +00:00
genxml intel/genxml: fix width of 3DSTATE_TASK_CONTROL.MaximumNumberofThreadGroups 2022-11-02 08:56:53 +00:00
isl isl: make Wa_1806565034 conditional to non robust access 2022-12-14 20:56:54 +00:00
nullhw-layer utils: Merge util/debug.* into util/u_debug.* and remove util/debug.* 2022-11-02 07:25:39 +00:00
perf intel/perf: fix B/C counters accumulation in non query mode 2022-11-23 19:11:58 +00:00
tools intel: Convert i915 engine type to intel in tools/ common/ and ds/ 2022-10-15 20:04:51 +00:00
vulkan intel/ds: Fix crash when allocating more intel_ds_queues than u_vector was initialized 2023-02-08 20:34:42 +00:00
vulkan_hasvk intel/ds: Fix crash when allocating more intel_ds_queues than u_vector was initialized 2023-02-08 20:34:42 +00:00
meson.build intel: add a hasvk vulkan driver 2022-09-02 09:40:45 +00:00