[Intel-gfx] [PATCH igt] lib: Avoid actually throttling from igt_require_gem()

Michał Winiarski michal.winiarski at intel.com
Fri Aug 18 13:04:55 UTC 2017


On Fri, Aug 18, 2017 at 01:46:12PM +0200, Michal Wajdeczko wrote:
> On Fri, Aug 18, 2017 at 11:53:22AM +0100, Chris Wilson wrote:
> > Quoting Chris Wilson (2017-08-18 11:46:19)
> > > igt_require_gem() checks whether we can use the i915 fd for submitting
> > > requests by detecting a wedged driver. It was intended to be used just
> > > after opening DRIVER_INTEL for a gem test to provide an early skip if
> > > the device was unusable. However, it is also used at the start of
> > > library functions like igt_spin_batch_new() which may be called after
> > > the test has setup some state, and importantly submitted some batches.
> > > igt_require_gem() has the risk of then waiting on those batches, unless
> > > we tell it to use a clean fd.
> > > 
> > > Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
> > > Cc: Michal Wajdeczko <michal.wajdeczko at intel.com>
> 
> You probably wanted to Cc: other Michal ;)
> 
> <snip>
> 
> +/* We only want to use the throttle-ioctl for its -EIO reporting
> + * of a wedged device, not for actually waiting on outstanding
> + * requests! So create a new drm_file for the device that is clean.
> + */
> 
> But while here: if you just need -EIO, why not read "i915_wedged" from debugfs ?
> 
> Michal

We're trying to excercise the ABI rather than reading files from debugfs
whenever possible (in this case it doesn't matter... in general case it's a good
guideline to follow).

-Michał


More information about the Intel-gfx mailing list