radeonsi/vcn: Add vcn_5_0_1 support

Add support for AMD vcn_5_0_1

Signed-off-by: Sonny Jiang <sonny.jiang@amd.com>
Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33004>
This commit is contained in:
Sonny Jiang
2024-10-24 10:05:59 -04:00
committed by Marge Bot
parent f7be8e228a
commit 5b2de9e593
4 changed files with 13 additions and 2 deletions
+3
View File
@@ -966,6 +966,9 @@ bool ac_query_gpu_info(int fd, void *dev_p, struct radeon_info *info,
case VCN_IP_VERSION(5, 0, 0):
info->vcn_ip_version = VCN_5_0_0;
break;
case VCN_IP_VERSION(5, 0, 1):
info->vcn_ip_version = VCN_5_0_1;
break;
default:
info->vcn_ip_version = VCN_UNKNOWN;
}
+1
View File
@@ -214,6 +214,7 @@ enum vcn_version{
VCN_4_0_6,
VCN_5_0_0,
VCN_5_0_1,
};
#define SDMA_VERSION_VALUE(major, minor) (((major) << 8) | (minor))
@@ -2954,6 +2954,11 @@ struct pipe_video_codec *radeon_create_decoder(struct pipe_context *context,
dec->addr_gfx_mode = RDECODE_ARRAY_MODE_ADDRLIB_SEL_GFX11;
dec->av1_version = RDECODE_AV1_VER_1;
break;
case VCN_5_0_1:
dec->jpg_reg.version = RDECODE_JPEG_REG_VER_V3;
dec->addr_gfx_mode = RDECODE_ARRAY_MODE_ADDRLIB_SEL_GFX9;
dec->av1_version = RDECODE_AV1_VER_1;
break;
default:
RADEON_DEC_ERR("VCN is not supported.\n");
goto error;
+4 -2
View File
@@ -664,7 +664,8 @@ static int si_get_video_param(struct pipe_screen *screen, enum pipe_video_profil
sscreen->info.ip[AMD_IP_VCN_ENC].num_queues))
return 0;
if (sscreen->info.vcn_ip_version == VCN_4_0_3)
if (sscreen->info.vcn_ip_version == VCN_4_0_3 ||
sscreen->info.vcn_ip_version == VCN_5_0_1)
return 0;
switch (param) {
@@ -1148,7 +1149,8 @@ static bool si_vid_is_format_supported(struct pipe_screen *screen, enum pipe_for
(sscreen->info.vcn_ip_version >= VCN_2_0_0)) ||
((profile == PIPE_VIDEO_PROFILE_AV1_MAIN) &&
(sscreen->info.vcn_ip_version >= VCN_4_0_0 &&
sscreen->info.vcn_ip_version != VCN_4_0_3))))
sscreen->info.vcn_ip_version != VCN_4_0_3 &&
sscreen->info.vcn_ip_version != VCN_5_0_1))))
return (format == PIPE_FORMAT_P010 || format == PIPE_FORMAT_NV12);