[Intel-gfx] [PATCH] drm/i915/guc: Use formalized struct definition for ads object
Joonas Lahtinen
joonas.lahtinen at linux.intel.com
Thu Mar 16 10:53:16 UTC 2017
On ke, 2017-03-15 at 11:49 +0000, Chris Wilson wrote:
> > From: Michal Wajdeczko <michal.wajdeczko at intel.com>
>
> Manual pointer manipulation is error prone. Let compiler calculate
> right offsets for us in case we need to change ads layout.
>
> v2: don't call it object (Chris)
> v3: restyle offset assignments (Chris)
> v4: stylistic reductions
>
> Signed-off-by: Michal Wajdeczko <michal.wajdeczko at intel.com>
> Cc: Oscar Mateo <oscar.mateo at intel.com>
> Cc: Joonas Lahtinen <joonas.lahtinen at linux.intel.com>
> Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio at intel.com>
> Cc: Chris Wilson <chris at chris-wilson.co.uk>
> Reviewed-by: Chris Wilson <chris at chris-wilson.co.uk>
This code definitely makes the computations better.
<SNIP>
> @@ -833,44 +832,38 @@ static void guc_addon_create(struct intel_guc *guc)
> }
>
> page = i915_vma_first_page(vma);
> - ads = kmap(page);
<SNIP>
> + blob = kmap(page);
I would still like to see a BUILD_BUG_ON to verify that everything
addressed through blob truly fits within the first page.
Other than that;
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