[Intel-xe] [PATCH v3] drm/xe/display: Print display ip version

Balasubramani Vivekanandan balasubramani.vivekanandan at intel.com
Mon Sep 11 10:41:34 UTC 2023


Print display ip version and flags during module load

v3:
Use the existing intel_display_device_info_print() function to print the
display information. (Jani)

Signed-off-by: Balasubramani Vivekanandan <balasubramani.vivekanandan at intel.com>
---
 drivers/gpu/drm/xe/xe_display.c | 9 +++++++++
 drivers/gpu/drm/xe/xe_display.h | 4 ++++
 drivers/gpu/drm/xe/xe_pci.c     | 2 ++
 3 files changed, 15 insertions(+)

diff --git a/drivers/gpu/drm/xe/xe_display.c b/drivers/gpu/drm/xe/xe_display.c
index a453946ad108..45ffc418e636 100644
--- a/drivers/gpu/drm/xe/xe_display.c
+++ b/drivers/gpu/drm/xe/xe_display.c
@@ -417,6 +417,15 @@ void xe_display_pm_resume(struct xe_device *xe)
 	intel_power_domains_enable(xe);
 }
 
+void xe_display_info_print(struct xe_device *xe)
+{
+	struct drm_printer p = drm_info_printer(xe->drm.dev);
+
+	if (xe->info.enable_display)
+		intel_display_device_info_print(xe->info.display,
+						&xe->info.display_runtime, &p);
+}
+
 /* Display info initialization */
 __diag_push();
 __diag_ignore_all("-Woverride-init", "Allow field overrides in table");
diff --git a/drivers/gpu/drm/xe/xe_display.h b/drivers/gpu/drm/xe/xe_display.h
index 9e29de012df7..b18bf5583229 100644
--- a/drivers/gpu/drm/xe/xe_display.h
+++ b/drivers/gpu/drm/xe/xe_display.h
@@ -19,6 +19,8 @@ int xe_display_create(struct xe_device *xe);
 
 void xe_display_info_init(struct xe_device *xe);
 
+void xe_display_info_print(struct xe_device *xe);
+
 int xe_display_init_nommio(struct xe_device *xe);
 void xe_display_fini_nommio(struct drm_device *dev, void *dummy);
 
@@ -57,6 +59,8 @@ xe_display_create(struct xe_device *xe) { return 0; }
 
 static inline void xe_display_info_init(struct xe_device *xe) { }
 
+static inline void xe_display_info_print(struct xe_device *xe) { }
+
 static inline int
 xe_display_enable(struct pci_dev *pdev, struct drm_driver *driver) { return 0; }
 
diff --git a/drivers/gpu/drm/xe/xe_pci.c b/drivers/gpu/drm/xe/xe_pci.c
index 24b16863bf3d..a4886ea8794f 100644
--- a/drivers/gpu/drm/xe/xe_pci.c
+++ b/drivers/gpu/drm/xe/xe_pci.c
@@ -724,6 +724,8 @@ static int xe_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
 		xe_step_name(xe->info.step.display),
 		xe_step_name(xe->info.step.basedie));
 
+	xe_display_info_print(xe);
+
 	err = xe_device_probe(xe);
 	if (err)
 		goto err_pci_disable;
-- 
2.25.1



More information about the Intel-xe mailing list