[Intel-gfx] [PATCH v2 9/9] drm/i915: Replace several IS_METEORLAKE with proper IP version checks
Andi Shyti
andi.shyti at linux.intel.com
Tue Jul 25 10:10:18 UTC 2023
Hi Matt,
> --- a/drivers/gpu/drm/i915/gem/i915_gem_pages.c
> +++ b/drivers/gpu/drm/i915/gem/i915_gem_pages.c
> @@ -470,9 +470,13 @@ enum i915_map_type i915_coherent_map_type(struct drm_i915_private *i915,
> bool always_coherent)
> {
> /*
> - * Wa_22016122933: always return I915_MAP_WC for MTL
> + * Wa_22016122933: always return I915_MAP_WC for Xe_LPM+
> + *
> + * FIXME: The scope of this workaround is too wide right now and
> + * is applying to objects used solely on the primary GT. We need to
> + * take into account which GT will be operating on the shared object.
> */
> - if (i915_gem_object_is_lmem(obj) || IS_METEORLAKE(i915))
> + if (i915_gem_object_is_lmem(obj) || MEDIA_VER_FULL(i915) == IP_VER(13, 0))
> return I915_MAP_WC;
> if (HAS_LLC(i915) || always_coherent)
> return I915_MAP_WB;
> diff --git a/drivers/gpu/drm/i915/gt/intel_engine_pm.c b/drivers/gpu/drm/i915/gt/intel_engine_pm.c
> index 21af0ec52223..24060278e7a2 100644
> --- a/drivers/gpu/drm/i915/gt/intel_engine_pm.c
> +++ b/drivers/gpu/drm/i915/gt/intel_engine_pm.c
> @@ -21,7 +21,7 @@ static void intel_gsc_idle_msg_enable(struct intel_engine_cs *engine)
> {
> struct drm_i915_private *i915 = engine->i915;
>
> - if (IS_METEORLAKE(i915) && engine->id == GSC0) {
> + if (MEDIA_VER(i915) >= 13 && engine->id == GSC0) {
this is a bit in countertrend... why isn't this
MEDIA_VER_FULL(engine->i915) == IP_VER(13, 0)
Like all others?
Andi
More information about the Intel-gfx
mailing list