[PATCH i-g-t 1/2] lib/intel_pat: account for Wa_16023588340
Matt Roper
matthew.d.roper at intel.com
Fri Jun 21 20:40:00 UTC 2024
On Wed, Jun 19, 2024 at 03:35:41PM +0100, Matthew Auld wrote:
> We can't use the CLOS3 entries on BMG g21.
>
> Signed-off-by: Matthew Auld <matthew.auld at intel.com>
> Cc: Matt Roper <matthew.d.roper at intel.com>
> ---
> lib/intel_pat.c | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/lib/intel_pat.c b/lib/intel_pat.c
> index 041952bd8..9191b3577 100644
> --- a/lib/intel_pat.c
> +++ b/lib/intel_pat.c
> @@ -24,7 +24,11 @@ static void intel_get_pat_idx(int fd, struct intel_pat_cache *pat)
> pat->wt = 15; /* Compressed + WB-transient */
> pat->wb = 2;
> pat->uc_comp = 12; /* Compressed + UC, XE2 and later */
> - pat->max_index = 31;
> +
> + if (intel_graphics_ver(dev_id) == IP_VER(20, 1))
> + pat->max_index = 27;
> + else
> + pat->max_index = 31;
Nitpick: I think it might be slightly more clear to the reader if we
leave the existing assignment of 31, and then just add
/* Wa_16023588340: CLOS3 entries at end of table are unusable */
if (intel_graphics_ver(dev_id) == IP_VER(20, 1))
pat->max_index -= 4;
Up to you though; either way,
Reviewed-by: Matt Roper <matthew.d.roper at intel.com>
> } else if (IS_METEORLAKE(dev_id)) {
> pat->uc = 2;
> pat->wt = 1;
> --
> 2.45.1
>
--
Matt Roper
Graphics Software Engineer
Linux GPU Platform Enablement
Intel Corporation
More information about the igt-dev
mailing list