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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/intel-gfx





[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux