Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/1] Xe OA Consolidated Diffs
@ 2024-05-27  1:36 Ashutosh Dixit
  2024-05-27  1:36 ` [PATCH 1/1] drm/xe/oa: Combined diff of changes between v14 and v15 Ashutosh Dixit
  2024-05-27  1:41 ` ✗ CI.Patch_applied: failure for Xe OA Consolidated Diffs Patchwork
  0 siblings, 2 replies; 3+ messages in thread
From: Ashutosh Dixit @ 2024-05-27  1:36 UTC (permalink / raw)
  To: intel-xe

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 v14 and v15

 drivers/gpu/drm/xe/xe_oa.c   | 16 +++++++---------
 drivers/gpu/drm/xe/xe_oa.h   |  9 +++------
 drivers/gpu/drm/xe/xe_perf.c |  6 +++---
 3 files changed, 13 insertions(+), 18 deletions(-)

-- 
2.41.0


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH 1/1] drm/xe/oa: Combined diff of changes between v14 and v15
  2024-05-27  1:36 [PATCH 0/1] Xe OA Consolidated Diffs Ashutosh Dixit
@ 2024-05-27  1:36 ` Ashutosh Dixit
  2024-05-27  1:41 ` ✗ CI.Patch_applied: failure for Xe OA Consolidated Diffs Patchwork
  1 sibling, 0 replies; 3+ messages in thread
From: Ashutosh Dixit @ 2024-05-27  1:36 UTC (permalink / raw)
  To: intel-xe

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 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.

* Fix 32 bit build issues

Signed-off-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
---
 drivers/gpu/drm/xe/xe_oa.c   | 16 +++++++---------
 drivers/gpu/drm/xe/xe_oa.h   |  9 +++------
 drivers/gpu/drm/xe/xe_perf.c |  6 +++---
 3 files changed, 13 insertions(+), 18 deletions(-)

diff --git a/drivers/gpu/drm/xe/xe_oa.c b/drivers/gpu/drm/xe/xe_oa.c
index 38e6364a60b1..3ed4ca19f9cd 100644
--- a/drivers/gpu/drm/xe/xe_oa.c
+++ b/drivers/gpu/drm/xe/xe_oa.c
@@ -401,7 +401,7 @@ static void xe_oa_init_oa_buffer(struct xe_oa_stream *stream)
 
 static u32 __format_to_oactrl(const struct xe_oa_format *format, int counter_sel_mask)
 {
-	return ((format->counter_select << __bf_shf(counter_sel_mask)) & counter_sel_mask) |
+	return ((format->counter_select << (ffs(counter_sel_mask) - 1)) & counter_sel_mask) |
 		REG_FIELD_PREP(OA_OACONTROL_REPORT_BC_MASK, format->bc_report) |
 		REG_FIELD_PREP(OA_OACONTROL_COUNTER_SIZE_MASK, format->counter_size);
 }
@@ -1698,7 +1698,7 @@ static int xe_oa_user_extensions(struct xe_oa *oa, u64 extension, int ext_number
 	return 0;
 }
 
-int xe_oa_stream_open_ioctl(struct drm_device *dev, void *data, struct drm_file *file)
+int xe_oa_stream_open_ioctl(struct drm_device *dev, u64 data, struct drm_file *file)
 {
 	struct xe_oa *oa = &to_xe_device(dev)->oa;
 	struct xe_file *xef = to_xe_file(file);
@@ -1712,7 +1712,7 @@ int xe_oa_stream_open_ioctl(struct drm_device *dev, void *data, struct drm_file
 		return -ENODEV;
 	}
 
-	ret = xe_oa_user_extensions(oa, (u64)data, 0, &param);
+	ret = xe_oa_user_extensions(oa, data, 0, &param);
 	if (ret)
 		return ret;
 
@@ -1963,8 +1963,7 @@ static int create_dynamic_oa_sysfs_entry(struct xe_oa *oa,
 	return sysfs_create_group(oa->metrics_kobj, &oa_config->sysfs_metric);
 }
 
-int xe_oa_add_config_ioctl(struct drm_device *dev, void *data,
-			   struct drm_file *file)
+int xe_oa_add_config_ioctl(struct drm_device *dev, u64 data, struct drm_file *file)
 {
 	struct xe_oa *oa = &to_xe_device(dev)->oa;
 	struct drm_xe_oa_config param;
@@ -1983,7 +1982,7 @@ int xe_oa_add_config_ioctl(struct drm_device *dev, void *data,
 		return -EACCES;
 	}
 
-	err = __copy_from_user(&param, data, sizeof(param));
+	err = __copy_from_user(&param, u64_to_user_ptr(data), sizeof(param));
 	if (XE_IOCTL_DBG(oa->xe, err))
 		return -EFAULT;
 
@@ -2059,12 +2058,11 @@ int xe_oa_add_config_ioctl(struct drm_device *dev, void *data,
 	return err;
 }
 
-int xe_oa_remove_config_ioctl(struct drm_device *dev, void *data,
-			      struct drm_file *file)
+int xe_oa_remove_config_ioctl(struct drm_device *dev, u64 data, struct drm_file *file)
 {
 	struct xe_oa *oa = &to_xe_device(dev)->oa;
 	struct xe_oa_config *oa_config;
-	u64 arg, *ptr = data;
+	u64 arg, *ptr = u64_to_user_ptr(data);
 	int ret;
 
 	if (!oa->xe) {
diff --git a/drivers/gpu/drm/xe/xe_oa.h b/drivers/gpu/drm/xe/xe_oa.h
index 6308aa1829bd..d2f50c3accf3 100644
--- a/drivers/gpu/drm/xe/xe_oa.h
+++ b/drivers/gpu/drm/xe/xe_oa.h
@@ -18,12 +18,9 @@ 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_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,
-			   struct drm_file *file);
-int xe_oa_remove_config_ioctl(struct drm_device *dev, void *data,
-			      struct drm_file *file);
+int xe_oa_stream_open_ioctl(struct drm_device *dev, u64 data, struct drm_file *file);
+int xe_oa_add_config_ioctl(struct drm_device *dev, u64 data, struct drm_file *file);
+int xe_oa_remove_config_ioctl(struct drm_device *dev, u64 data, struct drm_file *file);
 u32 xe_oa_timestamp_frequency(struct xe_gt *gt);
 u16 xe_oa_unit_id(struct xe_hw_engine *hwe);
 
diff --git a/drivers/gpu/drm/xe/xe_perf.c b/drivers/gpu/drm/xe/xe_perf.c
index 2c0615481b7d..06739787d0e7 100644
--- a/drivers/gpu/drm/xe/xe_perf.c
+++ b/drivers/gpu/drm/xe/xe_perf.c
@@ -17,11 +17,11 @@ static int xe_oa_ioctl(struct drm_device *dev, struct drm_xe_perf_param *arg,
 {
 	switch (arg->perf_op) {
 	case DRM_XE_PERF_OP_STREAM_OPEN:
-		return xe_oa_stream_open_ioctl(dev, (void *)arg->param, file);
+		return xe_oa_stream_open_ioctl(dev, arg->param, file);
 	case DRM_XE_PERF_OP_ADD_CONFIG:
-		return xe_oa_add_config_ioctl(dev, (void *)arg->param, file);
+		return xe_oa_add_config_ioctl(dev, arg->param, file);
 	case DRM_XE_PERF_OP_REMOVE_CONFIG:
-		return xe_oa_remove_config_ioctl(dev, (void *)arg->param, file);
+		return xe_oa_remove_config_ioctl(dev, arg->param, file);
 	default:
 		return -EINVAL;
 	}
-- 
2.41.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* ✗ CI.Patch_applied: failure for Xe OA Consolidated Diffs
  2024-05-27  1:36 [PATCH 0/1] Xe OA Consolidated Diffs Ashutosh Dixit
  2024-05-27  1:36 ` [PATCH 1/1] drm/xe/oa: Combined diff of changes between v14 and v15 Ashutosh Dixit
@ 2024-05-27  1:41 ` Patchwork
  1 sibling, 0 replies; 3+ messages in thread
From: Patchwork @ 2024-05-27  1:41 UTC (permalink / raw)
  To: Ashutosh Dixit; +Cc: intel-xe

== Series Details ==

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

== Summary ==

=== Applying kernel patches on branch 'drm-tip' with base: ===
Base commit: 573842e9ab57 drm-tip: 2024y-05m-24d-13h-04m-26s UTC integration manifest
=== git am output follows ===
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_perf.c: does not exist in index
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Applying: drm/xe/oa: Combined diff of changes between v14 and v15
Patch failed at 0001 drm/xe/oa: Combined diff of changes between v14 and v15
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".



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-05-27  1:41 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-27  1:36 [PATCH 0/1] Xe OA Consolidated Diffs Ashutosh Dixit
2024-05-27  1:36 ` [PATCH 1/1] drm/xe/oa: Combined diff of changes between v14 and v15 Ashutosh Dixit
2024-05-27  1:41 ` ✗ CI.Patch_applied: failure for Xe OA Consolidated Diffs Patchwork

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox