Skip to contentSkip to conversation

drm/i915: debugfs device parameters

PATCH In review Jani Nikula 4 participants 15 messages Dec 5, 2019 – Jan 15, 2020

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

cover drm/i915: debugfs device parameters

This is based on patches I sent over a year ago, adding device parameters to debugfs.

This would be the first step, making the debugfs only an alternative interface to the module parameters. The path forward would be:

* Add debugfs interface to parameters (this patch)

* Modify IGT to use this debugfs param interface if available, falling back to module param sysfs (for older kernels)

* Make module params read-only

* Make module params the initial values for really device specific parameters, i.e. duplicate the params struct in dev_priv and have the debugfs interface modify only that

* Start axing out unnecessary module parameters that can live in debugfs only

I tested this stuff way back when, this is an untested rebase for comments.

BR,
Jani.

Jani Nikula (2):
drm/i915/params: add i915 parameters to debugfs drm/i915/params: support bool values for int and uint params

 drivers/gpu/drm/i915/Makefile              |   5 +-
 drivers/gpu/drm/i915/i915_debugfs.c        |   4 +-
 drivers/gpu/drm/i915/i915_debugfs_params.c | 247 +++++++++++++++++++++
 drivers/gpu/drm/i915/i915_debugfs_params.h |  14 ++
 drivers/gpu/drm/i915/i915_params.c         |   2 +-
 drivers/gpu/drm/i915/i915_params.h         |  76 ++++---
 6 files changed, 308 insertions(+), 40 deletions(-)
 create mode 100644 drivers/gpu/drm/i915/i915_debugfs_params.c
 create mode 100644 drivers/gpu/drm/i915/i915_debugfs_params.h
Signature · 6 lines
2.20.1

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#1 lore raw

PATCH 1/2 drm/i915/params: add i915 parameters to debugfs

Add a debugfs subdirectory i915_params with all the i915 module parameters. This is a first step, with lots of boilerplate, and not much benefit yet.

This will result in a new device specific debugfs directory at /sys/kernel/debug/dri/<N>/i915_params duplicating the module specific sysfs directory at /sys/module/i915/parameters/. Going forward, all users of the parameters should use the debugfs, with the module parameters being phased out.

Add debugfs permissions to I915_PARAMS_FOR_EACH(). This duplicates the mode with module parameter sysfs, but the goal is to make the module parameters read-only initial values for device specific parameters.

0 mode will bypass debugfs creation. Use it for verbose_state_checks which will need special attention in follow-up work.

---
 drivers/gpu/drm/i915/Makefile              |   5 +-
 drivers/gpu/drm/i915/i915_debugfs.c        |   4 +-
 drivers/gpu/drm/i915/i915_debugfs_params.c | 233 +++++++++++++++++++++
 drivers/gpu/drm/i915/i915_debugfs_params.h |  14 ++
 drivers/gpu/drm/i915/i915_params.c         |   2 +-
 drivers/gpu/drm/i915/i915_params.h         |  76 +++----
 6 files changed, 294 insertions(+), 40 deletions(-)
 create mode 100644 drivers/gpu/drm/i915/i915_debugfs_params.c
 create mode 100644 drivers/gpu/drm/i915/i915_debugfs_params.h
drivers/gpu/drm/i915/Makefile +4 -1
index e0fd10c0cfb8..db4bf6ae9127 100644
@@ -69,7 +69,10 @@ i915-y += \
 	i915_user_extensions.o
 
 i915-$(CONFIG_COMPAT)   += i915_ioc32.o
-i915-$(CONFIG_DEBUG_FS) += i915_debugfs.o display/intel_pipe_crc.o
+i915-$(CONFIG_DEBUG_FS) += \
+	i915_debugfs.o \
+	i915_debugfs_params.o \
+	display/intel_pipe_crc.o
 i915-$(CONFIG_PERF_EVENTS) += i915_pmu.o
 
 # "Graphics Technology" (aka we talk to the gpu)
drivers/gpu/drm/i915/i915_debugfs.c +3 -1
index eb80a2c4b55b..b50af2f7865f 100644
@@ -48,6 +48,7 @@
 #include "gt/uc/intel_guc_submission.h"
 
 #include "i915_debugfs.h"
+#include "i915_debugfs_params.h"
 #include "i915_irq.h"
 #include "i915_trace.h"
 #include "intel_csr.h"
@@ -4352,9 +4353,10 @@ int i915_debugfs_register(struct drm_i915_private *dev_priv)
 	struct drm_minor *minor = dev_priv->drm.primary;
 	int i;
 
+	i915_debugfs_params(dev_priv);
+
 	debugfs_create_file("i915_forcewake_user", S_IRUSR, minor->debugfs_root,
 			    to_i915(minor->dev), &i915_forcewake_fops);
-
 	for (i = 0; i < ARRAY_SIZE(i915_debugfs_files); i++) {
 		debugfs_create_file(i915_debugfs_files[i].name,
 				    S_IRUGO | S_IWUSR,
drivers/gpu/drm/i915/i915_debugfs_params.c new file +233 -0

233 lines not on this page · raw message

drivers/gpu/drm/i915/i915_debugfs_params.h new file +14 -0
new file mode 100644
index 000000000000..66567076546b
@@ -0,0 +1,14 @@
+/* SPDX-License-Identifier: MIT */
+/*
+ * Copyright © 2019 Intel Corporation
+ */
+
+#ifndef __I915_DEBUGFS_PARAMS__
+#define __I915_DEBUGFS_PARAMS__
+
+struct dentry;
+struct drm_i915_private;
+
+struct dentry *i915_debugfs_params(struct drm_i915_private *i915);
+
+#endif /* __I915_DEBUGFS_PARAMS__ */
drivers/gpu/drm/i915/i915_params.c +1 -1
index 1dd1f3652795..64009e99073d 100644
@@ -35,7 +35,7 @@
 	MODULE_PARM_DESC(name, desc)
 
 struct i915_params i915_modparams __read_mostly = {
-#define MEMBER(T, member, value) .member = (value),
+#define MEMBER(T, member, value, ...) .member = (value),
 	I915_PARAMS_FOR_EACH(MEMBER)
 #undef MEMBER
 };
drivers/gpu/drm/i915/i915_params.h +39 -37

88 lines not on this page · raw message

Signature · 6 lines
2.20.1

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#9 lore raw

PATCH 2/2 drm/i915/params: support bool values for int and uint params

In reply to Jani Nikula

It's not uncommon for us to switch param types between bools and ints, often having otherwise bool semantics but -1 value for platform default. Allow bool values (such as YyNn) for ints.

---
 drivers/gpu/drm/i915/i915_debugfs_params.c | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
drivers/gpu/drm/i915/i915_debugfs_params.c +14 -0
index 7f1af5a35ca1..9acb755714cf 100644
@@ -32,6 +32,13 @@ static ssize_t i915_param_int_write(struct file *file,
 	int ret;
 
 	ret = kstrtoint_from_user(ubuf, len, 0, value);
+	if (ret) {
+		/* support boolean values too */
+		bool b;
+		ret = kstrtobool_from_user(ubuf, len, &b);
+		if (!ret)
+			*value = b;
+	}
 
 	return ret ?: len;
 }
@@ -77,6 +84,13 @@ static ssize_t i915_param_uint_write(struct file *file,
 	int ret;
 
 	ret = kstrtouint_from_user(ubuf, len, 0, value);
+	if (ret) {
+		/* support boolean values too */
+		bool b;
+		ret = kstrtobool_from_user(ubuf, len, &b);
+		if (!ret)
+			*value = b;
+	}
 
 	return ret ?: len;
 }
Signature · 6 lines
2.20.1

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#2 lore raw

Re: [Intel-gfx] [PATCH 1/2] drm/i915/params: add i915 parameters to debugfs

In reply to Jani Nikula
Quoted 9 lines · Jani Nikula

Add a debugfs subdirectory i915_params with all the i915 module parameters. This is a first step, with lots of boilerplate, and not much benefit yet.

This will result in a new device specific debugfs directory at /sys/kernel/debug/dri/<N>/i915_params duplicating the module specific sysfs directory at /sys/module/i915/parameters/. Going forward, all users of the parameters should use the debugfs, with the module parameters being phased out.

Does it perhaps needs to stay in sysfs (as modparams are)? Unless thinking is there will be no need ever to use one of them in production?

With phasing out of modparams - you will not keep a mechanism to pass in i915_params at boot time, perhaps targeting cards using pci ids?

Regards,

Tvrtko

Quoted 415 lines

Add debugfs permissions to I915_PARAMS_FOR_EACH(). This duplicates the mode with module parameter sysfs, but the goal is to make the module parameters read-only initial values for device specific parameters.

0 mode will bypass debugfs creation. Use it for verbose_state_checks which will need special attention in follow-up work.

---
  drivers/gpu/drm/i915/Makefile              |   5 +-
  drivers/gpu/drm/i915/i915_debugfs.c        |   4 +-
  drivers/gpu/drm/i915/i915_debugfs_params.c | 233 +++++++++++++++++++++
  drivers/gpu/drm/i915/i915_debugfs_params.h |  14 ++
  drivers/gpu/drm/i915/i915_params.c         |   2 +-
  drivers/gpu/drm/i915/i915_params.h         |  76 +++----
  6 files changed, 294 insertions(+), 40 deletions(-)

create mode 100644 drivers/gpu/drm/i915/i915_debugfs_params.c create mode 100644 drivers/gpu/drm/i915/i915_debugfs_params.h

drivers/gpu/drm/i915/Makefile +4 -1
index e0fd10c0cfb8..db4bf6ae9127 100644
@@ -69,7 +69,10 @@ i915-y += \
  	i915_user_extensions.o
 
  i915-$(CONFIG_COMPAT)   += i915_ioc32.o
-i915-$(CONFIG_DEBUG_FS) += i915_debugfs.o display/intel_pipe_crc.o
+i915-$(CONFIG_DEBUG_FS) += \
+	i915_debugfs.o \
+	i915_debugfs_params.o \
+	display/intel_pipe_crc.o
  i915-$(CONFIG_PERF_EVENTS) += i915_pmu.o
 
  # "Graphics Technology" (aka we talk to the gpu)
drivers/gpu/drm/i915/i915_debugfs.c +3 -1
index eb80a2c4b55b..b50af2f7865f 100644
@@ -48,6 +48,7 @@
  #include "gt/uc/intel_guc_submission.h"
 
  #include "i915_debugfs.h"
+#include "i915_debugfs_params.h"
  #include "i915_irq.h"
  #include "i915_trace.h"
  #include "intel_csr.h"
@@ -4352,9 +4353,10 @@ int i915_debugfs_register(struct drm_i915_private *dev_priv)
  	struct drm_minor *minor = dev_priv->drm.primary;
  	int i;
 
+	i915_debugfs_params(dev_priv);
+
  	debugfs_create_file("i915_forcewake_user", S_IRUSR, minor->debugfs_root,
  			    to_i915(minor->dev), &i915_forcewake_fops);
-
  	for (i = 0; i < ARRAY_SIZE(i915_debugfs_files); i++) {
  		debugfs_create_file(i915_debugfs_files[i].name,
  				    S_IRUGO | S_IWUSR,
drivers/gpu/drm/i915/i915_debugfs_params.c new file +233 -0
new file mode 100644
index 000000000000..7f1af5a35ca1
@@ -0,0 +1,233 @@
+// SPDX-License-Identifier: MIT
+/*
+ * Copyright © 2019 Intel Corporation
+ */
+
+#include <linux/kernel.h>
+
+#include "i915_drv.h"
+#include "i915_params.h"
+
+/* int param */
+static int i915_param_int_show(struct seq_file *m, void *data)
+{
+	int *value = m->private;
+
+	seq_printf(m, "%d\n", *value);
+
+	return 0;
+}
+
+static int i915_param_int_open(struct inode *inode, struct file *file)
+{
+	return single_open(file, i915_param_int_show, inode->i_private);
+}
+
+static ssize_t i915_param_int_write(struct file *file,
+				    const char __user *ubuf, size_t len,
+				    loff_t *offp)
+{
+	struct seq_file *m = file->private_data;
+	int *value = m->private;
+	int ret;
+
+	ret = kstrtoint_from_user(ubuf, len, 0, value);
+
+	return ret ?: len;
+}
+
+static const struct file_operations i915_param_int_fops = {
+	.owner = THIS_MODULE,
+	.open = i915_param_int_open,
+	.read = seq_read,
+	.write = i915_param_int_write,
+	.llseek = default_llseek,
+	.release = single_release,
+};
+
+static const struct file_operations i915_param_int_fops_ro = {
+	.owner = THIS_MODULE,
+	.open = i915_param_int_open,
+	.read = seq_read,
+	.llseek = default_llseek,
+	.release = single_release,
+};
+
+/* unsigned int param */
+static int i915_param_uint_show(struct seq_file *m, void *data)
+{
+	unsigned int *value = m->private;
+
+	seq_printf(m, "%u\n", *value);
+
+	return 0;
+}
+
+static int i915_param_uint_open(struct inode *inode, struct file *file)
+{
+	return single_open(file, i915_param_uint_show, inode->i_private);
+}
+
+static ssize_t i915_param_uint_write(struct file *file,
+				     const char __user *ubuf, size_t len,
+				     loff_t *offp)
+{
+	struct seq_file *m = file->private_data;
+	unsigned int *value = m->private;
+	int ret;
+
+	ret = kstrtouint_from_user(ubuf, len, 0, value);
+
+	return ret ?: len;
+}
+
+static const struct file_operations i915_param_uint_fops = {
+	.owner = THIS_MODULE,
+	.open = i915_param_uint_open,
+	.read = seq_read,
+	.write = i915_param_uint_write,
+	.llseek = default_llseek,
+	.release = single_release,
+};
+
+static const struct file_operations i915_param_uint_fops_ro = {
+	.owner = THIS_MODULE,
+	.open = i915_param_uint_open,
+	.read = seq_read,
+	.llseek = default_llseek,
+	.release = single_release,
+};
+
+/* char * param */
+static int i915_param_charp_show(struct seq_file *m, void *data)
+{
+	const char **s = m->private;
+
+	seq_printf(m, "%s\n", *s);
+
+	return 0;
+}
+
+static int i915_param_charp_open(struct inode *inode, struct file *file)
+{
+	return single_open(file, i915_param_charp_show, inode->i_private);
+}
+
+static ssize_t i915_param_charp_write(struct file *file,
+				      const char __user *ubuf, size_t len,
+				      loff_t *offp)
+{
+	struct seq_file *m = file->private_data;
+	char **s = m->private;
+	char *new, *old;
+
+	/* FIXME: remove locking after params aren't the module params */
+	kernel_param_lock(THIS_MODULE);
+
+	old = *s;
+	new = strndup_user(ubuf, PAGE_SIZE);
+	if (IS_ERR(new)) {
+		len = PTR_ERR(new);
+		goto out;
+	}
+
+	*s = new;
+
+	kfree(old);
+out:
+	kernel_param_unlock(THIS_MODULE);
+
+	return len;
+}
+
+static const struct file_operations i915_param_charp_fops = {
+	.owner = THIS_MODULE,
+	.open = i915_param_charp_open,
+	.read = seq_read,
+	.write = i915_param_charp_write,
+	.llseek = default_llseek,
+	.release = single_release,
+};
+
+static const struct file_operations i915_param_charp_fops_ro = {
+	.owner = THIS_MODULE,
+	.open = i915_param_charp_open,
+	.read = seq_read,
+	.llseek = default_llseek,
+	.release = single_release,
+};
+
+#define RO(mode) (((mode) & 0222) == 0)
+
+static struct dentry *
+i915_debugfs_create_int(const char *name, umode_t mode,
+			struct dentry *parent, int *value)
+{
+	return debugfs_create_file_unsafe(name, mode, parent, value,
+					  RO(mode) ? &i915_param_int_fops_ro :
+					  &i915_param_int_fops);
+}
+
+static struct dentry *
+i915_debugfs_create_uint(const char *name, umode_t mode,
+			 struct dentry *parent, unsigned int *value)
+{
+	return debugfs_create_file_unsafe(name, mode, parent, value,
+					  RO(mode) ? &i915_param_uint_fops_ro :
+					  &i915_param_uint_fops);
+}
+
+static struct dentry *
+i915_debugfs_create_charp(const char *name, umode_t mode,
+			  struct dentry *parent, char **value)
+{
+	return debugfs_create_file(name, mode, parent, value,
+				   RO(mode) ? &i915_param_charp_fops_ro :
+				   &i915_param_charp_fops);
+}
+
+static __always_inline void
+_i915_param_create_file(struct dentry *parent, const char *name,
+			const char *type, int mode, void *value)
+{
+	if (!mode)
+		return;
+
+	if (!__builtin_strcmp(type, "bool"))
+		debugfs_create_bool(name, mode, parent, value);
+	else if (!__builtin_strcmp(type, "int"))
+		i915_debugfs_create_int(name, mode, parent, value);
+	else if (!__builtin_strcmp(type, "unsigned int"))
+		i915_debugfs_create_uint(name, mode, parent, value);
+	else if (!__builtin_strcmp(type, "unsigned long"))
+		debugfs_create_ulong(name, mode, parent, value);
+	else if (!__builtin_strcmp(type, "char *"))
+		i915_debugfs_create_charp(name, mode, parent, value);
+	else
+		WARN(1, "no debugfs fops defined for param type %s (i915.%s)\n",
+		     type, name);
+}
+
+/* add a subdirectory with files for each i915 param */
+struct dentry *i915_debugfs_params(struct drm_i915_private *i915)
+{
+	struct drm_minor *minor = i915->drm.primary;
+	struct i915_params *params = &i915_modparams;
+	struct dentry *dir;
+
+	dir = debugfs_create_dir("i915_params", minor->debugfs_root);
+	if (IS_ERR(dir))
+		return dir;
+
+	/*
+	 * Note: We could create files for params needing special handling
+	 * here. Set mode in params to 0 to skip the generic create file, or
+	 * just let the generic create file fail silently with -EEXIST.
+	 */
+
+#define REGISTER(T, x, unused, mode, ...) _i915_param_create_file(dir, #x, #T, mode, &params->x);
+	I915_PARAMS_FOR_EACH(REGISTER);
+#undef REGISTER
+
+	return dir;
+}
drivers/gpu/drm/i915/i915_debugfs_params.h new file +14 -0
new file mode 100644
index 000000000000..66567076546b
@@ -0,0 +1,14 @@
+/* SPDX-License-Identifier: MIT */
+/*
+ * Copyright © 2019 Intel Corporation
+ */
+
+#ifndef __I915_DEBUGFS_PARAMS__
+#define __I915_DEBUGFS_PARAMS__
+
+struct dentry;
+struct drm_i915_private;
+
+struct dentry *i915_debugfs_params(struct drm_i915_private *i915);
+
+#endif /* __I915_DEBUGFS_PARAMS__ */
drivers/gpu/drm/i915/i915_params.c +1 -1
index 1dd1f3652795..64009e99073d 100644
@@ -35,7 +35,7 @@
  	MODULE_PARM_DESC(name, desc)
 
  struct i915_params i915_modparams __read_mostly = {
-#define MEMBER(T, member, value) .member = (value),
+#define MEMBER(T, member, value, ...) .member = (value),
  	I915_PARAMS_FOR_EACH(MEMBER)
  #undef MEMBER
  };
drivers/gpu/drm/i915/i915_params.h +32 -37
index 31b88f297fbc..be6089e4f9e6 100644
@@ -36,49 +36,51 @@ struct drm_printer;
  /*
   * Invoke param, a function-like macro, for each i915 param, with arguments:
   *
- * param(type, name, value)
+ * param(type, name, value, mode)
   *
- * type: parameter type, one of {bool, int, unsigned int, char *}
+ * type: parameter type, one of {bool, int, unsigned int, unsigned long, char *}
   * name: name of the parameter
   * value: initial/default value of the parameter
+ * mode: debugfs file permissions, one of {0400, 0600, 0}, use 0 to not create
+ *       debugfs file
   */
  #define I915_PARAMS_FOR_EACH(param) \
-	param(char *, vbt_firmware, NULL) \
-	param(int, modeset, -1) \
-	param(int, lvds_channel_mode, 0) \
-	param(int, panel_use_ssc, -1) \
-	param(int, vbt_sdvo_panel_type, -1) \
-	param(int, enable_dc, -1) \
-	param(int, enable_fbc, -1) \
-	param(int, enable_psr, -1) \
-	param(int, disable_power_well, -1) \
-	param(int, enable_ips, 1) \
-	param(int, invert_brightness, 0) \
-	param(int, enable_guc, 0) \
-	param(int, guc_log_level, -1) \
-	param(char *, guc_firmware_path, NULL) \
-	param(char *, huc_firmware_path, NULL) \
-	param(char *, dmc_firmware_path, NULL) \
-	param(int, mmio_debug, -IS_ENABLED(CONFIG_DRM_I915_DEBUG_MMIO)) \
-	param(int, edp_vswing, 0) \
-	param(int, reset, 3) \
-	param(unsigned int, inject_probe_failure, 0) \
-	param(int, fastboot, -1) \
-	param(int, enable_dpcd_backlight, 0) \
-	param(char *, force_probe, CONFIG_DRM_I915_FORCE_PROBE) \
-	param(unsigned long, fake_lmem_start, 0) \
+	param(char *, vbt_firmware, NULL, 0400) \
+	param(int, modeset, -1, 0400) \
+	param(int, lvds_channel_mode, 0, 0400) \
+	param(int, panel_use_ssc, -1, 0600) \
+	param(int, vbt_sdvo_panel_type, -1, 0400) \
+	param(int, enable_dc, -1, 0400) \
+	param(int, enable_fbc, -1, 0600) \
+	param(int, enable_psr, -1, 0600) \
+	param(int, disable_power_well, -1, 0400) \
+	param(int, enable_ips, 1, 0600) \
+	param(int, invert_brightness, 0, 0600) \
+	param(int, enable_guc, 0, 0400) \
+	param(int, guc_log_level, -1, 0400) \
+	param(char *, guc_firmware_path, NULL, 0400) \
+	param(char *, huc_firmware_path, NULL, 0400) \
+	param(char *, dmc_firmware_path, NULL, 0400) \
+	param(int, mmio_debug, -IS_ENABLED(CONFIG_DRM_I915_DEBUG_MMIO), 0600) \
+	param(int, edp_vswing, 0, 0400) \
+	param(int, reset, 3, 0600) \
+	param(unsigned int, inject_probe_failure, 0, 0600) \
+	param(int, fastboot, -1, 0600) \
+	param(int, enable_dpcd_backlight, 0, 0600) \
+	param(char *, force_probe, CONFIG_DRM_I915_FORCE_PROBE, 0400) \
+	param(unsigned long, fake_lmem_start, 0, 0400) \
  	/* leave bools at the end to not create holes */ \
-	param(bool, alpha_support, IS_ENABLED(CONFIG_DRM_I915_ALPHA_SUPPORT)) \
-	param(bool, enable_hangcheck, true) \
-	param(bool, prefault_disable, false) \
-	param(bool, load_detect_test, false) \
-	param(bool, force_reset_modeset_test, false) \
-	param(bool, error_capture, true) \
-	param(bool, disable_display, false) \
-	param(bool, verbose_state_checks, true) \
-	param(bool, nuclear_pageflip, false) \
-	param(bool, enable_dp_mst, true) \
-	param(bool, enable_gvt, false)
+	param(bool, alpha_support, IS_ENABLED(CONFIG_DRM_I915_ALPHA_SUPPORT), 0400) \
+	param(bool, enable_hangcheck, true, 0600) \
+	param(bool, prefault_disable, false, 0600) \
+	param(bool, load_detect_test, false, 0600) \

drivers/gpu/drm/i915/i915_params.h struct drm_printer; · line 86

Quoted 10 lines
drivers/gpu/drm/i915/i915_params.h +7 -0
+	param(bool, force_reset_modeset_test, false, 0600) \
+	param(bool, error_capture, true, 0600) \
+	param(bool, disable_display, false, 0400) \
+	param(bool, verbose_state_checks, true, 0) \
+	param(bool, nuclear_pageflip, false, 0400) \
+	param(bool, enable_dp_mst, true, 0600) \
+	param(bool, enable_gvt, false, 0400)
 
  #define MEMBER(T, member, ...) T member;
  struct i915_params {

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#11 lore raw

[Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915: debugfs device parameters

In reply to Jani Nikula
== Series Details ==

== Series Details ==

Series: drm/i915: debugfs device parameters
URL : https://patchwork.freedesktop.org/series/70502/
State : warning

== Summary ==

$ dim checkpatch origin/drm-tip
9f8f858a3391 drm/i915/params: add i915 parameters to debugfs
-:66: WARNING:FILE_PATH_CHANGES: added, moved or deleted file(s), does MAINTAINERS need updating?
#66: 
new file mode 100644

-:298: CHECK:MACRO_ARG_PRECEDENCE: Macro argument 'x' may be better as '(x)' to avoid precedence issues #298: FILE: drivers/gpu/drm/i915/i915_debugfs_params.c:228:
+#define REGISTER(T, x, unused, mode, ...) _i915_param_create_file(dir, #x, #T, mode, &params->x);

-:298: WARNING:TRAILING_SEMICOLON: macros should not use a trailing semicolon #298: FILE: drivers/gpu/drm/i915/i915_debugfs_params.c:228:
+#define REGISTER(T, x, unused, mode, ...) _i915_param_create_file(dir, #x, #T, mode, &params->x);

total: 0 errors, 2 warnings, 1 checks, 372 lines checked 7db14ea24487 drm/i915/params: support bool values for int and uint params -:23: WARNING:LINE_SPACING: Missing a blank line after declarations #23: FILE: drivers/gpu/drm/i915/i915_debugfs_params.c:38:
+ bool b;
+ ret = kstrtobool_from_user(ubuf, len, &b);

-:37: WARNING:LINE_SPACING: Missing a blank line after declarations #37: FILE: drivers/gpu/drm/i915/i915_debugfs_params.c:90:
+ bool b;
+ ret = kstrtobool_from_user(ubuf, len, &b);

total: 0 errors, 2 warnings, 0 checks, 26 lines checked

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#12 lore raw

[Intel-gfx] ✗ Fi.CI.SPARSE: warning for drm/i915: debugfs device parameters

In reply to Jani Nikula
== Series Details ==

== Series Details ==

Series: drm/i915: debugfs device parameters
URL : https://patchwork.freedesktop.org/series/70502/
State : warning

== Summary ==

$ dim sparse origin/drm-tip
Sparse version: v0.6.0
Commit: drm/i915/params: add i915 parameters to debugfs
+drivers/gpu/drm/i915/i915_debugfs_params.c:212:15: warning: symbol 'i915_debugfs_params' was not declared. Should it be static?

Commit: drm/i915/params: support bool values for int and uint params Okay!

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#13 lore raw

[Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915: debugfs device parameters

In reply to Jani Nikula
== Series Details ==

== Series Details ==

Series: drm/i915: debugfs device parameters
URL : https://patchwork.freedesktop.org/series/70502/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_7491 -> Patchwork_15608
====================================================

Summary
-------

**SUCCESS**

No regressions found.

External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15608/index.html

Known issues
------------

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

### IGT changes ###

#### Issues hit ####

* igt@i915_selftest@live_gem_contexts:
- fi-byt-j1900: [PASS][1] -> [INCOMPLETE][2] ([i915#45])
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7491/fi-byt-j1900/igt@i915_selftest@live_gem_contexts.html
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15608/fi-byt-j1900/igt@i915_selftest@live_gem_contexts.html

* igt@kms_chamelium@hdmi-hpd-fast:
- fi-kbl-7500u: [PASS][3] -> [FAIL][4] ([fdo#111407])
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7491/fi-kbl-7500u/igt@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15608/fi-kbl-7500u/igt@[email protected]

#### Possible fixes ####

* igt@gem_close_race@basic-threads:
- {fi-tgl-guc}: [INCOMPLETE][5] ([i915#435]) -> [PASS][6]
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7491/fi-tgl-guc/igt@[email protected]
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15608/fi-tgl-guc/igt@[email protected]

* igt@i915_selftest@live_gem_contexts:
- fi-hsw-peppy: [INCOMPLETE][7] ([i915#694]) -> [PASS][8]
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7491/fi-hsw-peppy/igt@i915_selftest@live_gem_contexts.html
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15608/fi-hsw-peppy/igt@i915_selftest@live_gem_contexts.html

#### Warnings ####

* igt@gem_exec_suspend@basic-s3:
- fi-kbl-x1275: [DMESG-WARN][9] ([i915#62] / [i915#92]) -> [DMESG-WARN][10] ([i915#62] / [i915#92] / [i915#95]) +5 similar issues
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7491/fi-kbl-x1275/igt@[email protected]
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15608/fi-kbl-x1275/igt@[email protected]

* igt@gem_exec_suspend@basic-s4-devices:
- fi-kbl-x1275: [DMESG-WARN][11] ([fdo#107139] / [i915#62] / [i915#92]) -> [DMESG-WARN][12] ([fdo#107139] / [i915#62] / [i915#92] / [i915#95])
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7491/fi-kbl-x1275/igt@[email protected]
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15608/fi-kbl-x1275/igt@[email protected]

* igt@i915_selftest@live_blt:
- fi-hsw-4770r: [DMESG-FAIL][13] ([i915#683]) -> [DMESG-FAIL][14] ([i915#563])
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7491/fi-hsw-4770r/igt@i915_selftest@live_blt.html
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15608/fi-hsw-4770r/igt@i915_selftest@live_blt.html

* igt@kms_cursor_legacy@basic-busy-flip-before-cursor-legacy:
- fi-kbl-x1275: [DMESG-WARN][15] ([i915#62] / [i915#92] / [i915#95]) -> [DMESG-WARN][16] ([i915#62] / [i915#92]) +7 similar issues
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7491/fi-kbl-x1275/igt@[email protected]
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15608/fi-kbl-x1275/igt@[email protected]

{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).

[fdo#107139]: https://bugs.freedesktop.org/show_bug.cgi?id=107139
[fdo#111407]: https://bugs.freedesktop.org/show_bug.cgi?id=111407
[i915#109]: https://gitlab.freedesktop.org/drm/intel/issues/109
[i915#435]: https://gitlab.freedesktop.org/drm/intel/issues/435
[i915#45]: https://gitlab.freedesktop.org/drm/intel/issues/45
[i915#563]: https://gitlab.freedesktop.org/drm/intel/issues/563
[i915#62]: https://gitlab.freedesktop.org/drm/intel/issues/62
[i915#683]: https://gitlab.freedesktop.org/drm/intel/issues/683
[i915#694]: https://gitlab.freedesktop.org/drm/intel/issues/694
[i915#710]: https://gitlab.freedesktop.org/drm/intel/issues/710
[i915#92]: https://gitlab.freedesktop.org/drm/intel/issues/92
[i915#95]: https://gitlab.freedesktop.org/drm/intel/issues/95

Participating hosts (53 -> 47)
------------------------------

Additional (1): fi-bdw-5557u
Missing (7): fi-ilk-m540 fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-ctg-p8600 fi-byt-clapper fi-bdw-samus

Build changes
-------------

* CI: CI-20190529 -> None
* Linux: CI_DRM_7491 -> Patchwork_15608

CI-20190529: 20190529
CI_DRM_7491: ac5e57322614f1c08b00ed9f52153ca12603c637 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_5333: e08522bb09ff1b9720359b3867da7e4aca0bd5f1 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_15608: 7db14ea24487bb2a817750c53a85f7c9d1d9a674 @ git://anongit.freedesktop.org/gfx-ci/linux

== Linux commits ==

7db14ea24487 drm/i915/params: support bool values for int and uint params 9f8f858a3391 drm/i915/params: add i915 parameters to debugfs

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15608/index.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#14 lore raw

[Intel-gfx] ✗ Fi.CI.IGT: failure for drm/i915: debugfs device parameters

In reply to Jani Nikula
== Series Details ==

== Series Details ==

Series: drm/i915: debugfs device parameters
URL : https://patchwork.freedesktop.org/series/70502/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_7491_full -> Patchwork_15608_full
====================================================

Summary
-------

**FAILURE**

Serious unknown changes coming with Patchwork_15608_full absolutely need to be verified manually.

If you think the reported changes have nothing to do with the changes introduced in Patchwork_15608_full, please notify your bug team to allow them to document this new failure mode, which will reduce false positives in CI.

Possible new issues
-------------------

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

### IGT changes ###

#### Possible regressions ####

* igt@gem_exec_parse_blt@allowed-single:
- shard-skl: [PASS][1] -> [DMESG-WARN][2]
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7491/shard-skl1/igt@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15608/shard-skl2/igt@[email protected]

* igt@gem_vm_create@execbuf:
- shard-hsw: [PASS][3] -> [DMESG-WARN][4]
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7491/shard-hsw7/igt@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15608/shard-hsw2/igt@[email protected]

* igt@kms_cursor_crc@pipe-b-cursor-alpha-transparent:
- shard-kbl: [PASS][5] -> [DMESG-WARN][6]
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7491/shard-kbl4/igt@[email protected]
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15608/shard-kbl4/igt@[email protected]

* igt@runner@aborted:
- shard-kbl: NOTRUN -> ([FAIL][7], [FAIL][8]) ([fdo#109383])
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15608/shard-kbl4/igt@[email protected]
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15608/shard-kbl1/igt@[email protected]

Known issues
------------

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

### IGT changes ###

#### Issues hit ####

* igt@gem_ctx_isolation@vecs0-s3:
- shard-tglb: [PASS][9] -> [INCOMPLETE][10] ([i915#456])
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7491/shard-tglb9/igt@[email protected]
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15608/shard-tglb3/igt@[email protected]

* igt@gem_ctx_shared@q-smoketest-all:
- shard-tglb: [PASS][11] -> [INCOMPLETE][12] ([fdo#111735])
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7491/shard-tglb3/igt@[email protected]
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15608/shard-tglb4/igt@[email protected]

* igt@gem_exec_parallel@vcs0-fds:
- shard-tglb: [PASS][13] -> [INCOMPLETE][14] ([i915#470]) +1 similar issue
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7491/shard-tglb3/igt@[email protected]
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15608/shard-tglb4/igt@[email protected]

* igt@gem_exec_schedule@preempt-hang-bsd:
- shard-iclb: [PASS][15] -> [SKIP][16] ([fdo#112146])
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7491/shard-iclb7/igt@[email protected]
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15608/shard-iclb2/igt@[email protected]

* igt@gem_exec_schedule@preempt-queue-bsd2:
- shard-iclb: [PASS][17] -> [SKIP][18] ([fdo#109276]) +1 similar issue
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7491/shard-iclb1/igt@[email protected]
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15608/shard-iclb7/igt@[email protected]

* igt@gem_exec_schedule@preempt-queue-contexts-bsd1:
- shard-tglb: [PASS][19] -> [INCOMPLETE][20] ([fdo#111606] / [fdo#111677])
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7491/shard-tglb8/igt@[email protected]
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15608/shard-tglb6/igt@[email protected]

* igt@gem_persistent_relocs@forked-interruptible-thrashing:
- shard-hsw: [PASS][21] -> [FAIL][22] ([i915#520])
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7491/shard-hsw8/igt@[email protected]
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15608/shard-hsw6/igt@[email protected]

* igt@gem_ppgtt@flink-and-close-vma-leak:
- shard-glk: [PASS][23] -> [FAIL][24] ([i915#644])
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7491/shard-glk5/igt@[email protected]
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15608/shard-glk5/igt@[email protected]
- shard-skl: [PASS][25] -> [FAIL][26] ([i915#644])
[25]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7491/shard-skl5/igt@[email protected]
[26]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15608/shard-skl5/igt@[email protected]

* igt@gem_sync@basic-many-each:
- shard-tglb: [PASS][27] -> [INCOMPLETE][28] ([i915#472] / [i915#707])
[27]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7491/shard-tglb8/igt@[email protected]
[28]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15608/shard-tglb8/igt@[email protected]

* igt@gem_userptr_blits@sync-unmap:
- shard-snb: [PASS][29] -> [DMESG-WARN][30] ([fdo#111870]) +1 similar issue
[29]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7491/shard-snb1/igt@[email protected]
[30]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15608/shard-snb4/igt@[email protected]

* igt@i915_selftest@live_hangcheck:
- shard-snb: [PASS][31] -> [INCOMPLETE][32] ([i915#82])
[31]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7491/shard-snb6/igt@i915_selftest@live_hangcheck.html
[32]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15608/shard-snb4/igt@i915_selftest@live_hangcheck.html

* igt@i915_suspend@sysfs-reader:
- shard-kbl: [PASS][33] -> [DMESG-WARN][34] ([i915#180]) +4 similar issues
[33]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7491/shard-kbl3/igt@[email protected]
[34]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15608/shard-kbl4/igt@[email protected]

* igt@kms_atomic_transition@plane-toggle-modeset-transition:
- shard-snb: [PASS][35] -> [SKIP][36] ([fdo#109271])
[35]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7491/shard-snb6/igt@[email protected]
[36]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15608/shard-snb6/igt@[email protected]

* igt@kms_big_fb@x-tiled-16bpp-rotate-0:
- shard-kbl: [PASS][37] -> [INCOMPLETE][38] ([fdo#103665]) +2 similar issues
[37]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7491/shard-kbl7/igt@[email protected]
[38]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15608/shard-kbl3/igt@[email protected]

* igt@kms_ccs@pipe-a-crc-primary-rotation-180:
- shard-iclb: [PASS][39] -> [INCOMPLETE][40] ([i915#140])
[39]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7491/shard-iclb7/igt@[email protected]
[40]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15608/shard-iclb8/igt@[email protected]

* igt@kms_cursor_crc@pipe-b-cursor-256x256-onscreen:
- shard-skl: [PASS][41] -> [FAIL][42] ([i915#54])
[41]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7491/shard-skl2/igt@[email protected]
[42]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15608/shard-skl7/igt@[email protected]

* igt@kms_cursor_crc@pipe-c-cursor-128x128-onscreen:
- shard-hsw: [PASS][43] -> [DMESG-WARN][44] ([IGT#6])
[43]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7491/shard-hsw2/igt@[email protected]
[44]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15608/shard-hsw6/igt@[email protected]

* igt@kms_draw_crc@draw-method-rgb565-blt-ytiled:
- shard-skl: [PASS][45] -> [DMESG-WARN][46] ([i915#728]) +3 similar issues
[45]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7491/shard-skl2/igt@[email protected]
[46]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15608/shard-skl4/igt@[email protected]

* igt@kms_flip@flip-vs-suspend-interruptible:
- shard-apl: [PASS][47] -> [DMESG-WARN][48] ([i915#180])
[47]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7491/shard-apl4/igt@[email protected]
[48]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15608/shard-apl6/igt@[email protected]

* igt@kms_frontbuffer_tracking@fbc-1p-offscren-pri-shrfb-draw-blt:
- shard-kbl: [PASS][49] -> [DMESG-WARN][50] ([i915#728]) +3 similar issues
[49]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7491/shard-kbl4/igt@[email protected]
[50]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15608/shard-kbl4/igt@[email protected]

* igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-draw-pwrite:
- shard-iclb: [PASS][51] -> [FAIL][52] ([i915#49]) +4 similar issues
[51]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7491/shard-iclb4/igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-draw-pwrite.html
[52]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15608/shard-iclb2/igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-draw-pwrite.html

* igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-spr-indfb-draw-blt:
- shard-tglb: [PASS][53] -> [DMESG-WARN][54] ([i915#728])
[53]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7491/shard-tglb7/igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-spr-indfb-draw-blt.html
[54]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15608/shard-tglb8/igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-spr-indfb-draw-blt.html

* igt@kms_frontbuffer_tracking@psr-1p-primscrn-cur-indfb-draw-mmap-cpu:
- shard-iclb: [PASS][55] -> [INCOMPLETE][56] ([i915#123] / [i915#140])
[55]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7491/shard-iclb1/igt@kms_frontbuffer_tracking@psr-1p-primscrn-cur-indfb-draw-mmap-cpu.html
[56]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15608/shard-iclb7/igt@kms_frontbuffer_tracking@psr-1p-primscrn-cur-indfb-draw-mmap-cpu.html

* igt@kms_frontbuffer_tracking@psr-1p-primscrn-shrfb-pgflip-blt:
- shard-skl: [PASS][57] -> [INCOMPLETE][58] ([i915#123])
[57]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7491/shard-skl1/igt@[email protected]
[58]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15608/shard-skl4/igt@[email protected]

* igt@kms_psr@psr2_sprite_plane_move:
- shard-iclb: [PASS][59] -> [SKIP][60] ([fdo#109441])
[59]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7491/shard-iclb2/igt@kms_psr@psr2_sprite_plane_move.html
[60]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15608/shard-iclb4/igt@kms_psr@psr2_sprite_plane_move.html

* igt@kms_setmode@basic:
- shard-apl: [PASS][61] -> [FAIL][62] ([i915#31])
[61]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7491/shard-apl1/igt@[email protected]
[62]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15608/shard-apl2/igt@[email protected]

* igt@perf_pmu@multi-client-rcs0:
- shard-iclb: [PASS][63] -> [DMESG-WARN][64] ([i915#728])
[63]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7491/shard-iclb6/igt@[email protected]
[64]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15608/shard-iclb6/igt@[email protected]

#### Possible fixes ####

* igt@gem_ctx_isolation@vcs0-s3:
- shard-skl: [INCOMPLETE][65] ([i915#69]) -> [PASS][66]
[65]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7491/shard-skl2/igt@[email protected]
[66]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15608/shard-skl9/igt@[email protected]

* igt@gem_ctx_persistence@vcs1-hostile:
- shard-iclb: [SKIP][67] ([fdo#109276] / [fdo#112080]) -> [PASS][68]
[67]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7491/shard-iclb7/igt@[email protected]
[68]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15608/shard-iclb2/igt@[email protected]

* igt@gem_eio@in-flight-contexts-1us:
- shard-snb: [INCOMPLETE][69] ([i915#82]) -> [PASS][70]
[69]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7491/shard-snb7/igt@[email protected]
[70]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15608/shard-snb1/igt@[email protected]

* igt@gem_exec_nop@basic-sequential:
- shard-tglb: [INCOMPLETE][71] ([i915#435]) -> [PASS][72] +1 similar issue
[71]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7491/shard-tglb6/igt@[email protected]
[72]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15608/shard-tglb4/igt@[email protected]

* igt@gem_exec_parallel@bcs0-fds:
- shard-hsw: [DMESG-WARN][73] -> [PASS][74] +1 similar issue
[73]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7491/shard-hsw6/igt@[email protected]
[74]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15608/shard-hsw2/igt@[email protected]

* igt@gem_exec_schedule@deep-bsd:
- shard-iclb: [SKIP][75] ([fdo#112146]) -> [PASS][76]
[75]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7491/shard-iclb1/igt@[email protected]
[76]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15608/shard-iclb7/igt@[email protected]

* igt@gem_exec_schedule@out-order-bsd2:
- shard-iclb: [SKIP][77] ([fdo#109276]) -> [PASS][78] +2 similar issues
[77]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7491/shard-iclb7/igt@[email protected]
[78]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15608/shard-iclb1/igt@[email protected]

* igt@gem_exec_schedule@smoketest-vebox:
- shard-tglb: [INCOMPLETE][79] ([i915#707]) -> [PASS][80] +1 similar issue
[79]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7491/shard-tglb3/igt@[email protected]
[80]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15608/shard-tglb8/igt@[email protected]

* igt@gem_persistent_relocs@forked-faulting-reloc-thrashing:
- shard-kbl: [INCOMPLETE][81] ([fdo#103665] / [i915#530]) -> [PASS][82]
[81]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7491/shard-kbl6/igt@[email protected]
[82]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15608/shard-kbl1/igt@[email protected]

* igt@gem_persistent_relocs@forked-interruptible-faulting-reloc-thrash-inactive:
- shard-hsw: [TIMEOUT][83] ([i915#530]) -> [PASS][84]
[83]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7491/shard-hsw2/igt@gem_persistent_relocs@forked-interruptible-faulting-reloc-thrash-inactive.html
[84]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15608/shard-hsw1/igt@gem_persistent_relocs@forked-interruptible-faulting-reloc-thrash-inactive.html

* igt@gem_persistent_relocs@forked-interruptible-faulting-reloc-thrashing:
- shard-snb: [TIMEOUT][85] ([i915#530]) -> [PASS][86]
[85]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7491/shard-snb4/igt@gem_persistent_relocs@forked-interruptible-faulting-reloc-thrashing.html
[86]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15608/shard-snb7/igt@gem_persistent_relocs@forked-interruptible-faulting-reloc-thrashing.html

* igt@gem_persistent_relocs@forked-thrashing:
- shard-snb: [FAIL][87] ([i915#520]) -> [PASS][88]
[87]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7491/shard-snb7/igt@[email protected]
[88]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15608/shard-snb2/igt@[email protected]

* igt@gem_ppgtt@blt-vs-render-ctxn:
- shard-tglb: [INCOMPLETE][89] ([i915#470] / [i915#475]) -> [PASS][90]
[89]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7491/shard-tglb6/igt@[email protected]
[90]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15608/shard-tglb7/igt@[email protected]

* igt@gem_userptr_blits@map-fixed-invalidate-busy:
- shard-snb: [DMESG-WARN][91] ([fdo#111870]) -> [PASS][92] +2 similar issues
[91]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7491/shard-snb2/igt@[email protected]
[92]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15608/shard-snb5/igt@[email protected]

* igt@gem_workarounds@suspend-resume-context:
- shard-apl: [DMESG-WARN][93] ([i915#180]) -> [PASS][94] +3 similar issues
[93]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7491/shard-apl6/igt@[email protected]
[94]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15608/shard-apl8/igt@[email protected]

* igt@kms_big_fb@y-tiled-32bpp-rotate-0:
- shard-kbl: [INCOMPLETE][95] ([fdo#103665]) -> [PASS][96] +3 similar issues
[95]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7491/shard-kbl2/igt@[email protected]
[96]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15608/shard-kbl4/igt@[email protected]

* igt@kms_cursor_crc@pipe-c-cursor-256x256-sliding:
- shard-skl: [FAIL][97] ([i915#54]) -> [PASS][98]
[97]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7491/shard-skl7/igt@[email protected]
[98]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15608/shard-skl1/igt@[email protected]

* igt@kms_draw_crc@draw-method-xrgb8888-blt-untiled:
- shard-skl: [INCOMPLETE][99] -> [PASS][100]
[99]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7491/shard-skl4/igt@[email protected]
[100]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15608/shard-skl8/igt@[email protected]

* igt@kms_flip@flip-vs-expired-vblank-interruptible:
- shard-glk: [FAIL][101] ([i915#79]) -> [PASS][102]
[101]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7491/shard-glk7/igt@[email protected]
[102]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15608/shard-glk7/igt@[email protected]

* igt@kms_flip@flip-vs-suspend-interruptible:
- shard-hsw: [INCOMPLETE][103] ([i915#61]) -> [PASS][104] +1 similar issue
[103]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7491/shard-hsw4/igt@[email protected]
[104]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15608/shard-hsw6/igt@[email protected]

* igt@kms_frontbuffer_tracking@fbc-1p-pri-indfb-multidraw:
- shard-iclb: [FAIL][105] ([i915#49]) -> [PASS][106] +2 similar issues
[105]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7491/shard-iclb7/igt@[email protected]
[106]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15608/shard-iclb1/igt@[email protected]

* igt@kms_frontbuffer_tracking@fbc-1p-primscrn-cur-indfb-move:
- shard-iclb: [INCOMPLETE][107] ([i915#140]) -> [PASS][108]
[107]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7491/shard-iclb6/igt@[email protected]
[108]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15608/shard-iclb6/igt@[email protected]

* igt@kms_frontbuffer_tracking@fbc-1p-primscrn-shrfb-plflip-blt:
- shard-kbl: [DMESG-WARN][109] ([i915#728]) -> [PASS][110] +2 similar issues
[109]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7491/shard-kbl2/igt@[email protected]
[110]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15608/shard-kbl3/igt@[email protected]

* igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-spr-indfb-draw-mmap-cpu:
- shard-iclb: [DMESG-WARN][111] ([i915#728]) -> [PASS][112] +1 similar issue
[111]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7491/shard-iclb7/igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-spr-indfb-draw-mmap-cpu.html
[112]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15608/shard-iclb8/igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-spr-indfb-draw-mmap-cpu.html

* igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a:
- shard-kbl: [DMESG-WARN][113] ([i915#180]) -> [PASS][114] +4 similar issues
[113]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7491/shard-kbl1/igt@[email protected]
[114]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15608/shard-kbl2/igt@[email protected]

* igt@kms_psr2_su@frontbuffer:
- shard-tglb: [FAIL][115] ([fdo#111842]) -> [PASS][116]
[115]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7491/shard-tglb6/igt@[email protected]
[116]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15608/shard-tglb7/igt@[email protected]

* igt@kms_psr@psr2_sprite_mmap_gtt:
- shard-iclb: [SKIP][117] ([fdo#109441]) -> [PASS][118] +2 similar issues
[117]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7491/shard-iclb1/igt@kms_psr@psr2_sprite_mmap_gtt.html
[118]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15608/shard-iclb2/igt@kms_psr@psr2_sprite_mmap_gtt.html

* igt@perf_pmu@busy-accuracy-2-vcs1:
- shard-iclb: [SKIP][119] ([fdo#112080]) -> [PASS][120] +6 similar issues
[119]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7491/shard-iclb5/igt@[email protected]
[120]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15608/shard-iclb2/igt@[email protected]

* igt@perf_pmu@busy-hang-vecs0:
- shard-tglb: [DMESG-WARN][121] ([i915#728]) -> [PASS][122] +1 similar issue
[121]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7491/shard-tglb3/igt@[email protected]
[122]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15608/shard-tglb8/igt@[email protected]
- shard-skl: [DMESG-WARN][123] ([i915#728]) -> [PASS][124] +1 similar issue
[123]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7491/shard-skl8/igt@[email protected]
[124]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15608/shard-skl4/igt@[email protected]

#### Warnings ####

* igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-spr-indfb-draw-blt:
- shard-iclb: [DMESG-FAIL][125] ([i915#49]) -> [FAIL][126] ([i915#49])
[125]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7491/shard-iclb5/igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-spr-indfb-draw-blt.html
[126]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15608/shard-iclb2/igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-spr-indfb-draw-blt.html

* igt@kms_plane@pixel-format-pipe-a-planes:
- shard-kbl: [DMESG-WARN][127] ([i915#728]) -> [INCOMPLETE][128] ([fdo#103665])
[127]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7491/shard-kbl3/igt@[email protected]
[128]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15608/shard-kbl3/igt@[email protected]
- shard-skl: [INCOMPLETE][129] ([fdo#112391] / [i915#648]) -> [INCOMPLETE][130] ([i915#648])
[129]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7491/shard-skl8/igt@[email protected]
[130]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15608/shard-skl3/igt@[email protected]

* igt@kms_plane@pixel-format-pipe-b-planes:
- shard-skl: [INCOMPLETE][131] ([fdo#112347] / [i915#648]) -> [INCOMPLETE][132] ([i915#648])
[131]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7491/shard-skl6/igt@[email protected]
[132]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15608/shard-skl8/igt@[email protected]

* igt@kms_plane@pixel-format-pipe-b-planes-source-clamping:
- shard-skl: [INCOMPLETE][133] ([fdo#112347] / [i915#648]) -> [INCOMPLETE][134] ([fdo#112391] / [i915#648])
[133]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7491/shard-skl7/igt@[email protected]
[134]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15608/shard-skl5/igt@[email protected]

[IGT#6]: https://gitlab.freedesktop.org/drm/igt-gpu-tools/issues/6
[fdo#103665]: https://bugs.freedesktop.org/show_bug.cgi?id=103665
[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[fdo#109276]: https://bugs.freedesktop.org/show_bug.cgi?id=109276
[fdo#109383]: https://bugs.freedesktop.org/show_bug.cgi?id=109383
[fdo#109441]: https://bugs.freedesktop.org/show_bug.cgi?id=109441
[fdo#111606]: https://bugs.freedesktop.org/show_bug.cgi?id=111606
[fdo#111677]: https://bugs.freedesktop.org/show_bug.cgi?id=111677
[fdo#111735]: https://bugs.freedesktop.org/show_bug.cgi?id=111735
[fdo#111842]: https://bugs.freedesktop.org/show_bug.cgi?id=111842
[fdo#111870]: https://bugs.freedesktop.org/show_bug.cgi?id=111870
[fdo#112080]: https://bugs.freedesktop.org/show_bug.cgi?id=112080
[fdo#112146]: https://bugs.freedesktop.org/show_bug.cgi?id=112146
[fdo#112347]: https://bugs.freedesktop.org/show_bug.cgi?id=112347
[fdo#112391]: https://bugs.freedesktop.org/show_bug.cgi?id=112391
[i915#123]: https://gitlab.freedesktop.org/drm/intel/issues/123
[i915#140]: https://gitlab.freedesktop.org/drm/intel/issues/140
[i915#180]: https://gitlab.freedesktop.org/drm/intel/issues/180
[i915#31]: https://gitlab.freedesktop.org/drm/intel/issues/31
[i915#435]: https://gitlab.freedesktop.org/drm/intel/issues/435
[i915#456]: https://gitlab.freedesktop.org/drm/intel/issues/456
[i915#470]: https://gitlab.freedesktop.org/drm/intel/issues/470
[i915#472]: https://gitlab.freedesktop.org/drm/intel/issues/472
[i915#475]: https://gitlab.freedesktop.org/drm/intel/issues/475
[i915#49]: https://gitlab.freedesktop.org/drm/intel/issues/49
[i915#520]: https://gitlab.freedesktop.org/drm/intel/issues/520
[i915#530]: https://gitlab.freedesktop.org/drm/intel/issues/530
[i915#54]: https://gitlab.freedesktop.org/drm/intel/issues/54
[i915#61]: https://gitlab.freedesktop.org/drm/intel/issues/61
[i915#644]: https://gitlab.freedesktop.org/drm/intel/issues/644
[i915#648]: https://gitlab.freedesktop.org/drm/intel/issues/648
[i915#69]: https://gitlab.freedesktop.org/drm/intel/issues/69
[i915#707]: https://gitlab.freedesktop.org/drm/intel/issues/707
[i915#728]: https://gitlab.freedesktop.org/drm/intel/issues/728
[i915#79]: https://gitlab.freedesktop.org/drm/intel/issues/79
[i915#82]: https://gitlab.freedesktop.org/drm/intel/issues/82

Participating hosts (11 -> 11)
------------------------------

No changes in participating hosts

Build changes
-------------

* CI: CI-20190529 -> None
* Linux: CI_DRM_7491 -> Patchwork_15608

CI-20190529: 20190529
CI_DRM_7491: ac5e57322614f1c08b00ed9f52153ca12603c637 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_5333: e08522bb09ff1b9720359b3867da7e4aca0bd5f1 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_15608: 7db14ea24487bb2a817750c53a85f7c9d1d9a674 @ git://anongit.freedesktop.org/gfx-ci/linux
piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ git://anongit.freedesktop.org/piglit

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15608/index.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#3 lore raw

Re: [Intel-gfx] [PATCH 1/2] drm/i915/params: add i915 parameters to debugfs

In reply to Tvrtko Ursulin
Quoted 11 lines · Tvrtko Ursulin
Quoted 9 lines · Jani Nikula

Add a debugfs subdirectory i915_params with all the i915 module parameters. This is a first step, with lots of boilerplate, and not much benefit yet.

This will result in a new device specific debugfs directory at /sys/kernel/debug/dri/<N>/i915_params duplicating the module specific sysfs directory at /sys/module/i915/parameters/. Going forward, all users of the parameters should use the debugfs, with the module parameters being phased out.

Quoted 5 lines

Does it perhaps needs to stay in sysfs (as modparams are)? Unless thinking is there will be no need ever to use one of them in production?

With phasing out of modparams - you will not keep a mechanism to pass in i915_params at boot time, perhaps targeting cards using pci ids?

Okay, so we may need to retain *some* module parameters as a module specific way to set initial values for *some* of the device specific parameters.

But the interface for modifying the device specific parameters should really be debugfs. For starters, 26 out of the 35 parameters are "unsafe" and taint the kernel. (Maybe the new debugfs interface should taint the kernel too.) They are purely for debugging by the developers, and they have no place in production or as an ABI.

The remaining "non-unsafe" ones are arguably more or less debugging too:

- disable_display
- enable_dpcd_backlight
- enable_gvt
- error_capture
- fastboot
- guc_log_level
- mmio_debug
- modeset
- verbose_state_checks

I can't really make a strong argument for any of those to be part of the ABI in sysfs. Maybe there are some exceptions, but the vast majority of the current module parameters are clearly for debugging only.

BR,
Jani.

Quoted 434 lines

Regards,

Tvrtko

Quoted 415 lines

Add debugfs permissions to I915_PARAMS_FOR_EACH(). This duplicates the mode with module parameter sysfs, but the goal is to make the module parameters read-only initial values for device specific parameters.

0 mode will bypass debugfs creation. Use it for verbose_state_checks which will need special attention in follow-up work.

---
  drivers/gpu/drm/i915/Makefile              |   5 +-
  drivers/gpu/drm/i915/i915_debugfs.c        |   4 +-
  drivers/gpu/drm/i915/i915_debugfs_params.c | 233 +++++++++++++++++++++
  drivers/gpu/drm/i915/i915_debugfs_params.h |  14 ++
  drivers/gpu/drm/i915/i915_params.c         |   2 +-
  drivers/gpu/drm/i915/i915_params.h         |  76 +++----
  6 files changed, 294 insertions(+), 40 deletions(-)

create mode 100644 drivers/gpu/drm/i915/i915_debugfs_params.c create mode 100644 drivers/gpu/drm/i915/i915_debugfs_params.h

drivers/gpu/drm/i915/Makefile +4 -1
index e0fd10c0cfb8..db4bf6ae9127 100644
@@ -69,7 +69,10 @@ i915-y += \
  	i915_user_extensions.o
 
  i915-$(CONFIG_COMPAT)   += i915_ioc32.o
-i915-$(CONFIG_DEBUG_FS) += i915_debugfs.o display/intel_pipe_crc.o
+i915-$(CONFIG_DEBUG_FS) += \
+	i915_debugfs.o \
+	i915_debugfs_params.o \
+	display/intel_pipe_crc.o
  i915-$(CONFIG_PERF_EVENTS) += i915_pmu.o
 
  # "Graphics Technology" (aka we talk to the gpu)
drivers/gpu/drm/i915/i915_debugfs.c +3 -1
index eb80a2c4b55b..b50af2f7865f 100644
@@ -48,6 +48,7 @@
  #include "gt/uc/intel_guc_submission.h"
 
  #include "i915_debugfs.h"
+#include "i915_debugfs_params.h"
  #include "i915_irq.h"
  #include "i915_trace.h"
  #include "intel_csr.h"
@@ -4352,9 +4353,10 @@ int i915_debugfs_register(struct drm_i915_private *dev_priv)
  	struct drm_minor *minor = dev_priv->drm.primary;
  	int i;
 
+	i915_debugfs_params(dev_priv);
+
  	debugfs_create_file("i915_forcewake_user", S_IRUSR, minor->debugfs_root,
  			    to_i915(minor->dev), &i915_forcewake_fops);
-
  	for (i = 0; i < ARRAY_SIZE(i915_debugfs_files); i++) {
  		debugfs_create_file(i915_debugfs_files[i].name,
  				    S_IRUGO | S_IWUSR,
drivers/gpu/drm/i915/i915_debugfs_params.c new file +233 -0
new file mode 100644
index 000000000000..7f1af5a35ca1
@@ -0,0 +1,233 @@
+// SPDX-License-Identifier: MIT
+/*
+ * Copyright © 2019 Intel Corporation
+ */
+
+#include <linux/kernel.h>
+
+#include "i915_drv.h"
+#include "i915_params.h"
+
+/* int param */
+static int i915_param_int_show(struct seq_file *m, void *data)
+{
+	int *value = m->private;
+
+	seq_printf(m, "%d\n", *value);
+
+	return 0;
+}
+
+static int i915_param_int_open(struct inode *inode, struct file *file)
+{
+	return single_open(file, i915_param_int_show, inode->i_private);
+}
+
+static ssize_t i915_param_int_write(struct file *file,
+				    const char __user *ubuf, size_t len,
+				    loff_t *offp)
+{
+	struct seq_file *m = file->private_data;
+	int *value = m->private;
+	int ret;
+
+	ret = kstrtoint_from_user(ubuf, len, 0, value);
+
+	return ret ?: len;
+}
+
+static const struct file_operations i915_param_int_fops = {
+	.owner = THIS_MODULE,
+	.open = i915_param_int_open,
+	.read = seq_read,
+	.write = i915_param_int_write,
+	.llseek = default_llseek,
+	.release = single_release,
+};
+
+static const struct file_operations i915_param_int_fops_ro = {
+	.owner = THIS_MODULE,
+	.open = i915_param_int_open,
+	.read = seq_read,
+	.llseek = default_llseek,
+	.release = single_release,
+};
+
+/* unsigned int param */
+static int i915_param_uint_show(struct seq_file *m, void *data)
+{
+	unsigned int *value = m->private;
+
+	seq_printf(m, "%u\n", *value);
+
+	return 0;
+}
+
+static int i915_param_uint_open(struct inode *inode, struct file *file)
+{
+	return single_open(file, i915_param_uint_show, inode->i_private);
+}
+
+static ssize_t i915_param_uint_write(struct file *file,
+				     const char __user *ubuf, size_t len,
+				     loff_t *offp)
+{
+	struct seq_file *m = file->private_data;
+	unsigned int *value = m->private;
+	int ret;
+
+	ret = kstrtouint_from_user(ubuf, len, 0, value);
+
+	return ret ?: len;
+}
+
+static const struct file_operations i915_param_uint_fops = {
+	.owner = THIS_MODULE,
+	.open = i915_param_uint_open,
+	.read = seq_read,
+	.write = i915_param_uint_write,
+	.llseek = default_llseek,
+	.release = single_release,
+};
+
+static const struct file_operations i915_param_uint_fops_ro = {
+	.owner = THIS_MODULE,
+	.open = i915_param_uint_open,
+	.read = seq_read,
+	.llseek = default_llseek,
+	.release = single_release,
+};
+
+/* char * param */
+static int i915_param_charp_show(struct seq_file *m, void *data)
+{
+	const char **s = m->private;
+
+	seq_printf(m, "%s\n", *s);
+
+	return 0;
+}
+
+static int i915_param_charp_open(struct inode *inode, struct file *file)
+{
+	return single_open(file, i915_param_charp_show, inode->i_private);
+}
+
+static ssize_t i915_param_charp_write(struct file *file,
+				      const char __user *ubuf, size_t len,
+				      loff_t *offp)
+{
+	struct seq_file *m = file->private_data;
+	char **s = m->private;
+	char *new, *old;
+
+	/* FIXME: remove locking after params aren't the module params */
+	kernel_param_lock(THIS_MODULE);
+
+	old = *s;
+	new = strndup_user(ubuf, PAGE_SIZE);
+	if (IS_ERR(new)) {
+		len = PTR_ERR(new);
+		goto out;
+	}
+
+	*s = new;
+
+	kfree(old);
+out:
+	kernel_param_unlock(THIS_MODULE);
+
+	return len;
+}
+
+static const struct file_operations i915_param_charp_fops = {
+	.owner = THIS_MODULE,
+	.open = i915_param_charp_open,
+	.read = seq_read,
+	.write = i915_param_charp_write,
+	.llseek = default_llseek,
+	.release = single_release,
+};
+
+static const struct file_operations i915_param_charp_fops_ro = {
+	.owner = THIS_MODULE,
+	.open = i915_param_charp_open,
+	.read = seq_read,
+	.llseek = default_llseek,
+	.release = single_release,
+};
+
+#define RO(mode) (((mode) & 0222) == 0)
+
+static struct dentry *
+i915_debugfs_create_int(const char *name, umode_t mode,
+			struct dentry *parent, int *value)
+{
+	return debugfs_create_file_unsafe(name, mode, parent, value,
+					  RO(mode) ? &i915_param_int_fops_ro :
+					  &i915_param_int_fops);
+}
+
+static struct dentry *
+i915_debugfs_create_uint(const char *name, umode_t mode,
+			 struct dentry *parent, unsigned int *value)
+{
+	return debugfs_create_file_unsafe(name, mode, parent, value,
+					  RO(mode) ? &i915_param_uint_fops_ro :
+					  &i915_param_uint_fops);
+}
+
+static struct dentry *
+i915_debugfs_create_charp(const char *name, umode_t mode,
+			  struct dentry *parent, char **value)
+{
+	return debugfs_create_file(name, mode, parent, value,
+				   RO(mode) ? &i915_param_charp_fops_ro :
+				   &i915_param_charp_fops);
+}
+
+static __always_inline void
+_i915_param_create_file(struct dentry *parent, const char *name,
+			const char *type, int mode, void *value)
+{
+	if (!mode)
+		return;
+
+	if (!__builtin_strcmp(type, "bool"))
+		debugfs_create_bool(name, mode, parent, value);
+	else if (!__builtin_strcmp(type, "int"))
+		i915_debugfs_create_int(name, mode, parent, value);
+	else if (!__builtin_strcmp(type, "unsigned int"))
+		i915_debugfs_create_uint(name, mode, parent, value);
+	else if (!__builtin_strcmp(type, "unsigned long"))
+		debugfs_create_ulong(name, mode, parent, value);
+	else if (!__builtin_strcmp(type, "char *"))
+		i915_debugfs_create_charp(name, mode, parent, value);
+	else
+		WARN(1, "no debugfs fops defined for param type %s (i915.%s)\n",
+		     type, name);
+}
+
+/* add a subdirectory with files for each i915 param */
+struct dentry *i915_debugfs_params(struct drm_i915_private *i915)
+{
+	struct drm_minor *minor = i915->drm.primary;
+	struct i915_params *params = &i915_modparams;
+	struct dentry *dir;
+
+	dir = debugfs_create_dir("i915_params", minor->debugfs_root);
+	if (IS_ERR(dir))
+		return dir;
+
+	/*
+	 * Note: We could create files for params needing special handling
+	 * here. Set mode in params to 0 to skip the generic create file, or
+	 * just let the generic create file fail silently with -EEXIST.
+	 */
+
+#define REGISTER(T, x, unused, mode, ...) _i915_param_create_file(dir, #x, #T, mode, &params->x);
+	I915_PARAMS_FOR_EACH(REGISTER);
+#undef REGISTER
+
+	return dir;
+}
drivers/gpu/drm/i915/i915_debugfs_params.h new file +14 -0
new file mode 100644
index 000000000000..66567076546b
@@ -0,0 +1,14 @@
+/* SPDX-License-Identifier: MIT */
+/*
+ * Copyright © 2019 Intel Corporation
+ */
+
+#ifndef __I915_DEBUGFS_PARAMS__
+#define __I915_DEBUGFS_PARAMS__
+
+struct dentry;
+struct drm_i915_private;
+
+struct dentry *i915_debugfs_params(struct drm_i915_private *i915);
+
+#endif /* __I915_DEBUGFS_PARAMS__ */
drivers/gpu/drm/i915/i915_params.c +1 -1
index 1dd1f3652795..64009e99073d 100644
@@ -35,7 +35,7 @@
  	MODULE_PARM_DESC(name, desc)
 
  struct i915_params i915_modparams __read_mostly = {
-#define MEMBER(T, member, value) .member = (value),
+#define MEMBER(T, member, value, ...) .member = (value),
  	I915_PARAMS_FOR_EACH(MEMBER)
  #undef MEMBER
  };
drivers/gpu/drm/i915/i915_params.h +32 -37
index 31b88f297fbc..be6089e4f9e6 100644
@@ -36,49 +36,51 @@ struct drm_printer;
  /*
   * Invoke param, a function-like macro, for each i915 param, with arguments:
   *
- * param(type, name, value)
+ * param(type, name, value, mode)
   *
- * type: parameter type, one of {bool, int, unsigned int, char *}
+ * type: parameter type, one of {bool, int, unsigned int, unsigned long, char *}
   * name: name of the parameter
   * value: initial/default value of the parameter
+ * mode: debugfs file permissions, one of {0400, 0600, 0}, use 0 to not create
+ *       debugfs file
   */
  #define I915_PARAMS_FOR_EACH(param) \
-	param(char *, vbt_firmware, NULL) \
-	param(int, modeset, -1) \
-	param(int, lvds_channel_mode, 0) \
-	param(int, panel_use_ssc, -1) \
-	param(int, vbt_sdvo_panel_type, -1) \
-	param(int, enable_dc, -1) \
-	param(int, enable_fbc, -1) \
-	param(int, enable_psr, -1) \
-	param(int, disable_power_well, -1) \
-	param(int, enable_ips, 1) \
-	param(int, invert_brightness, 0) \
-	param(int, enable_guc, 0) \
-	param(int, guc_log_level, -1) \
-	param(char *, guc_firmware_path, NULL) \
-	param(char *, huc_firmware_path, NULL) \
-	param(char *, dmc_firmware_path, NULL) \
-	param(int, mmio_debug, -IS_ENABLED(CONFIG_DRM_I915_DEBUG_MMIO)) \
-	param(int, edp_vswing, 0) \
-	param(int, reset, 3) \
-	param(unsigned int, inject_probe_failure, 0) \
-	param(int, fastboot, -1) \
-	param(int, enable_dpcd_backlight, 0) \
-	param(char *, force_probe, CONFIG_DRM_I915_FORCE_PROBE) \
-	param(unsigned long, fake_lmem_start, 0) \
+	param(char *, vbt_firmware, NULL, 0400) \
+	param(int, modeset, -1, 0400) \
+	param(int, lvds_channel_mode, 0, 0400) \
+	param(int, panel_use_ssc, -1, 0600) \
+	param(int, vbt_sdvo_panel_type, -1, 0400) \
+	param(int, enable_dc, -1, 0400) \
+	param(int, enable_fbc, -1, 0600) \
+	param(int, enable_psr, -1, 0600) \
+	param(int, disable_power_well, -1, 0400) \
+	param(int, enable_ips, 1, 0600) \
+	param(int, invert_brightness, 0, 0600) \
+	param(int, enable_guc, 0, 0400) \
+	param(int, guc_log_level, -1, 0400) \
+	param(char *, guc_firmware_path, NULL, 0400) \
+	param(char *, huc_firmware_path, NULL, 0400) \
+	param(char *, dmc_firmware_path, NULL, 0400) \
+	param(int, mmio_debug, -IS_ENABLED(CONFIG_DRM_I915_DEBUG_MMIO), 0600) \
+	param(int, edp_vswing, 0, 0400) \
+	param(int, reset, 3, 0600) \
+	param(unsigned int, inject_probe_failure, 0, 0600) \
+	param(int, fastboot, -1, 0600) \
+	param(int, enable_dpcd_backlight, 0, 0600) \
+	param(char *, force_probe, CONFIG_DRM_I915_FORCE_PROBE, 0400) \
+	param(unsigned long, fake_lmem_start, 0, 0400) \
  	/* leave bools at the end to not create holes */ \
-	param(bool, alpha_support, IS_ENABLED(CONFIG_DRM_I915_ALPHA_SUPPORT)) \
-	param(bool, enable_hangcheck, true) \
-	param(bool, prefault_disable, false) \
-	param(bool, load_detect_test, false) \
-	param(bool, force_reset_modeset_test, false) \
-	param(bool, error_capture, true) \
-	param(bool, disable_display, false) \
-	param(bool, verbose_state_checks, true) \
-	param(bool, nuclear_pageflip, false) \
-	param(bool, enable_dp_mst, true) \
-	param(bool, enable_gvt, false)
+	param(bool, alpha_support, IS_ENABLED(CONFIG_DRM_I915_ALPHA_SUPPORT), 0400) \
+	param(bool, enable_hangcheck, true, 0600) \
+	param(bool, prefault_disable, false, 0600) \
+	param(bool, load_detect_test, false, 0600) \

drivers/gpu/drm/i915/i915_params.h struct drm_printer; · line 86

Quoted 10 lines
drivers/gpu/drm/i915/i915_params.h +7 -0
+	param(bool, force_reset_modeset_test, false, 0600) \
+	param(bool, error_capture, true, 0600) \
+	param(bool, disable_display, false, 0400) \
+	param(bool, verbose_state_checks, true, 0) \
+	param(bool, nuclear_pageflip, false, 0400) \
+	param(bool, enable_dp_mst, true, 0600) \
+	param(bool, enable_gvt, false, 0400)
 
  #define MEMBER(T, member, ...) T member;
  struct i915_params {

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Signature · 5 lines
Jani Nikula, Intel Open Source Graphics Center
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#4 lore raw

Re: [Intel-gfx] [PATCH 1/2] drm/i915/params: add i915 parameters to debugfs

In reply to Jani Nikula

Quoting Jani Nikula (2019-12-05 15:43:40)

drivers/gpu/drm/i915/i915_debugfs_params.c line 23

Quoted 3 lines
drivers/gpu/drm/i915/i915_debugfs_params.c new file +3 -0
+static int i915_param_int_open(struct inode *inode, struct file *file)
+{
+       return single_open(file, i915_param_int_show, inode->i_private);

What I've always wanted with this style of approach was a means that the parameter is only set while the debugfs remained open.

	fd = open("/debug/my_parameter", O_WRONLY | O_EXCL);
	write(fd, "1", 1);

	... run test ..

System reverts to default on process termination, or explicit close(fd).

I'd make the open implicitly O_EXCL, i.e. return -EBUSY if something else already holds the parameter set. Or, you can use the O_EXCL to select between the different modes of operation.

Moving the parameters to debugfs is more than worth it imo if we can enable this mode of operation.
-Chris
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#5 lore raw

Re: [Intel-gfx] [PATCH 1/2] drm/i915/params: add i915 parameters to debugfs

Quoted 13 lines · Chris Wilson

Quoting Jani Nikula (2019-12-05 15:43:40)

drivers/gpu/drm/i915/i915_debugfs_params.c line 23

Quoted 3 lines
drivers/gpu/drm/i915/i915_debugfs_params.c new file +3 -0
+static int i915_param_int_open(struct inode *inode, struct file *file)
+{
+       return single_open(file, i915_param_int_show, inode->i_private);

What I've always wanted with this style of approach was a means that the parameter is only set while the debugfs remained open.

	fd = open("/debug/my_parameter", O_WRONLY | O_EXCL);
	write(fd, "1", 1);

	... run test ..
Quoted 8 lines

System reverts to default on process termination, or explicit close(fd).

I'd make the open implicitly O_EXCL, i.e. return -EBUSY if something else already holds the parameter set. Or, you can use the O_EXCL to select between the different modes of operation.

Moving the parameters to debugfs is more than worth it imo if we can enable this mode of operation.

I understand the use case, and I'd like something like that. But (obviously?) I think the regular use case of 'echo 1 > /debug/my_parameter' needs to work as one would expect.

Reading open(2) man page, feels like using O_EXCL for this would be a hack. Granted, it's debugfs to begin with, but still. Makes me a bit hesitant about abusing O_EXCL for this. (Or am I missing something?)

BR,
Jani.

Signature · 5 lines
Jani Nikula, Intel Open Source Graphics Center
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Reviewed-by on v1 1/2
#6 lore raw

Re: [Intel-gfx] [PATCH 1/2] drm/i915/params: add i915 parameters to debugfs

In reply to Jani Nikula

Quoting Jani Nikula (2019-12-05 15:43:40)

Quoted 3 lines

Add a debugfs subdirectory i915_params with all the i915 module parameters. This is a first step, with lots of boilerplate, and not much benefit yet.

Right, creates a mirror [more or less] of /sys/module/i915/parameters. I probably would have used parameters/ rather than i915_params/, but that is immaterial.

Quoted 7 lines

This will result in a new device specific debugfs directory at /sys/kernel/debug/dri/<N>/i915_params duplicating the module specific sysfs directory at /sys/module/i915/parameters/. Going forward, all users of the parameters should use the debugfs, with the module parameters being phased out.

Quoted 6 lines

Add debugfs permissions to I915_PARAMS_FOR_EACH(). This duplicates the mode with module parameter sysfs, but the goal is to make the module parameters read-only initial values for device specific parameters.

0 mode will bypass debugfs creation. Use it for verbose_state_checks which will need special attention in follow-up work.

The patch does what you say, hopefully a local entropy maxima.

-Chris
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reviewed-by on v1 2/2
#10 lore raw

Re: [Intel-gfx] [PATCH 2/2] drm/i915/params: support bool values for int and uint params

In reply to Jani Nikula

Quoting Jani Nikula (2019-12-05 15:43:41)

Quoted 5 lines

It's not uncommon for us to switch param types between bools and ints, often having otherwise bool semantics but -1 value for platform default. Allow bool values (such as YyNn) for ints.

But play nice with checkpatch, no point fighting with it over a line of whitespace.
-Chris
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#7 lore raw

Re: [Intel-gfx] [PATCH 1/2] drm/i915/params: add i915 parameters to debugfs

In reply to Chris Wilson
Quoted 8 lines · Chris Wilson

Quoting Jani Nikula (2019-12-05 15:43:40)

Quoted 3 lines

Add a debugfs subdirectory i915_params with all the i915 module parameters. This is a first step, with lots of boilerplate, and not much benefit yet.

Right, creates a mirror [more or less] of /sys/module/i915/parameters. I probably would have used parameters/ rather than i915_params/, but that is immaterial.

I guess I used i915_ because it's sort of a shared namespace with drm core, which in itself is, IMO, a historical mistake. Perhaps there should've been a driver/ debugfs directory for driver specific debug files.

What if someone wanted to add a drm core level parameters/ file or directory? Would be kind of embarrassing to say, don't do that, i915 already uses it...

Quoted 11 lines
Quoted 11 lines

This will result in a new device specific debugfs directory at /sys/kernel/debug/dri/<N>/i915_params duplicating the module specific sysfs directory at /sys/module/i915/parameters/. Going forward, all users of the parameters should use the debugfs, with the module parameters being phased out.

Add debugfs permissions to I915_PARAMS_FOR_EACH(). This duplicates the mode with module parameter sysfs, but the goal is to make the module parameters read-only initial values for device specific parameters.

Quoted 5 lines
Quoted 2 lines

0 mode will bypass debugfs creation. Use it for verbose_state_checks which will need special attention in follow-up work.

The patch does what you say, hopefully a local entropy maxima.

Many thanks,
Jani.

Signature · 5 lines
Jani Nikula, Intel Open Source Graphics Center
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#8 lore raw

Re: [Intel-gfx] [PATCH 1/2] drm/i915/params: add i915 parameters to debugfs

Quoted 30 lines · Jani Nikula
Quoted 8 lines · Chris Wilson

Quoting Jani Nikula (2019-12-05 15:43:40)

Quoted 3 lines

Add a debugfs subdirectory i915_params with all the i915 module parameters. This is a first step, with lots of boilerplate, and not much benefit yet.

Right, creates a mirror [more or less] of /sys/module/i915/parameters. I probably would have used parameters/ rather than i915_params/, but that is immaterial.

I guess I used i915_ because it's sort of a shared namespace with drm core, which in itself is, IMO, a historical mistake. Perhaps there should've been a driver/ debugfs directory for driver specific debug files.

What if someone wanted to add a drm core level parameters/ file or directory? Would be kind of embarrassing to say, don't do that, i915 already uses it...

Quoted 11 lines
Quoted 11 lines

This will result in a new device specific debugfs directory at /sys/kernel/debug/dri/<N>/i915_params duplicating the module specific sysfs directory at /sys/module/i915/parameters/. Going forward, all users of the parameters should use the debugfs, with the module parameters being phased out.

Add debugfs permissions to I915_PARAMS_FOR_EACH(). This duplicates the mode with module parameter sysfs, but the goal is to make the module parameters read-only initial values for device specific parameters.

Quoted 8 lines
Quoted 5 lines
Quoted 2 lines

0 mode will bypass debugfs creation. Use it for verbose_state_checks which will need special attention in follow-up work.

The patch does what you say, hopefully a local entropy maxima.

Many thanks,
Jani.

And pushed both to dinq, thanks again for the review.

BR,
Jani.

Signature · 5 lines
Jani Nikula, Intel Open Source Graphics Center
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx