[Intel-gfx] [PATCH v2 11/15] drm/i915: Exercise request cancellation using a mock selftest

Chris Wilson chris at chris-wilson.co.uk
Wed Feb 22 14:03:34 UTC 2017


On Wed, Feb 22, 2017 at 01:59:13PM +0000, Chris Wilson wrote:
> On Wed, Feb 22, 2017 at 01:46:10PM +0000, Tvrtko Ursulin wrote:
> > 
> > On 22/02/2017 11:46, Chris Wilson wrote:
> > >+	ctx[1] = mock_context(i915, "B");
> > >+	vip = mock_request(i915->engine[RCS], ctx[1], 0);
> > >+	if (!vip) {
> > >+		err = -ENOMEM;
> > >+		goto err_locked;
> > 
> > Leaks the request.
> 
> That's been handed over to the device.

However, we shouldn't assume that the test harness is functioning
perfectly and the request remains valid as we poke it without a
reference of our own.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre


More information about the Intel-gfx mailing list