[Intel-xe] [PATCH 2/3] drm/xe: Cleanup HuC Debugfs entries

Anusha Srivatsa anusha.srivatsa at intel.com
Wed Mar 22 23:28:11 UTC 2023


For platforms under force_probe protection, HuC minor version
can change. Debugfs entry shold clearly state the minimum version
required for the platform.

For platform not under force_probe protection driver need not
do a version checks for HUC.

Cc: Lucas De Marchi <lucas.demarchi at intel.com>
Cc: Matt Roper <matthew.d.roper at intel.com>
Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio at intel.com>
Signed-off-by: Anusha Srivatsa <anusha.srivatsa at intel.com>
---
 drivers/gpu/drm/xe/xe_device_types.h |  2 ++
 drivers/gpu/drm/xe/xe_pci.c          |  1 +
 drivers/gpu/drm/xe/xe_uc_fw.c        | 11 +++++++++++
 3 files changed, 14 insertions(+)

diff --git a/drivers/gpu/drm/xe/xe_device_types.h b/drivers/gpu/drm/xe/xe_device_types.h
index a02c4eb6bd0d..c87b65b3c447 100644
--- a/drivers/gpu/drm/xe/xe_device_types.h
+++ b/drivers/gpu/drm/xe/xe_device_types.h
@@ -99,6 +99,8 @@ struct xe_device {
 		bool has_link_copy_engine;
 		/** @enable_display: display enabled */
 		bool enable_display;
+		/** @require_force_probe: platform under force_probe protection */
+		bool require_force_probe;
 
 #if IS_ENABLED(CONFIG_DRM_XE_DISPLAY)
 		struct xe_device_display_info {
diff --git a/drivers/gpu/drm/xe/xe_pci.c b/drivers/gpu/drm/xe/xe_pci.c
index 91fed9d3105e..2562e87160d6 100644
--- a/drivers/gpu/drm/xe/xe_pci.c
+++ b/drivers/gpu/drm/xe/xe_pci.c
@@ -422,6 +422,7 @@ static int xe_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
 	xe->info.has_4tile = desc->has_4tile;
 	xe->info.has_range_tlb_invalidation = desc->has_range_tlb_invalidation;
 	xe->info.has_link_copy_engine = desc->has_link_copy_engine;
+	xe->info.require_force_probe = desc->require_force_probe;
 
 	spd = subplatform_get(xe, desc);
 	xe->info.subplatform = spd ? spd->subplatform : XE_SUBPLATFORM_NONE;
diff --git a/drivers/gpu/drm/xe/xe_uc_fw.c b/drivers/gpu/drm/xe/xe_uc_fw.c
index 4ade5b1b6d31..b8452c91c170 100644
--- a/drivers/gpu/drm/xe/xe_uc_fw.c
+++ b/drivers/gpu/drm/xe/xe_uc_fw.c
@@ -441,10 +441,21 @@ int xe_uc_fw_upload(struct xe_uc_fw *uc_fw, u32 offset, u32 dma_flags)
 
 void xe_uc_fw_print(struct xe_uc_fw *uc_fw, struct drm_printer *p)
 {
+	struct xe_device *xe = uc_fw_to_xe(uc_fw);
 	drm_printf(p, "%s firmware: %s\n",
 		   xe_uc_fw_type_repr(uc_fw->type), uc_fw->path);
 	drm_printf(p, "\tstatus: %s\n",
 		   xe_uc_fw_status_repr(uc_fw->status));
+	if (uc_fw->type == XE_UC_FW_TYPE_HUC) {
+		if (xe->info.require_force_probe)
+			drm_printf(p, "\tversion: minimum wanted %u.%u, found %u.%u\n",
+				   uc_fw->major_ver_wanted, uc_fw->minor_ver_wanted,
+				   uc_fw->major_ver_found, uc_fw->minor_ver_found);
+		else
+			drm_printf(p, "\tversion: found %u.%u\n",
+				   uc_fw->major_ver_found, uc_fw->minor_ver_found);
+	}
+
 	drm_printf(p, "\tversion: wanted %u.%u, found %u.%u\n",
 		   uc_fw->major_ver_wanted, uc_fw->minor_ver_wanted,
 		   uc_fw->major_ver_found, uc_fw->minor_ver_found);
-- 
2.25.1



More information about the Intel-xe mailing list