radeonsi: return kernel queried video capability for HEVC and JPEG

Query and return the values obtained from kernel for VCN_1 and above.
Earlier the HEVC and JPEG capabilities were returned based on
pre-defined values.

Signed-off-by: Veerabadhran Gopalakrishnan <veerabadhran.gopalakrishnan@amd.com>
Reviewed-by: Thong Thai <thong.thai@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23067>
This commit is contained in:
Veerabadhran Gopalakrishnan 2023-05-17 12:24:40 +05:30 committed by Marge Bot
parent af8f04e9fe
commit 11c8b84c53

View file

@ -753,12 +753,12 @@ static int si_get_video_param(struct pipe_screen *screen, enum pipe_video_profil
sscreen->info.ip[AMD_IP_VCN_UNIFIED].num_queues :
sscreen->info.ip[AMD_IP_VCN_DEC].num_queues)))
return false;
if (codec < PIPE_VIDEO_FORMAT_MPEG4_AVC &&
sscreen->info.vcn_ip_version >= VCN_3_0_33)
return false;
if (QUERYABLE_KERNEL &&
sscreen->info.vcn_ip_version >= VCN_1_0_0)
return KERNEL_DEC_CAP(codec, valid);
if (codec < PIPE_VIDEO_FORMAT_MPEG4_AVC &&
sscreen->info.vcn_ip_version >= VCN_3_0_33)
return false;
switch (codec) {
case PIPE_VIDEO_FORMAT_MPEG12: