[Intel-xe] [PATCH 1/1] drm/xe: set PTE_AE for all platforms supporting it

Lucas De Marchi lucas.demarchi at intel.com
Fri Sep 29 06:05:29 UTC 2023


On Thu, Sep 28, 2023 at 11:11:34AM -0700, Matt Roper wrote:
>On Wed, Sep 27, 2023 at 09:43:35PM -0700, fei.yang at intel.com wrote:
>> From: Fei Yang <fei.yang at intel.com>
>>
>> Atomic access is supported by PVC, and became a common feature for all
>> platforms starting from Xe2. To enable that XE_VMA_ATOMIC_PTE_BIT needs
>> to be set, then pte encode will eventually set PTE_AE for devmem.
>>
>> Signed-off-by: Fei Yang <fei.yang at intel.com>
>
>Matches the PTEs for Xe2 documented on bspec 67095, so
>
>Reviewed-by: Matt Roper <matthew.d.roper at intel.com>
>
>It seems strange to be setting this flag at this layer of the driver
>before we know whether it's even the correct setting for atomic enable
>(i.e., we don't know yet at this point whether we want to get pagefaults
>for atomics or not).  At some point in the future we may want to move
>the platform checks down to the same layer of the code where the actual
>atomic enable logic happens, but that can wait until later.

Applied. Thanks for the patch and review.

Lucas De Marchi


>
>
>Matt
>
>> ---
>>  drivers/gpu/drm/xe/xe_vm.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/gpu/drm/xe/xe_vm.c b/drivers/gpu/drm/xe/xe_vm.c
>> index beffbb1039d3..5f700c0d5ef9 100644
>> --- a/drivers/gpu/drm/xe/xe_vm.c
>> +++ b/drivers/gpu/drm/xe/xe_vm.c
>> @@ -897,7 +897,7 @@ static struct xe_vma *xe_vma_create(struct xe_vm *vm,
>>  			vma->tile_mask |= 0x1 << id;
>>  	}
>>
>> -	if (vm->xe->info.platform == XE_PVC)
>> +	if (vm->xe->info.platform == XE_PVC || GRAPHICS_VER(vm->xe) >= 20)
>>  		vma->gpuva.flags |= XE_VMA_ATOMIC_PTE_BIT;
>>
>>  	if (bo) {
>> --
>> 2.25.1
>>
>
>-- 
>Matt Roper
>Graphics Software Engineer
>Linux GPU Platform Enablement
>Intel Corporation


More information about the Intel-xe mailing list