mesa/src/gallium/drivers/etnaviv
Lucas Stach 612b99d721 etnaviv: fix use after free in async shader compile
When the shader state is destroyed before the async shader compile is
done, we get a use after free in the async thread, as the shader state
it is operating on is gone. Fix this by dropping any pending job from
the async queue or wait for it to finish before destroying the state
by calling util_queue_drop_job.

Also call util_queue_fence_destroy, which would have caught this issue
by asserting that the queue_fence is in signalled state when the
shader state is destroyed.

Fixes: 1141ed5859 ("etnaviv: async shader compile")
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17534>
2022-07-15 11:07:12 +00:00
..
hw etnaviv: update headers from rnndb 2022-04-27 09:10:27 +00:00
tests
README
etnaviv_asm.c etnaviv: use feature bit for one const src per instuction limitation 2022-04-27 09:10:27 +00:00
etnaviv_asm.h etnaviv: use feature bit for one const src per instuction limitation 2022-04-27 09:10:27 +00:00
etnaviv_blend.c etnaviv: fix alpha blend with dither on older GPUs 2021-12-11 03:06:15 +00:00
etnaviv_blend.h
etnaviv_blt.c etnaviv: rework resource status tracking (again) 2022-07-03 17:41:55 +00:00
etnaviv_blt.h
etnaviv_clear_blit.c gallium/u_blitter: disable sample shading for all blits 2021-11-04 15:06:09 +00:00
etnaviv_clear_blit.h
etnaviv_compiler.c etnaviv: drop TGSI based backend compiler 2022-02-11 08:48:10 +00:00
etnaviv_compiler.h etnaviv: drop TGSI based backend compiler 2022-02-11 08:48:10 +00:00
etnaviv_compiler_cmdline.c
etnaviv_compiler_nir.c etnaviv: Implement TXD 2022-07-12 21:28:11 +00:00
etnaviv_compiler_nir.h etnaviv: Rename etna_emit_tex() args 2022-07-12 21:28:11 +00:00
etnaviv_compiler_nir_emit.c etnaviv: Implement TXD 2022-07-12 21:28:11 +00:00
etnaviv_compiler_nir_liveness.c
etnaviv_compiler_nir_ra.c
etnaviv_context.c etnaviv: add texture descriptor suballocator 2022-07-13 15:00:33 +00:00
etnaviv_context.h etnaviv: add texture descriptor suballocator 2022-07-13 15:00:33 +00:00
etnaviv_debug.h etnaviv: drop TGSI based backend compiler 2022-02-11 08:48:10 +00:00
etnaviv_disasm.c
etnaviv_disasm.h
etnaviv_disk_cache.c etnaviv: drop TGSI based backend compiler 2022-02-11 08:48:10 +00:00
etnaviv_disk_cache.h
etnaviv_emit.c etnaviv: use new PE pipe address states on >= HALTI0 2022-04-27 09:10:27 +00:00
etnaviv_emit.h
etnaviv_etc2.c
etnaviv_etc2.h
etnaviv_fence.c
etnaviv_fence.h
etnaviv_format.c
etnaviv_format.h
etnaviv_internal.h etnaviv: add tile size helper 2022-04-27 09:10:27 +00:00
etnaviv_nir.c etnaviv: Implement TXD 2022-07-12 21:28:11 +00:00
etnaviv_nir.h
etnaviv_nir_lower_ubo_to_uniform.c
etnaviv_perfmon.c etnaviv: add two new HI related perfmon counter 2022-01-31 10:14:57 +00:00
etnaviv_perfmon.h etnaviv: add two new HI related perfmon counter 2022-01-31 10:14:57 +00:00
etnaviv_query.c
etnaviv_query.h
etnaviv_query_acc.c etnaviv: add function to get resource status 2022-07-03 17:41:55 +00:00
etnaviv_query_acc.h
etnaviv_query_acc_occlusion.c
etnaviv_query_acc_perfmon.c etnaviv: add multiply_with_8 flag 2022-01-31 10:14:57 +00:00
etnaviv_query_sw.c
etnaviv_query_sw.h
etnaviv_rasterizer.c
etnaviv_rasterizer.h
etnaviv_resource.c etnaviv: drop scanout assumption for resources allocated via modifier interface 2022-07-06 07:43:26 +00:00
etnaviv_resource.h etnaviv: rework resource status tracking (again) 2022-07-03 17:41:55 +00:00
etnaviv_rs.c etnaviv: rework resource status tracking (again) 2022-07-03 17:41:55 +00:00
etnaviv_rs.h etnaviv: add support for big tile RS states 2022-04-27 09:10:27 +00:00
etnaviv_screen.c etnaviv: move dummy BOs to screen 2022-07-13 15:00:33 +00:00
etnaviv_screen.h etnaviv: move dummy BOs to screen 2022-07-13 15:00:33 +00:00
etnaviv_shader.c etnaviv: fix use after free in async shader compile 2022-07-15 11:07:12 +00:00
etnaviv_shader.h etnaviv: async shader compile 2022-07-01 19:55:36 +00:00
etnaviv_state.c etnaviv: move dummy BOs to screen 2022-07-13 15:00:33 +00:00
etnaviv_state.h
etnaviv_surface.c etnaviv: add linear PE support 2022-05-20 09:30:18 +00:00
etnaviv_surface.h
etnaviv_texture.c etnaviv: add texture descriptor suballocator 2022-07-13 15:00:33 +00:00
etnaviv_texture.h etnaviv: add texture descriptor suballocator 2022-07-13 15:00:33 +00:00
etnaviv_texture_desc.c etnaviv: tex_desc: remove descriptor patch TODO comment 2022-07-13 15:00:33 +00:00
etnaviv_texture_desc.h
etnaviv_texture_state.c etnaviv: make use of nir_lower_tex_shadow 2022-01-28 18:40:53 +00:00
etnaviv_texture_state.h
etnaviv_tiling.c
etnaviv_tiling.h
etnaviv_transfer.c etnaviv: rework resource status tracking (again) 2022-07-03 17:41:55 +00:00
etnaviv_transfer.h
etnaviv_translate.h etnaviv: fix FRONT_AND_BACK culling 2022-01-29 16:28:09 +00:00
etnaviv_uniforms.c
etnaviv_uniforms.h
etnaviv_util.h
etnaviv_zsa.c
etnaviv_zsa.h
meson.build etnaviv: drop TGSI based backend compiler 2022-02-11 08:48:10 +00:00

README

Notes for the etnaviv gallium driver
------------------------------------

There are two ways how this driver might get used:

- application opens kms device (kmscube, weston, ..)
- X via xf86-video-armada

For the kms device case we provide a renderonly based driver like
imx where all the magic for buffer import and export between kms
and renderonly GPU is handled automaticly.

For X/xf86-video-armada we need to provide etnaviv_dri.so.