]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
drm/xe: Store platform name in xe_device.info
authorMichal Wajdeczko <michal.wajdeczko@intel.com>
Tue, 21 May 2024 14:22:55 +0000 (16:22 +0200)
committerMichal Wajdeczko <michal.wajdeczko@intel.com>
Tue, 28 May 2024 14:08:23 +0000 (16:08 +0200)
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@intel.com>
Cc: Lucas De Marchi <lucas.demarchi@intel.com>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240521142257.756-2-michal.wajdeczko@intel.com
drivers/gpu/drm/xe/xe_device_types.h
drivers/gpu/drm/xe/xe_pci.c

index db12393217f51cc0da4fd83fbd7592930d200057..52bc461171d50340285973ff8b93ee3cad67f58d 100644 (file)
@@ -221,6 +221,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 */
index 90ca97894a0947dcde377cd688242e021cbf594c..9782cff9dd824b253ba653ed21920dac8247b8ea 100644 (file)
@@ -597,6 +597,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;