Skip to contentSkip to conversation

Xe OA Consolidated Diffs

PATCH New Ashutosh Dixit 2 participants 3 messages Jan 20, 2024

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

cover Xe OA Consolidated Diffs

Because Xe OA changes between successive revisions are distributed across multiple patches, I am providing a combined diff of all changes in a single patch to help with the code review.

These changes pertain to: https://patchwork.freedesktop.org/series/121084/

Ashutosh Dixit (1):
drm/xe/oa: Combined diff of changes between v7 and v8

 drivers/gpu/drm/xe/regs/xe_oa_regs.h |   9 +-
 drivers/gpu/drm/xe/xe_device.c       |   7 +-
 drivers/gpu/drm/xe/xe_module.c       |   4 -
 drivers/gpu/drm/xe/xe_oa.c           | 420 +++++++--------------------
 drivers/gpu/drm/xe/xe_oa.h           |   3 -
 drivers/gpu/drm/xe/xe_oa_types.h     |   5 +-
 include/uapi/drm/xe_drm.h            | 162 ++++-------
 7 files changed, 174 insertions(+), 436 deletions(-)
Signature · 1 line
2.41.0
#1 lore raw

PATCH 1/1 drm/xe/oa: Combined diff of changes between v7 and v8

Because Xe OA changes between successive revisions are distributed across multiple patches, provide a combined diff of all changes in a single patch to help with the code review.

These changes pertain to: https://patchwork.freedesktop.org/series/121084/

This patch will not compile, it's purpose is to just provide the diff.

Changes between v7 and v8 include:

uAPI changes:
-------------

Perf layer

* Add DRM_XE_PERF_IOCTL_STATUS at perf layer

OA

* Drop report headers for read()
* Drop 'struct drm_xe_oa_open_param'
* Drop DRM_XE_OA_PROPERTY_OPEN_FLAGS, add DRM_XE_OA_PROPERTY_OA_DISABLED
* Drop DRM_XE_OA_PROPERTY_POLL_OA_PERIOD_US
* Drop "oa_max_sample_rate" sysctl
* Clean up 'struct drm_xe_query_oa_units'

Other changes:
--------------

* Minor changes to xe_oa_mmap
* Rename xe_oa_modify_self
* Drop XE_OA_UNIT_OAM_SAMEDIA_0
* And other minor changes

---
 drivers/gpu/drm/xe/regs/xe_oa_regs.h |   9 +-
 drivers/gpu/drm/xe/xe_device.c       |   7 +-
 drivers/gpu/drm/xe/xe_module.c       |   4 -
 drivers/gpu/drm/xe/xe_oa.c           | 420 +++++++--------------------
 drivers/gpu/drm/xe/xe_oa.h           |   3 -
 drivers/gpu/drm/xe/xe_oa_types.h     |   5 +-
 include/uapi/drm/xe_drm.h            | 162 ++++-------
 7 files changed, 174 insertions(+), 436 deletions(-)
drivers/gpu/drm/xe/regs/xe_oa_regs.h +1 -8
index 1ce27a72079ad..4c9eee27b5c48 100644
@@ -70,17 +70,10 @@
 #define  OAG_OA_DEBUG_DISABLE_START_TRG_1_COUNT_QUAL	REG_BIT(7)
 #define  OAG_OA_DEBUG_INCLUDE_CLK_RATIO			REG_BIT(6)
 #define  OAG_OA_DEBUG_DISABLE_CLK_RATIO_REPORTS		REG_BIT(5)
-#define  OAG_OA_DEBUG_DISABLE_GO_1_0_REPORTS		REG_BIT(2)
 #define  OAG_OA_DEBUG_DISABLE_CTX_SWITCH_REPORTS	REG_BIT(1)
 
-#define OAG_OASTATUS XE_REG(0xdafc)
-#define  OAG_OASTATUS_MMIO_TRG_Q_FULL	REG_BIT(6)
-#define  OAG_OASTATUS_COUNTER_OVERFLOW	REG_BIT(2)
-#define  OAG_OASTATUS_BUFFER_OVERFLOW	REG_BIT(1)
-#define  OAG_OASTATUS_REPORT_LOST	REG_BIT(0)
-
+#define OAG_OASTATUS			XE_REG(0xdafc)
 #define OAG_MMIOTRIGGER			XE_REG(0xdb1c)
-
 /* OAC unit */
 #define OAC_OACONTROL			XE_REG(0x15114)
 
drivers/gpu/drm/xe/xe_device.c +5 -2
index 80a7f367ec4f5..46e781983125e 100644
@@ -537,11 +537,11 @@ int xe_device_probe(struct xe_device *xe)
 
 	err = xe_oa_init(xe);
 	if (err)
-		goto err_irq_shutdown;
+		goto err_fini_gt;
 
 	err = xe_display_init(xe);
 	if (err)
-		goto err_fini_gt;
+		goto err_oa_fini;
 
 	err = drm_dev_register(&xe->drm, 0);
 	if (err)
@@ -564,6 +564,9 @@ int xe_device_probe(struct xe_device *xe)
 err_fini_display:
 	xe_display_driver_remove(xe);
 
+err_oa_fini:
+	xe_oa_fini(xe);
+
 err_fini_gt:
 	for_each_gt(gt, xe, id) {
 		if (id < last_gt)
drivers/gpu/drm/xe/xe_module.c +0 -4
index 4fdec789b4503..b5108e66dd1ee 100644
@@ -72,10 +72,6 @@ static const struct init_funcs init_funcs[] = {
 		.init = xe_perf_sysctl_register,
 		.exit = xe_perf_sysctl_unregister,
 	},
-	{
-		.init = xe_oa_sysctl_register,
-		.exit = xe_oa_sysctl_unregister,
-	},
 };
 
 static int __init xe_init(void)
drivers/gpu/drm/xe/xe_oa.c +113 -307

745 lines not on this page · raw message

drivers/gpu/drm/xe/xe_oa.h +0 -3
index 044440300c88f..6308aa1829bd7 100644
@@ -18,9 +18,6 @@ int xe_oa_init(struct xe_device *xe);
 void xe_oa_fini(struct xe_device *xe);
 void xe_oa_register(struct xe_device *xe);
 void xe_oa_unregister(struct xe_device *xe);
-int xe_oa_sysctl_register(void);
-void xe_oa_sysctl_unregister(void);
-
 int xe_oa_stream_open_ioctl(struct drm_device *dev, void *data,
 			    struct drm_file *file);
 int xe_oa_add_config_ioctl(struct drm_device *dev, void *data,
drivers/gpu/drm/xe/xe_oa_types.h +1 -4
index e11555bac7c79..bee49977ee3d4 100644
@@ -23,7 +23,7 @@ enum xe_oa_report_header {
 };
 
 enum xe_oa_format_name {
-	XE_OA_FORMAT_C4_B8 = 7,
+	XE_OA_FORMAT_C4_B8,
 
 	/* Gen8+ */
 	XE_OA_FORMAT_A12,
@@ -188,9 +188,6 @@ struct xe_oa_stream {
 	/** @sample: true if DRM_XE_OA_PROP_SAMPLE_OA is provided */
 	bool sample;
 
-	/** @sample_size: Size of an OA record/packet plus the header */
-	int sample_size;
-
 	/** @exec_q: Exec queue corresponding to DRM_XE_OA_PROPERTY_EXEC_QUEUE_ID */
 	struct xe_exec_queue *exec_q;
 
include/uapi/drm/xe_drm.h +54 -108

217 lines not on this page · raw message

Signature · 1 line
2.41.0
#2 lore raw

✗ CI.Patch_applied: failure for Xe OA Consolidated Diffs

In reply to Ashutosh Dixit
== Series Details ==

== Series Details ==

Series: Xe OA Consolidated Diffs
URL : https://patchwork.freedesktop.org/series/128993/
State : failure

== Summary ==

=== Applying kernel patches on branch 'drm-tip' with base: ===
Base commit: b239ffd47 drm-tip: 2024y-01m-19d-21h-47m-43s UTC integration manifest === git am output follows ===
error: drivers/gpu/drm/xe/regs/xe_oa_regs.h: does not exist in index
error: patch failed: drivers/gpu/drm/xe/xe_device.c:537
error: drivers/gpu/drm/xe/xe_device.c: patch does not apply
error: patch failed: drivers/gpu/drm/xe/xe_module.c:72
error: drivers/gpu/drm/xe/xe_module.c: patch does not apply
error: drivers/gpu/drm/xe/xe_oa.c: does not exist in index
error: drivers/gpu/drm/xe/xe_oa.h: does not exist in index
error: drivers/gpu/drm/xe/xe_oa_types.h: does not exist in index
error: patch failed: include/uapi/drm/xe_drm.h:100
error: include/uapi/drm/xe_drm.h: patch does not apply
hint: Use 'git am --show-current-patch' to see the failed patch
Applying: drm/xe/oa: Combined diff of changes between v7 and v8
Patch failed at 0001 drm/xe/oa: Combined diff of changes between v7 and v8 When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".