Hi Jonathan, On Fri, Jul 21, 2023 at 07:05:58AM -0700, Jonathan Cavitt wrote: > Refactor i915_coherent_map_type to be GT-centric rather than > device-centric. Each GT may require different coherency > handling due to hardware workarounds. [...] > -enum i915_map_type i915_coherent_map_type(struct drm_i915_private *i915, > +enum i915_map_type i915_coherent_map_type(struct intel_gt *gt, > struct drm_i915_gem_object *obj, > bool always_coherent) > { > /* > * Wa_22016122933: always return I915_MAP_WC for MTL > */ > - if (i915_gem_object_is_lmem(obj) || IS_METEORLAKE(i915)) > + if (i915_gem_object_is_lmem(obj) || IS_METEORLAKE(gt->i915)) > return I915_MAP_WC; > - if (HAS_LLC(i915) || always_coherent) > + if (HAS_LLC(gt->i915) || always_coherent) > return I915_MAP_WB; > else > return I915_MAP_WC; this doesn't fully look right to me as gt-centric stuff need to be in the gt/ directory. As for this patch, here we don't need any reference to the gt. You could eventually add some wrapper inside gt/ that perform the per 'gt' checks and at the end call this function here. Andi