[Intel-gfx] [PATCH] drm/i915/selftests: Skip mixed page exhaustion if only small pages available

Chris Wilson chris at chris-wilson.co.uk
Tue Nov 7 11:25:52 UTC 2017


Quoting Matthew Auld (2017-11-07 11:17:53)
> On 7 November 2017 at 11:05, Chris Wilson <chris at chris-wilson.co.uk> wrote:
> > If we only have 4k pages, we can't mix together different combinations
> > of hugepages to see if the world burns. However, as the loops did
> > nothing, we never set err to 0 and reported ENODEV aborting the test.
> > Teach the test to skip instead.
> >
> > Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
> > Cc: Matthew Auld <matthew.william.auld at gmail.com>
> > Cc: Joonas Lahtinen <joonas.lahtinen at linux.intel.com>
> > ---
> >  drivers/gpu/drm/i915/selftests/huge_pages.c | 5 ++++-
> >  1 file changed, 4 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/gpu/drm/i915/selftests/huge_pages.c b/drivers/gpu/drm/i915/selftests/huge_pages.c
> > index 5cc8101bb2b1..a8d3328b8b64 100644
> > --- a/drivers/gpu/drm/i915/selftests/huge_pages.c
> > +++ b/drivers/gpu/drm/i915/selftests/huge_pages.c
> > @@ -1156,8 +1156,11 @@ static int igt_ppgtt_exhaust_huge(void *arg)
> >         struct drm_i915_gem_object *obj;
> >         unsigned int size_mask;
> >         unsigned int page_mask;
> > -       int n, i;
> >         int err = -ENODEV;
> > +       int n, i;
> Keep the err at the end?

The question is which looks less like a Christmas tree. Does the '=...'
contribute to the width?
-Chris


More information about the Intel-gfx mailing list