From e9d9c67eab13b2e2882ee83f54d4a368d0667ec6 Mon Sep 17 00:00:00 2001 From: Benjamin Cheng Date: Fri, 29 Nov 2024 11:59:49 -0500 Subject: [PATCH] radv/video: enable by default on vcn2/3 with latest fw The latest FW in the linux-firmware repo provides the required features to pass all the CTS tests. Reviewed-by: Dave Airlie Part-of: --- src/amd/vulkan/radv_video.c | 14 +++++++++++++- src/amd/vulkan/radv_video_enc.c | 12 ++++++++++++ 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/src/amd/vulkan/radv_video.c b/src/amd/vulkan/radv_video.c index cd42ba79191..753c934951b 100644 --- a/src/amd/vulkan/radv_video.c +++ b/src/amd/vulkan/radv_video.c @@ -277,13 +277,25 @@ radv_probe_video_decode(struct radv_physical_device *pdev) pdev->video_decode_enabled = false; + /* The support for decode events are available at the same time as encode */ if (pdev->info.vcn_ip_version >= VCN_4_0_0) { if (pdev->info.vcn_enc_major_version > 1) pdev->video_decode_enabled = true; /* VCN 4 FW 1.22 has all the necessary pieces to pass CTS */ - /* VCN 4 has unified fw so use the enc versions */ if (pdev->info.vcn_enc_major_version == 1 && pdev->info.vcn_enc_minor_version >= 22) pdev->video_decode_enabled = true; + } else if (pdev->info.vcn_ip_version >= VCN_3_0_0) { + if (pdev->info.vcn_enc_major_version > 1) + pdev->video_decode_enabled = true; + /* VCN 3 FW 1.33 has all the necessary pieces to pass CTS */ + if (pdev->info.vcn_enc_major_version == 1 && pdev->info.vcn_enc_minor_version >= 33) + pdev->video_decode_enabled = true; + } else if (pdev->info.vcn_ip_version >= VCN_2_0_0) { + if (pdev->info.vcn_enc_major_version > 1) + pdev->video_decode_enabled = true; + /* VCN 2 FW 1.24 has all the necessary pieces to pass CTS */ + if (pdev->info.vcn_enc_major_version == 1 && pdev->info.vcn_enc_minor_version >= 24) + pdev->video_decode_enabled = true; } if (instance->perftest_flags & RADV_PERFTEST_VIDEO_DECODE) { pdev->video_decode_enabled = true; diff --git a/src/amd/vulkan/radv_video_enc.c b/src/amd/vulkan/radv_video_enc.c index af37be10297..9364ba1fc92 100644 --- a/src/amd/vulkan/radv_video_enc.c +++ b/src/amd/vulkan/radv_video_enc.c @@ -129,11 +129,23 @@ radv_probe_video_encode(struct radv_physical_device *pdev) return; if (pdev->info.vcn_enc_minor_version < RENCODE_V3_FW_INTERFACE_MINOR_VERSION) return; + + /* VCN 3 FW 1.33 has all the necessary pieces to pass CTS */ + if (pdev->info.vcn_enc_minor_version >= 33) { + pdev->video_encode_enabled = true; + return; + } } else if (pdev->info.vcn_ip_version >= VCN_2_0_0) { if (pdev->info.vcn_enc_major_version != RENCODE_V2_FW_INTERFACE_MAJOR_VERSION) return; if (pdev->info.vcn_enc_minor_version < RENCODE_V2_FW_INTERFACE_MINOR_VERSION) return; + + /* VCN 2 FW 1.24 has all the necessary pieces to pass CTS */ + if (pdev->info.vcn_enc_minor_version >= 24) { + pdev->video_encode_enabled = true; + return; + } } else { if (pdev->info.vcn_enc_major_version != RENCODE_FW_INTERFACE_MAJOR_VERSION) return;