From 78159ab1c1023587baf876c647325ae973c88f26 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Wed, 18 Oct 2017 13:23:15 +0100 Subject: lib: Idle the GT when quiescing the GPU As part of the general procedure for ensuring the GPU is idle, we also want to ask the driver to flush its idle_worker. The idle_worker is responsible for releasing both the driver's internal cache of buffers and cache of state (such as the prolonged GT wakeref). By flushing the idle_worker we ensure that each test (each caller needing an idle gpu) has a clean slate; not carrying over caches from one test to the next. Note this is a silent no-op for kernels that do not know about DROP_IDLE, old bugs will remain. Signed-off-by: Chris Wilson Cc: Joonas Lahtinen Reviewed-by: Joonas Lahtinen --- lib/drmtest.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/drmtest.c') diff --git a/lib/drmtest.c b/lib/drmtest.c index 8a07152c..15a46477 100644 --- a/lib/drmtest.c +++ b/lib/drmtest.c @@ -187,7 +187,7 @@ void gem_quiescent_gpu(int fd) gem_sync(fd, obj.handle); gem_close(fd, obj.handle); - igt_drop_caches_set(fd, DROP_RETIRE | DROP_FREED); + igt_drop_caches_set(fd, DROP_RETIRE | DROP_IDLE | DROP_FREED); } /** -- cgit v1.2.3