From 7b9d4bbdd5c9a903d6938a7fe48ce64653ac08e0 Mon Sep 17 00:00:00 2001 From: Leo Liu Date: Thu, 14 May 2020 12:24:53 -0400 Subject: tests/amdgpu: add VCN3.0 regs support VCN3.0 has its own set of internal regs Signed-off-by: Leo Liu Reviewed-by: Thong Thai Reviewed-by: James Zhu --- tests/amdgpu/vcn_tests.c | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/tests/amdgpu/vcn_tests.c b/tests/amdgpu/vcn_tests.c index 77ceeb14..dcd51c05 100644 --- a/tests/amdgpu/vcn_tests.c +++ b/tests/amdgpu/vcn_tests.c @@ -56,6 +56,8 @@ static amdgpu_device_handle device_handle; static uint32_t major_version; static uint32_t minor_version; static uint32_t family_id; +static uint32_t chip_rev; +static uint32_t chip_id; static uint32_t asic_id; static amdgpu_context_handle context_handle; @@ -96,6 +98,8 @@ CU_BOOL suite_vcn_tests_enable(void) return CU_FALSE; family_id = device_handle->info.family_id; + chip_rev = device_handle->info.chip_rev; + chip_id = device_handle->info.chip_external_rev; asic_id = device_handle->info.asic_id; if (amdgpu_device_deinitialize(device_handle)) @@ -122,11 +126,20 @@ CU_BOOL suite_vcn_tests_enable(void) reg.cntl = 0x81c6; } } else if (family_id == AMDGPU_FAMILY_NV) { - reg.data0 = 0x504; - reg.data1 = 0x505; - reg.cmd = 0x503; - reg.nop = 0x53f; - reg.cntl = 0x506; + if (chip_id == (chip_rev + 0x28)) { + reg.data0 = 0x10; + reg.data1 = 0x11; + reg.cmd = 0xf; + reg.nop = 0x29; + reg.cntl = 0x26d; + } + else { + reg.data0 = 0x504; + reg.data1 = 0x505; + reg.cmd = 0x503; + reg.nop = 0x53f; + reg.cntl = 0x506; + } } else return CU_FALSE; -- cgit v1.2.3