Re: [PATCH 05/18] drm/i915: clean up cache coloring

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

 



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@xxxxxxxxx>
> Cc: Mika Kuoppala <mika.kuoppala@xxxxxxxxxxxxxxx>

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