AV1 Hardware Video Decode Support For AMD RX 6000 Series GPUs Coming In Linux 5.10

From LinuxReviews
Jump to navigationJump to search
Amdlogo.png

AMD has historically been extremely slow compared to Nvidia and Intel when it comes to providing hardware video encoding and decoding capabilities for open video standards like VP8 and VP9. New patches by AMD Open Source Laboratory developer Alex Deucher show that AMD won't be dragging their feet for years before they add AV1 video decoding support to their hardware, it is already there in the upcoming RX 6000 series GPUs. VP9 and AV1 video encoding support is still severely lacking.

written by 林慧 (Wai Lin) 2020-09-16 - last edited 2020-10-24. © CC BY

RX6000-fortnite.jpg
Mysterious new AMD RX 6000 series GPU in something called "Fortnite".

A close-up inspection of a message from AMD Open Source Laboratory developer Alex Deucher titled drm/amdgpu: use the AV1 defines for VCN 3.0 in a series of four patches for the Video Core Next hardware on AMD RX 6000 graphics cards posted on the amd-gfx mailing list shows that upcoming AMD RX 6000 series cards can and will do AV1 video decoding in hardware. These patches will soon make it to drm-next and then Linux 5.10 when Linux 5.9 is released and the next merge window opens.

 drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c b/drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c
index 589d6cd8adec..e074f7ed388c 100644
--- a/drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c
@@ -746,18 +746,18 @@ static void vcn_v3_0_disable_clock_gating(struct amdgpu_device *adev, int inst)
 		| UVD_SUVD_CGC_GATE__IME_HEVC_MASK
 		| UVD_SUVD_CGC_GATE__EFC_MASK
 		| UVD_SUVD_CGC_GATE__SAOE_MASK
-		| 0x08000000
+		| UVD_SUVD_CGC_GATE__SRE_AV1_MASK
 		| UVD_SUVD_CGC_GATE__FBC_PCLK_MASK
 		| UVD_SUVD_CGC_GATE__FBC_CCLK_MASK
-		| 0x40000000
+		| UVD_SUVD_CGC_GATE__SCM_AV1_MASK
 		| UVD_SUVD_CGC_GATE__SMPA_MASK);
 	WREG32_SOC15(VCN, inst, mmUVD_SUVD_CGC_GATE, data);
 
 	data = RREG32_SOC15(VCN, inst, mmUVD_SUVD_CGC_GATE2);
 	data |= (UVD_SUVD_CGC_GATE2__MPBE0_MASK
 		| UVD_SUVD_CGC_GATE2__MPBE1_MASK
-		| 0x00000004
-		| 0x00000008
+		| UVD_SUVD_CGC_GATE2__SIT_AV1_MASK
+		| UVD_SUVD_CGC_GATE2__SDB_AV1_MASK
 		| UVD_SUVD_CGC_GATE2__MPC1_MASK);
 	WREG32_SOC15(VCN, inst, mmUVD_SUVD_CGC_GATE2, data);
 
@@ -776,8 +776,8 @@ static void vcn_v3_0_disable_clock_gating(struct amdgpu_device *adev, int inst)
 		| UVD_SUVD_CGC_CTRL__SMPA_MODE_MASK
 		| UVD_SUVD_CGC_CTRL__MPBE0_MODE_MASK
 		| UVD_SUVD_CGC_CTRL__MPBE1_MODE_MASK
-		| 0x00008000
-		| 0x00010000
+		| UVD_SUVD_CGC_CTRL__SIT_AV1_MODE_MASK
+		| UVD_SUVD_CGC_CTRL__SDB_AV1_MODE_MASK
 		| UVD_SUVD_CGC_CTRL__MPC1_MODE_MASK
 		| UVD_SUVD_CGC_CTRL__FBC_PCLK_MASK
 		| UVD_SUVD_CGC_CTRL__FBC_CCLK_MASK);
@@ -892,8 +892,8 @@ static void vcn_v3_0_enable_clock_gating(struct amdgpu_device *adev, int inst)
 		| UVD_SUVD_CGC_CTRL__SMPA_MODE_MASK
 		| UVD_SUVD_CGC_CTRL__MPBE0_MODE_MASK
 		| UVD_SUVD_CGC_CTRL__MPBE1_MODE_MASK
-		| 0x00008000
-		| 0x00010000
+		| UVD_SUVD_CGC_CTRL__SIT_AV1_MODE_MASK
+		| UVD_SUVD_CGC_CTRL__SDB_AV1_MODE_MASK
 		| UVD_SUVD_CGC_CTRL__MPC1_MODE_MASK
 		| UVD_SUVD_CGC_CTRL__FBC_PCLK_MASK
 		| UVD_SUVD_CGC_CTRL__FBC_CCLK_MASK);

Video Core Next 3.0 support (vcn_v3_0.c) is in itself new in the upcoming Linux 5.9 kernel. It ties in with the new Display Core Next hardware support for the RX 6000 series graphics cards and upcoming AMD APUs which are, in the Linux kernel code, referred to as CHIP_SIENNA_CICHLID and CHIP_NAVY_FLOUNDER. Sienna Cichlid is what the dedicated graphics cards are called and we now have the PCIe IDs:

+	/* Sienna_Cichlid */
+	{0x1002, 0x73A0, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_SIENNA_CICHLID},
+	{0x1002, 0x73A2, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_SIENNA_CICHLID},
+	{0x1002, 0x73A3, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_SIENNA_CICHLID},
+	{0x1002, 0x73AB, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_SIENNA_CICHLID},
+	{0x1002, 0x73AE, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_SIENNA_CICHLID},
+	{0x1002, 0x73BF, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_SIENNA_CICHLID},

The severe lack of any VP9 or AV1 video encoding support in these patches is quite disturbing. There is no SIT_VP9_ENC_MASK or SIT_AV1_ENC_MASK anywhere in these patches, other patches, git trees or anywhere else for that matter. We can therefore only assume that all the RX 6000 series cards will lack hardware video encoding support for both VP9 and AV1 video. There is a vague chance that encoding support is present in hardware and that Linux support will arrive at a later date, but that seems very unlikely. Encoding support would like have arrived along with decoding support if it was present in hardware. It really does seem like AMD fans will have to wait for RX 7000 series graphics cards before they can do VP9 hardware video encoding - something the otherwise far simpler integrated Intel graphics on Intel products has been capable of since Kaby Lake was launched in 2016.

User-space support for AV1 hardware video decoding has been present in the VAAPI library for a while nowso the AV1 hardware video decoding functionality on RX 6000 cards will be usable as soon as kernel support arrives with the release of Linux 5.10.

5.00
(one vote)


avatar

Anonymous (645e5231)

15 months ago
Score 0++

>The severe lack of any VP9 or AV1 video encoding support in these patches is quite disturbing.

-_-
avatar

Anonymous (645e5231)

15 months ago
Score 0++
nvidia doesn't have av1 encode.
avatar

Anonymous (645e5231)

15 months ago
Score 0++
nvidia doesn't have av1 encode.
Add your comment
LinuxReviews welcomes all comments. If you do not want to be anonymous, register or log in. It is free.