[PATCH v3 5/7] drm/xe: Introduce has_device_atomics_on_smem device info

Zeng, Oak oak.zeng at intel.com
Fri Apr 19 20:24:47 UTC 2024


Reviewed-by: Oak Zeng <oak.zeng at intel.com>

> -----Original Message-----
> From: Intel-xe <intel-xe-bounces at lists.freedesktop.org> On Behalf Of
> Nirmoy Das
> Sent: Monday, April 15, 2024 10:52 AM
> To: intel-xe at lists.freedesktop.org
> Cc: Das, Nirmoy <nirmoy.das at intel.com>
> Subject: [PATCH v3 5/7] drm/xe: Introduce has_device_atomics_on_smem
> device info
> 
> Add has_device_atomics_on_smem to specify that a device
> supports device atomics on system memory. Currently XE2
> supports this so set this for XE2.
> 
> Signed-off-by: Nirmoy Das <nirmoy.das at intel.com>
> ---
>  drivers/gpu/drm/xe/xe_device_types.h | 2 ++
>  drivers/gpu/drm/xe/xe_pci.c          | 2 ++
>  2 files changed, 4 insertions(+)
> 
> diff --git a/drivers/gpu/drm/xe/xe_device_types.h
> b/drivers/gpu/drm/xe/xe_device_types.h
> index bde42fe288ff..c06be1e00f1a 100644
> --- a/drivers/gpu/drm/xe/xe_device_types.h
> +++ b/drivers/gpu/drm/xe/xe_device_types.h
> @@ -283,6 +283,8 @@ struct xe_device {
>  		u8 skip_guc_pc:1;
>  		/** @info.has_atomic_enable_pte_bit: Device has atomic
> enable PTE bit */
>  		u8 has_atomic_enable_pte_bit:1;
> +		/** @info.has_device_atomics_on_smem: Supports device
> atomics on SMEM */
> +		u8 has_device_atomics_on_smem:1;
> 
>  #if IS_ENABLED(CONFIG_DRM_XE_DISPLAY)
>  		struct {
> diff --git a/drivers/gpu/drm/xe/xe_pci.c b/drivers/gpu/drm/xe/xe_pci.c
> index 9cf45559b915..34eb4bbc2366 100644
> --- a/drivers/gpu/drm/xe/xe_pci.c
> +++ b/drivers/gpu/drm/xe/xe_pci.c
> @@ -630,6 +630,8 @@ static int xe_info_init(struct xe_device *xe,
>  	xe->info.vm_max_level = graphics_desc->vm_max_level;
>  	xe->info.has_asid = graphics_desc->has_asid;
>  	xe->info.has_atomic_enable_pte_bit = graphics_desc-
> >has_atomic_enable_pte_bit;
> +	if (GRAPHICS_VER(xe) >= 20)
> +		xe->info.has_device_atomics_on_smem = 1;
>  	xe->info.has_flat_ccs = graphics_desc->has_flat_ccs;
>  	xe->info.has_range_tlb_invalidation = graphics_desc-
> >has_range_tlb_invalidation;
>  	xe->info.has_usm = graphics_desc->has_usm;
> --
> 2.42.0



More information about the Intel-xe mailing list