diff mbox series

[1/2] drm/i915/selftests: Flush live_evict

Message ID 20190618161951.28820-1-chris@chris-wilson.co.uk (mailing list archive)
State New, archived
Headers show
Series [1/2] drm/i915/selftests: Flush live_evict | expand

Commit Message

Chris Wilson June 18, 2019, 4:19 p.m. UTC
Be sure to cleanup after live_evict by flushing any residual state off
the GPU using igt_flush_test.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
 drivers/gpu/drm/i915/selftests/i915_gem_evict.c | 3 +++
 1 file changed, 3 insertions(+)

Comments

Tvrtko Ursulin June 18, 2019, 4:49 p.m. UTC | #1
On 18/06/2019 17:19, Chris Wilson wrote:
> Be sure to cleanup after live_evict by flushing any residual state off
> the GPU using igt_flush_test.
> 
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> ---
>   drivers/gpu/drm/i915/selftests/i915_gem_evict.c | 3 +++
>   1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/selftests/i915_gem_evict.c b/drivers/gpu/drm/i915/selftests/i915_gem_evict.c
> index 8c69198c7e4e..a3cb0aade6f1 100644
> --- a/drivers/gpu/drm/i915/selftests/i915_gem_evict.c
> +++ b/drivers/gpu/drm/i915/selftests/i915_gem_evict.c
> @@ -28,6 +28,7 @@
>   
>   #include "i915_selftest.h"
>   
> +#include "igt_flush_test.h"
>   #include "lib_sw_fence.h"
>   #include "mock_drm.h"
>   #include "mock_gem_device.h"
> @@ -505,6 +506,8 @@ static int igt_evict_contexts(void *arg)
>   
>   	mutex_lock(&i915->drm.struct_mutex);
>   out_locked:
> +	if (igt_flush_test(i915, I915_WAIT_LOCKED))
> +		err = -EIO;
>   	while (reserved) {
>   		struct reserved *next = reserved->next;
>   
> 

Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>

Regards,

Tvrtko
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/selftests/i915_gem_evict.c b/drivers/gpu/drm/i915/selftests/i915_gem_evict.c
index 8c69198c7e4e..a3cb0aade6f1 100644
--- a/drivers/gpu/drm/i915/selftests/i915_gem_evict.c
+++ b/drivers/gpu/drm/i915/selftests/i915_gem_evict.c
@@ -28,6 +28,7 @@ 
 
 #include "i915_selftest.h"
 
+#include "igt_flush_test.h"
 #include "lib_sw_fence.h"
 #include "mock_drm.h"
 #include "mock_gem_device.h"
@@ -505,6 +506,8 @@  static int igt_evict_contexts(void *arg)
 
 	mutex_lock(&i915->drm.struct_mutex);
 out_locked:
+	if (igt_flush_test(i915, I915_WAIT_LOCKED))
+		err = -EIO;
 	while (reserved) {
 		struct reserved *next = reserved->next;