tests/amdgpu: add VCN3.0 regs support

VCN3.0 has its own set of internal regs

Signed-off-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: Thong Thai <thong.thai@amd.com>
Reviewed-by: James Zhu <James.Zhu@amd.com>
main
Leo Liu 2020-05-14 12:24:53 -04:00
parent c7d8941288
commit 7b9d4bbdd5
1 changed files with 18 additions and 5 deletions

View File

@ -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;