]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915/tgl: Add bound checks and simplify TGL REVID macros
authorAditya Swarup <aditya.swarup@intel.com>
Thu, 3 Dec 2020 07:23:59 +0000 (23:23 -0800)
committerLucas De Marchi <lucas.demarchi@intel.com>
Fri, 18 Dec 2020 02:24:19 +0000 (18:24 -0800)
commitc0ff85ef58d6149d42110b757c3bd26ea7fb0a46
treef99a6e4bb530ce301b774cbc3be672dfe975fdd9
parent857d86b4185396aab5458bd245173f4da0891c73
drm/i915/tgl: Add bound checks and simplify TGL REVID macros

Add bound checks for TGL REV ID array. Since, there might
be a possibility of using older kernels on latest platform
revisions, resulting in out of bounds access for rev ID array.
In this scenario, use the latest rev ID available and apply
those WAs.

Also, modify GT macros for TGL rev ID to reuse tgl_revids_get().

Cc: José Roberto de Souza <jose.souza@intel.com>
Cc: Matt Roper <matthew.d.roper@intel.com>
Cc: Lucas De Marchi <lucas.demarchi@intel.com>
Cc: Jani Nikula <jani.nikula@intel.com>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Aditya Swarup <aditya.swarup@intel.com>
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20201203072359.156682-2-aditya.swarup@intel.com
drivers/gpu/drm/i915/i915_drv.h