[Intel-gfx] [PATCH 11/23] drm/i915/selftests: Make evict tolerant of foreign objects
Chris Wilson
chris at chris-wilson.co.uk
Fri Jan 18 11:23:27 UTC 2019
Quoting Tvrtko Ursulin (2019-01-17 17:29:34)
>
> On 17/01/2019 14:34, Chris Wilson wrote:
> > The evict selftests presumed that all objects in use had been allocated
> > by itself. This is a dubious claim and so instead of asserting complete
> > control over the object lists, take (temporary) ownership of them
> > instead.
> >
> > Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
> > ---
> > .../gpu/drm/i915/selftests/i915_gem_evict.c | 64 +++++++++++++++----
> > 1 file changed, 53 insertions(+), 11 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/i915/selftests/i915_gem_evict.c b/drivers/gpu/drm/i915/selftests/i915_gem_evict.c
> > index fb7df895afeb..c8deb961a020 100644
> > --- a/drivers/gpu/drm/i915/selftests/i915_gem_evict.c
> > +++ b/drivers/gpu/drm/i915/selftests/i915_gem_evict.c
> > @@ -31,30 +31,63 @@
> >
> > static int populate_ggtt(struct drm_i915_private *i915)
> > {
> > - struct drm_i915_gem_object *obj;
> > + struct drm_i915_gem_object *obj, *on;
> > + unsigned long expected_unbound, expected_bound;
> > + unsigned long unbound, bound, count;
>
> Minor/optional comment - longs seem like overkill for either filling
> ggtt with page size objects or for initial state. :)
Force of habit, or just hope for the glorious future.
-Chris
More information about the Intel-gfx
mailing list