radeonsi/vcn: avoid hard-coding the number of jpeg instance
use the number of jpeg instances from query to create as many submission ctx Signed-off-by: Sathishkumar S <sathishkumar.sundararaju@amd.com> Reviewed-by: Leo Liu <leo.liu@amd.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27884>
This commit is contained in:

committed by
Marge Bot

parent
f3ab454f07
commit
0fe5ad708d
@@ -3132,10 +3132,9 @@ struct pipe_video_codec *radeon_create_decoder(struct pipe_context *context,
|
||||
|
||||
if (dec->stream_type == RDECODE_CODEC_JPEG) {
|
||||
|
||||
if (sctx->vcn_ip_ver == VCN_2_5_0 || sctx->vcn_ip_ver == VCN_2_6_0)
|
||||
dec->njctx = 2;
|
||||
else if (sctx->vcn_ip_ver == VCN_4_0_3)
|
||||
dec->njctx = 24;
|
||||
if (((struct si_screen*)dec->screen)->info.ip[AMD_IP_VCN_JPEG].num_queues > 1 &&
|
||||
((struct si_screen*)dec->screen)->info.ip[AMD_IP_VCN_JPEG].num_queues <= MAX_JPEG_INST)
|
||||
dec->njctx = ((struct si_screen*)dec->screen)->info.ip[AMD_IP_VCN_JPEG].num_queues;
|
||||
else
|
||||
dec->njctx = 1;
|
||||
|
||||
|
@@ -15,6 +15,7 @@
|
||||
#include "ac_vcn_dec.h"
|
||||
|
||||
#define NUM_BUFFERS 4
|
||||
#define MAX_JPEG_INST 64
|
||||
|
||||
struct rvcn_dec_dynamic_dpb_t2 {
|
||||
struct list_head list;
|
||||
|
Reference in New Issue
Block a user