Skip to contentSkip to conversation

drm/xe/vsec: Support BMG devices

PATCH New Michael J. Ruhl 2 participants 2 messages Aug 15, 2024

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH v12 1/1 drm/xe/vsec: Support BMG devices

The Battlemage (BMG) discrete graphics card supports the Platform, Monitoring Technology (PMT) feature directly on the primary PCI device.

Utilize the PMT callback API to add support for the BMG devices.

---

v10:
Use the mutex guard feature
Use the xe_pm_runtime_get_if_active() return value correctly Add r/b from Ilpo
Deferred DG2 patches for the future
v11:
add include for cleanup.h
v12:
use default clause in switch
rename OFFSET to OFFSET_BASE

 drivers/gpu/drm/xe/Makefile          |   1 +
 drivers/gpu/drm/xe/xe_device.c       |   5 +
 drivers/gpu/drm/xe/xe_device_types.h |   6 +
 drivers/gpu/drm/xe/xe_vsec.c         | 221 +++++++++++++++++++++++++++
 drivers/gpu/drm/xe/xe_vsec.h         |  13 ++
 5 files changed, 246 insertions(+)
 create mode 100644 drivers/gpu/drm/xe/xe_vsec.c
 create mode 100644 drivers/gpu/drm/xe/xe_vsec.h
drivers/gpu/drm/xe/Makefile +1 -0
index 628c245c4822..f4c6761dc2e7 100644
@@ -129,6 +129,7 @@ xe-y += xe_bb.o \
 	xe_vm.o \
 	xe_vram.o \
 	xe_vram_freq.o \
+	xe_vsec.o \
 	xe_wait_user_fence.o \
 	xe_wa.o \
 	xe_wopcm.o
drivers/gpu/drm/xe/xe_device.c +5 -0
index 76109415eba6..a7c759c98560 100644
@@ -53,6 +53,7 @@
 #include "xe_ttm_sys_mgr.h"
 #include "xe_vm.h"
 #include "xe_vram.h"
+#include "xe_vsec.h"
 #include "xe_wait_user_fence.h"
 
 static int xe_file_open(struct drm_device *dev, struct drm_file *file)
@@ -317,6 +318,8 @@ struct xe_device *xe_device_create(struct pci_dev *pdev,
 		goto err;
 	}
 
+	drmm_mutex_init(&xe->drm, &xe->pmt.lock);
+
 	err = xe_display_create(xe);
 	if (WARN_ON(err))
 		goto err;
@@ -692,6 +695,8 @@ int xe_device_probe(struct xe_device *xe)
 	for_each_gt(gt, xe, id)
 		xe_gt_sanitize_freq(gt);
 
+	xe_vsec_init(xe);
+
 	return devm_add_action_or_reset(xe->drm.dev, xe_device_sanitize, xe);
 
 err_fini_display:
drivers/gpu/drm/xe/xe_device_types.h +6 -0
index 3bca6d344744..448a92148081 100644
@@ -451,6 +451,12 @@ struct xe_device {
 		struct mutex lock;
 	} d3cold;
 
+	/** @pmt: Support the PMT driver callback interface */
+	struct {
+		/** @pmt.lock: protect access for telemetry data */
+		struct mutex lock;
+	} pmt;
+
 	/**
 	 * @pm_callback_task: Track the active task that is running in either
 	 * the runtime_suspend or runtime_resume callbacks.
drivers/gpu/drm/xe/xe_vsec.c new file +221 -0

221 lines not on this page · raw message

drivers/gpu/drm/xe/xe_vsec.h new file +13 -0
new file mode 100644
index 000000000000..3fd29a21cad6
@@ -0,0 +1,13 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
+ * Copyright © 2022 - 2024 Intel Corporation
+ */
+
+#ifndef _XE_VSEC_H_
+#define _XE_VSEC_H_
+
+struct xe_device;
+
+void xe_vsec_init(struct xe_device *xe);
+
+#endif
Signature · 1 line
2.44.0
#1 lore raw

✗ CI.Patch_applied: failure for drm/xe/vsec: Support BMG devices (rev4)

== Series Details ==

== Series Details ==

Series: drm/xe/vsec: Support BMG devices (rev4)
URL : https://patchwork.freedesktop.org/series/137199/
State : failure

== Summary ==

=== Applying kernel patches on branch 'drm-tip' with base: ===
Base commit: 04b7aff6fa1b drm-tip: 2024y-08m-15d-20h-12m-22s UTC integration manifest === git am output follows ===
error: patch failed: drivers/gpu/drm/xe/xe_device.c:53
error: drivers/gpu/drm/xe/xe_device.c: patch does not apply
hint: Use 'git am --show-current-patch=diff' to see the failed patch
hint: When you have resolved this problem, run "git am --continue".
hint: If you prefer to skip this patch, run "git am --skip" instead.
hint: To restore the original branch and stop patching, run "git am --abort".
hint: Disable this message with "git config advice.mergeConflict false"
Applying: drm/xe/vsec: Support BMG devices
Patch failed at 0001 drm/xe/vsec: Support BMG devices