mirror of
https://github.com/tiagovignatti/intel-gpu-tools.git
synced 2025-06-14 03:16:21 +00:00
igt/gem_exec_nop: Apply missed interrupt detection
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
parent
2f859537b5
commit
71f4153287
@ -76,6 +76,7 @@ static double nop_on_ring(int fd, uint32_t handle, unsigned ring_id,
|
|||||||
gem_execbuf(fd, &execbuf);
|
gem_execbuf(fd, &execbuf);
|
||||||
}
|
}
|
||||||
gem_sync(fd, handle);
|
gem_sync(fd, handle);
|
||||||
|
intel_detect_and_clear_missed_interrupts(fd);
|
||||||
|
|
||||||
count = 0;
|
count = 0;
|
||||||
clock_gettime(CLOCK_MONOTONIC, &start);
|
clock_gettime(CLOCK_MONOTONIC, &start);
|
||||||
@ -88,6 +89,7 @@ static double nop_on_ring(int fd, uint32_t handle, unsigned ring_id,
|
|||||||
} while (elapsed(&start, &now) < timeout);
|
} while (elapsed(&start, &now) < timeout);
|
||||||
gem_sync(fd, handle);
|
gem_sync(fd, handle);
|
||||||
clock_gettime(CLOCK_MONOTONIC, &now);
|
clock_gettime(CLOCK_MONOTONIC, &now);
|
||||||
|
igt_assert_eq(intel_detect_and_clear_missed_interrupts(fd), 0);
|
||||||
|
|
||||||
*out = count;
|
*out = count;
|
||||||
return elapsed(&start, &now);
|
return elapsed(&start, &now);
|
||||||
@ -161,6 +163,7 @@ static void all(int fd, uint32_t handle, int timeout)
|
|||||||
gem_execbuf(fd, &execbuf);
|
gem_execbuf(fd, &execbuf);
|
||||||
}
|
}
|
||||||
gem_sync(fd, handle);
|
gem_sync(fd, handle);
|
||||||
|
intel_detect_and_clear_missed_interrupts(fd);
|
||||||
|
|
||||||
count = 0;
|
count = 0;
|
||||||
clock_gettime(CLOCK_MONOTONIC, &start);
|
clock_gettime(CLOCK_MONOTONIC, &start);
|
||||||
@ -177,6 +180,7 @@ static void all(int fd, uint32_t handle, int timeout)
|
|||||||
} while (elapsed(&start, &now) < timeout); /* Hang detection ~120s */
|
} while (elapsed(&start, &now) < timeout); /* Hang detection ~120s */
|
||||||
gem_sync(fd, handle);
|
gem_sync(fd, handle);
|
||||||
clock_gettime(CLOCK_MONOTONIC, &now);
|
clock_gettime(CLOCK_MONOTONIC, &now);
|
||||||
|
igt_assert_eq(intel_detect_and_clear_missed_interrupts(fd), 0);
|
||||||
|
|
||||||
time = elapsed(&start, &now) / count;
|
time = elapsed(&start, &now) / count;
|
||||||
igt_info("All (%d engines): %'lu cycles, average %.3fus per cycle\n",
|
igt_info("All (%d engines): %'lu cycles, average %.3fus per cycle\n",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user