All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915: add support for perf configuration queries
@ 2018-06-05 16:18 Lionel Landwerlin
  2018-06-05 17:47 ` ✗ Fi.CI.CHECKPATCH: warning for " Patchwork
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Lionel Landwerlin @ 2018-06-05 16:18 UTC (permalink / raw)
  To: intel-gfx

Listing configurations at the moment is supported only through sysfs.
This might cause issues for applications wanting to list
configurations from a container where sysfs isn't available.

This change adds a way to query the number of configurations and their
content through the i915 query uAPI.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
---
 drivers/gpu/drm/i915/i915_drv.h   |   6 +
 drivers/gpu/drm/i915/i915_perf.c  |   4 +
 drivers/gpu/drm/i915/i915_query.c | 256 ++++++++++++++++++++++++++++++
 include/uapi/drm/i915_drm.h       |  47 +++++-
 4 files changed, 312 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index f8f9fd82a29a..e60385b77725 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -1935,6 +1935,12 @@ struct drm_i915_private {
 		 */
 		struct idr metrics_idr;
 
+		/*
+		 * Number of dynamic configurations, you need to hold
+		 * dev_priv->perf.metrics_lock to access it.
+		 */
+		u32 n_metrics;
+
 		/*
 		 * Lock associated with anything below within this structure
 		 * except exclusive_stream.
diff --git a/drivers/gpu/drm/i915/i915_perf.c b/drivers/gpu/drm/i915/i915_perf.c
index 9f07900b872b..02f8034bb699 100644
--- a/drivers/gpu/drm/i915/i915_perf.c
+++ b/drivers/gpu/drm/i915/i915_perf.c
@@ -3365,6 +3365,8 @@ int i915_perf_add_config_ioctl(struct drm_device *dev, void *data,
 		goto sysfs_err;
 	}
 
+	dev_priv->perf.n_metrics++;
+
 	mutex_unlock(&dev_priv->perf.metrics_lock);
 
 	DRM_DEBUG("Added config %s id=%i\n", oa_config->uuid, oa_config->id);
@@ -3426,6 +3428,8 @@ int i915_perf_remove_config_ioctl(struct drm_device *dev, void *data,
 
 	idr_remove(&dev_priv->perf.metrics_idr, *arg);
 
+	dev_priv->perf.n_metrics--;
+
 	DRM_DEBUG("Removed config %s id=%i\n", oa_config->uuid, oa_config->id);
 
 	put_oa_config(dev_priv, oa_config);
diff --git a/drivers/gpu/drm/i915/i915_query.c b/drivers/gpu/drm/i915/i915_query.c
index 3f502eef2431..6583547de9df 100644
--- a/drivers/gpu/drm/i915/i915_query.c
+++ b/drivers/gpu/drm/i915/i915_query.c
@@ -84,9 +84,265 @@ static int query_topology_info(struct drm_i915_private *dev_priv,
 	return total_length;
 }
 
+static int can_copy_perf_config_registers_or_number(u32 user_n_regs,
+						    u64 user_regs_ptr,
+						    u32 kernel_n_regs)
+{
+	/*
+	 * We'll just put the number of registers, and won't copy the
+	 * register.
+	 */
+	if (user_n_regs == 0)
+		return 0;
+
+	if (user_n_regs < kernel_n_regs)
+		return -EINVAL;
+
+	if (!access_ok(VERIFY_WRITE, user_regs_ptr,
+		       2 * sizeof(u32) * kernel_n_regs))
+		return -EFAULT;
+
+	return 0;
+}
+
+static int copy_perf_config_registers_or_number(const struct i915_oa_reg *kernel_regs,
+						u32 kernel_n_regs,
+						u64 user_regs_ptr,
+						u32 *user_n_regs)
+{
+	u32 r;
+
+	if (*user_n_regs == 0) {
+		*user_n_regs = kernel_n_regs;
+		return 0;
+	}
+
+	*user_n_regs = kernel_n_regs;
+
+	for (r = 0; r < kernel_n_regs; r++) {
+		u32 __user *user_reg_ptr =
+			u64_to_user_ptr(user_regs_ptr + sizeof(u32) * r * 2);
+		u32 __user *user_val_ptr =
+			u64_to_user_ptr(user_regs_ptr + sizeof(u32) * r * 2 +
+					sizeof(u32));
+		int ret;
+
+		ret = __put_user(i915_mmio_reg_offset(kernel_regs[r].addr),
+				 user_reg_ptr);
+		if (ret)
+			return -EFAULT;
+
+		ret = __put_user(kernel_regs[r].value, user_val_ptr);
+		if (ret)
+			return -EFAULT;
+	}
+
+	return 0;
+}
+
+static int query_perf_config_data(struct drm_i915_private *i915,
+				  struct drm_i915_query_item *query_item)
+{
+	struct drm_i915_query_perf_config __user *user_query_config_ptr =
+		u64_to_user_ptr(query_item->data_ptr);
+	struct drm_i915_perf_oa_config __user *user_config_ptr =
+		u64_to_user_ptr(query_item->data_ptr +
+				sizeof(struct drm_i915_query_perf_config));
+	struct drm_i915_perf_oa_config user_config;
+	struct i915_oa_config *oa_config;
+	u64 config_id, flags;
+	u32 total_size;
+	int ret;
+
+	if (!i915->perf.initialized)
+		return -ENODEV;
+
+	total_size = sizeof(struct drm_i915_query_perf_config) +
+		sizeof(struct drm_i915_perf_oa_config);
+
+	if (query_item->length == 0)
+		return total_size;
+
+	if (query_item->length < total_size)
+		return -EINVAL;
+
+	if (!access_ok(VERIFY_WRITE, user_query_config_ptr, total_size))
+		return -EFAULT;
+
+	if (__get_user(flags, &user_query_config_ptr->flags))
+		return -EFAULT;
+
+	if (flags != 0)
+		return -EINVAL;
+
+	if (__get_user(config_id, &user_query_config_ptr->config))
+		return -EFAULT;
+
+	ret = mutex_lock_interruptible(&i915->perf.metrics_lock);
+	if (ret)
+		return ret;
+
+	if (config_id == 1) {
+		oa_config = &i915->perf.oa.test_config;
+	} else {
+		oa_config = idr_find(&i915->perf.metrics_idr, config_id);
+		if (!oa_config) {
+			ret = -ENOENT;
+			goto out;
+		}
+	}
+
+	if (__copy_from_user(&user_config, user_config_ptr,
+			     sizeof(user_config))) {
+		ret = -EFAULT;
+		goto out;
+	}
+
+	ret = can_copy_perf_config_registers_or_number(user_config.n_boolean_regs,
+						       user_config.boolean_regs_ptr,
+						       oa_config->b_counter_regs_len);
+	if (ret)
+		goto out;
+
+	ret = can_copy_perf_config_registers_or_number(user_config.n_flex_regs,
+						       user_config.flex_regs_ptr,
+						       oa_config->flex_regs_len);
+	if (ret)
+		goto out;
+
+	ret = can_copy_perf_config_registers_or_number(user_config.n_mux_regs,
+						       user_config.mux_regs_ptr,
+						       oa_config->mux_regs_len);
+	if (ret)
+		goto out;
+
+	ret = copy_perf_config_registers_or_number(oa_config->b_counter_regs,
+						   oa_config->b_counter_regs_len,
+						   user_config.boolean_regs_ptr,
+						   &user_config.n_boolean_regs);
+	if (ret)
+		goto out;
+
+	ret = copy_perf_config_registers_or_number(oa_config->flex_regs,
+						   oa_config->flex_regs_len,
+						   user_config.flex_regs_ptr,
+						   &user_config.n_flex_regs);
+	if (ret)
+		goto out;
+
+	ret = copy_perf_config_registers_or_number(oa_config->mux_regs,
+						   oa_config->mux_regs_len,
+						   user_config.mux_regs_ptr,
+						   &user_config.n_mux_regs);
+	if (ret)
+		goto out;
+
+	memcpy(user_config.uuid, oa_config->uuid, sizeof(user_config.uuid));
+
+	if (__copy_to_user(user_config_ptr, &user_config,
+			   sizeof(user_config))) {
+		ret = -EFAULT;
+		goto out;
+	}
+
+	ret = total_size;
+
+out:
+	mutex_unlock(&i915->perf.metrics_lock);
+	return ret;
+}
+
+static int query_perf_config_list(struct drm_i915_private *i915,
+				  struct drm_i915_query_item *query_item)
+{
+	struct drm_i915_query_perf_config __user *user_query_config_ptr =
+		u64_to_user_ptr(query_item->data_ptr);
+	struct i915_oa_config *oa_config;
+	u64 n_configs, flags;
+	u32 total_size;
+	int ret, id;
+
+	if (!i915->perf.initialized)
+		return -ENODEV;
+
+	/* Count the default test configuration */
+	n_configs = i915->perf.n_metrics + 1;
+	total_size = sizeof(struct drm_i915_query_perf_config) +
+		sizeof(u64) * n_configs;
+
+	if (query_item->length == 0) {
+		ret = total_size;
+		goto out;
+	}
+
+	if (query_item->length < total_size) {
+		ret = -EINVAL;
+		goto out;
+	}
+
+	if (!access_ok(VERIFY_WRITE, user_query_config_ptr, total_size)) {
+		ret = -EFAULT;
+		goto out;
+	}
+
+	if (__get_user(flags, &user_query_config_ptr->flags)) {
+		ret = -EFAULT;
+		goto out;
+	}
+
+	if (flags != 0) {
+		ret = -EINVAL;
+		goto out;
+	}
+
+	if (__put_user(n_configs, &user_query_config_ptr->config)) {
+		ret = -EFAULT;
+		goto out;
+	}
+
+	if (__put_user((u64) 1ULL, &user_query_config_ptr->data[0])) {
+		ret = -EFAULT;
+		goto out;
+	}
+
+	ret = mutex_lock_interruptible(&i915->perf.metrics_lock);
+	if (ret)
+		return ret;
+
+	n_configs = 1;
+	idr_for_each_entry(&i915->perf.metrics_idr, oa_config, id) {
+		if (__put_user((u64) id,
+			       &user_query_config_ptr->data[0] +
+			       n_configs * sizeof(u64))) {
+			ret = -EFAULT;
+			goto out;
+		}
+		n_configs++;
+	}
+
+	ret = total_size;
+
+out:
+	mutex_unlock(&i915->perf.metrics_lock);
+	return ret;
+}
+
+static int query_perf_config(struct drm_i915_private *i915,
+			     struct drm_i915_query_item *query_item)
+{
+	if (query_item->flags == DRM_I915_QUERY_PERF_CONFIG_LIST)
+		return query_perf_config_list(i915, query_item);
+	else if (query_item->flags == DRM_I915_QUERY_PERF_CONFIG_DATA)
+		return query_perf_config_data(i915, query_item);
+
+	return -EINVAL;
+}
+
+
 static int (* const i915_query_funcs[])(struct drm_i915_private *dev_priv,
 					struct drm_i915_query_item *query_item) = {
 	query_topology_info,
+	query_perf_config,
 };
 
 int i915_query_ioctl(struct drm_device *dev, void *data, struct drm_file *file)
diff --git a/include/uapi/drm/i915_drm.h b/include/uapi/drm/i915_drm.h
index 21df158056a2..3d9c44f35df4 100644
--- a/include/uapi/drm/i915_drm.h
+++ b/include/uapi/drm/i915_drm.h
@@ -1663,6 +1663,7 @@ struct drm_i915_perf_oa_config {
 struct drm_i915_query_item {
 	__u64 query_id;
 #define DRM_I915_QUERY_TOPOLOGY_INFO    1
+#define DRM_I915_QUERY_PERF_CONFIG      2
 
 	/*
 	 * When set to zero by userspace, this is filled with the size of the
@@ -1673,9 +1674,16 @@ struct drm_i915_query_item {
 	__s32 length;
 
 	/*
-	 * Unused for now. Must be cleared to zero.
+	 * When query_id == DRM_I915_QUERY_TOPOLOGY_INFO, must be 0.
+	 *
+	 * When query_id == DRM_I915_QUERY_PERF_CONFIG, must be one of the
+	 * following :
+	 *         - DRM_I915_QUERY_PERF_CONFIG_LIST
+	 *         - DRM_I915_QUERY_PERF_CONFIG_DATA
 	 */
 	__u32 flags;
+#define DRM_I915_QUERY_PERF_CONFIG_LIST 1
+#define DRM_I915_QUERY_PERF_CONFIG_DATA 2
 
 	/*
 	 * Data will be written at the location pointed by data_ptr when the
@@ -1760,6 +1768,43 @@ struct drm_i915_query_topology_info {
 	__u8 data[];
 };
 
+/*
+ * Data written by the kernel with query DRM_I915_QUERY_PERF_CONFIG.
+ */
+struct drm_i915_query_perf_config {
+	/*
+	 *
+	 * When query_item.flags == DRM_I915_QUERY_PERF_CONFIG_LIST, i915 sets
+	 * this fields to the number of configurations available.
+	 *
+	 * When query_id == DRM_I915_QUERY_PERF_CONFIG_DATA, i915 will use the
+	 * value in this field as configuration identifier to decide what data
+	 * to write into config_ptr.
+	 */
+	__u64 config;
+
+	/*
+	 * Unused for now. Must be cleared to zero.
+	 */
+	__u64 flags;
+
+	/*
+	 * When query_item.flags == DRM_I915_QUERY_PERF_CONFIG_LIST, i915 will
+	 * write an array of __u64 of configuration identifiers.
+	 *
+	 * When query_item.flags == DRM_I915_QUERY_PERF_CONFIG_DATA, i915 will
+	 * write a struct drm_i915_perf_oa_config. If the following fields of
+	 * drm_i915_perf_oa_config are set not set to 0, i915 will write into
+	 * the associated pointers the values of submitted when the
+	 * configuration was created :
+	 *
+	 *         - n_mux_regs
+	 *         - n_boolean_regs
+	 *         - n_flex_regs
+	 */
+	__u8 data[];
+};
+
 #if defined(__cplusplus)
 }
 #endif
-- 
2.17.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* ✗ Fi.CI.CHECKPATCH: warning for drm/i915: add support for perf configuration queries
  2018-06-05 16:18 [PATCH] drm/i915: add support for perf configuration queries Lionel Landwerlin
@ 2018-06-05 17:47 ` Patchwork
  2018-06-05 17:48 ` ✗ Fi.CI.SPARSE: " Patchwork
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Patchwork @ 2018-06-05 17:47 UTC (permalink / raw)
  To: Lionel Landwerlin; +Cc: intel-gfx

== Series Details ==

Series: drm/i915: add support for perf configuration queries
URL   : https://patchwork.freedesktop.org/series/44290/
State : warning

== Summary ==

$ dim checkpatch origin/drm-tip
37762d5da514 drm/i915: add support for perf configuration queries
-:278: CHECK:SPACING: No space is necessary after a cast
#278: FILE: drivers/gpu/drm/i915/i915_query.c:303:
+	if (__put_user((u64) 1ULL, &user_query_config_ptr->data[0])) {

-:289: CHECK:SPACING: No space is necessary after a cast
#289: FILE: drivers/gpu/drm/i915/i915_query.c:314:
+		if (__put_user((u64) id,

-:316: CHECK:LINE_SPACING: Please don't use multiple blank lines
#316: FILE: drivers/gpu/drm/i915/i915_query.c:341:
+
+

total: 0 errors, 0 warnings, 3 checks, 360 lines checked

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* ✗ Fi.CI.SPARSE: warning for drm/i915: add support for perf configuration queries
  2018-06-05 16:18 [PATCH] drm/i915: add support for perf configuration queries Lionel Landwerlin
  2018-06-05 17:47 ` ✗ Fi.CI.CHECKPATCH: warning for " Patchwork
@ 2018-06-05 17:48 ` Patchwork
  2018-06-05 18:03 ` ✓ Fi.CI.BAT: success " Patchwork
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Patchwork @ 2018-06-05 17:48 UTC (permalink / raw)
  To: Lionel Landwerlin; +Cc: intel-gfx

== Series Details ==

Series: drm/i915: add support for perf configuration queries
URL   : https://patchwork.freedesktop.org/series/44290/
State : warning

== Summary ==

$ dim sparse origin/drm-tip
Commit: drm/i915: add support for perf configuration queries
+drivers/gpu/drm/i915/i915_query.c:101:14:    expected void const volatile [noderef] <asn:1>*<noident>
+drivers/gpu/drm/i915/i915_query.c:101:14:    got unsigned long long [unsigned] [usertype] user_regs_ptr
+drivers/gpu/drm/i915/i915_query.c:101:14: warning: incorrect type in argument 1 (different base types)
-drivers/gpu/drm/i915/selftests/../i915_drv.h:3668:16: warning: expression using sizeof(void)
+drivers/gpu/drm/i915/selftests/../i915_drv.h:3674:16: warning: expression using sizeof(void)

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* ✓ Fi.CI.BAT: success for drm/i915: add support for perf configuration queries
  2018-06-05 16:18 [PATCH] drm/i915: add support for perf configuration queries Lionel Landwerlin
  2018-06-05 17:47 ` ✗ Fi.CI.CHECKPATCH: warning for " Patchwork
  2018-06-05 17:48 ` ✗ Fi.CI.SPARSE: " Patchwork
@ 2018-06-05 18:03 ` Patchwork
  2018-06-06  2:18 ` ✓ Fi.CI.IGT: " Patchwork
  2018-06-06 18:39 ` [PATCH] " kbuild test robot
  4 siblings, 0 replies; 6+ messages in thread
From: Patchwork @ 2018-06-05 18:03 UTC (permalink / raw)
  To: Lionel Landwerlin; +Cc: intel-gfx

== Series Details ==

Series: drm/i915: add support for perf configuration queries
URL   : https://patchwork.freedesktop.org/series/44290/
State : success

== Summary ==

= CI Bug Log - changes from CI_DRM_4281 -> Patchwork_9209 =

== Summary - SUCCESS ==

  No regressions found.

  External URL: https://patchwork.freedesktop.org/api/1.0/series/44290/revisions/1/mbox/

== Known issues ==

  Here are the changes found in Patchwork_9209 that come from known issues:

  === IGT changes ===

    ==== Issues hit ====

    igt@gem_mmap_gtt@basic-small-bo-tiledx:
      fi-gdg-551:         PASS -> FAIL (fdo#102575)

    igt@gem_mmap_gtt@basic-small-copy-xy:
      fi-glk-j4005:       PASS -> DMESG-WARN (fdo#105719)

    igt@kms_flip@basic-flip-vs-modeset:
      fi-glk-j4005:       PASS -> DMESG-WARN (fdo#106000) +1

    igt@prime_vgem@basic-fence-flip:
      fi-ilk-650:         PASS -> FAIL (fdo#104008)

    
    ==== Possible fixes ====

    igt@kms_frontbuffer_tracking@basic:
      fi-glk-j4005:       DMESG-WARN (fdo#106097) -> PASS

    
  fdo#102575 https://bugs.freedesktop.org/show_bug.cgi?id=102575
  fdo#104008 https://bugs.freedesktop.org/show_bug.cgi?id=104008
  fdo#105719 https://bugs.freedesktop.org/show_bug.cgi?id=105719
  fdo#106000 https://bugs.freedesktop.org/show_bug.cgi?id=106000
  fdo#106097 https://bugs.freedesktop.org/show_bug.cgi?id=106097


== Participating hosts (40 -> 37) ==

  Additional (1): fi-cnl-y3 
  Missing    (4): fi-ctg-p8600 fi-ilk-m540 fi-byt-squawks fi-skl-6700hq 


== Build changes ==

    * Linux: CI_DRM_4281 -> Patchwork_9209

  CI_DRM_4281: b2c949c853cfc65073492bba5b96ef54c9886b17 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGT_4508: 78a68c905066beeefd24b3a4518d817a811e8798 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
  Patchwork_9209: 37762d5da514dafd37542526273485657d230c2d @ git://anongit.freedesktop.org/gfx-ci/linux


== Linux commits ==

37762d5da514 drm/i915: add support for perf configuration queries

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_9209/issues.html
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* ✓ Fi.CI.IGT: success for drm/i915: add support for perf configuration queries
  2018-06-05 16:18 [PATCH] drm/i915: add support for perf configuration queries Lionel Landwerlin
                   ` (2 preceding siblings ...)
  2018-06-05 18:03 ` ✓ Fi.CI.BAT: success " Patchwork
@ 2018-06-06  2:18 ` Patchwork
  2018-06-06 18:39 ` [PATCH] " kbuild test robot
  4 siblings, 0 replies; 6+ messages in thread
From: Patchwork @ 2018-06-06  2:18 UTC (permalink / raw)
  To: Lionel Landwerlin; +Cc: intel-gfx

== Series Details ==

Series: drm/i915: add support for perf configuration queries
URL   : https://patchwork.freedesktop.org/series/44290/
State : success

== Summary ==

= CI Bug Log - changes from CI_DRM_4281_full -> Patchwork_9209_full =

== Summary - WARNING ==

  Minor unknown changes coming with Patchwork_9209_full need to be verified
  manually.
  
  If you think the reported changes have nothing to do with the changes
  introduced in Patchwork_9209_full, please notify your bug team to allow them
  to document this new failure mode, which will reduce false positives in CI.

  External URL: https://patchwork.freedesktop.org/api/1.0/series/44290/revisions/1/mbox/

== Possible new issues ==

  Here are the unknown changes that may have been introduced in Patchwork_9209_full:

  === IGT changes ===

    ==== Warnings ====

    igt@gem_mocs_settings@mocs-rc6-render:
      shard-kbl:          SKIP -> PASS +1

    igt@kms_cursor_crc@cursor-128x128-offscreen:
      shard-snb:          PASS -> SKIP +2

    
== Known issues ==

  Here are the changes found in Patchwork_9209_full that come from known issues:

  === IGT changes ===

    ==== Issues hit ====

    igt@drv_selftest@live_gtt:
      shard-kbl:          PASS -> INCOMPLETE (fdo#103665)

    igt@gem_exec_basic@gtt-vebox:
      shard-snb:          SKIP -> INCOMPLETE (fdo#105411)

    igt@kms_cursor_crc@cursor-128x128-suspend:
      shard-apl:          PASS -> INCOMPLETE (fdo#103927)

    igt@kms_flip@modeset-vs-vblank-race-interruptible:
      shard-hsw:          PASS -> FAIL (fdo#103060)

    igt@kms_flip_tiling@flip-y-tiled:
      shard-glk:          PASS -> FAIL (fdo#104724, fdo#103822)

    
    ==== Possible fixes ====

    igt@kms_atomic_transition@1x-modeset-transitions-nonblocking-fencing:
      shard-glk:          FAIL (fdo#105703) -> PASS

    igt@kms_flip@flip-vs-absolute-wf_vblank:
      shard-hsw:          FAIL (fdo#100368) -> PASS

    igt@kms_flip@flip-vs-expired-vblank:
      shard-hsw:          FAIL (fdo#105189) -> PASS

    igt@kms_flip_tiling@flip-to-x-tiled:
      shard-glk:          FAIL (fdo#104724) -> PASS

    
  fdo#100368 https://bugs.freedesktop.org/show_bug.cgi?id=100368
  fdo#103060 https://bugs.freedesktop.org/show_bug.cgi?id=103060
  fdo#103665 https://bugs.freedesktop.org/show_bug.cgi?id=103665
  fdo#103822 https://bugs.freedesktop.org/show_bug.cgi?id=103822
  fdo#103927 https://bugs.freedesktop.org/show_bug.cgi?id=103927
  fdo#104724 https://bugs.freedesktop.org/show_bug.cgi?id=104724
  fdo#105189 https://bugs.freedesktop.org/show_bug.cgi?id=105189
  fdo#105411 https://bugs.freedesktop.org/show_bug.cgi?id=105411
  fdo#105703 https://bugs.freedesktop.org/show_bug.cgi?id=105703


== Participating hosts (5 -> 5) ==

  No changes in participating hosts


== Build changes ==

    * Linux: CI_DRM_4281 -> Patchwork_9209

  CI_DRM_4281: b2c949c853cfc65073492bba5b96ef54c9886b17 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGT_4508: 78a68c905066beeefd24b3a4518d817a811e8798 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
  Patchwork_9209: 37762d5da514dafd37542526273485657d230c2d @ git://anongit.freedesktop.org/gfx-ci/linux

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_9209/shards.html
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: [PATCH] drm/i915: add support for perf configuration queries
  2018-06-05 16:18 [PATCH] drm/i915: add support for perf configuration queries Lionel Landwerlin
                   ` (3 preceding siblings ...)
  2018-06-06  2:18 ` ✓ Fi.CI.IGT: " Patchwork
@ 2018-06-06 18:39 ` kbuild test robot
  4 siblings, 0 replies; 6+ messages in thread
From: kbuild test robot @ 2018-06-06 18:39 UTC (permalink / raw)
  To: Lionel Landwerlin; +Cc: intel-gfx, kbuild-all

Hi Lionel,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on drm-intel/for-linux-next]
[also build test WARNING on next-20180605]
[cannot apply to v4.17]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Lionel-Landwerlin/drm-i915-add-support-for-perf-configuration-queries/20180607-004646
base:   git://anongit.freedesktop.org/drm-intel for-linux-next
reproduce:
        # apt-get install sparse
        make ARCH=x86_64 allmodconfig
        make C=1 CF=-D__CHECK_ENDIAN__


sparse warnings: (new ones prefixed by >>)

>> drivers/gpu/drm/i915/i915_query.c:99:14: sparse: incorrect type in argument 1 (different base types) @@    expected void const volatile [noderef] <asn:1>*<noident> @@    got unsvoid const volatile [noderef] <asn:1>*<noident> @@
   drivers/gpu/drm/i915/i915_query.c:99:14:    expected void const volatile [noderef] <asn:1>*<noident>
   drivers/gpu/drm/i915/i915_query.c:99:14:    got unsigned long long [unsigned] [usertype] user_regs_ptr

vim +99 drivers/gpu/drm/i915/i915_query.c

    84	
    85	static int can_copy_perf_config_registers_or_number(u32 user_n_regs,
    86							    u64 user_regs_ptr,
    87							    u32 kernel_n_regs)
    88	{
    89		/*
    90		 * We'll just put the number of registers, and won't copy the
    91		 * register.
    92		 */
    93		if (user_n_regs == 0)
    94			return 0;
    95	
    96		if (user_n_regs < kernel_n_regs)
    97			return -EINVAL;
    98	
  > 99		if (!access_ok(VERIFY_WRITE, user_regs_ptr,
   100			       2 * sizeof(u32) * kernel_n_regs))
   101			return -EFAULT;
   102	
   103		return 0;
   104	}
   105	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

end of thread, other threads:[~2018-06-06 18:39 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-06-05 16:18 [PATCH] drm/i915: add support for perf configuration queries Lionel Landwerlin
2018-06-05 17:47 ` ✗ Fi.CI.CHECKPATCH: warning for " Patchwork
2018-06-05 17:48 ` ✗ Fi.CI.SPARSE: " Patchwork
2018-06-05 18:03 ` ✓ Fi.CI.BAT: success " Patchwork
2018-06-06  2:18 ` ✓ Fi.CI.IGT: " Patchwork
2018-06-06 18:39 ` [PATCH] " kbuild test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.