Commit 9a08b2b9 authored by Matt Roper's avatar Matt Roper Committed by Rodrigo Vivi

drm/xe: Add printable name to IP descriptors

Printing the name, along with the IP version number, will help reduce
confusion about which IP is present on a platform.

Cc: Lucas De Marchi <lucas.demarchi@intel.com>
Reviewed-by: default avatarLucas De Marchi <lucas.demarchi@intel.com>
Link: https://lore.kernel.org/r/20230406235621.1914492-7-matthew.d.roper@intel.comSigned-off-by: default avatarMatt Roper <matthew.d.roper@intel.com>
Signed-off-by: default avatarRodrigo Vivi <rodrigo.vivi@intel.com>
parent bd75664b
......@@ -51,6 +51,10 @@ struct xe_device {
/** @info: device info */
struct intel_device_info {
/** @graphics_name: graphics IP name */
const char *graphics_name;
/** @media_name: media IP name */
const char *media_name;
/** @graphics_verx100: graphics IP version */
u32 graphics_verx100;
/** @media_verx100: media IP version */
......
......@@ -71,6 +71,7 @@ struct xe_device_desc {
#define NOP(x) x
static const struct xe_graphics_desc graphics_xelp = {
.name = "Xe_LP",
.ver = 12,
.rel = 0,
......@@ -81,6 +82,7 @@ static const struct xe_graphics_desc graphics_xelp = {
};
static const struct xe_graphics_desc graphics_xelpp = {
.name = "Xe_LP+",
.ver = 12,
.rel = 10,
......@@ -97,6 +99,7 @@ static const struct xe_graphics_desc graphics_xelpp = {
.vm_max_level = 3
static const struct xe_graphics_desc graphics_xehpg = {
.name = "Xe_HPG",
.ver = 12,
.rel = 55,
......@@ -110,6 +113,7 @@ static const struct xe_graphics_desc graphics_xehpg = {
};
static const struct xe_graphics_desc graphics_xehpc = {
.name = "Xe_HPC",
.ver = 12,
.rel = 60,
......@@ -135,6 +139,7 @@ static const struct xe_graphics_desc graphics_xehpc = {
};
static const struct xe_graphics_desc graphics_xelpg = {
.name = "Xe_LPG",
.ver = 12,
.rel = 70,
......@@ -147,6 +152,7 @@ static const struct xe_graphics_desc graphics_xelpg = {
};
static const struct xe_media_desc media_xem = {
.name = "Xe_M",
.ver = 12,
.rel = 0,
......@@ -156,6 +162,7 @@ static const struct xe_media_desc media_xem = {
};
static const struct xe_media_desc media_xehpm = {
.name = "Xe_HPM",
.ver = 12,
.rel = 55,
......@@ -165,6 +172,7 @@ static const struct xe_media_desc media_xehpm = {
};
static const struct xe_media_desc media_xelpmp = {
.name = "Xe_LPM+",
.ver = 13,
.rel = 0,
......@@ -384,6 +392,8 @@ static void xe_info_init(struct xe_device *xe,
desc->media->rel;
xe->info.is_dgfx = desc->is_dgfx;
xe->info.platform = desc->platform;
xe->info.graphics_name = desc->graphics->name;
xe->info.media_name = desc->media ? desc->media->name : "none";
xe->info.dma_mask_size = desc->graphics->dma_mask_size;
xe->info.vram_flags = desc->graphics->vram_flags;
xe->info.vm_max_level = desc->graphics->vm_max_level;
......@@ -485,12 +495,17 @@ static int xe_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
subplatform_desc = find_subplatform(xe, desc);
xe_info_init(xe, desc, subplatform_desc);
drm_dbg(&xe->drm, "%s %s %04x:%04x dgfx:%d gfx100:%d media100:%d dma_m_s:%d tc:%d",
drm_dbg(&xe->drm, "%s %s %04x:%04x dgfx:%d gfx:%s (%d.%02d) media:%s (%d.%02d) dma_m_s:%d tc:%d",
desc->platform_name,
subplatform_desc ? subplatform_desc->name : "",
xe->info.devid, xe->info.revid,
xe->info.is_dgfx, xe->info.graphics_verx100,
xe->info.media_verx100,
xe->info.is_dgfx,
xe->info.graphics_name,
xe->info.graphics_verx100 / 100,
xe->info.graphics_verx100 % 100,
xe->info.media_name,
xe->info.media_verx100 / 100,
xe->info.media_verx100 % 100,
xe->info.dma_mask_size, xe->info.tile_count);
drm_dbg(&xe->drm, "Stepping = (G:%s, M:%s, D:%s, B:%s)\n",
......
......@@ -9,6 +9,7 @@
#include <linux/types.h>
struct xe_graphics_desc {
const char *name;
u8 ver;
u8 rel;
......@@ -28,6 +29,7 @@ struct xe_graphics_desc {
};
struct xe_media_desc {
const char *name;
u8 ver;
u8 rel;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment