[Intel-gfx] [PATCH v2 4/5] drm/i915: Add a partial GGTT view type

Daniel Vetter daniel at ffwll.ch
Wed May 6 03:20:19 PDT 2015


On Thu, Apr 30, 2015 at 01:16:30PM +0100, Tvrtko Ursulin wrote:
> On 04/30/2015 12:20 PM, Joonas Lahtinen wrote:
> >@@ -495,7 +503,10 @@ i915_ggtt_view_equal(const struct i915_ggtt_view *a,
> >  	if (WARN_ON(!a || !b))
> >  		return false;
> >
> >-	return a->type == b->type;
> >+	if (a->type != b->type)
> >+		return false;
> >+
> >+	return !memcmp(&a->params, &b->params, sizeof(a->params));
> 
> Still don't like this, would this be so bad:
> 
> if (a->type != PARTIAL)
> 	return a->type == b->type;
> else
> 	return !memcmp(...)

Why do we even need this? memcmp implies comparing just one part of the
struct, doesn't it? Of course this means we need to clear it, but imo
that's the rtdt anyway.
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch


More information about the Intel-gfx mailing list