From: Gustavo Sousa <gustavo.sousa@intel.com>
To: intel-xe@lists.freedesktop.org
Subject: [PATCH 1/4] drm/xe: Set IP names in functions handling IP version
Date: Thu, 20 Feb 2025 14:25:08 -0300 [thread overview]
Message-ID: <20250220172532.66613-2-gustavo.sousa@intel.com> (raw)
In-Reply-To: <20250220172532.66613-1-gustavo.sousa@intel.com>
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.
Signed-off-by: Gustavo Sousa <gustavo.sousa@intel.com>
---
drivers/gpu/drm/xe/xe_pci.c | 15 ++++++++++-----
1 file changed, 10 insertions(+), 5 deletions(-)
diff --git a/drivers/gpu/drm/xe/xe_pci.c b/drivers/gpu/drm/xe/xe_pci.c
index 70b697fde5b9..feea897f130d 100644
--- a/drivers/gpu/drm/xe/xe_pci.c
+++ b/drivers/gpu/drm/xe/xe_pci.c
@@ -564,9 +564,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";
+ }
}
@@ -588,6 +593,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;
}
@@ -598,8 +604,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;
@@ -608,6 +615,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;
}
@@ -698,9 +706,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;
--
2.48.1
next prev parent reply other threads:[~2025-02-20 17:26 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-20 17:25 [PATCH 0/4] drm/xe: Unify IP descriptors Gustavo Sousa
2025-02-20 17:25 ` Gustavo Sousa [this message]
2025-02-20 20:40 ` [PATCH 1/4] drm/xe: Set IP names in functions handling IP version Matt Roper
2025-02-20 17:25 ` [PATCH 2/4] drm/xe: Disambiguate GMDID-based IP names Gustavo Sousa
2025-02-20 20:45 ` Matt Roper
2025-02-20 17:25 ` [PATCH 3/4] drm/xe: Rename gmdid_map to xe_ip Gustavo Sousa
2025-02-20 20:52 ` Matt Roper
2025-02-20 17:25 ` [PATCH 4/4] drm/xe: Convert pre-GMDID IPs to struct xe_ip Gustavo Sousa
2025-02-20 21:10 ` Matt Roper
2025-02-20 21:23 ` Gustavo Sousa
2025-02-20 21:25 ` Gustavo Sousa
2025-02-20 21:31 ` Matt Roper
2025-02-20 18:02 ` ✓ CI.Patch_applied: success for drm/xe: Unify IP descriptors Patchwork
2025-02-20 18:02 ` ✓ CI.checkpatch: " Patchwork
2025-02-20 18:03 ` ✓ CI.KUnit: " Patchwork
2025-02-20 18:20 ` ✓ CI.Build: " Patchwork
2025-02-20 18:22 ` ✓ CI.Hooks: " Patchwork
2025-02-20 18:23 ` ✓ CI.checksparse: " Patchwork
2025-02-20 18:55 ` ✓ Xe.CI.BAT: " Patchwork
2025-02-21 12:53 ` ✗ Xe.CI.Full: failure " Patchwork
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250220172532.66613-2-gustavo.sousa@intel.com \
--to=gustavo.sousa@intel.com \
--cc=intel-xe@lists.freedesktop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox