[Intel-gfx] [PATCH v3 5/7] drm/i915: Convert i915_ggtt_view to use an anonymous union

Joonas Lahtinen joonas.lahtinen at linux.intel.com
Fri Jan 13 11:26:02 UTC 2017


On pe, 2017-01-13 at 10:33 +0000, Chris Wilson wrote:
> Reading the ggtt_views is much more pleasant without the extra
> characters from specifying the union (i.e. ggtt_view.partial rather than
> ggtt_view.params.partial). To make this work inside i915_vma_compare()
> with only a single memcmp requires us to ensure that there are no
> uninitialised bytes within each branch of the union (we make sure the
> structs are packed) and we need to store the size of each branch.
> 
> v4: Rewrite changelog and add comments explaining the assert.
> 
> Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
> Cc: Daniel Vetter <daniel.vetter at ffwll.ch>

Reviewed-by: Joonas Lahtinen <joonas.lahtinen at linux.intel.com>

Regards, Joonas
-- 
Joonas Lahtinen
Open Source Technology Center
Intel Corporation


More information about the Intel-gfx mailing list