radeonsi: create a new context for transcode with multiple video engines
authorLeo Liu <leo.liu@amd.com>
Thu, 13 Apr 2023 15:29:39 +0000 (11:29 -0400)
committerMarge Bot <emma+marge@anholt.net>
Mon, 17 Apr 2023 15:10:01 +0000 (15:10 +0000)
commitec896048bb90803ba0e0c3b494e9ed60b0bf643c
tree1c2769dde9359c8db143d190e8be2c7c7b9203b4
parent1563210a41d85501834df4b0ec96132010191157
radeonsi: create a new context for transcode with multiple video engines

For CHIP_GFX1100, there are 2 VCN instances but using unified queue i.e.
decode and encode will go to HW via same ring type. With AMDGPU kernel
scheduler, since the trancode is sharing the same pipe context, so that
the gpu scheduler assign the decode and encode into the same VCN engine.
In order to use both engines with transcode case, the new pipe context will
be created when the case being detected, with that the transcode can be
load balanced with multiple VCN engines.

Signed-off-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: Boyuan Zhang <Boyuan.Zhang@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22471>
src/gallium/drivers/radeonsi/radeon_vcn_enc.c
src/gallium/drivers/radeonsi/radeon_vcn_enc.h
src/gallium/drivers/radeonsi/si_pipe.h
src/gallium/drivers/radeonsi/si_uvd.c