aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/drivers/gpu/drm/xe/xe_pci.c
diff options
context:
space:
mode:
authorGustavo Sousa <gustavo.sousa@intel.com>2025-02-21 15:51:40 -0300
committerMatt Roper <matthew.d.roper@intel.com>2025-03-05 12:16:04 -0800
commitc8f33a6fa64735015032cbb2bc5300b93f3f709c (patch)
tree22b775ffbe643d434741ff739f7f98d67d1f3c71 /drivers/gpu/drm/xe/xe_pci.c
parentdrm/xe/userptr: Unmap userptrs in the mmu notifier (diff)
downloadwireguard-linux-c8f33a6fa64735015032cbb2bc5300b93f3f709c.tar.xz
wireguard-linux-c8f33a6fa64735015032cbb2bc5300b93f3f709c.zip
drm/xe: Set IP names in functions handling IP version
In an upcoming change, we will handle setting graphics_name and media_name differently for GMDID-based IPs. As such, let's make both handle_pre_gmdid() and handle_gmdid() functions responsible for initializing those fields. While now we have both doing essentially the same thing with respect to those fields, handle_pre_gmdid() will diverge soon. Reviewed-by: Matt Roper <matthew.d.roper@intel.com> Signed-off-by: Gustavo Sousa <gustavo.sousa@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20250221-xe-unify-ip-descriptors-v2-1-5bc0c6d0c13f@intel.com Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
Diffstat (limited to 'drivers/gpu/drm/xe/xe_pci.c')
-rw-r--r--drivers/gpu/drm/xe/xe_pci.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/drivers/gpu/drm/xe/xe_pci.c b/drivers/gpu/drm/xe/xe_pci.c
index 8b6658b214be..eb81b1a3b40a 100644
--- a/drivers/gpu/drm/xe/xe_pci.c
+++ b/drivers/gpu/drm/xe/xe_pci.c
@@ -559,9 +559,14 @@ static void handle_pre_gmdid(struct xe_device *xe,
const struct xe_media_desc *media)
{
xe->info.graphics_verx100 = graphics->ver * 100 + graphics->rel;
+ xe->info.graphics_name = graphics->name;
- if (media)
+ if (media) {
xe->info.media_verx100 = media->ver * 100 + media->rel;
+ xe->info.media_name = media->name;
+ } else {
+ xe->info.media_name = "none";
+ }
}
@@ -583,6 +588,7 @@ static void handle_gmdid(struct xe_device *xe,
if (ver == graphics_ip_map[i].ver) {
xe->info.graphics_verx100 = ver;
*graphics = graphics_ip_map[i].ip;
+ xe->info.graphics_name = (*graphics)->name;
break;
}
@@ -593,8 +599,9 @@ static void handle_gmdid(struct xe_device *xe,
ver / 100, ver % 100);
}
- read_gmdid(xe, GMDID_MEDIA, &ver, media_revid);
+ xe->info.media_name = "none";
+ read_gmdid(xe, GMDID_MEDIA, &ver, media_revid);
/* Media may legitimately be fused off / not present */
if (ver == 0)
return;
@@ -603,6 +610,7 @@ static void handle_gmdid(struct xe_device *xe,
if (ver == media_ip_map[i].ver) {
xe->info.media_verx100 = ver;
*media = media_ip_map[i].ip;
+ xe->info.media_name = (*media)->name;
break;
}
@@ -693,9 +701,6 @@ static int xe_info_init(struct xe_device *xe,
if (!graphics_desc)
return -ENODEV;
- xe->info.graphics_name = graphics_desc->name;
- xe->info.media_name = media_desc ? media_desc->name : "none";
-
xe->info.vram_flags = graphics_desc->vram_flags;
xe->info.va_bits = graphics_desc->va_bits;
xe->info.vm_max_level = graphics_desc->vm_max_level;