diff options
author | Flora Cui <Flora.Cui@amd.com> | 2017-07-19 10:52:33 +0800 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2017-08-04 08:27:06 -0400 |
commit | e2b6785c5abecceee8f3c1830ee1bb22e6d0ef51 (patch) | |
tree | 70d7b8364318cf87daed8dbb570d308eff117595 /tests/amdgpu/vce_tests.c | |
parent | 4d0e05eb2a611eef83609678de27f45a9a3ad806 (diff) |
test/amdgpu: fix test failure for SI
Signed-off-by: Flora Cui <Flora.Cui@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'tests/amdgpu/vce_tests.c')
-rw-r--r-- | tests/amdgpu/vce_tests.c | 41 |
1 files changed, 22 insertions, 19 deletions
diff --git a/tests/amdgpu/vce_tests.c b/tests/amdgpu/vce_tests.c index 8d61a3b1..cf44c132 100644 --- a/tests/amdgpu/vce_tests.c +++ b/tests/amdgpu/vce_tests.c @@ -106,7 +106,7 @@ int suite_vce_tests_init(void) family_id = device_handle->info.family_id; vce_harvest_config = device_handle->info.vce_harvest_config; - if (family_id >= AMDGPU_FAMILY_RV) { + if (family_id >= AMDGPU_FAMILY_RV || family_id == AMDGPU_FAMILY_SI) { printf("\n\nThe ASIC NOT support VCE, all sub-tests will pass\n"); return CUE_SUCCESS; } @@ -131,21 +131,24 @@ int suite_vce_tests_clean(void) { int r; - if (family_id >= AMDGPU_FAMILY_RV) - return CUE_SUCCESS; - - r = amdgpu_bo_unmap_and_free(ib_handle, ib_va_handle, - ib_mc_address, IB_SIZE); - if (r) - return CUE_SCLEAN_FAILED; - - r = amdgpu_cs_ctx_free(context_handle); - if (r) - return CUE_SCLEAN_FAILED; - - r = amdgpu_device_deinitialize(device_handle); - if (r) - return CUE_SCLEAN_FAILED; + if (family_id >= AMDGPU_FAMILY_RV || family_id == AMDGPU_FAMILY_SI) { + r = amdgpu_device_deinitialize(device_handle); + if (r) + return CUE_SCLEAN_FAILED; + } else { + r = amdgpu_bo_unmap_and_free(ib_handle, ib_va_handle, + ib_mc_address, IB_SIZE); + if (r) + return CUE_SCLEAN_FAILED; + + r = amdgpu_cs_ctx_free(context_handle); + if (r) + return CUE_SCLEAN_FAILED; + + r = amdgpu_device_deinitialize(device_handle); + if (r) + return CUE_SCLEAN_FAILED; + } return CUE_SUCCESS; } @@ -245,7 +248,7 @@ static void amdgpu_cs_vce_create(void) unsigned align = (family_id >= AMDGPU_FAMILY_AI) ? 256 : 16; int len, r; - if (family_id >= AMDGPU_FAMILY_RV) + if (family_id >= AMDGPU_FAMILY_RV || family_id == AMDGPU_FAMILY_SI) return; enc.width = vce_create[6]; @@ -441,7 +444,7 @@ static void amdgpu_cs_vce_encode(void) unsigned align = (family_id >= AMDGPU_FAMILY_AI) ? 256 : 16; int i, r; - if (family_id >= AMDGPU_FAMILY_RV) + if (family_id >= AMDGPU_FAMILY_RV || family_id == AMDGPU_FAMILY_SI) return; vbuf_size = ALIGN(enc.width, align) * ALIGN(enc.height, 16) * 1.5; @@ -522,7 +525,7 @@ static void amdgpu_cs_vce_destroy(void) { int len, r; - if (family_id >= AMDGPU_FAMILY_RV) + if (family_id >= AMDGPU_FAMILY_RV || family_id == AMDGPU_FAMILY_SI) return; num_resources = 0; |