OSDN Git Service

tests/amdgpu/vcn: add Renoir VCN2.0 decode support
authorLeo Liu <leo.liu@amd.com>
Thu, 23 Apr 2020 16:05:09 +0000 (12:05 -0400)
committerLeo Liu <leo.liu@amd.com>
Sun, 26 Apr 2020 15:39:19 +0000 (11:39 -0400)
Renoir is the same family as Raven, but it's with VCN2.0,
so it has to use VCN2.0 reg set

Signed-off-by: Leo Liu <leo.liu@amd.com>
Reviewed-By: Thong Thai <thong.thai@amd.com>
tests/amdgpu/vcn_tests.c

index 0d8df81..77ceeb1 100644 (file)
@@ -56,6 +56,7 @@ static amdgpu_device_handle device_handle;
 static uint32_t major_version;
 static uint32_t minor_version;
 static uint32_t family_id;
+static uint32_t asic_id;
 
 static amdgpu_context_handle context_handle;
 static amdgpu_bo_handle ib_handle;
@@ -95,6 +96,7 @@ CU_BOOL suite_vcn_tests_enable(void)
                return CU_FALSE;
 
        family_id = device_handle->info.family_id;
+       asic_id = device_handle->info.asic_id;
 
        if (amdgpu_device_deinitialize(device_handle))
                        return CU_FALSE;
@@ -106,11 +108,19 @@ CU_BOOL suite_vcn_tests_enable(void)
        }
 
        if (family_id == AMDGPU_FAMILY_RV) {
-               reg.data0 = 0x81c4;
-               reg.data1 = 0x81c5;
-               reg.cmd = 0x81c3;
-               reg.nop = 0x81ff;
-               reg.cntl = 0x81c6;
+               if (asic_id == 0x1636) {
+                       reg.data0 = 0x504;
+                       reg.data1 = 0x505;
+                       reg.cmd = 0x503;
+                       reg.nop = 0x53f;
+                       reg.cntl = 0x506;
+               } else {
+                       reg.data0 = 0x81c4;
+                       reg.data1 = 0x81c5;
+                       reg.cmd = 0x81c3;
+                       reg.nop = 0x81ff;
+                       reg.cntl = 0x81c6;
+               }
        } else if (family_id == AMDGPU_FAMILY_NV) {
                reg.data0 = 0x504;
                reg.data1 = 0x505;