kfdtest: Allow some CS to fail in EvictTest

amdgpu_cs_submit can fail intermittently if another process has too much
memory reserved at the time. Allow a small percental of command
submissions to fail to make the test more robust.

Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
Change-Id: If9f62b2b6f67be71420016d4e38d4dd6b6bca9a5
Bu işleme şunda yer alıyor:
Felix Kuehling
2021-02-26 22:35:00 -05:00
işlemeyi yapan: Kent Russell
ebeveyn bd68646772
işleme 8baf02e80b
+8 -1
Dosyayı Görüntüle
@@ -213,6 +213,7 @@ void KFDEvictTest::AmdgpuCommandSubmissionSdmaNop(int rn, amdgpu_bo_handle handl
amdgpu_va_handle vaHandle;
uint32_t *ptr;
uint32_t expired;
unsigned failCount = 0;
ASSERT_EQ(0, amdgpu_cs_ctx_create(m_RenderNodes[rn].device_handle, &contextHandle));
@@ -244,8 +245,14 @@ void KFDEvictTest::AmdgpuCommandSubmissionSdmaNop(int rn, amdgpu_bo_handle handl
memset(&fenceStatus, 0, sizeof(struct amdgpu_cs_fence));
for (int i = 0; i < 100; i++) {
ASSERT_EQ(0, amdgpu_cs_submit(contextHandle, 0, &ibsRequest, 1));
int r = amdgpu_cs_submit(contextHandle, 0, &ibsRequest, 1);
Delay(50);
if (r) {
failCount++;
ASSERT_LE(failCount, 2);
continue;
}
fenceStatus.context = contextHandle;
fenceStatus.ip_type = AMDGPU_HW_IP_DMA;