[PATCH v2 20/40] drm: kselftest for drm_mm and color eviction

Chris Wilson chris at chris-wilson.co.uk
Fri Dec 16 14:48:35 UTC 2016


On Fri, Dec 16, 2016 at 04:38:12PM +0200, Joonas Lahtinen wrote:
> On pe, 2016-12-16 at 07:46 +0000, Chris Wilson wrote:
> > Check that after applying the driver's color adjustment, eviction
> > scanning find a suitable hole.
> > 
> > Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
> 
> <SNIP>
> 
> > +static int evict_color(struct drm_mm *mm,
> > +		       struct evict_node *nodes,
> > +		       unsigned int *order,
> > +		       unsigned int count,
> > +		       unsigned int size,
> > +		       unsigned int alignment,
> > +		       unsigned long color,
> > +		       const struct insert_mode *mode)
> 
> expect_evict_color? evict_color gave me an impression of single-way
> action (when reading the next patch).

I thought of this and evict_something() as being the final level test
runner (with the callers iterating over various paramters).
expect_insert_fail/expect_insert_in_range_fail definitely are the single
action check result matches expectations (return bool). Not convinced
these two fall into the same category, so I'll leave as is.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre


More information about the dri-devel mailing list