Re: [PATCH] drm/i915/guc: Use formalized struct definition for ads object

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

 



On ke, 2017-03-15 at 11:49 +0000, Chris Wilson wrote:
> > From: Michal Wajdeczko <michal.wajdeczko@xxxxxxxxx>
> 
> 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@xxxxxxxxx>
> Cc: Oscar Mateo <oscar.mateo@xxxxxxxxx>
> Cc: Joonas Lahtinen <joonas.lahtinen@xxxxxxxxxxxxxxx>
> Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@xxxxxxxxx>
> Cc: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>
> Reviewed-by: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>

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@xxxxxxxxxxxxxxx>

Regards, Joonas
-- 
Joonas Lahtinen
Open Source Technology Center
Intel Corporation
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://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