[Intel-xe] [PATCH] drm/xe: Add support for PAT encoding in PTE and PDE
Lucas De Marchi
lucas.demarchi at intel.com
Thu Sep 21 21:51:19 UTC 2023
On Thu, Sep 14, 2023 at 11:50:01AM +0100, Matthew Auld wrote:
>> +static u64 xelp_ppgtt_pde_encode_pat(struct xe_device *xe, u64 pde_pat,
>> + enum xe_cache_level cache)
>> +{
>> + u32 pat_index = xe_pat_get_index(xe, cache);
>> +
>> + pde_pat &= ~(XELP_PDE_PAT_MASK);
>> +
>> + if (pat_index & BIT(0))
>> + pde_pat |= BIT(3);
>> +
>> + if (pat_index & BIT(1))
>> + pde_pat |= BIT(4);
>> +
>> + if (pat_index & BIT(2))
>> + pde_pat |= BIT(12);
>
>BIT(12) will smash the address in the pde (also when applying the
>PDE_PAT_MASK), leading to hangs/crashes.
>
>AFAICT there is no PAT programming needed for the PDE, but only leaf nodes.
>
>I think the above BIT(12) needs to move into pte_encode_pat(), and
>make it conditional on XE_PDE_PS_2M/1G. Also I think that only applies
>to xe2, so perhaps we need to split 1200 and 2000 or something?
no, MTL also has it. I'm reworking this patch and thinking if we should
move this to the pte (it conflicts with a "normal" pte) or make this
function handle a leaf pde for 2M/1G pages
Lucas De Marchi
More information about the Intel-xe
mailing list