summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSonny Jiang <sonny.jiang@amd.com>2016-02-18 10:59:56 -0500
committerAlex Deucher <alexander.deucher@amd.com>2016-02-18 16:50:43 -0500
commit99ede3e6874c4cc5d1d36339095f49467fcf3c17 (patch)
tree78e9ac5723972653fc7d56fe43226b8a789ce8cf
parentadd8936031ee5acb2a3ec87841bb03c938ff36e5 (diff)
amdgpu/tests: fix tests for asics with one VCE instance
Reviewed-by: Leo Liu <leo.liu@amd.com> Signed-off-by: Sonny Jiang <sonny.jiang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r--tests/amdgpu/vce_tests.c20
1 files changed, 12 insertions, 8 deletions
diff --git a/tests/amdgpu/vce_tests.c b/tests/amdgpu/vce_tests.c
index 32fc001b63ee..491517059f4d 100644
--- a/tests/amdgpu/vce_tests.c
+++ b/tests/amdgpu/vce_tests.c
@@ -65,6 +65,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 vce_harvest_config;
static amdgpu_context_handle context_handle;
static amdgpu_bo_handle ib_handle;
@@ -97,6 +98,7 @@ int suite_vce_tests_init(void)
return CUE_SINIT_FAILED;
family_id = device_handle->info.family_id;
+ vce_harvest_config = device_handle->info.vce_harvest_config;
r = amdgpu_cs_ctx_create(device_handle, &context_handle);
if (r)
@@ -440,14 +442,16 @@ static void amdgpu_cs_vce_encode(void)
check_result(&enc);
/* two instances */
- enc.two_instance = true;
- vce_taskinfo[2] = 0x83;
- vce_taskinfo[4] = 1;
- amdgpu_cs_vce_encode_idr(&enc);
- vce_taskinfo[2] = 0xffffffff;
- vce_taskinfo[4] = 2;
- amdgpu_cs_vce_encode_p(&enc);
- check_result(&enc);
+ if (vce_harvest_config == 0) {
+ enc.two_instance = true;
+ vce_taskinfo[2] = 0x83;
+ vce_taskinfo[4] = 1;
+ amdgpu_cs_vce_encode_idr(&enc);
+ vce_taskinfo[2] = 0xffffffff;
+ vce_taskinfo[4] = 2;
+ amdgpu_cs_vce_encode_p(&enc);
+ check_result(&enc);
+ }
} else {
vce_taskinfo[3] = 3;
vce_encode[16] = 0;