[PATCH 1/3] drm/xe: Store platform name in xe_device.info

Rodrigo Vivi rodrigo.vivi at intel.com
Wed May 22 16:28:57 UTC 2024


On Tue, May 21, 2024 at 04:22:55PM +0200, Michal Wajdeczko wrote:
> We already maintain the platform name as part of the device
> descriptor, but in xe_device.info we only store platform enum,
> which is not the best for use in any user-facing messages.
> 
> Signed-off-by: Michal Wajdeczko <michal.wajdeczko at intel.com>
> Cc: Lucas De Marchi <lucas.demarchi at intel.com>

Reviewed-by: Rodrigo Vivi <rodrigo.vivi at intel.com>

> ---
>  drivers/gpu/drm/xe/xe_device_types.h | 2 ++
>  drivers/gpu/drm/xe/xe_pci.c          | 1 +
>  2 files changed, 3 insertions(+)
> 
> diff --git a/drivers/gpu/drm/xe/xe_device_types.h b/drivers/gpu/drm/xe/xe_device_types.h
> index 5c5e36de452a..99edaebfcbfd 100644
> --- a/drivers/gpu/drm/xe/xe_device_types.h
> +++ b/drivers/gpu/drm/xe/xe_device_types.h
> @@ -218,6 +218,8 @@ struct xe_device {
>  
>  	/** @info: device info */
>  	struct intel_device_info {
> +		/** @info.platform_name: platform name */
> +		const char *platform_name;
>  		/** @info.graphics_name: graphics IP name */
>  		const char *graphics_name;
>  		/** @info.media_name: media IP name */
> diff --git a/drivers/gpu/drm/xe/xe_pci.c b/drivers/gpu/drm/xe/xe_pci.c
> index 682eafd84901..b30fe4849038 100644
> --- a/drivers/gpu/drm/xe/xe_pci.c
> +++ b/drivers/gpu/drm/xe/xe_pci.c
> @@ -561,6 +561,7 @@ static int xe_info_init_early(struct xe_device *xe,
>  {
>  	int err;
>  
> +	xe->info.platform_name = desc->platform_name;
>  	xe->info.platform = desc->platform;
>  	xe->info.subplatform = subplatform_desc ?
>  		subplatform_desc->subplatform : XE_SUBPLATFORM_NONE;
> -- 
> 2.43.0
> 


More information about the Intel-xe mailing list