[Intel-gfx] [PATCH 21/46] drm/i915: Add selftests for object allocation, phys

Chris Wilson chris at chris-wilson.co.uk
Thu Feb 2 13:20:24 UTC 2017


On Thu, Feb 02, 2017 at 01:10:57PM +0000, Matthew Auld wrote:
> On 2 February 2017 at 09:08, Chris Wilson <chris at chris-wilson.co.uk> wrote:
> > +       err = -EINVAL;
> > +       mutex_lock(&i915->drm.struct_mutex);
> > +       err = i915_gem_object_attach_phys(obj, PAGE_SIZE);
> > +       mutex_unlock(&i915->drm.struct_mutex);
> > +       if (err) {
> > +               pr_err("i915_gem_object_attach_phys failed, err=%d\n", err);
> > +               goto out_obj;
> > +       }
> > +
> > +       if (obj->ops != &i915_gem_phys_ops) {
> > +               pr_err("i915_gem_object_attach_phys did not create a phys object\n");
> > +               goto out_obj;
> I'm guessing that you meant to return an error value, see below also.

Looks like I still thought I had the err = -EINVAL set. Good thing the
purpose of the test was to trigger the oops!
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre


More information about the Intel-gfx mailing list