radeonsi/tmz: add workaround for mpv/vaapi subtitles
authorPierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Fri, 24 Jul 2020 14:04:14 +0000 (16:04 +0200)
committerMarge Bot <eric+marge@anholt.net>
Thu, 24 Sep 2020 14:51:16 +0000 (14:51 +0000)
commit24796899685c0be3cd99fef02a7ec3ebb7b1b63b
tree352c5465bbf9d1a77cd2a7d478f5833aadcba083
parent2c6643546ad85f4e19aa3728a96fa4d6ddb571d9
radeonsi/tmz: add workaround for mpv/vaapi subtitles

Subtitles are rendering with an upload through a staging texture.
So the sequence is:
  1. draw video (with a secure cs)
  2. copy staging texture to the real texture (via si_resource_copy_region) in
    a non-secure cs.
  3. draw video (with a secure cs)

Step 2 and 3 both generates a flush with RADEON_FLUSH_TOGGLE_SECURE_SUBMISSION.
These flushes are executed quite late: right before doing the draw/dispatch,
so maybe the issue here is the handling of dependencies.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6049>
src/gallium/drivers/radeonsi/si_gfx_cs.c