[Intel-gfx] [PATCH 05/18] drm/i915: clean up cache coloring

Joonas Lahtinen joonas.lahtinen at linux.intel.com
Wed Apr 5 06:35:51 UTC 2017


On ti, 2017-04-04 at 23:11 +0100, Matthew Auld wrote:
> Rid the code of any mm.color_adjust assumptions to allow adding another
> flavour of coloring.
> 
> v2: better naming
> 
> Signed-off-by: Matthew Auld <matthew.auld at intel.com>
> Cc: Mika Kuoppala <mika.kuoppala at linux.intel.com>

<SNIP>

> +++ b/drivers/gpu/drm/i915/i915_gem_gtt.h
> @@ -347,6 +347,12 @@ struct i915_address_space {
>  #define i915_is_ggtt(V) (!(V)->file)
>  
>  static inline bool
> +i915_vm_has_cache_coloring(const struct i915_address_space *vm)
> +{
> +	return vm->mm.color_adjust && i915_is_ggtt(vm);
> +}

I'd first check the is_ggtt() because it's more important one, and drop
a comment here as to why we can make the decision.

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