summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeo Liu <leo.liu@amd.com>2020-05-14 12:24:53 -0400
committerLeo Liu <leo.liu@amd.com>2020-06-18 10:08:23 -0400
commit7b9d4bbdd5c9a903d6938a7fe48ce64653ac08e0 (patch)
tree61ba5808a080d826e404e5464ce955649b088ed1
parentc7d89412884de2dbfa543720d185027377e62f21 (diff)
downloadlibdrm-7b9d4bbdd5c9a903d6938a7fe48ce64653ac08e0.tar.gz
libdrm-7b9d4bbdd5c9a903d6938a7fe48ce64653ac08e0.tar.bz2
libdrm-7b9d4bbdd5c9a903d6938a7fe48ce64653ac08e0.zip
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>
-rw-r--r--tests/amdgpu/vcn_tests.c23
1 files 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;