[Intel-gfx] [PATCH 4/4] drm/i915/selftests: Skip live timeline/suspend tests if wedged

Tvrtko Ursulin tvrtko.ursulin at linux.intel.com
Mon Apr 15 10:44:06 UTC 2019


On 13/04/2019 13:58, Chris Wilson wrote:
> If the driver is wedged, we can not issue the requests to exercise the
> timelines or the system across suspend, so skip the tests. live_hangcheck
> is there to fail if we cannot recover.
> 
> Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
> ---
>   drivers/gpu/drm/i915/selftests/i915_gem.c      | 3 +++
>   drivers/gpu/drm/i915/selftests/i915_timeline.c | 3 +++
>   2 files changed, 6 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/selftests/i915_gem.c b/drivers/gpu/drm/i915/selftests/i915_gem.c
> index 50bb7bbd26d3..6fd70d326468 100644
> --- a/drivers/gpu/drm/i915/selftests/i915_gem.c
> +++ b/drivers/gpu/drm/i915/selftests/i915_gem.c
> @@ -215,5 +215,8 @@ int i915_gem_live_selftests(struct drm_i915_private *i915)
>   		SUBTEST(igt_gem_hibernate),
>   	};
>   
> +	if (i915_terminally_wedged(i915))
> +		return 0;
> +
>   	return i915_subtests(tests, i915);
>   }
> diff --git a/drivers/gpu/drm/i915/selftests/i915_timeline.c b/drivers/gpu/drm/i915/selftests/i915_timeline.c
> index 8e7bcaa1eb66..bd96afcadfe7 100644
> --- a/drivers/gpu/drm/i915/selftests/i915_timeline.c
> +++ b/drivers/gpu/drm/i915/selftests/i915_timeline.c
> @@ -838,5 +838,8 @@ int i915_timeline_live_selftests(struct drm_i915_private *i915)
>   		SUBTEST(live_hwsp_wrap),
>   	};
>   
> +	if (i915_terminally_wedged(i915))
> +		return 0;
> +
>   	return i915_subtests(tests, i915);
>   }
> 

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

Regards,

Tvrtko


More information about the Intel-gfx mailing list