Re: [Intel-gfx] [PATCH 02/21] drm/i915/tgl: Fix macros for TGL SOC based WA

Lucas De Marchi
2020-11-17T19:31:26Z

On Tue, Nov 17, 2020 at 10:50:10AM -0800, Aditya Swarup wrote:
>@@ -1579,9 +1579,9 @@ static inline const struct i915_rev_steppings *
> tgl_revids_get(struct drm_i915_private *dev_priv)
> {
> if (IS_TGL_U(dev_priv) || IS_TGL_Y(dev_priv))
>- return tgl_uy_revids;
>+ return tgl_uy_revids + INTEL_REVID(dev_priv);

oohh, no. You have to at least check you are not accessing out of
bounds. New HW running on old kernel should not access create invalid
accesses like this.

Lucas De Marchi