mesa/src/panfrost/lib
Alyssa Rosenzweig cc980ee0ed panfrost: Protect pandecode by a mutex
Pandecode is not thread-safe (for a large number of reasons) and does not even
try to be. This is a problem when tracing (or just using PAN_MESA_DEBUG=sync)
multithreaded applications. The most common symptom of the problem are assertion
failures deep in the red-black tree implementation, which is not thread-safe.

Just protect the whole thing by a "in pandecode?" mutex, since this is not
performance sensitive code and we don't really care about the extra
serialization incurred. As pandecode does not recurse into itself, we may simply
lock at the beginning and unlock at the end of each entrypoint in pandecode,
which is thread-safe regardless of how pandecode is used. A few entrypoints are
refactored to avoid early returns to keep the lock/unlock calls in obvious
visual pairs.

Fixes flakes when running the CL CTS with PAN_MESA_DEBUG=sync like we would in
CI (e.g: events.event_flush)

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Tested-by: Icecream95 <ixn@disroot.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17409>
2022-07-13 19:15:13 +00:00
..
genxml panfrost: Protect pandecode by a mutex 2022-07-13 19:15:13 +00:00
tests panfrost: Add 1x1 layout unit tests 2022-05-26 15:56:32 +00:00
.gitignore
meson.build panfrost: Unit test block size queries 2022-04-26 17:47:49 +00:00
pan_afbc.c panfrost: Pass arch instead of dev into afbc_format 2022-06-01 19:44:31 +00:00
pan_attributes.c
pan_blend.c panfrost: Copy blend constant into variant even when reusing it 2022-05-20 23:17:07 +00:00
pan_blend.h panfrost: Increase the limit for blend shader variants 2022-05-20 23:17:07 +00:00
pan_blitter.c panfrost: Disable CRC at <16x16 tile sizes 2022-06-13 15:46:12 +00:00
pan_blitter.h panfrost: Move genxml related files to a subdir 2021-09-30 10:30:19 +00:00
pan_bo.c panfrost: Remove BO mapping from import 2022-04-10 01:51:04 +00:00
pan_bo.h panfrost: Stop using sparse_array for batch BOs 2022-06-14 23:44:02 +00:00
pan_clear.c panfrost: Move genxml related files to a subdir 2021-09-30 10:30:19 +00:00
pan_cs.c panfrost: Use implementation-specific tile size 2022-07-13 19:00:41 +00:00
pan_cs.h panfrost: Separate core ID range from core count 2022-07-08 01:14:55 +00:00
pan_device.h panfrost: Use implementation-specific tile size 2022-07-13 19:00:41 +00:00
pan_encoder.h panfrost: Separate core ID range from core count 2022-07-08 01:14:55 +00:00
pan_format.c panfrost: Handle stencil texturing on Valhall 2022-04-07 15:11:04 +00:00
pan_format.h panfrost: Add Valhall compressed formats 2022-03-30 17:29:12 +00:00
pan_indirect_dispatch.c panfrost: Remove is_64b assignments 2022-06-08 13:42:42 +00:00
pan_indirect_dispatch.h panfrost: Deduplicate indirect dispatch structs 2022-06-08 13:42:42 +00:00
pan_indirect_draw.c panfrost: Remove is_64b assignments 2022-06-08 13:42:42 +00:00
pan_indirect_draw.h panfrost: Move genxml related files to a subdir 2021-09-30 10:30:19 +00:00
pan_layout.c panfrost: Advertise 16x16 tiled AFBC 2022-05-26 15:56:32 +00:00
pan_pool.h panfrost: Move genxml related files to a subdir 2021-09-30 10:30:19 +00:00
pan_props.c panfrost: Use implementation-specific tile size 2022-07-13 19:00:41 +00:00
pan_samples.c
pan_scoreboard.h panfrost: Handle Valhall IDVS in job_uses_tiling 2022-03-30 17:29:12 +00:00
pan_scratch.c panfrost: Separate core ID range from core count 2022-07-08 01:14:55 +00:00
pan_shader.c panfrost,panvk: Make fixed_sysval_ubo < 0 mean compiler-assigned 2022-05-12 10:53:15 +00:00
pan_shader.h panfrost: Allow pixels using discard to be killed 2022-06-13 14:23:55 +00:00
pan_texture.c panfrost: Handle texturing from AFBC on Valhall 2022-06-01 19:44:31 +00:00
pan_texture.h panfrost: Add pan_afbc_compression_mode on Valhall 2022-06-01 19:44:31 +00:00
pan_tiler.c panfrost: Centralize our model list 2022-01-28 17:47:46 +00:00
pan_util.c panfrost: Centralize our model list 2022-01-28 17:47:46 +00:00
pan_util.h panfrost: Add PAN_MESA_DEBUG=dump option 2022-03-01 19:43:22 +00:00
wrap.h panfrost: Prepare pandecode to per-gen XML 2021-09-20 15:11:30 +02:00