All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH 00/11] drm/i915: from module params to device params
@ 2018-12-21 13:31 Jani Nikula
  2018-12-21 13:31 ` [RFC PATCH 01/11] drm/i915: add a helper to make a copy of i915_params Jani Nikula
                   ` (14 more replies)
  0 siblings, 15 replies; 18+ messages in thread
From: Jani Nikula @ 2018-12-21 13:31 UTC (permalink / raw)
  To: intel-gfx; +Cc: jani.nikula

Season's greetings!

This series migrates module parameters to per-device parameters in
drm_i915_private, accessible via debugfs.

Patches 1-6 are fairly straightforward prep work to make the rest
easier. After initial reviews I'll probably submit them separately.

Patches 7-8 add debugfs access to the current module parameters. They
work simultaneously with the module parameter sysfs access.

It is expected that at this point we'll have a transition period, as IGT
needs to be switched over to using the debugfs, but we don't want to
have a flag day.

Patch 9 removes module parameter sysfs write access, leaving debugfs the
only interface to changing module parameters runtime. This breaks IGT.

Patch 10 copies module parameters to dev_priv, and starts using them as
device specific parameters from there, leaving module parameters merely
initial/default values for the device parameters.

Patch 11 makes i915_modparams static to avoid accidental module param
use where device parameters should be used.

The series is thoroughly untested, and CI will greet it with nice red
christmas colors, bringing comfort and joy to us all.

Cheers,
Jani.


Jani Nikula (11):
  drm/i915: add a helper to make a copy of i915_params
  drm/i915: add a helper to free the members of i915_params
  drm/i915/uc: add dev_priv parameter to intel_uc_is_using_* functions
  drm/i915/params: set i915.enable_hangcheck permissions to 0600
  drm/i915: move load failure injection to selftests
  drm/i915/params: document I915_PARAMS_FOR_EACH()
  drm/i915/params: add i915 parameters to debugfs
  drm/i915/params: support bool values for int and uint params
  drm/i915/params: prevent changing module params runtime
  drm/i915/params: switch to device specific parameters
  drm/i915/params: hide i915_modparams within i915_params.c

 drivers/gpu/drm/i915/i915_debugfs.c              | 217 ++++++++++++++++++++++-
 drivers/gpu/drm/i915/i915_drv.c                  |  37 +---
 drivers/gpu/drm/i915/i915_drv.h                  |  28 +--
 drivers/gpu/drm/i915/i915_gem_execbuffer.c       |   2 +-
 drivers/gpu/drm/i915/i915_gpu_error.c            |  22 +--
 drivers/gpu/drm/i915/i915_params.c               |  97 +++++++---
 drivers/gpu/drm/i915/i915_params.h               |  84 +++++----
 drivers/gpu/drm/i915/i915_pci.c                  |   6 +-
 drivers/gpu/drm/i915/i915_selftest.h             |  10 ++
 drivers/gpu/drm/i915/intel_bios.c                |   6 +-
 drivers/gpu/drm/i915/intel_crt.c                 |   4 +-
 drivers/gpu/drm/i915/intel_csr.c                 |   6 +-
 drivers/gpu/drm/i915/intel_device_info.c         |   2 +-
 drivers/gpu/drm/i915/intel_display.c             |  10 +-
 drivers/gpu/drm/i915/intel_dp.c                  |  11 +-
 drivers/gpu/drm/i915/intel_dp_aux_backlight.c    |   3 +-
 drivers/gpu/drm/i915/intel_fbc.c                 |  12 +-
 drivers/gpu/drm/i915/intel_guc_fw.c              |   4 +-
 drivers/gpu/drm/i915/intel_guc_log.c             |   3 +-
 drivers/gpu/drm/i915/intel_gvt.c                 |   8 +-
 drivers/gpu/drm/i915/intel_hangcheck.c           |   2 +-
 drivers/gpu/drm/i915/intel_huc_fw.c              |   4 +-
 drivers/gpu/drm/i915/intel_lvds.c                |   4 +-
 drivers/gpu/drm/i915/intel_opregion.c            |   2 +-
 drivers/gpu/drm/i915/intel_panel.c               |   4 +-
 drivers/gpu/drm/i915/intel_psr.c                 |  14 +-
 drivers/gpu/drm/i915/intel_runtime_pm.c          |  14 +-
 drivers/gpu/drm/i915/intel_uc.c                  |  66 ++++---
 drivers/gpu/drm/i915/intel_uc.h                  |  21 +--
 drivers/gpu/drm/i915/intel_uncore.c              |  18 +-
 drivers/gpu/drm/i915/intel_wopcm.c               |   2 +-
 drivers/gpu/drm/i915/selftests/i915_selftest.c   |  26 +++
 drivers/gpu/drm/i915/selftests/intel_hangcheck.c |   4 +-
 33 files changed, 515 insertions(+), 238 deletions(-)

-- 
2.11.0

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

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

* [RFC PATCH 01/11] drm/i915: add a helper to make a copy of i915_params
  2018-12-21 13:31 [RFC PATCH 00/11] drm/i915: from module params to device params Jani Nikula
@ 2018-12-21 13:31 ` Jani Nikula
  2018-12-21 13:31 ` [RFC PATCH 02/11] drm/i915: add a helper to free the members " Jani Nikula
                   ` (13 subsequent siblings)
  14 siblings, 0 replies; 18+ messages in thread
From: Jani Nikula @ 2018-12-21 13:31 UTC (permalink / raw)
  To: intel-gfx; +Cc: jani.nikula

Abstract the one user in anticipation of more.

Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
 drivers/gpu/drm/i915/i915_gpu_error.c | 11 +----------
 drivers/gpu/drm/i915/i915_params.c    | 14 ++++++++++++++
 drivers/gpu/drm/i915/i915_params.h    |  1 +
 3 files changed, 16 insertions(+), 10 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_gpu_error.c b/drivers/gpu/drm/i915/i915_gpu_error.c
index 63df41d93379..8c04479c1586 100644
--- a/drivers/gpu/drm/i915/i915_gpu_error.c
+++ b/drivers/gpu/drm/i915/i915_gpu_error.c
@@ -1834,18 +1834,9 @@ static void capture_gen_state(struct i915_gpu_state *error)
 	error->driver_caps = i915->caps;
 }
 
-static __always_inline void dup_param(const char *type, void *x)
-{
-	if (!__builtin_strcmp(type, "char *"))
-		*(void **)x = kstrdup(*(void **)x, GFP_ATOMIC);
-}
-
 static void capture_params(struct i915_gpu_state *error)
 {
-	error->params = i915_modparams;
-#define DUP(T, x, ...) dup_param(#T, &error->params.x);
-	I915_PARAMS_FOR_EACH(DUP);
-#undef DUP
+	i915_params_copy(&error->params, &i915_modparams);
 }
 
 static unsigned long capture_find_epoch(const struct i915_gpu_state *error)
diff --git a/drivers/gpu/drm/i915/i915_params.c b/drivers/gpu/drm/i915/i915_params.c
index 2e0356561839..ae3ece4ec7ab 100644
--- a/drivers/gpu/drm/i915/i915_params.c
+++ b/drivers/gpu/drm/i915/i915_params.c
@@ -203,3 +203,17 @@ void i915_params_dump(const struct i915_params *params, struct drm_printer *p)
 	I915_PARAMS_FOR_EACH(PRINT);
 #undef PRINT
 }
+
+static __always_inline void dup_param(const char *type, void *x)
+{
+	if (!__builtin_strcmp(type, "char *"))
+		*(void **)x = kstrdup(*(void **)x, GFP_ATOMIC);
+}
+
+void i915_params_copy(struct i915_params *dest, const struct i915_params *src)
+{
+	*dest = *src;
+#define DUP(T, x, ...) dup_param(#T, &dest->x);
+	I915_PARAMS_FOR_EACH(DUP);
+#undef DUP
+}
diff --git a/drivers/gpu/drm/i915/i915_params.h b/drivers/gpu/drm/i915/i915_params.h
index 7e56c516c815..fd1cf9415e60 100644
--- a/drivers/gpu/drm/i915/i915_params.h
+++ b/drivers/gpu/drm/i915/i915_params.h
@@ -78,6 +78,7 @@ struct i915_params {
 extern struct i915_params i915_modparams __read_mostly;
 
 void i915_params_dump(const struct i915_params *params, struct drm_printer *p);
+void i915_params_copy(struct i915_params *dest, const struct i915_params *src);
 
 #endif
 
-- 
2.11.0

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

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

* [RFC PATCH 02/11] drm/i915: add a helper to free the members of i915_params
  2018-12-21 13:31 [RFC PATCH 00/11] drm/i915: from module params to device params Jani Nikula
  2018-12-21 13:31 ` [RFC PATCH 01/11] drm/i915: add a helper to make a copy of i915_params Jani Nikula
@ 2018-12-21 13:31 ` Jani Nikula
  2018-12-21 13:31 ` [RFC PATCH 03/11] drm/i915/uc: add dev_priv parameter to intel_uc_is_using_* functions Jani Nikula
                   ` (12 subsequent siblings)
  14 siblings, 0 replies; 18+ messages in thread
From: Jani Nikula @ 2018-12-21 13:31 UTC (permalink / raw)
  To: intel-gfx; +Cc: jani.nikula

Abstract the one user in anticipation of more. Set the dangling pointers
to NULL while at it.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
 drivers/gpu/drm/i915/i915_gpu_error.c |  9 +--------
 drivers/gpu/drm/i915/i915_params.c    | 16 ++++++++++++++++
 drivers/gpu/drm/i915/i915_params.h    |  1 +
 3 files changed, 18 insertions(+), 8 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_gpu_error.c b/drivers/gpu/drm/i915/i915_gpu_error.c
index 8c04479c1586..2bd7991ec9af 100644
--- a/drivers/gpu/drm/i915/i915_gpu_error.c
+++ b/drivers/gpu/drm/i915/i915_gpu_error.c
@@ -963,17 +963,10 @@ static void i915_error_object_free(struct drm_i915_error_object *obj)
 	kfree(obj);
 }
 
-static __always_inline void free_param(const char *type, void *x)
-{
-	if (!__builtin_strcmp(type, "char *"))
-		kfree(*(void **)x);
-}
 
 static void cleanup_params(struct i915_gpu_state *error)
 {
-#define FREE(T, x, ...) free_param(#T, &error->params.x);
-	I915_PARAMS_FOR_EACH(FREE);
-#undef FREE
+	i915_params_free(&error->params);
 }
 
 static void cleanup_uc_state(struct i915_gpu_state *error)
diff --git a/drivers/gpu/drm/i915/i915_params.c b/drivers/gpu/drm/i915/i915_params.c
index ae3ece4ec7ab..81c73bfc7991 100644
--- a/drivers/gpu/drm/i915/i915_params.c
+++ b/drivers/gpu/drm/i915/i915_params.c
@@ -217,3 +217,19 @@ void i915_params_copy(struct i915_params *dest, const struct i915_params *src)
 	I915_PARAMS_FOR_EACH(DUP);
 #undef DUP
 }
+
+static __always_inline void free_param(const char *type, void *x)
+{
+	if (!__builtin_strcmp(type, "char *")) {
+		kfree(*(void **)x);
+		*(void **)x = NULL;
+	}
+}
+
+/* free the allocated members, *not* the passed in params itself */
+void i915_params_free(struct i915_params *params)
+{
+#define FREE(T, x, ...) free_param(#T, &params->x);
+	I915_PARAMS_FOR_EACH(FREE);
+#undef FREE
+}
diff --git a/drivers/gpu/drm/i915/i915_params.h b/drivers/gpu/drm/i915/i915_params.h
index fd1cf9415e60..93f665eced16 100644
--- a/drivers/gpu/drm/i915/i915_params.h
+++ b/drivers/gpu/drm/i915/i915_params.h
@@ -79,6 +79,7 @@ extern struct i915_params i915_modparams __read_mostly;
 
 void i915_params_dump(const struct i915_params *params, struct drm_printer *p);
 void i915_params_copy(struct i915_params *dest, const struct i915_params *src);
+void i915_params_free(struct i915_params *params);
 
 #endif
 
-- 
2.11.0

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

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

* [RFC PATCH 03/11] drm/i915/uc: add dev_priv parameter to intel_uc_is_using_* functions
  2018-12-21 13:31 [RFC PATCH 00/11] drm/i915: from module params to device params Jani Nikula
  2018-12-21 13:31 ` [RFC PATCH 01/11] drm/i915: add a helper to make a copy of i915_params Jani Nikula
  2018-12-21 13:31 ` [RFC PATCH 02/11] drm/i915: add a helper to free the members " Jani Nikula
@ 2018-12-21 13:31 ` Jani Nikula
  2018-12-21 14:59   ` Michal Wajdeczko
  2018-12-21 13:31 ` [RFC PATCH 04/11] drm/i915/params: set i915.enable_hangcheck permissions to 0600 Jani Nikula
                   ` (11 subsequent siblings)
  14 siblings, 1 reply; 18+ messages in thread
From: Jani Nikula @ 2018-12-21 13:31 UTC (permalink / raw)
  To: intel-gfx; +Cc: jani.nikula

Reveals the build fail fixed in the last hunk. Also prep work.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
 drivers/gpu/drm/i915/i915_drv.h    |  6 +++---
 drivers/gpu/drm/i915/intel_uc.c    | 12 ++++++------
 drivers/gpu/drm/i915/intel_uc.h    |  6 +++---
 drivers/gpu/drm/i915/intel_wopcm.c |  2 +-
 4 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index 815db160b966..b6158ec21065 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -2490,9 +2490,9 @@ intel_info(const struct drm_i915_private *dev_priv)
 #define HAS_HUC_UCODE(dev_priv)	(HAS_GUC(dev_priv))
 
 /* Having a GuC is not the same as using a GuC */
-#define USES_GUC(dev_priv)		intel_uc_is_using_guc()
-#define USES_GUC_SUBMISSION(dev_priv)	intel_uc_is_using_guc_submission()
-#define USES_HUC(dev_priv)		intel_uc_is_using_huc()
+#define USES_GUC(dev_priv)		intel_uc_is_using_guc(dev_priv)
+#define USES_GUC_SUBMISSION(dev_priv)	intel_uc_is_using_guc_submission(dev_priv)
+#define USES_HUC(dev_priv)		intel_uc_is_using_huc(dev_priv)
 
 #define HAS_POOLED_EU(dev_priv)	((dev_priv)->info.has_pooled_eu)
 
diff --git a/drivers/gpu/drm/i915/intel_uc.c b/drivers/gpu/drm/i915/intel_uc.c
index 447b1de77cc7..731b82afe636 100644
--- a/drivers/gpu/drm/i915/intel_uc.c
+++ b/drivers/gpu/drm/i915/intel_uc.c
@@ -71,7 +71,7 @@ static int __get_default_guc_log_level(struct drm_i915_private *i915)
 {
 	int guc_log_level;
 
-	if (!HAS_GUC(i915) || !intel_uc_is_using_guc())
+	if (!HAS_GUC(i915) || !intel_uc_is_using_guc(i915))
 		guc_log_level = GUC_LOG_LEVEL_DISABLED;
 	else if (IS_ENABLED(CONFIG_DRM_I915_DEBUG) ||
 		 IS_ENABLED(CONFIG_DRM_I915_DEBUG_GEM))
@@ -112,11 +112,11 @@ static void sanitize_options_early(struct drm_i915_private *i915)
 
 	DRM_DEBUG_DRIVER("enable_guc=%d (submission:%s huc:%s)\n",
 			 i915_modparams.enable_guc,
-			 yesno(intel_uc_is_using_guc_submission()),
-			 yesno(intel_uc_is_using_huc()));
+			 yesno(intel_uc_is_using_guc_submission(i915)),
+			 yesno(intel_uc_is_using_huc(i915)));
 
 	/* Verify GuC firmware availability */
-	if (intel_uc_is_using_guc() && !intel_uc_fw_is_selected(guc_fw)) {
+	if (intel_uc_is_using_guc(i915) && !intel_uc_fw_is_selected(guc_fw)) {
 		DRM_WARN("Incompatible option detected: %s=%d, %s!\n",
 			 "enable_guc", i915_modparams.enable_guc,
 			 !HAS_GUC(i915) ? "no GuC hardware" :
@@ -124,7 +124,7 @@ static void sanitize_options_early(struct drm_i915_private *i915)
 	}
 
 	/* Verify HuC firmware availability */
-	if (intel_uc_is_using_huc() && !intel_uc_fw_is_selected(huc_fw)) {
+	if (intel_uc_is_using_huc(i915) && !intel_uc_fw_is_selected(huc_fw)) {
 		DRM_WARN("Incompatible option detected: %s=%d, %s!\n",
 			 "enable_guc", i915_modparams.enable_guc,
 			 !HAS_HUC(i915) ? "no HuC hardware" :
@@ -136,7 +136,7 @@ static void sanitize_options_early(struct drm_i915_private *i915)
 		i915_modparams.guc_log_level =
 			__get_default_guc_log_level(i915);
 
-	if (i915_modparams.guc_log_level > 0 && !intel_uc_is_using_guc()) {
+	if (i915_modparams.guc_log_level > 0 && !intel_uc_is_using_guc(i915)) {
 		DRM_WARN("Incompatible option detected: %s=%d, %s!\n",
 			 "guc_log_level", i915_modparams.guc_log_level,
 			 !HAS_GUC(i915) ? "no GuC hardware" :
diff --git a/drivers/gpu/drm/i915/intel_uc.h b/drivers/gpu/drm/i915/intel_uc.h
index 25d73ada74ae..24990ade4fb8 100644
--- a/drivers/gpu/drm/i915/intel_uc.h
+++ b/drivers/gpu/drm/i915/intel_uc.h
@@ -41,19 +41,19 @@ void intel_uc_fini(struct drm_i915_private *dev_priv);
 int intel_uc_suspend(struct drm_i915_private *dev_priv);
 int intel_uc_resume(struct drm_i915_private *dev_priv);
 
-static inline bool intel_uc_is_using_guc(void)
+static inline bool intel_uc_is_using_guc(struct drm_i915_private *dev_priv)
 {
 	GEM_BUG_ON(i915_modparams.enable_guc < 0);
 	return i915_modparams.enable_guc > 0;
 }
 
-static inline bool intel_uc_is_using_guc_submission(void)
+static inline bool intel_uc_is_using_guc_submission(struct drm_i915_private *dev_priv)
 {
 	GEM_BUG_ON(i915_modparams.enable_guc < 0);
 	return i915_modparams.enable_guc & ENABLE_GUC_SUBMISSION;
 }
 
-static inline bool intel_uc_is_using_huc(void)
+static inline bool intel_uc_is_using_huc(struct drm_i915_private *dev_priv)
 {
 	GEM_BUG_ON(i915_modparams.enable_guc < 0);
 	return i915_modparams.enable_guc & ENABLE_GUC_LOAD_HUC;
diff --git a/drivers/gpu/drm/i915/intel_wopcm.c b/drivers/gpu/drm/i915/intel_wopcm.c
index 630c887682e8..f82a415ea2ba 100644
--- a/drivers/gpu/drm/i915/intel_wopcm.c
+++ b/drivers/gpu/drm/i915/intel_wopcm.c
@@ -163,7 +163,7 @@ int intel_wopcm_init(struct intel_wopcm *wopcm)
 	u32 guc_wopcm_rsvd;
 	int err;
 
-	if (!USES_GUC(dev_priv))
+	if (!USES_GUC(i915))
 		return 0;
 
 	GEM_BUG_ON(!wopcm->size);
-- 
2.11.0

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

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

* [RFC PATCH 04/11] drm/i915/params: set i915.enable_hangcheck permissions to 0600
  2018-12-21 13:31 [RFC PATCH 00/11] drm/i915: from module params to device params Jani Nikula
                   ` (2 preceding siblings ...)
  2018-12-21 13:31 ` [RFC PATCH 03/11] drm/i915/uc: add dev_priv parameter to intel_uc_is_using_* functions Jani Nikula
@ 2018-12-21 13:31 ` Jani Nikula
  2018-12-21 13:31 ` [RFC PATCH 05/11] drm/i915: move load failure injection to selftests Jani Nikula
                   ` (10 subsequent siblings)
  14 siblings, 0 replies; 18+ messages in thread
From: Jani Nikula @ 2018-12-21 13:31 UTC (permalink / raw)
  To: intel-gfx; +Cc: jani.nikula

i915.enable_hangcheck has been an outlier since its introduction in
commit 3e0dc6b01f53 ("drm/i915: hangcheck disable parameter") with 0644
permissions, while all the rest are either 0400 or 0600. Follow suit
with 0600.

IGT never reads the value, so there should be no impact.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
 drivers/gpu/drm/i915/i915_params.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/i915_params.c b/drivers/gpu/drm/i915/i915_params.c
index 81c73bfc7991..9f0539bdaa39 100644
--- a/drivers/gpu/drm/i915/i915_params.c
+++ b/drivers/gpu/drm/i915/i915_params.c
@@ -77,7 +77,7 @@ i915_param_named(error_capture, bool, 0600,
 	"triaging and debugging hangs.");
 #endif
 
-i915_param_named_unsafe(enable_hangcheck, bool, 0644,
+i915_param_named_unsafe(enable_hangcheck, bool, 0600,
 	"Periodically check GPU activity for detecting hangs. "
 	"WARNING: Disabling this can cause system wide hangs. "
 	"(default: true)");
-- 
2.11.0

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

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

* [RFC PATCH 05/11] drm/i915: move load failure injection to selftests
  2018-12-21 13:31 [RFC PATCH 00/11] drm/i915: from module params to device params Jani Nikula
                   ` (3 preceding siblings ...)
  2018-12-21 13:31 ` [RFC PATCH 04/11] drm/i915/params: set i915.enable_hangcheck permissions to 0600 Jani Nikula
@ 2018-12-21 13:31 ` Jani Nikula
  2018-12-21 13:31 ` [RFC PATCH 06/11] drm/i915/params: document I915_PARAMS_FOR_EACH() Jani Nikula
                   ` (9 subsequent siblings)
  14 siblings, 0 replies; 18+ messages in thread
From: Jani Nikula @ 2018-12-21 13:31 UTC (permalink / raw)
  To: intel-gfx; +Cc: jani.nikula

Seems like selftests is a better home for everything related to load
failure injection, including the module parameter.

The failure injection code gets moved from under DRM_I915_DEBUG to
DRM_I915_SELFTEST config option. This should be of no consequence, as
the former selects the latter.

With the parameter no longer part of i915_params, its value will not be
recorded in error capture or debugfs param dump. Note that the value
would have been zeroed anyway if a selftest had been hit, so there
should not be meaningful information loss here, especially with all the
logging around failure injection.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
 drivers/gpu/drm/i915/i915_drv.c                | 25 -------------------------
 drivers/gpu/drm/i915/i915_drv.h                | 15 ---------------
 drivers/gpu/drm/i915/i915_params.c             |  5 -----
 drivers/gpu/drm/i915/i915_params.h             |  1 -
 drivers/gpu/drm/i915/i915_selftest.h           | 10 ++++++++++
 drivers/gpu/drm/i915/selftests/i915_selftest.c | 26 ++++++++++++++++++++++++++
 6 files changed, 36 insertions(+), 46 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
index caa055ac9472..559a1b11f3e4 100644
--- a/drivers/gpu/drm/i915/i915_drv.c
+++ b/drivers/gpu/drm/i915/i915_drv.c
@@ -57,31 +57,6 @@
 
 static struct drm_driver driver;
 
-#if IS_ENABLED(CONFIG_DRM_I915_DEBUG)
-static unsigned int i915_load_fail_count;
-
-bool __i915_inject_load_failure(const char *func, int line)
-{
-	if (i915_load_fail_count >= i915_modparams.inject_load_failure)
-		return false;
-
-	if (++i915_load_fail_count == i915_modparams.inject_load_failure) {
-		DRM_INFO("Injecting failure at checkpoint %u [%s:%d]\n",
-			 i915_modparams.inject_load_failure, func, line);
-		i915_modparams.inject_load_failure = 0;
-		return true;
-	}
-
-	return false;
-}
-
-bool i915_error_injected(void)
-{
-	return i915_load_fail_count && !i915_modparams.inject_load_failure;
-}
-
-#endif
-
 #define FDO_BUG_URL "https://bugs.freedesktop.org/enter_bug.cgi?product=DRI"
 #define FDO_BUG_MSG "Please file a bug at " FDO_BUG_URL " against DRM/Intel " \
 		    "providing the dmesg log by booting with drm.debug=0xf"
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index b6158ec21065..fef4da3bddc5 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -111,21 +111,6 @@
 #define I915_STATE_WARN_ON(x)						\
 	I915_STATE_WARN((x), "%s", "WARN_ON(" __stringify(x) ")")
 
-#if IS_ENABLED(CONFIG_DRM_I915_DEBUG)
-
-bool __i915_inject_load_failure(const char *func, int line);
-#define i915_inject_load_failure() \
-	__i915_inject_load_failure(__func__, __LINE__)
-
-bool i915_error_injected(void);
-
-#else
-
-#define i915_inject_load_failure() false
-#define i915_error_injected() false
-
-#endif
-
 #define i915_load_error(i915, fmt, ...)					 \
 	__i915_printk(i915, i915_error_injected() ? KERN_DEBUG : KERN_ERR, \
 		      fmt, ##__VA_ARGS__)
diff --git a/drivers/gpu/drm/i915/i915_params.c b/drivers/gpu/drm/i915/i915_params.c
index 9f0539bdaa39..2853b54570eb 100644
--- a/drivers/gpu/drm/i915/i915_params.c
+++ b/drivers/gpu/drm/i915/i915_params.c
@@ -159,11 +159,6 @@ i915_param_named_unsafe(dmc_firmware_path, charp, 0400,
 i915_param_named_unsafe(enable_dp_mst, bool, 0600,
 	"Enable multi-stream transport (MST) for new DisplayPort sinks. (default: true)");
 
-#if IS_ENABLED(CONFIG_DRM_I915_DEBUG)
-i915_param_named_unsafe(inject_load_failure, uint, 0400,
-	"Force an error after a number of failure check points (0:disabled (default), N:force failure at the Nth failure check point)");
-#endif
-
 i915_param_named(enable_dpcd_backlight, bool, 0600,
 	"Enable support for DPCD backlight control (default:false)");
 
diff --git a/drivers/gpu/drm/i915/i915_params.h b/drivers/gpu/drm/i915/i915_params.h
index 93f665eced16..85a9007c0ed6 100644
--- a/drivers/gpu/drm/i915/i915_params.h
+++ b/drivers/gpu/drm/i915/i915_params.h
@@ -53,7 +53,6 @@ struct drm_printer;
 	param(int, mmio_debug, 0) \
 	param(int, edp_vswing, 0) \
 	param(int, reset, 2) \
-	param(unsigned int, inject_load_failure, 0) \
 	/* 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) \
diff --git a/drivers/gpu/drm/i915/i915_selftest.h b/drivers/gpu/drm/i915/i915_selftest.h
index a73472dd12fd..1266cef8bf17 100644
--- a/drivers/gpu/drm/i915/i915_selftest.h
+++ b/drivers/gpu/drm/i915/i915_selftest.h
@@ -33,6 +33,7 @@ struct i915_selftest {
 	unsigned int random_seed;
 	int mock;
 	int live;
+	unsigned int inject_load_failure;
 };
 
 #if IS_ENABLED(CONFIG_DRM_I915_SELFTEST)
@@ -77,6 +78,12 @@ int __i915_subtests(const char *caller,
 #define I915_SELFTEST_DECLARE(x) x
 #define I915_SELFTEST_ONLY(x) unlikely(x)
 
+bool __i915_inject_load_failure(const char *func, int line);
+#define i915_inject_load_failure() \
+	__i915_inject_load_failure(__func__, __LINE__)
+
+bool i915_error_injected(void);
+
 #else /* !IS_ENABLED(CONFIG_DRM_I915_SELFTEST) */
 
 static inline int i915_mock_selftests(void) { return 0; }
@@ -85,6 +92,9 @@ static inline int i915_live_selftests(struct pci_dev *pdev) { return 0; }
 #define I915_SELFTEST_DECLARE(x)
 #define I915_SELFTEST_ONLY(x) 0
 
+static inline int i915_inject_load_failure(void) { return false; }
+static inline int i915_error_injected(void) { return false; }
+
 #endif
 
 /* Using the i915_selftest_ prefix becomes a little unwieldy with the helpers.
diff --git a/drivers/gpu/drm/i915/selftests/i915_selftest.c b/drivers/gpu/drm/i915/selftests/i915_selftest.c
index 86c54ea37f48..9e556fc4707d 100644
--- a/drivers/gpu/drm/i915/selftests/i915_selftest.c
+++ b/drivers/gpu/drm/i915/selftests/i915_selftest.c
@@ -250,3 +250,29 @@ MODULE_PARM_DESC(mock_selftests, "Run selftests before loading, using mock hardw
 
 module_param_named_unsafe(live_selftests, i915_selftest.live, int, 0400);
 MODULE_PARM_DESC(live_selftests, "Run selftests after driver initialisation on the live system (0:disabled [default], 1:run tests then continue, -1:run tests then exit module)");
+
+module_param_named_unsafe(inject_load_failure, i915_selftest.inject_load_failure, uint, 0400);
+MODULE_PARM_DESC(inject_load_failure,
+		 "Force an error after a number of failure check points (0:disabled (default), N:force failure at the Nth failure check point)");
+
+static unsigned int i915_load_fail_count;
+
+bool __i915_inject_load_failure(const char *func, int line)
+{
+	if (i915_load_fail_count >= i915_selftest.inject_load_failure)
+		return false;
+
+	if (++i915_load_fail_count == i915_selftest.inject_load_failure) {
+		DRM_INFO("Injecting failure at checkpoint %u [%s:%d]\n",
+			 i915_selftest.inject_load_failure, func, line);
+		i915_selftest.inject_load_failure = 0;
+		return true;
+	}
+
+	return false;
+}
+
+bool i915_error_injected(void)
+{
+	return i915_load_fail_count && !i915_selftest.inject_load_failure;
+}
-- 
2.11.0

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

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

* [RFC PATCH 06/11] drm/i915/params: document I915_PARAMS_FOR_EACH()
  2018-12-21 13:31 [RFC PATCH 00/11] drm/i915: from module params to device params Jani Nikula
                   ` (4 preceding siblings ...)
  2018-12-21 13:31 ` [RFC PATCH 05/11] drm/i915: move load failure injection to selftests Jani Nikula
@ 2018-12-21 13:31 ` Jani Nikula
  2018-12-21 13:31 ` [RFC PATCH 07/11] drm/i915/params: add i915 parameters to debugfs Jani Nikula
                   ` (8 subsequent siblings)
  14 siblings, 0 replies; 18+ messages in thread
From: Jani Nikula @ 2018-12-21 13:31 UTC (permalink / raw)
  To: intel-gfx; +Cc: jani.nikula

Macros with this much magic in them deserve some explanatory text.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
 drivers/gpu/drm/i915/i915_params.h | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/drivers/gpu/drm/i915/i915_params.h b/drivers/gpu/drm/i915/i915_params.h
index 85a9007c0ed6..98eba6728095 100644
--- a/drivers/gpu/drm/i915/i915_params.h
+++ b/drivers/gpu/drm/i915/i915_params.h
@@ -33,6 +33,15 @@ struct drm_printer;
 #define ENABLE_GUC_SUBMISSION		BIT(0)
 #define ENABLE_GUC_LOAD_HUC		BIT(1)
 
+/*
+ * Invoke param, a function-like macro, for each i915 param, with arguments:
+ *
+ * param(type, name, value)
+ *
+ * type: parameter type, one of {bool, int, unsigned int, char *}
+ * name: name of the parameter
+ * value: initial/default value of the parameter
+ */
 #define I915_PARAMS_FOR_EACH(param) \
 	param(char *, vbt_firmware, NULL) \
 	param(int, modeset, -1) \
-- 
2.11.0

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

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

* [RFC PATCH 07/11] drm/i915/params: add i915 parameters to debugfs
  2018-12-21 13:31 [RFC PATCH 00/11] drm/i915: from module params to device params Jani Nikula
                   ` (5 preceding siblings ...)
  2018-12-21 13:31 ` [RFC PATCH 06/11] drm/i915/params: document I915_PARAMS_FOR_EACH() Jani Nikula
@ 2018-12-21 13:31 ` Jani Nikula
       [not found] ` <cover.1545396674.git.jani.nikula@intel.com>
                   ` (7 subsequent siblings)
  14 siblings, 0 replies; 18+ messages in thread
From: Jani Nikula @ 2018-12-21 13:31 UTC (permalink / raw)
  To: intel-gfx; +Cc: 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.

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.

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

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
 drivers/gpu/drm/i915/i915_debugfs.c | 197 ++++++++++++++++++++++++++++++++++++
 drivers/gpu/drm/i915/i915_params.c  |   2 +-
 drivers/gpu/drm/i915/i915_params.h  |  68 +++++++------
 3 files changed, 233 insertions(+), 34 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
index aca26a25ed50..33375cf79713 100644
--- a/drivers/gpu/drm/i915/i915_debugfs.c
+++ b/drivers/gpu/drm/i915/i915_debugfs.c
@@ -37,6 +37,201 @@ static inline struct drm_i915_private *node_to_i915(struct drm_info_node *node)
 	return to_i915(node->minor->dev);
 }
 
+/* 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: racy */
+	old = *s;
+	new = strndup_user(ubuf, PAGE_SIZE);
+	if (IS_ERR(new))
+		return PTR_ERR(new);
+
+	*s = new;
+
+	kfree(old);
+
+	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,
+};
+
+static __always_inline void
+_i915_param_create_file(struct dentry *parent, const char *name,
+			const char *type, int mode, void *value)
+{
+	bool ro = !(mode & 0222);
+
+	if (!mode)
+		return;
+
+	if (!__builtin_strcmp(type, "bool"))
+		debugfs_create_bool(name, mode, parent, value);
+	else if (!__builtin_strcmp(type, "int"))
+		debugfs_create_file_unsafe(name, mode, parent, value,
+					   ro ? &i915_param_int_fops_ro :
+					   &i915_param_int_fops);
+	else if (!__builtin_strcmp(type, "unsigned int"))
+		debugfs_create_file_unsafe(name, mode, parent, value,
+					   ro ? &i915_param_uint_fops_ro :
+					   &i915_param_uint_fops);
+	else if (!__builtin_strcmp(type, "char *"))
+		debugfs_create_file(name, mode, parent, value,
+				    ro ? &i915_param_charp_fops_ro :
+				    &i915_param_charp_fops);
+	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 */
+static int i915_debugfs_params(struct drm_i915_private *dev_priv)
+{
+	struct drm_minor *minor = dev_priv->drm.primary;
+	struct i915_params *params = &i915_modparams;
+	struct dentry *dir;
+
+	dir = debugfs_create_dir("i915_params", minor->debugfs_root);
+	if (!dir)
+		return -ENOMEM;
+
+	/*
+	 * 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 0;
+}
+
 static int i915_capabilities(struct seq_file *m, void *data)
 {
 	struct drm_i915_private *dev_priv = node_to_i915(m->private);
@@ -4970,6 +5165,8 @@ int i915_debugfs_register(struct drm_i915_private *dev_priv)
 	struct dentry *ent;
 	int i;
 
+	i915_debugfs_params(dev_priv);
+
 	ent = debugfs_create_file("i915_forcewake_user", S_IRUSR,
 				  minor->debugfs_root, to_i915(minor->dev),
 				  &i915_forcewake_fops);
diff --git a/drivers/gpu/drm/i915/i915_params.c b/drivers/gpu/drm/i915/i915_params.c
index 2853b54570eb..b1a8b8f7dac9 100644
--- a/drivers/gpu/drm/i915/i915_params.c
+++ b/drivers/gpu/drm/i915/i915_params.c
@@ -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
 };
diff --git a/drivers/gpu/drm/i915/i915_params.h b/drivers/gpu/drm/i915/i915_params.h
index 98eba6728095..30c32e288efe 100644
--- a/drivers/gpu/drm/i915/i915_params.h
+++ b/drivers/gpu/drm/i915/i915_params.h
@@ -36,46 +36,48 @@ 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 *}
  * 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, 0) \
-	param(int, edp_vswing, 0) \
-	param(int, reset, 2) \
+	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, 0, 0600) \
+	param(int, edp_vswing, 0, 0400) \
+	param(int, reset, 2, 0600) \
 	/* 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, fastboot, false) \
-	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_dpcd_backlight, false) \
-	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, fastboot, false, 0600) \
+	param(bool, prefault_disable, false, 0600) \
+	param(bool, load_detect_test, false, 0600) \
+	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_dpcd_backlight, false, 0600) \
+	param(bool, enable_gvt, false, 0400)
 
 #define MEMBER(T, member, ...) T member;
 struct i915_params {
-- 
2.11.0

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

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

* [RFC PATCH 08/11] drm/i915/debugfs: support bool values for int and uint params
       [not found] ` <cover.1545396674.git.jani.nikula@intel.com>
@ 2018-12-21 13:31   ` Jani Nikula
  2018-12-21 13:42     ` Jani Nikula
  0 siblings, 1 reply; 18+ messages in thread
From: Jani Nikula @ 2018-12-21 13:31 UTC (permalink / raw)
  To: intel-gfx; +Cc: 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 for ints.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
 drivers/gpu/drm/i915/i915_debugfs.c | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
index 33375cf79713..c9e2cf8e071a 100644
--- a/drivers/gpu/drm/i915/i915_debugfs.c
+++ b/drivers/gpu/drm/i915/i915_debugfs.c
@@ -61,6 +61,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;
 }
@@ -106,6 +113,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;
 }
-- 
2.11.0

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

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

* [RFC PATCH 08/11] drm/i915/params: support bool values for int and uint params
  2018-12-21 13:31 [RFC PATCH 00/11] drm/i915: from module params to device params Jani Nikula
                   ` (7 preceding siblings ...)
       [not found] ` <cover.1545396674.git.jani.nikula@intel.com>
@ 2018-12-21 13:31 ` Jani Nikula
  2018-12-21 13:31 ` [RFC PATCH 09/11] drm/i915/params: prevent changing module params runtime Jani Nikula
                   ` (5 subsequent siblings)
  14 siblings, 0 replies; 18+ messages in thread
From: Jani Nikula @ 2018-12-21 13:31 UTC (permalink / raw)
  To: intel-gfx; +Cc: 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 for ints.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
 drivers/gpu/drm/i915/i915_debugfs.c | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
index 33375cf79713..c9e2cf8e071a 100644
--- a/drivers/gpu/drm/i915/i915_debugfs.c
+++ b/drivers/gpu/drm/i915/i915_debugfs.c
@@ -61,6 +61,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;
 }
@@ -106,6 +113,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;
 }
-- 
2.11.0

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

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

* [RFC PATCH 09/11] drm/i915/params: prevent changing module params runtime
  2018-12-21 13:31 [RFC PATCH 00/11] drm/i915: from module params to device params Jani Nikula
                   ` (8 preceding siblings ...)
  2018-12-21 13:31 ` [RFC PATCH 08/11] drm/i915/params: " Jani Nikula
@ 2018-12-21 13:31 ` Jani Nikula
  2018-12-21 13:31 ` [RFC PATCH 10/11] drm/i915/params: switch to device specific parameters Jani Nikula
                   ` (4 subsequent siblings)
  14 siblings, 0 replies; 18+ messages in thread
From: Jani Nikula @ 2018-12-21 13:31 UTC (permalink / raw)
  To: intel-gfx; +Cc: jani.nikula

Only support runtime changes through the debugfs.

i915.verbose_state_checks remains an exception, and is not exposed via
debugfs.

FIXME: Before this gets applied, IGT needs to be changed to use the
debugfs for modifying the parameters. IGT changes at least the following
through module parameter sysfs:

 * enable_fbc
 * reset
 * enable_hangcheck
 * enable_psr
 * fastboot
 * prefault_disable
 * load_detect_test
 * force_reset_modeset_test

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
 drivers/gpu/drm/i915/i915_params.c | 40 ++++++++++++++++++++++++--------------
 1 file changed, 25 insertions(+), 15 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_params.c b/drivers/gpu/drm/i915/i915_params.c
index b1a8b8f7dac9..61cde445346e 100644
--- a/drivers/gpu/drm/i915/i915_params.c
+++ b/drivers/gpu/drm/i915/i915_params.c
@@ -40,6 +40,15 @@ struct i915_params i915_modparams __read_mostly = {
 #undef MEMBER
 };
 
+/*
+ * Note: As a rule, keep module parameter sysfs permissions read-only
+ * 0400. Runtime changes are only supported through i915 debugfs.
+ *
+ * For any exceptions requiring write access and runtime changes through module
+ * parameter sysfs, prevent debugfs file creation by setting the parameter's
+ * debugfs mode to 0.
+ */
+
 i915_param_named(modeset, int, 0400,
 	"Use kernel modesetting [KMS] (0=disable, "
 	"1=on, -1=force vga console preference [default])");
@@ -48,7 +57,7 @@ i915_param_named_unsafe(enable_dc, int, 0400,
 	"Enable power-saving display C-states. "
 	"(-1=auto [default]; 0=disable; 1=up to DC5; 2=up to DC6)");
 
-i915_param_named_unsafe(enable_fbc, int, 0600,
+i915_param_named_unsafe(enable_fbc, int, 0400,
 	"Enable frame buffer compression for power savings "
 	"(default: -1 (use per-chip default))");
 
@@ -56,7 +65,7 @@ i915_param_named_unsafe(lvds_channel_mode, int, 0400,
 	 "Specify LVDS channel mode "
 	 "(0=probe BIOS [default], 1=single-channel, 2=dual-channel)");
 
-i915_param_named_unsafe(panel_use_ssc, int, 0600,
+i915_param_named_unsafe(panel_use_ssc, int, 0400,
 	"Use Spread Spectrum Clock with panels [LVDS/eDP] "
 	"(default: auto from VBT)");
 
@@ -64,25 +73,25 @@ i915_param_named_unsafe(vbt_sdvo_panel_type, int, 0400,
 	"Override/Ignore selection of SDVO panel mode in the VBT "
 	"(-2=ignore, -1=auto [default], index in VBT BIOS table)");
 
-i915_param_named_unsafe(reset, int, 0600,
+i915_param_named_unsafe(reset, int, 0400,
 	"Attempt GPU resets (0=disabled, 1=full gpu reset, 2=engine reset [default])");
 
 i915_param_named_unsafe(vbt_firmware, charp, 0400,
 	"Load VBT from specified file under /lib/firmware");
 
 #if IS_ENABLED(CONFIG_DRM_I915_CAPTURE_ERROR)
-i915_param_named(error_capture, bool, 0600,
+i915_param_named(error_capture, bool, 0400,
 	"Record the GPU state following a hang. "
 	"This information in /sys/class/drm/card<N>/error is vital for "
 	"triaging and debugging hangs.");
 #endif
 
-i915_param_named_unsafe(enable_hangcheck, bool, 0600,
+i915_param_named_unsafe(enable_hangcheck, bool, 0400,
 	"Periodically check GPU activity for detecting hangs. "
 	"WARNING: Disabling this can cause system wide hangs. "
 	"(default: true)");
 
-i915_param_named_unsafe(enable_psr, int, 0600,
+i915_param_named_unsafe(enable_psr, int, 0400,
 	"Enable PSR "
 	"(0=disabled, 1=enabled) "
 	"Default: -1 (use per-chip default)");
@@ -95,24 +104,24 @@ i915_param_named_unsafe(disable_power_well, int, 0400,
 	"Disable display power wells when possible "
 	"(-1=auto [default], 0=power wells always on, 1=power wells disabled when possible)");
 
-i915_param_named_unsafe(enable_ips, int, 0600, "Enable IPS (default: true)");
+i915_param_named_unsafe(enable_ips, int, 0400, "Enable IPS (default: true)");
 
-i915_param_named(fastboot, bool, 0600,
+i915_param_named(fastboot, bool, 0400,
 	"Try to skip unnecessary mode sets at boot time (default: false)");
 
-i915_param_named_unsafe(prefault_disable, bool, 0600,
+i915_param_named_unsafe(prefault_disable, bool, 0400,
 	"Disable page prefaulting for pread/pwrite/reloc (default:false). "
 	"For developers only.");
 
-i915_param_named_unsafe(load_detect_test, bool, 0600,
+i915_param_named_unsafe(load_detect_test, bool, 0400,
 	"Force-enable the VGA load detect code for testing (default:false). "
 	"For developers only.");
 
-i915_param_named_unsafe(force_reset_modeset_test, bool, 0600,
+i915_param_named_unsafe(force_reset_modeset_test, bool, 0400,
 	"Force a modeset during gpu reset for testing (default:false). "
 	"For developers only.");
 
-i915_param_named_unsafe(invert_brightness, int, 0600,
+i915_param_named_unsafe(invert_brightness, int, 0400,
 	"Invert backlight brightness "
 	"(-1 force normal, 0 machine defaults, 1 force inversion), please "
 	"report PCI device ID, subsystem vendor and subsystem device ID "
@@ -122,10 +131,11 @@ i915_param_named_unsafe(invert_brightness, int, 0600,
 i915_param_named(disable_display, bool, 0400,
 	"Disable display (default: false)");
 
-i915_param_named(mmio_debug, int, 0600,
+i915_param_named(mmio_debug, int, 0400,
 	"Enable the MMIO debug code for the first N failures (default: off). "
 	"This may negatively affect performance.");
 
+/* Special case writable file */
 i915_param_named(verbose_state_checks, bool, 0600,
 	"Enable verbose logs (ie. WARN_ON()) in case of unexpected hw state conditions.");
 
@@ -156,10 +166,10 @@ i915_param_named_unsafe(huc_firmware_path, charp, 0400,
 i915_param_named_unsafe(dmc_firmware_path, charp, 0400,
 	"DMC firmware path to use instead of the default one");
 
-i915_param_named_unsafe(enable_dp_mst, bool, 0600,
+i915_param_named_unsafe(enable_dp_mst, bool, 0400,
 	"Enable multi-stream transport (MST) for new DisplayPort sinks. (default: true)");
 
-i915_param_named(enable_dpcd_backlight, bool, 0600,
+i915_param_named(enable_dpcd_backlight, bool, 0400,
 	"Enable support for DPCD backlight control (default:false)");
 
 #if IS_ENABLED(CONFIG_DRM_I915_GVT)
-- 
2.11.0

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

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

* [RFC PATCH 10/11] drm/i915/params: switch to device specific parameters
  2018-12-21 13:31 [RFC PATCH 00/11] drm/i915: from module params to device params Jani Nikula
                   ` (9 preceding siblings ...)
  2018-12-21 13:31 ` [RFC PATCH 09/11] drm/i915/params: prevent changing module params runtime Jani Nikula
@ 2018-12-21 13:31 ` Jani Nikula
  2018-12-21 13:31 ` [RFC PATCH 11/11] drm/i915/params: hide i915_modparams within i915_params.c Jani Nikula
                   ` (3 subsequent siblings)
  14 siblings, 0 replies; 18+ messages in thread
From: Jani Nikula @ 2018-12-21 13:31 UTC (permalink / raw)
  To: intel-gfx; +Cc: jani.nikula

Start using device specific parameters instead of module parameters for
most things. The module parameters become the immutable initial values
for i915 parameters. Any later changes are only reflected in the
debugfs.

The stragglers are:

* i915.alpha_support and i915.modeset. Needed before dev_priv is
  available. This is fine because the parameters are read-only and never
  modified.

* i915.verbose_state_checks. Passing dev_priv to I915_STATE_WARN and
  I915_STATE_WARN_ON would result in massive and ugly churn. This is
  handled by not exposing the parameter via debugfs, and leaving the
  parameter writable in sysfs.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
 drivers/gpu/drm/i915/i915_debugfs.c              |  8 ++--
 drivers/gpu/drm/i915/i915_drv.c                  | 12 +++--
 drivers/gpu/drm/i915/i915_drv.h                  |  5 ++-
 drivers/gpu/drm/i915/i915_gem_execbuffer.c       |  2 +-
 drivers/gpu/drm/i915/i915_gpu_error.c            |  4 +-
 drivers/gpu/drm/i915/intel_bios.c                |  6 +--
 drivers/gpu/drm/i915/intel_crt.c                 |  4 +-
 drivers/gpu/drm/i915/intel_csr.c                 |  6 +--
 drivers/gpu/drm/i915/intel_device_info.c         |  2 +-
 drivers/gpu/drm/i915/intel_display.c             | 10 ++---
 drivers/gpu/drm/i915/intel_dp.c                  | 11 +++--
 drivers/gpu/drm/i915/intel_dp_aux_backlight.c    |  3 +-
 drivers/gpu/drm/i915/intel_fbc.c                 | 12 ++---
 drivers/gpu/drm/i915/intel_guc_fw.c              |  4 +-
 drivers/gpu/drm/i915/intel_guc_log.c             |  3 +-
 drivers/gpu/drm/i915/intel_gvt.c                 |  8 ++--
 drivers/gpu/drm/i915/intel_hangcheck.c           |  2 +-
 drivers/gpu/drm/i915/intel_huc_fw.c              |  4 +-
 drivers/gpu/drm/i915/intel_lvds.c                |  4 +-
 drivers/gpu/drm/i915/intel_opregion.c            |  2 +-
 drivers/gpu/drm/i915/intel_panel.c               |  4 +-
 drivers/gpu/drm/i915/intel_psr.c                 | 14 +++---
 drivers/gpu/drm/i915/intel_runtime_pm.c          | 14 +++---
 drivers/gpu/drm/i915/intel_uc.c                  | 56 ++++++++++++++++--------
 drivers/gpu/drm/i915/intel_uc.h                  | 21 ++-------
 drivers/gpu/drm/i915/intel_uncore.c              | 18 ++++----
 drivers/gpu/drm/i915/selftests/intel_hangcheck.c |  4 +-
 27 files changed, 131 insertions(+), 112 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
index c9e2cf8e071a..29ab4e5967fd 100644
--- a/drivers/gpu/drm/i915/i915_debugfs.c
+++ b/drivers/gpu/drm/i915/i915_debugfs.c
@@ -226,7 +226,7 @@ _i915_param_create_file(struct dentry *parent, const char *name,
 static int i915_debugfs_params(struct drm_i915_private *dev_priv)
 {
 	struct drm_minor *minor = dev_priv->drm.primary;
-	struct i915_params *params = &i915_modparams;
+	struct i915_params *params = &dev_priv->params;
 	struct dentry *dir;
 
 	dir = debugfs_create_dir("i915_params", minor->debugfs_root);
@@ -261,7 +261,7 @@ static int i915_capabilities(struct seq_file *m, void *data)
 	intel_driver_caps_print(&dev_priv->caps, &p);
 
 	kernel_param_lock(THIS_MODULE);
-	i915_params_dump(&i915_modparams, &p);
+	i915_params_dump(&dev_priv->params, &p);
 	kernel_param_unlock(THIS_MODULE);
 
 	return 0;
@@ -1541,7 +1541,7 @@ static int i915_hangcheck_info(struct seq_file *m, void *unused)
 	if (waitqueue_active(&dev_priv->gpu_error.reset_queue))
 		seq_puts(m, "struct_mutex blocked for reset\n");
 
-	if (!i915_modparams.enable_hangcheck) {
+	if (!dev_priv->params.enable_hangcheck) {
 		seq_puts(m, "Hangcheck disabled\n");
 		return 0;
 	}
@@ -1947,7 +1947,7 @@ static int i915_ips_status(struct seq_file *m, void *unused)
 	intel_runtime_pm_get(dev_priv);
 
 	seq_printf(m, "Enabled by kernel parameter: %s\n",
-		   yesno(i915_modparams.enable_ips));
+		   yesno(dev_priv->params.enable_ips));
 
 	if (INTEL_GEN(dev_priv) >= 8) {
 		seq_puts(m, "Currently: unknown\n");
diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
index 559a1b11f3e4..cfe1f93f9683 100644
--- a/drivers/gpu/drm/i915/i915_drv.c
+++ b/drivers/gpu/drm/i915/i915_drv.c
@@ -343,7 +343,7 @@ static int i915_getparam_ioctl(struct drm_device *dev, void *data,
 			return -ENODEV;
 		break;
 	case I915_PARAM_HAS_GPU_RESET:
-		value = i915_modparams.enable_hangcheck &&
+		value = dev_priv->params.enable_hangcheck &&
 			intel_has_gpu_reset(dev_priv);
 		if (value && intel_has_reset_engine(dev_priv))
 			value = 2;
@@ -1642,6 +1642,9 @@ i915_driver_create(struct pci_dev *pdev, const struct pci_device_id *ent)
 		return ERR_PTR(err);
 	}
 
+	/* Device parameters start as a copy of module parameters. */
+	i915_params_copy(&i915->params, &i915_modparams);
+
 	i915->drm.pdev = pdev;
 	i915->drm.dev_private = i915;
 	pci_set_drvdata(pdev, &i915->drm);
@@ -1663,6 +1666,9 @@ static void i915_driver_destroy(struct drm_i915_private *i915)
 	struct pci_dev *pdev = i915->drm.pdev;
 
 	drm_dev_fini(&i915->drm);
+
+	i915_params_free(&i915->params);
+
 	kfree(i915);
 
 	/* And make sure we never chase our dangling pointer from pci_dev */
@@ -1692,7 +1698,7 @@ int i915_driver_load(struct pci_dev *pdev, const struct pci_device_id *ent)
 		return PTR_ERR(dev_priv);
 
 	/* Disable nuclear pageflip by default on pre-ILK */
-	if (!i915_modparams.nuclear_pageflip && match_info->gen < 5)
+	if (!dev_priv->params.nuclear_pageflip && match_info->gen < 5)
 		dev_priv->drm.driver_features &= ~DRIVER_ATOMIC;
 
 	ret = pci_enable_device(pdev);
@@ -2222,7 +2228,7 @@ void i915_reset(struct drm_i915_private *i915,
 	}
 
 	if (!intel_has_gpu_reset(i915)) {
-		if (i915_modparams.reset)
+		if (i915->params.reset)
 			dev_err(i915->drm.dev, "GPU reset not supported\n");
 		else
 			DRM_DEBUG_DRIVER("GPU reset disabled\n");
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index fef4da3bddc5..baacd37c7259 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -1416,6 +1416,9 @@ struct drm_i915_private {
 	struct kmem_cache *dependencies;
 	struct kmem_cache *priorities;
 
+	/* i915 device parameters */
+	struct i915_params params;
+
 	const struct intel_device_info info;
 	struct intel_driver_caps caps;
 
@@ -2616,7 +2619,7 @@ static inline void i915_queue_hangcheck(struct drm_i915_private *dev_priv)
 {
 	unsigned long delay;
 
-	if (unlikely(!i915_modparams.enable_hangcheck))
+	if (unlikely(!dev_priv->params.enable_hangcheck))
 		return;
 
 	/* Don't continually defer the hangcheck so that it is always run at
diff --git a/drivers/gpu/drm/i915/i915_gem_execbuffer.c b/drivers/gpu/drm/i915/i915_gem_execbuffer.c
index 7314074d4680..e1e88d680891 100644
--- a/drivers/gpu/drm/i915/i915_gem_execbuffer.c
+++ b/drivers/gpu/drm/i915/i915_gem_execbuffer.c
@@ -1650,7 +1650,7 @@ static int eb_prefault_relocations(const struct i915_execbuffer *eb)
 	const unsigned int count = eb->buffer_count;
 	unsigned int i;
 
-	if (unlikely(i915_modparams.prefault_disable))
+	if (unlikely(eb->i915->params.prefault_disable))
 		return 0;
 
 	for (i = 0; i < count; i++) {
diff --git a/drivers/gpu/drm/i915/i915_gpu_error.c b/drivers/gpu/drm/i915/i915_gpu_error.c
index 2bd7991ec9af..a5026f853391 100644
--- a/drivers/gpu/drm/i915/i915_gpu_error.c
+++ b/drivers/gpu/drm/i915/i915_gpu_error.c
@@ -1829,7 +1829,7 @@ static void capture_gen_state(struct i915_gpu_state *error)
 
 static void capture_params(struct i915_gpu_state *error)
 {
-	i915_params_copy(&error->params, &i915_modparams);
+	i915_params_copy(&error->params, &error->i915->params);
 }
 
 static unsigned long capture_find_epoch(const struct i915_gpu_state *error)
@@ -1929,7 +1929,7 @@ void i915_capture_error_state(struct drm_i915_private *i915,
 	struct i915_gpu_state *error;
 	unsigned long flags;
 
-	if (!i915_modparams.error_capture)
+	if (!i915->params.error_capture)
 		return;
 
 	if (READ_ONCE(i915->gpu_error.first_error))
diff --git a/drivers/gpu/drm/i915/intel_bios.c b/drivers/gpu/drm/i915/intel_bios.c
index 764d84d4109b..15ba30264230 100644
--- a/drivers/gpu/drm/i915/intel_bios.c
+++ b/drivers/gpu/drm/i915/intel_bios.c
@@ -354,7 +354,7 @@ parse_sdvo_panel_data(struct drm_i915_private *dev_priv,
 	struct drm_display_mode *panel_fixed_mode;
 	int index;
 
-	index = i915_modparams.vbt_sdvo_panel_type;
+	index = dev_priv->params.vbt_sdvo_panel_type;
 	if (index == -2) {
 		DRM_DEBUG_KMS("Ignore SDVO panel mode from BIOS VBT tables.\n");
 		return;
@@ -662,9 +662,9 @@ parse_edp(struct drm_i915_private *dev_priv, const struct bdb_header *bdb)
 		u8 vswing;
 
 		/* Don't read from VBT if module parameter has valid value*/
-		if (i915_modparams.edp_vswing) {
+		if (dev_priv->params.edp_vswing) {
 			dev_priv->vbt.edp.low_vswing =
-				i915_modparams.edp_vswing == 1;
+				dev_priv->params.edp_vswing == 1;
 		} else {
 			vswing = (edp->edp_vswing_preemph >> (panel_type * 4)) & 0xF;
 			dev_priv->vbt.edp.low_vswing = vswing == 0;
diff --git a/drivers/gpu/drm/i915/intel_crt.c b/drivers/gpu/drm/i915/intel_crt.c
index 0a41e58d61de..ceff5c9ca7fe 100644
--- a/drivers/gpu/drm/i915/intel_crt.c
+++ b/drivers/gpu/drm/i915/intel_crt.c
@@ -784,7 +784,7 @@ intel_crt_detect(struct drm_connector *connector,
 		      connector->base.id, connector->name,
 		      force);
 
-	if (i915_modparams.load_detect_test) {
+	if (dev_priv->params.load_detect_test) {
 		intel_display_power_get(dev_priv, intel_encoder->power_domain);
 		goto load_detect;
 	}
@@ -836,7 +836,7 @@ intel_crt_detect(struct drm_connector *connector,
 		else if (INTEL_GEN(dev_priv) < 4)
 			status = intel_crt_load_detect(crt,
 				to_intel_crtc(connector->state->crtc)->pipe);
-		else if (i915_modparams.load_detect_test)
+		else if (dev_priv->params.load_detect_test)
 			status = connector_status_disconnected;
 		else
 			status = connector_status_unknown;
diff --git a/drivers/gpu/drm/i915/intel_csr.c b/drivers/gpu/drm/i915/intel_csr.c
index a516697bf57d..7faf9559fc98 100644
--- a/drivers/gpu/drm/i915/intel_csr.c
+++ b/drivers/gpu/drm/i915/intel_csr.c
@@ -498,14 +498,14 @@ void intel_csr_ucode_init(struct drm_i915_private *dev_priv)
 		csr->max_fw_size = BXT_CSR_MAX_FW_SIZE;
 	}
 
-	if (i915_modparams.dmc_firmware_path) {
-		if (strlen(i915_modparams.dmc_firmware_path) == 0) {
+	if (dev_priv->params.dmc_firmware_path) {
+		if (strlen(dev_priv->params.dmc_firmware_path) == 0) {
 			csr->fw_path = NULL;
 			DRM_INFO("Disabling CSR firmware and runtime PM\n");
 			return;
 		}
 
-		csr->fw_path = i915_modparams.dmc_firmware_path;
+		csr->fw_path = dev_priv->params.dmc_firmware_path;
 		/* Bypass version check for firmware override. */
 		csr->required_version = 0;
 	}
diff --git a/drivers/gpu/drm/i915/intel_device_info.c b/drivers/gpu/drm/i915/intel_device_info.c
index a1dfb00aa16d..b2beef303c11 100644
--- a/drivers/gpu/drm/i915/intel_device_info.c
+++ b/drivers/gpu/drm/i915/intel_device_info.c
@@ -783,7 +783,7 @@ void intel_device_info_runtime_init(struct intel_device_info *info)
 			info->num_sprites[pipe] = 1;
 	}
 
-	if (i915_modparams.disable_display) {
+	if (dev_priv->params.disable_display) {
 		DRM_INFO("Display disabled (module parameter)\n");
 		info->num_pipes = 0;
 	} else if (HAS_DISPLAY(dev_priv) &&
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 3b7094822aa9..ed63eee18314 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -3758,7 +3758,7 @@ void intel_prepare_reset(struct drm_i915_private *dev_priv)
 	int ret;
 
 	/* reset doesn't touch the display */
-	if (!i915_modparams.force_reset_modeset_test &&
+	if (!dev_priv->params.force_reset_modeset_test &&
 	    !gpu_reset_clobbers_display(dev_priv))
 		return;
 
@@ -6546,7 +6546,7 @@ bool hsw_crtc_state_ips_capable(const struct intel_crtc_state *crtc_state)
 	if (!hsw_crtc_supports_ips(crtc))
 		return false;
 
-	if (!i915_modparams.enable_ips)
+	if (!dev_priv->params.enable_ips)
 		return false;
 
 	if (crtc_state->pipe_bpp > 24)
@@ -6773,8 +6773,8 @@ intel_link_compute_m_n(u16 bits_per_pixel, int nlanes,
 
 static inline bool intel_panel_use_ssc(struct drm_i915_private *dev_priv)
 {
-	if (i915_modparams.panel_use_ssc >= 0)
-		return i915_modparams.panel_use_ssc != 0;
+	if (dev_priv->params.panel_use_ssc >= 0)
+		return dev_priv->params.panel_use_ssc != 0;
 	return dev_priv->vbt.lvds_use_ssc
 		&& !(dev_priv->quirks & QUIRK_LVDS_SSC_DISABLE);
 }
@@ -12674,7 +12674,7 @@ static int intel_atomic_check(struct drm_device *dev,
 			return ret;
 		}
 
-		if (i915_modparams.fastboot &&
+		if (dev_priv->params.fastboot &&
 		    intel_pipe_config_compare(dev_priv,
 					to_intel_crtc_state(old_crtc_state),
 					pipe_config, true)) {
diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index 5b601b754707..7696a5dd5e92 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -4235,7 +4235,10 @@ intel_dp_sink_can_mst(struct intel_dp *intel_dp)
 static bool
 intel_dp_can_mst(struct intel_dp *intel_dp)
 {
-	return i915_modparams.enable_dp_mst &&
+	struct intel_digital_port *dig_port = dp_to_dig_port(intel_dp);
+	struct drm_i915_private *dev_priv = to_i915(dig_port->base.base.dev);
+
+	return dev_priv->params.enable_dp_mst &&
 		intel_dp->can_mst &&
 		intel_dp_sink_can_mst(intel_dp);
 }
@@ -4243,19 +4246,21 @@ intel_dp_can_mst(struct intel_dp *intel_dp)
 static void
 intel_dp_configure_mst(struct intel_dp *intel_dp)
 {
+	struct intel_digital_port *dig_port = dp_to_dig_port(intel_dp);
+	struct drm_i915_private *dev_priv = to_i915(dig_port->base.base.dev);
 	struct intel_encoder *encoder =
 		&dp_to_dig_port(intel_dp)->base;
 	bool sink_can_mst = intel_dp_sink_can_mst(intel_dp);
 
 	DRM_DEBUG_KMS("MST support? port %c: %s, sink: %s, modparam: %s\n",
 		      port_name(encoder->port), yesno(intel_dp->can_mst),
-		      yesno(sink_can_mst), yesno(i915_modparams.enable_dp_mst));
+		      yesno(sink_can_mst), yesno(dev_priv->params.enable_dp_mst));
 
 	if (!intel_dp->can_mst)
 		return;
 
 	intel_dp->is_mst = sink_can_mst &&
-		i915_modparams.enable_dp_mst;
+		dev_priv->params.enable_dp_mst;
 
 	drm_dp_mst_topology_mgr_set_mst(&intel_dp->mst_mgr,
 					intel_dp->is_mst);
diff --git a/drivers/gpu/drm/i915/intel_dp_aux_backlight.c b/drivers/gpu/drm/i915/intel_dp_aux_backlight.c
index 357136f17f85..66141d53d5d9 100644
--- a/drivers/gpu/drm/i915/intel_dp_aux_backlight.c
+++ b/drivers/gpu/drm/i915/intel_dp_aux_backlight.c
@@ -262,9 +262,10 @@ intel_dp_aux_display_control_capable(struct intel_connector *connector)
 
 int intel_dp_aux_init_backlight_funcs(struct intel_connector *intel_connector)
 {
+	struct drm_i915_private *dev_priv = to_i915(intel_connector->base.dev);
 	struct intel_panel *panel = &intel_connector->panel;
 
-	if (!i915_modparams.enable_dpcd_backlight)
+	if (!dev_priv->params.enable_dpcd_backlight)
 		return -ENODEV;
 
 	if (!intel_dp_aux_display_control_capable(intel_connector))
diff --git a/drivers/gpu/drm/i915/intel_fbc.c b/drivers/gpu/drm/i915/intel_fbc.c
index 1d3ff026d1bc..171c0dacb183 100644
--- a/drivers/gpu/drm/i915/intel_fbc.c
+++ b/drivers/gpu/drm/i915/intel_fbc.c
@@ -805,7 +805,7 @@ static bool intel_fbc_can_enable(struct drm_i915_private *dev_priv)
 		return false;
 	}
 
-	if (!i915_modparams.enable_fbc) {
+	if (!dev_priv->params.enable_fbc) {
 		fbc->no_fbc_reason = "disabled per module param or by default";
 		return false;
 	}
@@ -914,7 +914,7 @@ static void __intel_fbc_post_update(struct intel_crtc *crtc)
 	fbc->flip_pending = false;
 	WARN_ON(fbc->active);
 
-	if (!i915_modparams.enable_fbc) {
+	if (!dev_priv->params.enable_fbc) {
 		intel_fbc_deactivate(dev_priv, "disabled at runtime per module param");
 		__intel_fbc_disable(dev_priv);
 
@@ -1272,8 +1272,8 @@ void intel_fbc_init_pipe_state(struct drm_i915_private *dev_priv)
  */
 static int intel_sanitize_fbc_option(struct drm_i915_private *dev_priv)
 {
-	if (i915_modparams.enable_fbc >= 0)
-		return !!i915_modparams.enable_fbc;
+	if (dev_priv->params.enable_fbc >= 0)
+		return !!dev_priv->params.enable_fbc;
 
 	if (!HAS_FBC(dev_priv))
 		return 0;
@@ -1314,9 +1314,9 @@ void intel_fbc_init(struct drm_i915_private *dev_priv)
 	if (need_fbc_vtd_wa(dev_priv))
 		mkwrite_device_info(dev_priv)->display.has_fbc = false;
 
-	i915_modparams.enable_fbc = intel_sanitize_fbc_option(dev_priv);
+	dev_priv->params.enable_fbc = intel_sanitize_fbc_option(dev_priv);
 	DRM_DEBUG_KMS("Sanitized enable_fbc value: %d\n",
-		      i915_modparams.enable_fbc);
+		      dev_priv->params.enable_fbc);
 
 	if (!HAS_FBC(dev_priv)) {
 		fbc->no_fbc_reason = "unsupported by this chipset";
diff --git a/drivers/gpu/drm/i915/intel_guc_fw.c b/drivers/gpu/drm/i915/intel_guc_fw.c
index 4b437e05e2cd..9e23de003a79 100644
--- a/drivers/gpu/drm/i915/intel_guc_fw.c
+++ b/drivers/gpu/drm/i915/intel_guc_fw.c
@@ -61,8 +61,8 @@ static void guc_fw_select(struct intel_uc_fw *guc_fw)
 	if (!HAS_GUC(dev_priv))
 		return;
 
-	if (i915_modparams.guc_firmware_path) {
-		guc_fw->path = i915_modparams.guc_firmware_path;
+	if (dev_priv->params.guc_firmware_path) {
+		guc_fw->path = dev_priv->params.guc_firmware_path;
 		guc_fw->major_ver_wanted = 0;
 		guc_fw->minor_ver_wanted = 0;
 	} else if (IS_SKYLAKE(dev_priv)) {
diff --git a/drivers/gpu/drm/i915/intel_guc_log.c b/drivers/gpu/drm/i915/intel_guc_log.c
index d3ebdbc0182e..65adff2600d6 100644
--- a/drivers/gpu/drm/i915/intel_guc_log.c
+++ b/drivers/gpu/drm/i915/intel_guc_log.c
@@ -451,6 +451,7 @@ static void guc_log_capture_logs(struct intel_guc_log *log)
 int intel_guc_log_create(struct intel_guc_log *log)
 {
 	struct intel_guc *guc = log_to_guc(log);
+	struct drm_i915_private *dev_priv = guc_to_i915(guc);
 	struct i915_vma *vma;
 	u32 guc_log_size;
 	int ret;
@@ -487,7 +488,7 @@ int intel_guc_log_create(struct intel_guc_log *log)
 
 	log->vma = vma;
 
-	log->level = i915_modparams.guc_log_level;
+	log->level = dev_priv->params.guc_log_level;
 
 	return 0;
 
diff --git a/drivers/gpu/drm/i915/intel_gvt.c b/drivers/gpu/drm/i915/intel_gvt.c
index c22b3e18a0f5..3eada25f5733 100644
--- a/drivers/gpu/drm/i915/intel_gvt.c
+++ b/drivers/gpu/drm/i915/intel_gvt.c
@@ -60,7 +60,7 @@ static bool is_supported_device(struct drm_i915_private *dev_priv)
  */
 void intel_gvt_sanitize_options(struct drm_i915_private *dev_priv)
 {
-	if (!i915_modparams.enable_gvt)
+	if (!dev_priv->params.enable_gvt)
 		return;
 
 	if (intel_vgpu_active(dev_priv)) {
@@ -75,7 +75,7 @@ void intel_gvt_sanitize_options(struct drm_i915_private *dev_priv)
 
 	return;
 bail:
-	i915_modparams.enable_gvt = 0;
+	dev_priv->params.enable_gvt = 0;
 }
 
 /**
@@ -95,7 +95,7 @@ int intel_gvt_init(struct drm_i915_private *dev_priv)
 	if (i915_inject_load_failure())
 		return -ENODEV;
 
-	if (!i915_modparams.enable_gvt) {
+	if (!dev_priv->params.enable_gvt) {
 		DRM_DEBUG_DRIVER("GVT-g is disabled by kernel params\n");
 		return 0;
 	}
@@ -123,7 +123,7 @@ int intel_gvt_init(struct drm_i915_private *dev_priv)
 	return 0;
 
 bail:
-	i915_modparams.enable_gvt = 0;
+	dev_priv->params.enable_gvt = 0;
 	return 0;
 }
 
diff --git a/drivers/gpu/drm/i915/intel_hangcheck.c b/drivers/gpu/drm/i915/intel_hangcheck.c
index 495fa145f37f..50855c27031f 100644
--- a/drivers/gpu/drm/i915/intel_hangcheck.c
+++ b/drivers/gpu/drm/i915/intel_hangcheck.c
@@ -415,7 +415,7 @@ static void i915_hangcheck_elapsed(struct work_struct *work)
 	enum intel_engine_id id;
 	unsigned int hung = 0, stuck = 0, wedged = 0;
 
-	if (!i915_modparams.enable_hangcheck)
+	if (!dev_priv->params.enable_hangcheck)
 		return;
 
 	if (!READ_ONCE(dev_priv->gt.awake))
diff --git a/drivers/gpu/drm/i915/intel_huc_fw.c b/drivers/gpu/drm/i915/intel_huc_fw.c
index 9612227b3c44..53b0f98b8a3e 100644
--- a/drivers/gpu/drm/i915/intel_huc_fw.c
+++ b/drivers/gpu/drm/i915/intel_huc_fw.c
@@ -60,8 +60,8 @@ static void huc_fw_select(struct intel_uc_fw *huc_fw)
 	if (!HAS_HUC(dev_priv))
 		return;
 
-	if (i915_modparams.huc_firmware_path) {
-		huc_fw->path = i915_modparams.huc_firmware_path;
+	if (dev_priv->params.huc_firmware_path) {
+		huc_fw->path = dev_priv->params.huc_firmware_path;
 		huc_fw->major_ver_wanted = 0;
 		huc_fw->minor_ver_wanted = 0;
 	} else if (IS_SKYLAKE(dev_priv)) {
diff --git a/drivers/gpu/drm/i915/intel_lvds.c b/drivers/gpu/drm/i915/intel_lvds.c
index b85e195f7c8a..aae190409059 100644
--- a/drivers/gpu/drm/i915/intel_lvds.c
+++ b/drivers/gpu/drm/i915/intel_lvds.c
@@ -770,8 +770,8 @@ static bool compute_is_dual_link_lvds(struct intel_lvds_encoder *lvds_encoder)
 	struct drm_i915_private *dev_priv = to_i915(dev);
 
 	/* use the module option value if specified */
-	if (i915_modparams.lvds_channel_mode > 0)
-		return i915_modparams.lvds_channel_mode == 2;
+	if (dev_priv->params.lvds_channel_mode > 0)
+		return dev_priv->params.lvds_channel_mode == 2;
 
 	/* single channel LVDS is limited to 112 MHz */
 	if (lvds_encoder->attached_connector->panel.fixed_mode->clock > 112999)
diff --git a/drivers/gpu/drm/i915/intel_opregion.c b/drivers/gpu/drm/i915/intel_opregion.c
index b8f106d9ecf8..123796307253 100644
--- a/drivers/gpu/drm/i915/intel_opregion.c
+++ b/drivers/gpu/drm/i915/intel_opregion.c
@@ -852,7 +852,7 @@ static int intel_load_vbt_firmware(struct drm_i915_private *dev_priv)
 {
 	struct intel_opregion *opregion = &dev_priv->opregion;
 	const struct firmware *fw = NULL;
-	const char *name = i915_modparams.vbt_firmware;
+	const char *name = dev_priv->params.vbt_firmware;
 	int ret;
 
 	if (!name || !*name)
diff --git a/drivers/gpu/drm/i915/intel_panel.c b/drivers/gpu/drm/i915/intel_panel.c
index ee3e0842d542..b2e1ebcbfd40 100644
--- a/drivers/gpu/drm/i915/intel_panel.c
+++ b/drivers/gpu/drm/i915/intel_panel.c
@@ -449,10 +449,10 @@ static u32 intel_panel_compute_brightness(struct intel_connector *connector,
 
 	WARN_ON(panel->backlight.max == 0);
 
-	if (i915_modparams.invert_brightness < 0)
+	if (dev_priv->params.invert_brightness < 0)
 		return val;
 
-	if (i915_modparams.invert_brightness > 0 ||
+	if (dev_priv->params.invert_brightness > 0 ||
 	    dev_priv->quirks & QUIRK_INVERT_BRIGHTNESS) {
 		return panel->backlight.max - val + panel->backlight.min;
 	}
diff --git a/drivers/gpu/drm/i915/intel_psr.c b/drivers/gpu/drm/i915/intel_psr.c
index dce39f06b682..4f88e4478304 100644
--- a/drivers/gpu/drm/i915/intel_psr.c
+++ b/drivers/gpu/drm/i915/intel_psr.c
@@ -56,11 +56,11 @@
 #include "intel_drv.h"
 #include "i915_drv.h"
 
-static bool psr_global_enabled(u32 debug)
+static bool psr_global_enabled(struct drm_i915_private *dev_priv, u32 debug)
 {
 	switch (debug & I915_PSR_DEBUG_MODE_MASK) {
 	case I915_PSR_DEBUG_DEFAULT:
-		return i915_modparams.enable_psr;
+		return dev_priv->params.enable_psr;
 	case I915_PSR_DEBUG_DISABLE:
 		return false;
 	default:
@@ -72,7 +72,7 @@ static bool intel_psr2_enabled(struct drm_i915_private *dev_priv,
 			       const struct intel_crtc_state *crtc_state)
 {
 	/* Disable PSR2 by default for all platforms */
-	if (i915_modparams.enable_psr == -1)
+	if (dev_priv->params.enable_psr == -1)
 		return false;
 
 	/* Cannot enable DSC and PSR2 simultaneously */
@@ -763,7 +763,7 @@ void intel_psr_enable(struct intel_dp *intel_dp,
 	dev_priv->psr.prepared = true;
 	dev_priv->psr.pipe = to_intel_crtc(crtc_state->base.crtc)->pipe;
 
-	if (psr_global_enabled(dev_priv->psr.debug))
+	if (psr_global_enabled(dev_priv, dev_priv->psr.debug))
 		intel_psr_enable_locked(dev_priv, crtc_state);
 	else
 		DRM_DEBUG_KMS("PSR disabled by flag\n");
@@ -990,7 +990,7 @@ int intel_psr_set_debugfs_mode(struct drm_i915_private *dev_priv,
 	if (ret)
 		return ret;
 
-	enable = psr_global_enabled(val);
+	enable = psr_global_enabled(dev_priv, val);
 
 	if (!enable || switching_psr(dev_priv, crtc_state, mode))
 		intel_psr_disable_locked(dev_priv->psr.dp);
@@ -1160,9 +1160,9 @@ void intel_psr_init(struct drm_i915_private *dev_priv)
 	if (!dev_priv->psr.sink_support)
 		return;
 
-	if (i915_modparams.enable_psr == -1)
+	if (dev_priv->params.enable_psr == -1)
 		if (INTEL_GEN(dev_priv) < 9 || !dev_priv->vbt.psr.enable)
-			i915_modparams.enable_psr = 0;
+			dev_priv->params.enable_psr = 0;
 
 	/*
 	 * If a PSR error happened and the driver is reloaded, the EDP_PSR_IIR
diff --git a/drivers/gpu/drm/i915/intel_runtime_pm.c b/drivers/gpu/drm/i915/intel_runtime_pm.c
index 9e9501f82f06..c00c263f623d 100644
--- a/drivers/gpu/drm/i915/intel_runtime_pm.c
+++ b/drivers/gpu/drm/i915/intel_runtime_pm.c
@@ -3069,7 +3069,7 @@ static uint32_t get_allowed_dc_mask(const struct drm_i915_private *dev_priv,
 		mask = 0;
 	}
 
-	if (!i915_modparams.disable_power_well)
+	if (!dev_priv->params.disable_power_well)
 		max_dc = 0;
 
 	if (enable_dc >= 0 && enable_dc <= max_dc) {
@@ -3143,11 +3143,11 @@ int intel_power_domains_init(struct drm_i915_private *dev_priv)
 	struct i915_power_domains *power_domains = &dev_priv->power_domains;
 	int err;
 
-	i915_modparams.disable_power_well =
+	dev_priv->params.disable_power_well =
 		sanitize_disable_power_well_option(dev_priv,
-						   i915_modparams.disable_power_well);
+						   dev_priv->params.disable_power_well);
 	dev_priv->csr.allowed_dc_mask =
-		get_allowed_dc_mask(dev_priv, i915_modparams.enable_dc);
+		get_allowed_dc_mask(dev_priv, dev_priv->params.enable_dc);
 
 	BUILD_BUG_ON(POWER_DOMAIN_NUM > 64);
 
@@ -3759,7 +3759,7 @@ void intel_power_domains_init_hw(struct drm_i915_private *dev_priv, bool resume)
 	 */
 	intel_display_power_get(dev_priv, POWER_DOMAIN_INIT);
 	/* Disable power support if the user asked so. */
-	if (!i915_modparams.disable_power_well)
+	if (!dev_priv->params.disable_power_well)
 		intel_display_power_get(dev_priv, POWER_DOMAIN_INIT);
 	intel_power_domains_sync_hw(dev_priv);
 
@@ -3783,7 +3783,7 @@ void intel_power_domains_fini_hw(struct drm_i915_private *dev_priv)
 	intel_runtime_pm_put(dev_priv);
 
 	/* Remove the refcount we took to keep power well support disabled. */
-	if (!i915_modparams.disable_power_well)
+	if (!dev_priv->params.disable_power_well)
 		intel_display_power_put(dev_priv, POWER_DOMAIN_INIT);
 
 	intel_power_domains_verify_state(dev_priv);
@@ -3858,7 +3858,7 @@ void intel_power_domains_suspend(struct drm_i915_private *dev_priv,
 	 * Even if power well support was disabled we still want to disable
 	 * power wells if power domains must be deinitialized for suspend.
 	 */
-	if (!i915_modparams.disable_power_well) {
+	if (!dev_priv->params.disable_power_well) {
 		intel_display_power_put(dev_priv, POWER_DOMAIN_INIT);
 		intel_power_domains_verify_state(dev_priv);
 	}
diff --git a/drivers/gpu/drm/i915/intel_uc.c b/drivers/gpu/drm/i915/intel_uc.c
index 731b82afe636..d513664d155e 100644
--- a/drivers/gpu/drm/i915/intel_uc.c
+++ b/drivers/gpu/drm/i915/intel_uc.c
@@ -107,18 +107,18 @@ static void sanitize_options_early(struct drm_i915_private *i915)
 	struct intel_uc_fw *huc_fw = &i915->huc.fw;
 
 	/* A negative value means "use platform default" */
-	if (i915_modparams.enable_guc < 0)
-		i915_modparams.enable_guc = __get_platform_enable_guc(i915);
+	if (i915->params.enable_guc < 0)
+		i915->params.enable_guc = __get_platform_enable_guc(i915);
 
 	DRM_DEBUG_DRIVER("enable_guc=%d (submission:%s huc:%s)\n",
-			 i915_modparams.enable_guc,
+			 i915->params.enable_guc,
 			 yesno(intel_uc_is_using_guc_submission(i915)),
 			 yesno(intel_uc_is_using_huc(i915)));
 
 	/* Verify GuC firmware availability */
 	if (intel_uc_is_using_guc(i915) && !intel_uc_fw_is_selected(guc_fw)) {
 		DRM_WARN("Incompatible option detected: %s=%d, %s!\n",
-			 "enable_guc", i915_modparams.enable_guc,
+			 "enable_guc", i915->params.enable_guc,
 			 !HAS_GUC(i915) ? "no GuC hardware" :
 					  "no GuC firmware");
 	}
@@ -126,40 +126,40 @@ static void sanitize_options_early(struct drm_i915_private *i915)
 	/* Verify HuC firmware availability */
 	if (intel_uc_is_using_huc(i915) && !intel_uc_fw_is_selected(huc_fw)) {
 		DRM_WARN("Incompatible option detected: %s=%d, %s!\n",
-			 "enable_guc", i915_modparams.enable_guc,
+			 "enable_guc", i915->params.enable_guc,
 			 !HAS_HUC(i915) ? "no HuC hardware" :
 					  "no HuC firmware");
 	}
 
 	/* A negative value means "use platform/config default" */
-	if (i915_modparams.guc_log_level < 0)
-		i915_modparams.guc_log_level =
+	if (i915->params.guc_log_level < 0)
+		i915->params.guc_log_level =
 			__get_default_guc_log_level(i915);
 
-	if (i915_modparams.guc_log_level > 0 && !intel_uc_is_using_guc(i915)) {
+	if (i915->params.guc_log_level > 0 && !intel_uc_is_using_guc(i915)) {
 		DRM_WARN("Incompatible option detected: %s=%d, %s!\n",
-			 "guc_log_level", i915_modparams.guc_log_level,
+			 "guc_log_level", i915->params.guc_log_level,
 			 !HAS_GUC(i915) ? "no GuC hardware" :
 					  "GuC not enabled");
-		i915_modparams.guc_log_level = 0;
+		i915->params.guc_log_level = 0;
 	}
 
-	if (i915_modparams.guc_log_level > GUC_LOG_LEVEL_MAX) {
+	if (i915->params.guc_log_level > GUC_LOG_LEVEL_MAX) {
 		DRM_WARN("Incompatible option detected: %s=%d, %s!\n",
-			 "guc_log_level", i915_modparams.guc_log_level,
+			 "guc_log_level", i915->params.guc_log_level,
 			 "verbosity too high");
-		i915_modparams.guc_log_level = GUC_LOG_LEVEL_MAX;
+		i915->params.guc_log_level = GUC_LOG_LEVEL_MAX;
 	}
 
 	DRM_DEBUG_DRIVER("guc_log_level=%d (enabled:%s, verbose:%s, verbosity:%d)\n",
-			 i915_modparams.guc_log_level,
-			 yesno(i915_modparams.guc_log_level),
-			 yesno(GUC_LOG_LEVEL_IS_VERBOSE(i915_modparams.guc_log_level)),
-			 GUC_LOG_LEVEL_TO_VERBOSITY(i915_modparams.guc_log_level));
+			 i915->params.guc_log_level,
+			 yesno(i915->params.guc_log_level),
+			 yesno(GUC_LOG_LEVEL_IS_VERBOSE(i915->params.guc_log_level)),
+			 GUC_LOG_LEVEL_TO_VERBOSITY(i915->params.guc_log_level));
 
 	/* Make sure that sanitization was done */
-	GEM_BUG_ON(i915_modparams.enable_guc < 0);
-	GEM_BUG_ON(i915_modparams.guc_log_level < 0);
+	GEM_BUG_ON(i915->params.enable_guc < 0);
+	GEM_BUG_ON(i915->params.guc_log_level < 0);
 }
 
 void intel_uc_init_early(struct drm_i915_private *i915)
@@ -493,3 +493,21 @@ int intel_uc_resume(struct drm_i915_private *i915)
 
 	return 0;
 }
+
+bool intel_uc_is_using_guc(struct drm_i915_private *dev_priv)
+{
+	GEM_BUG_ON(dev_priv->params.enable_guc < 0);
+	return dev_priv->params.enable_guc > 0;
+}
+
+bool intel_uc_is_using_guc_submission(struct drm_i915_private *dev_priv)
+{
+	GEM_BUG_ON(dev_priv->params.enable_guc < 0);
+	return dev_priv->params.enable_guc & ENABLE_GUC_SUBMISSION;
+}
+
+bool intel_uc_is_using_huc(struct drm_i915_private *dev_priv)
+{
+	GEM_BUG_ON(dev_priv->params.enable_guc < 0);
+	return dev_priv->params.enable_guc & ENABLE_GUC_LOAD_HUC;
+}
diff --git a/drivers/gpu/drm/i915/intel_uc.h b/drivers/gpu/drm/i915/intel_uc.h
index 24990ade4fb8..6a6a3ff63e96 100644
--- a/drivers/gpu/drm/i915/intel_uc.h
+++ b/drivers/gpu/drm/i915/intel_uc.h
@@ -26,7 +26,6 @@
 
 #include "intel_guc.h"
 #include "intel_huc.h"
-#include "i915_params.h"
 
 void intel_uc_init_early(struct drm_i915_private *dev_priv);
 void intel_uc_cleanup_early(struct drm_i915_private *dev_priv);
@@ -41,22 +40,8 @@ void intel_uc_fini(struct drm_i915_private *dev_priv);
 int intel_uc_suspend(struct drm_i915_private *dev_priv);
 int intel_uc_resume(struct drm_i915_private *dev_priv);
 
-static inline bool intel_uc_is_using_guc(struct drm_i915_private *dev_priv)
-{
-	GEM_BUG_ON(i915_modparams.enable_guc < 0);
-	return i915_modparams.enable_guc > 0;
-}
-
-static inline bool intel_uc_is_using_guc_submission(struct drm_i915_private *dev_priv)
-{
-	GEM_BUG_ON(i915_modparams.enable_guc < 0);
-	return i915_modparams.enable_guc & ENABLE_GUC_SUBMISSION;
-}
-
-static inline bool intel_uc_is_using_huc(struct drm_i915_private *dev_priv)
-{
-	GEM_BUG_ON(i915_modparams.enable_guc < 0);
-	return i915_modparams.enable_guc & ENABLE_GUC_LOAD_HUC;
-}
+bool intel_uc_is_using_guc(struct drm_i915_private *dev_priv);
+bool intel_uc_is_using_guc_submission(struct drm_i915_private *dev_priv);
+bool intel_uc_is_using_huc(struct drm_i915_private *dev_priv);
 
 #endif
diff --git a/drivers/gpu/drm/i915/intel_uncore.c b/drivers/gpu/drm/i915/intel_uncore.c
index 5800f0ce2c57..2918e0b6d32e 100644
--- a/drivers/gpu/drm/i915/intel_uncore.c
+++ b/drivers/gpu/drm/i915/intel_uncore.c
@@ -663,10 +663,10 @@ void intel_uncore_forcewake_user_get(struct drm_i915_private *dev_priv)
 		dev_priv->uncore.user_forcewake.saved_mmio_check =
 			dev_priv->uncore.unclaimed_mmio_check;
 		dev_priv->uncore.user_forcewake.saved_mmio_debug =
-			i915_modparams.mmio_debug;
+			dev_priv->params.mmio_debug;
 
 		dev_priv->uncore.unclaimed_mmio_check = 0;
-		i915_modparams.mmio_debug = 0;
+		dev_priv->params.mmio_debug = 0;
 	}
 	spin_unlock_irq(&dev_priv->uncore.lock);
 }
@@ -688,7 +688,7 @@ void intel_uncore_forcewake_user_put(struct drm_i915_private *dev_priv)
 
 		dev_priv->uncore.unclaimed_mmio_check =
 			dev_priv->uncore.user_forcewake.saved_mmio_check;
-		i915_modparams.mmio_debug =
+		dev_priv->params.mmio_debug =
 			dev_priv->uncore.user_forcewake.saved_mmio_debug;
 
 		intel_uncore_forcewake_put__locked(dev_priv, FORCEWAKE_ALL);
@@ -1092,7 +1092,7 @@ __unclaimed_reg_debug(struct drm_i915_private *dev_priv,
 		 read ? "read from" : "write to",
 		 i915_mmio_reg_offset(reg)))
 		/* Only report the first N failures */
-		i915_modparams.mmio_debug--;
+		dev_priv->params.mmio_debug--;
 }
 
 static inline void
@@ -1101,7 +1101,7 @@ unclaimed_reg_debug(struct drm_i915_private *dev_priv,
 		    const bool read,
 		    const bool before)
 {
-	if (likely(!i915_modparams.mmio_debug))
+	if (likely(!dev_priv->params.mmio_debug))
 		return;
 
 	__unclaimed_reg_debug(dev_priv, reg, read, before);
@@ -2271,7 +2271,7 @@ typedef int (*reset_func)(struct drm_i915_private *,
 
 static reset_func intel_get_gpu_reset(struct drm_i915_private *dev_priv)
 {
-	if (!i915_modparams.reset)
+	if (!dev_priv->params.reset)
 		return NULL;
 
 	if (INTEL_GEN(dev_priv) >= 8)
@@ -2362,7 +2362,7 @@ bool intel_has_gpu_reset(struct drm_i915_private *dev_priv)
 bool intel_has_reset_engine(struct drm_i915_private *dev_priv)
 {
 	return (dev_priv->info.has_reset_engine &&
-		i915_modparams.reset >= 2);
+		dev_priv->params.reset >= 2);
 }
 
 int intel_reset_guc(struct drm_i915_private *dev_priv)
@@ -2396,11 +2396,11 @@ intel_uncore_arm_unclaimed_mmio_detection(struct drm_i915_private *dev_priv)
 		goto out;
 
 	if (unlikely(intel_uncore_unclaimed_mmio(dev_priv))) {
-		if (!i915_modparams.mmio_debug) {
+		if (!dev_priv->params.mmio_debug) {
 			DRM_DEBUG("Unclaimed register detected, "
 				  "enabling oneshot unclaimed register reporting. "
 				  "Please use i915.mmio_debug=N for more information.\n");
-			i915_modparams.mmio_debug++;
+			dev_priv->params.mmio_debug++;
 		}
 		dev_priv->uncore.unclaimed_mmio_check--;
 		ret = true;
diff --git a/drivers/gpu/drm/i915/selftests/intel_hangcheck.c b/drivers/gpu/drm/i915/selftests/intel_hangcheck.c
index 0aadbd9c7d56..f0238f4f8493 100644
--- a/drivers/gpu/drm/i915/selftests/intel_hangcheck.c
+++ b/drivers/gpu/drm/i915/selftests/intel_hangcheck.c
@@ -1670,7 +1670,7 @@ int intel_hangcheck_live_selftests(struct drm_i915_private *i915)
 		return -EIO; /* we're long past hope of a successful reset */
 
 	intel_runtime_pm_get(i915);
-	saved_hangcheck = fetch_and_zero(&i915_modparams.enable_hangcheck);
+	saved_hangcheck = fetch_and_zero(&i915->params.enable_hangcheck);
 
 	err = i915_subtests(tests, i915);
 
@@ -1678,7 +1678,7 @@ int intel_hangcheck_live_selftests(struct drm_i915_private *i915)
 	igt_flush_test(i915, I915_WAIT_LOCKED);
 	mutex_unlock(&i915->drm.struct_mutex);
 
-	i915_modparams.enable_hangcheck = saved_hangcheck;
+	i915->params.enable_hangcheck = saved_hangcheck;
 	intel_runtime_pm_put(i915);
 
 	return err;
-- 
2.11.0

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

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

* [RFC PATCH 11/11] drm/i915/params: hide i915_modparams within i915_params.c
  2018-12-21 13:31 [RFC PATCH 00/11] drm/i915: from module params to device params Jani Nikula
                   ` (10 preceding siblings ...)
  2018-12-21 13:31 ` [RFC PATCH 10/11] drm/i915/params: switch to device specific parameters Jani Nikula
@ 2018-12-21 13:31 ` Jani Nikula
  2018-12-21 14:53 ` ✗ Fi.CI.CHECKPATCH: warning for drm/i915: from module params to device params Patchwork
                   ` (2 subsequent siblings)
  14 siblings, 0 replies; 18+ messages in thread
From: Jani Nikula @ 2018-12-21 13:31 UTC (permalink / raw)
  To: intel-gfx; +Cc: jani.nikula

Prevent accidental use of i915_modparams throughout the driver by hiding
it in i915_params.c. Add accessors for the legitimate uses.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
 drivers/gpu/drm/i915/i915_drv.c    |  2 +-
 drivers/gpu/drm/i915/i915_drv.h    |  2 +-
 drivers/gpu/drm/i915/i915_params.c | 20 +++++++++++++++++++-
 drivers/gpu/drm/i915/i915_params.h |  6 ++++--
 drivers/gpu/drm/i915/i915_pci.c    |  6 +++---
 5 files changed, 28 insertions(+), 8 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
index cfe1f93f9683..2f03d47c4a1f 100644
--- a/drivers/gpu/drm/i915/i915_drv.c
+++ b/drivers/gpu/drm/i915/i915_drv.c
@@ -1643,7 +1643,7 @@ i915_driver_create(struct pci_dev *pdev, const struct pci_device_id *ent)
 	}
 
 	/* Device parameters start as a copy of module parameters. */
-	i915_params_copy(&i915->params, &i915_modparams);
+	i915_params_copy(&i915->params, NULL);
 
 	i915->drm.pdev = pdev;
 	i915->drm.dev_private = i915;
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index baacd37c7259..97ac33ac34c0 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -103,7 +103,7 @@
 #define I915_STATE_WARN(condition, format...) ({			\
 	int __ret_warn_on = !!(condition);				\
 	if (unlikely(__ret_warn_on))					\
-		if (!WARN(i915_modparams.verbose_state_checks, format))	\
+		if (!WARN(i915_params_verbose_state_checks(), format))	\
 			DRM_ERROR(format);				\
 	unlikely(__ret_warn_on);					\
 })
diff --git a/drivers/gpu/drm/i915/i915_params.c b/drivers/gpu/drm/i915/i915_params.c
index 61cde445346e..c14ad496f9ab 100644
--- a/drivers/gpu/drm/i915/i915_params.c
+++ b/drivers/gpu/drm/i915/i915_params.c
@@ -34,12 +34,27 @@
 	module_param_named_unsafe(name, i915_modparams.name, T, perm); \
 	MODULE_PARM_DESC(name, desc)
 
-struct i915_params i915_modparams __read_mostly = {
+static struct i915_params i915_modparams __read_mostly = {
 #define MEMBER(T, member, value, ...) .member = (value),
 	I915_PARAMS_FOR_EACH(MEMBER)
 #undef MEMBER
 };
 
+int i915_params_modeset(void)
+{
+	return i915_modparams.modeset;
+}
+
+bool i915_params_verbose_state_checks(void)
+{
+	return i915_modparams.verbose_state_checks;
+}
+
+bool i915_params_alpha_support(void)
+{
+	return i915_modparams.alpha_support;
+}
+
 /*
  * Note: As a rule, keep module parameter sysfs permissions read-only
  * 0400. Runtime changes are only supported through i915 debugfs.
@@ -217,6 +232,9 @@ static __always_inline void dup_param(const char *type, void *x)
 
 void i915_params_copy(struct i915_params *dest, const struct i915_params *src)
 {
+	if (!src)
+		src = &i915_modparams;
+
 	*dest = *src;
 #define DUP(T, x, ...) dup_param(#T, &dest->x);
 	I915_PARAMS_FOR_EACH(DUP);
diff --git a/drivers/gpu/drm/i915/i915_params.h b/drivers/gpu/drm/i915/i915_params.h
index 30c32e288efe..61de08446c4b 100644
--- a/drivers/gpu/drm/i915/i915_params.h
+++ b/drivers/gpu/drm/i915/i915_params.h
@@ -85,11 +85,13 @@ struct i915_params {
 };
 #undef MEMBER
 
-extern struct i915_params i915_modparams __read_mostly;
-
 void i915_params_dump(const struct i915_params *params, struct drm_printer *p);
 void i915_params_copy(struct i915_params *dest, const struct i915_params *src);
 void i915_params_free(struct i915_params *params);
 
+int i915_params_modeset(void);
+bool i915_params_verbose_state_checks(void);
+bool i915_params_alpha_support(void);
+
 #endif
 
diff --git a/drivers/gpu/drm/i915/i915_pci.c b/drivers/gpu/drm/i915/i915_pci.c
index 6350db5503cd..34ec4d2d23d0 100644
--- a/drivers/gpu/drm/i915/i915_pci.c
+++ b/drivers/gpu/drm/i915/i915_pci.c
@@ -734,7 +734,7 @@ static int i915_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
 		(struct intel_device_info *) ent->driver_data;
 	int err;
 
-	if (IS_ALPHA_SUPPORT(intel_info) && !i915_modparams.alpha_support) {
+	if (IS_ALPHA_SUPPORT(intel_info) && !i915_params_alpha_support()) {
 		DRM_INFO("The driver support for your hardware in this kernel version is alpha quality\n"
 			 "See CONFIG_DRM_I915_ALPHA_SUPPORT or i915.alpha_support module parameter\n"
 			 "to enable support in this kernel version, or check for kernel updates.\n");
@@ -797,10 +797,10 @@ static int __init i915_init(void)
 	 * vga_text_mode_force boot option.
 	 */
 
-	if (i915_modparams.modeset == 0)
+	if (i915_params_modeset() == 0)
 		use_kms = false;
 
-	if (vgacon_text_force() && i915_modparams.modeset == -1)
+	if (vgacon_text_force() && i915_params_modeset() == -1)
 		use_kms = false;
 
 	if (!use_kms) {
-- 
2.11.0

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

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

* Re: [RFC PATCH 08/11] drm/i915/debugfs: support bool values for int and uint params
  2018-12-21 13:31   ` [RFC PATCH 08/11] drm/i915/debugfs: support bool values for int and uint params Jani Nikula
@ 2018-12-21 13:42     ` Jani Nikula
  0 siblings, 0 replies; 18+ messages in thread
From: Jani Nikula @ 2018-12-21 13:42 UTC (permalink / raw)
  To: intel-gfx


Argh, stray file accidentally sent, ignore.

On Fri, 21 Dec 2018, Jani Nikula <jani.nikula@intel.com> wrote:
> 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 for ints.
>
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
> ---
>  drivers/gpu/drm/i915/i915_debugfs.c | 14 ++++++++++++++
>  1 file changed, 14 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
> index 33375cf79713..c9e2cf8e071a 100644
> --- a/drivers/gpu/drm/i915/i915_debugfs.c
> +++ b/drivers/gpu/drm/i915/i915_debugfs.c
> @@ -61,6 +61,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;
>  }
> @@ -106,6 +113,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;
>  }

-- 
Jani Nikula, Intel Open Source Graphics Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* ✗ Fi.CI.CHECKPATCH: warning for drm/i915: from module params to device params
  2018-12-21 13:31 [RFC PATCH 00/11] drm/i915: from module params to device params Jani Nikula
                   ` (11 preceding siblings ...)
  2018-12-21 13:31 ` [RFC PATCH 11/11] drm/i915/params: hide i915_modparams within i915_params.c Jani Nikula
@ 2018-12-21 14:53 ` Patchwork
  2018-12-21 14:58 ` ✗ Fi.CI.SPARSE: " Patchwork
  2018-12-21 15:10 ` ✗ Fi.CI.BAT: failure " Patchwork
  14 siblings, 0 replies; 18+ messages in thread
From: Patchwork @ 2018-12-21 14:53 UTC (permalink / raw)
  To: Jani Nikula; +Cc: intel-gfx

== Series Details ==

Series: drm/i915: from module params to device params
URL   : https://patchwork.freedesktop.org/series/54414/
State : warning

== Summary ==

$ dim checkpatch origin/drm-tip
586195831aff drm/i915: add a helper to make a copy of i915_params
-:53: CHECK:MACRO_ARG_PRECEDENCE: Macro argument 'x' may be better as '(x)' to avoid precedence issues
#53: FILE: drivers/gpu/drm/i915/i915_params.c:216:
+#define DUP(T, x, ...) dup_param(#T, &dest->x);

-:53: WARNING:TRAILING_SEMICOLON: macros should not use a trailing semicolon
#53: FILE: drivers/gpu/drm/i915/i915_params.c:216:
+#define DUP(T, x, ...) dup_param(#T, &dest->x);

total: 0 errors, 1 warnings, 1 checks, 43 lines checked
0812143284ad drm/i915: add a helper to free the members of i915_params
-:54: CHECK:MACRO_ARG_PRECEDENCE: Macro argument 'x' may be better as '(x)' to avoid precedence issues
#54: FILE: drivers/gpu/drm/i915/i915_params.c:232:
+#define FREE(T, x, ...) free_param(#T, &params->x);

-:54: WARNING:TRAILING_SEMICOLON: macros should not use a trailing semicolon
#54: FILE: drivers/gpu/drm/i915/i915_params.c:232:
+#define FREE(T, x, ...) free_param(#T, &params->x);

total: 0 errors, 1 warnings, 1 checks, 44 lines checked
4509a9377d1c drm/i915/uc: add dev_priv parameter to intel_uc_is_using_* functions
6a59dbd9d959 drm/i915/params: set i915.enable_hangcheck permissions to 0600
-:26: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis
#26: FILE: drivers/gpu/drm/i915/i915_params.c:81:
+i915_param_named_unsafe(enable_hangcheck, bool, 0600,
 	"Periodically check GPU activity for detecting hangs. "

total: 0 errors, 0 warnings, 1 checks, 8 lines checked
305ba63bcf19 drm/i915: move load failure injection to selftests
a2297526194c drm/i915/params: document I915_PARAMS_FOR_EACH()
53915b3c08cf drm/i915/params: add i915 parameters to debugfs
-:88: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis
#88: FILE: drivers/gpu/drm/i915/i915_debugfs.c:101:
+static ssize_t i915_param_uint_write(struct file *file,
+				    const char __user *ubuf, size_t len,

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

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

total: 0 errors, 1 warnings, 2 checks, 298 lines checked
80c374cedf12 drm/i915/debugfs: 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.c:67:
+		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.c:119:
+		bool b;
+		ret = kstrtobool_from_user(ubuf, len, &b);

total: 0 errors, 2 warnings, 0 checks, 26 lines checked
29ef2d634ac8 drm/i915/params: prevent changing module params runtime
-:52: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis
#52: FILE: drivers/gpu/drm/i915/i915_params.c:61:
+i915_param_named_unsafe(enable_fbc, int, 0400,
 	"Enable frame buffer compression for power savings "

-:61: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis
#61: FILE: drivers/gpu/drm/i915/i915_params.c:69:
+i915_param_named_unsafe(panel_use_ssc, int, 0400,
 	"Use Spread Spectrum Clock with panels [LVDS/eDP] "

-:70: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis
#70: FILE: drivers/gpu/drm/i915/i915_params.c:77:
+i915_param_named_unsafe(reset, int, 0400,
 	"Attempt GPU resets (0=disabled, 1=full gpu reset, 2=engine reset [default])");

-:78: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis
#78: FILE: drivers/gpu/drm/i915/i915_params.c:84:
+i915_param_named(error_capture, bool, 0400,
 	"Record the GPU state following a hang. "

-:85: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis
#85: FILE: drivers/gpu/drm/i915/i915_params.c:90:
+i915_param_named_unsafe(enable_hangcheck, bool, 0400,
 	"Periodically check GPU activity for detecting hangs. "

-:91: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis
#91: FILE: drivers/gpu/drm/i915/i915_params.c:95:
+i915_param_named_unsafe(enable_psr, int, 0400,
 	"Enable PSR "

-:103: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis
#103: FILE: drivers/gpu/drm/i915/i915_params.c:110:
+i915_param_named(fastboot, bool, 0400,
 	"Try to skip unnecessary mode sets at boot time (default: false)");

-:107: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis
#107: FILE: drivers/gpu/drm/i915/i915_params.c:113:
+i915_param_named_unsafe(prefault_disable, bool, 0400,
 	"Disable page prefaulting for pread/pwrite/reloc (default:false). "

-:112: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis
#112: FILE: drivers/gpu/drm/i915/i915_params.c:117:
+i915_param_named_unsafe(load_detect_test, bool, 0400,
 	"Force-enable the VGA load detect code for testing (default:false). "

-:117: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis
#117: FILE: drivers/gpu/drm/i915/i915_params.c:121:
+i915_param_named_unsafe(force_reset_modeset_test, bool, 0400,
 	"Force a modeset during gpu reset for testing (default:false). "

-:122: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis
#122: FILE: drivers/gpu/drm/i915/i915_params.c:125:
+i915_param_named_unsafe(invert_brightness, int, 0400,
 	"Invert backlight brightness "

-:131: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis
#131: FILE: drivers/gpu/drm/i915/i915_params.c:135:
+i915_param_named(mmio_debug, int, 0400,
 	"Enable the MMIO debug code for the first N failures (default: off). "

-:144: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis
#144: FILE: drivers/gpu/drm/i915/i915_params.c:170:
+i915_param_named_unsafe(enable_dp_mst, bool, 0400,
 	"Enable multi-stream transport (MST) for new DisplayPort sinks. (default: true)");

-:148: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis
#148: FILE: drivers/gpu/drm/i915/i915_params.c:173:
+i915_param_named(enable_dpcd_backlight, bool, 0400,
 	"Enable support for DPCD backlight control (default:false)");

total: 0 errors, 0 warnings, 14 checks, 114 lines checked
b7a1deaff9b1 drm/i915/params: switch to device specific parameters
fd33cc4237ef drm/i915/params: hide i915_modparams within i915_params.c

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

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

* ✗ Fi.CI.SPARSE: warning for drm/i915: from module params to device params
  2018-12-21 13:31 [RFC PATCH 00/11] drm/i915: from module params to device params Jani Nikula
                   ` (12 preceding siblings ...)
  2018-12-21 14:53 ` ✗ Fi.CI.CHECKPATCH: warning for drm/i915: from module params to device params Patchwork
@ 2018-12-21 14:58 ` Patchwork
  2018-12-21 15:10 ` ✗ Fi.CI.BAT: failure " Patchwork
  14 siblings, 0 replies; 18+ messages in thread
From: Patchwork @ 2018-12-21 14:58 UTC (permalink / raw)
  To: Jani Nikula; +Cc: intel-gfx

== Series Details ==

Series: drm/i915: from module params to device params
URL   : https://patchwork.freedesktop.org/series/54414/
State : warning

== Summary ==

$ dim sparse origin/drm-tip
Sparse version: v0.5.2
Commit: drm/i915: add a helper to make a copy of i915_params
Okay!

Commit: drm/i915: add a helper to free the members of i915_params
Okay!

Commit: drm/i915/uc: add dev_priv parameter to intel_uc_is_using_* functions
Okay!

Commit: drm/i915/params: set i915.enable_hangcheck permissions to 0600
Okay!

Commit: drm/i915: move load failure injection to selftests
-drivers/gpu/drm/i915/selftests/../i915_drv.h:3550:16: warning: expression using sizeof(void)
+drivers/gpu/drm/i915/selftests/../i915_drv.h:3535:16: warning: expression using sizeof(void)

Commit: drm/i915/params: document I915_PARAMS_FOR_EACH()
Okay!

Commit: drm/i915/params: add i915 parameters to debugfs
Okay!

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

Commit: drm/i915/params: prevent changing module params runtime
Okay!

Commit: drm/i915/params: switch to device specific parameters
-drivers/gpu/drm/i915/selftests/../i915_drv.h:3535:16: warning: expression using sizeof(void)
+drivers/gpu/drm/i915/selftests/../i915_drv.h:3538:16: warning: expression using sizeof(void)

Commit: drm/i915/params: hide i915_modparams within i915_params.c
Okay!

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

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

* Re: [RFC PATCH 03/11] drm/i915/uc: add dev_priv parameter to intel_uc_is_using_* functions
  2018-12-21 13:31 ` [RFC PATCH 03/11] drm/i915/uc: add dev_priv parameter to intel_uc_is_using_* functions Jani Nikula
@ 2018-12-21 14:59   ` Michal Wajdeczko
  0 siblings, 0 replies; 18+ messages in thread
From: Michal Wajdeczko @ 2018-12-21 14:59 UTC (permalink / raw)
  To: intel-gfx, Jani Nikula

On Fri, 21 Dec 2018 14:31:38 +0100, Jani Nikula <jani.nikula@intel.com>  
wrote:

/snip/

> diff --git a/drivers/gpu/drm/i915/intel_uc.h  
> b/drivers/gpu/drm/i915/intel_uc.h
> index 25d73ada74ae..24990ade4fb8 100644
> --- a/drivers/gpu/drm/i915/intel_uc.h
> +++ b/drivers/gpu/drm/i915/intel_uc.h
> @@ -41,19 +41,19 @@ void intel_uc_fini(struct drm_i915_private  
> *dev_priv);
>  int intel_uc_suspend(struct drm_i915_private *dev_priv);
>  int intel_uc_resume(struct drm_i915_private *dev_priv);
> -static inline bool intel_uc_is_using_guc(void)
> +static inline bool intel_uc_is_using_guc(struct drm_i915_private  
> *dev_priv)

please s/dev_priv/i915

>  {
>  	GEM_BUG_ON(i915_modparams.enable_guc < 0);
>  	return i915_modparams.enable_guc > 0;
>  }
> -static inline bool intel_uc_is_using_guc_submission(void)
> +static inline bool intel_uc_is_using_guc_submission(struct  
> drm_i915_private *dev_priv)

and here

>  {
>  	GEM_BUG_ON(i915_modparams.enable_guc < 0);
>  	return i915_modparams.enable_guc & ENABLE_GUC_SUBMISSION;
>  }
> -static inline bool intel_uc_is_using_huc(void)
> +static inline bool intel_uc_is_using_huc(struct drm_i915_private  
> *dev_priv)

and here

>  {
>  	GEM_BUG_ON(i915_modparams.enable_guc < 0);
>  	return i915_modparams.enable_guc & ENABLE_GUC_LOAD_HUC;

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

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

* ✗ Fi.CI.BAT: failure for drm/i915: from module params to device params
  2018-12-21 13:31 [RFC PATCH 00/11] drm/i915: from module params to device params Jani Nikula
                   ` (13 preceding siblings ...)
  2018-12-21 14:58 ` ✗ Fi.CI.SPARSE: " Patchwork
@ 2018-12-21 15:10 ` Patchwork
  14 siblings, 0 replies; 18+ messages in thread
From: Patchwork @ 2018-12-21 15:10 UTC (permalink / raw)
  To: Jani Nikula; +Cc: intel-gfx

== Series Details ==

Series: drm/i915: from module params to device params
URL   : https://patchwork.freedesktop.org/series/54414/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_5338 -> Patchwork_11146
====================================================

Summary
-------

  **FAILURE**

  Serious unknown changes coming with Patchwork_11146 absolutely need to be
  verified manually.
  
  If you think the reported changes have nothing to do with the changes
  introduced in Patchwork_11146, 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/54414/revisions/1/mbox/

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

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

### IGT changes ###

#### Possible regressions ####

  * igt@gem_busy@basic-busy-default:
    - fi-apl-guc:         PASS -> FAIL +55

  * igt@gem_close_race@basic-process:
    - fi-elk-e7500:       PASS -> FAIL +43

  * igt@gem_close_race@basic-threads:
    - fi-skl-6600u:       PASS -> FAIL +55
    - fi-whl-u:           PASS -> FAIL +55
    - fi-skl-guc:         PASS -> FAIL +55
    - fi-kbl-7567u:       PASS -> FAIL +63

  * igt@gem_ctx_create@basic-files:
    - fi-kbl-r:           PASS -> FAIL +55

  * igt@gem_ctx_switch@basic-default:
    - fi-cfl-8700k:       PASS -> FAIL +55

  * igt@gem_ctx_switch@basic-default-heavy:
    - fi-skl-iommu:       PASS -> FAIL +55

  * igt@gem_exec_basic@basic-bsd:
    - fi-bdw-gvtdvm:      PASS -> FAIL +62
    - fi-ivb-3520m:       PASS -> FAIL +54
    - fi-kbl-7500u:       PASS -> FAIL +55

  * igt@gem_exec_basic@basic-bsd2:
    - fi-kbl-7500u:       SKIP -> FAIL +7
    - fi-bxt-j4205:       SKIP -> FAIL +7

  * igt@gem_exec_basic@basic-default:
    - fi-skl-gvtdvm:      PASS -> FAIL +62

  * igt@gem_exec_basic@basic-render:
    - fi-ilk-650:         PASS -> FAIL +43
    - fi-bsw-n3050:       PASS -> FAIL +52

  * igt@gem_exec_basic@gtt-blt:
    - fi-hsw-4770:        PASS -> FAIL +58

  * igt@gem_exec_basic@gtt-bsd:
    - fi-bwr-2160:        SKIP -> FAIL +17

  * igt@gem_exec_basic@gtt-bsd1:
    - fi-ivb-3520m:       SKIP -> FAIL +11
    - fi-skl-6700hq:      SKIP -> FAIL +7
    - fi-skl-iommu:       SKIP -> FAIL +7
    - fi-glk-j4005:       SKIP -> FAIL +7
    - fi-icl-u3:          SKIP -> FAIL +7

  * igt@gem_exec_basic@gtt-bsd2:
    - fi-byt-clapper:     SKIP -> FAIL +13

  * igt@gem_exec_basic@gtt-default:
    - fi-bwr-2160:        PASS -> FAIL +21

  * igt@gem_exec_basic@gtt-render:
    - fi-snb-2520m:       PASS -> FAIL +50

  * igt@gem_exec_basic@gtt-vebox:
    - fi-icl-u3:          PASS -> FAIL +55

  * igt@gem_exec_basic@readonly-bsd:
    - fi-hsw-peppy:       PASS -> FAIL +56

  * igt@gem_exec_basic@readonly-bsd1:
    - fi-snb-2520m:       SKIP -> FAIL +13
    - fi-icl-u2:          SKIP -> FAIL +7
    - fi-ilk-650:         SKIP -> FAIL +16

  * igt@gem_exec_basic@readonly-bsd2:
    - fi-pnv-d510:        SKIP -> FAIL +20
    - fi-kbl-guc:         SKIP -> FAIL +10
    - fi-hsw-4770r:       SKIP -> FAIL +7
    - fi-kbl-8809g:       SKIP -> FAIL +7
    - fi-cfl-guc:         SKIP -> FAIL +7
    - fi-kbl-x1275:       SKIP -> FAIL +7
    - fi-hsw-peppy:       SKIP -> FAIL +8

  * igt@gem_exec_basic@readonly-default:
    - fi-skl-6700hq:      PASS -> FAIL +55
    - fi-kbl-guc:         PASS -> FAIL +52

  * igt@gem_exec_create@basic:
    - fi-bsw-kefka:       PASS -> FAIL +53

  * igt@gem_exec_fence@basic-await-default:
    - fi-skl-6700k2:      PASS -> FAIL +55

  * igt@gem_exec_fence@basic-busy-default:
    - fi-blb-e6850:       PASS -> FAIL +39
    - fi-cfl-guc:         PASS -> FAIL +55

  * igt@gem_exec_fence@basic-wait-default:
    - fi-pnv-d510:        PASS -> FAIL +39

  * igt@gem_exec_gttfill@basic:
    - fi-skl-gvtdvm:      SKIP -> FAIL
    - fi-kbl-x1275:       PASS -> FAIL +55
    - fi-bsw-kefka:       SKIP -> FAIL +9
    - fi-glk-dsi:         SKIP -> FAIL +8
    - fi-bdw-gvtdvm:      SKIP -> FAIL

  * igt@gem_exec_reloc@basic-cpu:
    - fi-skl-6600u:       PASS -> WARN +30
    - fi-pnv-d510:        PASS -> WARN +32
    - fi-kbl-7560u:       PASS -> WARN +30

  * igt@gem_exec_reloc@basic-cpu-active:
    - fi-bsw-kefka:       PASS -> WARN +29
    - fi-skl-6700hq:      PASS -> WARN +30
    - fi-cfl-8109u:       PASS -> WARN +27
    - fi-byt-clapper:     PASS -> WARN +29

  * igt@gem_exec_reloc@basic-cpu-gtt:
    - fi-kbl-guc:         PASS -> WARN +27

  * igt@gem_exec_reloc@basic-cpu-gtt-active:
    - fi-whl-u:           PASS -> WARN +30
    - fi-skl-6770hq:      PASS -> WARN +30
    - fi-bsw-n3050:       PASS -> WARN +28

  * igt@gem_exec_reloc@basic-cpu-gtt-noreloc:
    - fi-kbl-7500u:       PASS -> WARN +30
    - fi-kbl-8809g:       PASS -> WARN +27

  * igt@gem_exec_reloc@basic-cpu-noreloc:
    - fi-cfl-guc:         PASS -> WARN +30

  * igt@gem_exec_reloc@basic-cpu-read:
    - fi-skl-iommu:       PASS -> WARN +30
    - fi-cfl-8700k:       PASS -> WARN +30

  * igt@gem_exec_reloc@basic-cpu-read-active:
    - fi-ilk-650:         PASS -> WARN +32

  * igt@gem_exec_reloc@basic-cpu-read-noreloc:
    - fi-glk-dsi:         PASS -> WARN +30

  * igt@gem_exec_reloc@basic-gtt:
    - fi-hsw-4770:        PASS -> WARN +33
    - fi-byt-j1900:       PASS -> WARN +32
    - fi-bxt-dsi:         PASS -> WARN +30
    - fi-skl-6260u:       PASS -> WARN +30

  * igt@gem_exec_reloc@basic-gtt-cpu:
    - fi-elk-e7500:       PASS -> WARN +32

  * igt@gem_exec_reloc@basic-gtt-cpu-noreloc:
    - fi-glk-j4005:       PASS -> WARN +30

  * igt@gem_exec_reloc@basic-gtt-noreloc:
    - fi-skl-guc:         PASS -> WARN +30
    - fi-kbl-7567u:       PASS -> WARN +27
    - fi-bwr-2160:        PASS -> WARN +32
    - fi-kbl-r:           PASS -> WARN +30

  * igt@gem_exec_reloc@basic-gtt-read:
    - fi-blb-e6850:       PASS -> WARN +32
    - fi-skl-6700k2:      PASS -> WARN +30

  * igt@gem_exec_reloc@basic-gtt-read-active:
    - fi-skl-gvtdvm:      PASS -> WARN +30
    - fi-icl-u3:          PASS -> WARN +30

  * igt@gem_exec_reloc@basic-gtt-read-noreloc:
    - fi-hsw-peppy:       PASS -> WARN +30

  * igt@gem_exec_reloc@basic-softpin:
    - fi-hsw-4770r:       PASS -> WARN +30
    - fi-kbl-x1275:       PASS -> WARN +30

  * igt@gem_exec_reloc@basic-write-cpu-active:
    - fi-icl-u2:          PASS -> WARN +30

  * igt@gem_exec_reloc@basic-write-gtt-active:
    - fi-bdw-gvtdvm:      PASS -> WARN +30

  * igt@gem_exec_reloc@basic-write-gtt-noreloc:
    - fi-ivb-3520m:       PASS -> WARN +33

  * igt@gem_exec_reloc@basic-write-read-noreloc:
    - fi-bxt-j4205:       PASS -> WARN +30

  * igt@gem_exec_store@basic-bsd:
    - fi-cfl-8109u:       PASS -> FAIL +60
    - fi-skl-6770hq:      PASS -> FAIL +63

  * igt@gem_exec_store@basic-bsd1:
    - fi-kbl-r:           SKIP -> FAIL +7
    - fi-apl-guc:         SKIP -> FAIL +7
    - fi-whl-u:           SKIP -> FAIL +7
    - fi-skl-6600u:       SKIP -> FAIL +7
    - fi-skl-6700k2:      SKIP -> FAIL +7

  * igt@gem_exec_store@basic-bsd2:
    - fi-hsw-4770:        SKIP -> FAIL +7
    - fi-bxt-dsi:         SKIP -> FAIL +8
    - fi-cfl-8700k:       SKIP -> FAIL +7
    - fi-skl-guc:         SKIP -> FAIL +7

  * igt@gem_exec_store@basic-vebox:
    - fi-byt-j1900:       SKIP -> FAIL +12
    - fi-elk-e7500:       SKIP -> FAIL +16

  * igt@gem_exec_suspend@basic:
    - fi-icl-u2:          PASS -> FAIL +55

  * igt@gem_exec_suspend@basic-s3:
    - fi-bdw-5557u:       PASS -> FAIL +63

  * igt@gem_sync@basic-many-each:
    - fi-kbl-7560u:       PASS -> FAIL +63
    - fi-bxt-dsi:         PASS -> FAIL +54

  * igt@gem_sync@basic-store-all:
    - fi-byt-clapper:     PASS -> FAIL +50

  * igt@gem_sync@basic-store-each:
    - fi-byt-j1900:       PASS -> FAIL +53
    - fi-skl-6260u:       PASS -> FAIL +63

  * igt@gem_wait@basic-busy-all:
    - fi-hsw-4770r:       PASS -> FAIL +57

  * igt@i915_module_load@reload:
    - fi-glk-j4005:       PASS -> FAIL +54
    - fi-kbl-8809g:       PASS -> FAIL +51

  * igt@kms_busy@basic-flip-a:
    - fi-apl-guc:         PASS -> WARN +30

  * igt@kms_busy@basic-flip-b:
    - fi-bdw-5557u:       PASS -> WARN +30

  * igt@kms_force_connector_basic@force-edid:
    - fi-snb-2520m:       PASS -> WARN +32

  * igt@kms_pipe_crc_basic@hang-read-crc-pipe-a:
    - fi-bsw-n3050:       SKIP -> FAIL +10

  * igt@kms_pipe_crc_basic@hang-read-crc-pipe-b:
    - fi-bxt-j4205:       PASS -> FAIL +55
    - fi-glk-dsi:         PASS -> FAIL +53

  * igt@kms_pipe_crc_basic@hang-read-crc-pipe-c:
    - fi-blb-e6850:       SKIP -> FAIL +20

  
#### Warnings ####

  * igt@gem_mmap_gtt@basic-read-no-prefault:
    - fi-kbl-r:           PASS -> SKIP +2
    - fi-skl-6260u:       PASS -> SKIP +2
    - fi-blb-e6850:       PASS -> SKIP +2
    - fi-hsw-peppy:       PASS -> SKIP +2
    - fi-skl-6770hq:      PASS -> SKIP +2
    - fi-cfl-guc:         PASS -> SKIP +2
    - fi-cfl-8700k:       PASS -> SKIP +2
    - fi-icl-u2:          PASS -> SKIP +2

  * igt@gem_mmap_gtt@basic-write-gtt-no-prefault:
    - fi-kbl-guc:         PASS -> SKIP +2
    - fi-bsw-kefka:       PASS -> SKIP +2
    - fi-bdw-5557u:       PASS -> SKIP +2
    - fi-cfl-8109u:       PASS -> SKIP +2
    - fi-bxt-dsi:         PASS -> SKIP +2
    - fi-ilk-650:         PASS -> SKIP +2
    - fi-hsw-4770:        PASS -> SKIP +2
    - fi-ivb-3520m:       PASS -> SKIP +2
    - fi-skl-guc:         PASS -> SKIP +2
    - fi-snb-2520m:       PASS -> SKIP +2
    - fi-whl-u:           PASS -> SKIP +2
    - fi-skl-iommu:       PASS -> SKIP +2

  * igt@gem_mmap_gtt@basic-write-no-prefault:
    - fi-kbl-7500u:       PASS -> SKIP +2
    - fi-bdw-gvtdvm:      PASS -> SKIP +2
    - fi-kbl-8809g:       PASS -> SKIP +2
    - fi-byt-clapper:     PASS -> SKIP +2
    - fi-skl-gvtdvm:      PASS -> SKIP +2
    - fi-glk-j4005:       PASS -> SKIP +2
    - fi-glk-dsi:         PASS -> SKIP +2
    - fi-bxt-j4205:       PASS -> SKIP +2
    - fi-skl-6700hq:      PASS -> SKIP +2
    - fi-kbl-x1275:       PASS -> SKIP +2
    - fi-icl-u3:          PASS -> SKIP +2
    - fi-bsw-n3050:       PASS -> SKIP +2
    - fi-byt-j1900:       PASS -> SKIP +2
    - fi-skl-6700k2:      PASS -> SKIP +2
    - fi-apl-guc:         PASS -> SKIP +2
    - fi-bwr-2160:        PASS -> SKIP +2
    - fi-kbl-7560u:       PASS -> SKIP +2
    - fi-skl-6600u:       PASS -> SKIP +2
    - fi-hsw-4770r:       PASS -> SKIP +2
    - fi-elk-e7500:       PASS -> SKIP +2
    - fi-pnv-d510:        PASS -> SKIP +2

  * igt@kms_busy@basic-flip-a:
    - fi-kbl-7567u:       PASS -> SKIP +36

  * igt@pm_rpm@basic-pci-d3-state:
    - fi-bsw-kefka:       SKIP -> PASS

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

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

### IGT changes ###

#### Issues hit ####

  * igt@gem_exec_fence@basic-wait-default:
    - fi-glk-dsi:         PASS -> FAIL [fdo#108455]
    - fi-glk-j4005:       PASS -> FAIL [fdo#108455]

  * igt@gem_exec_suspend@basic-s4-devices:
    - fi-kbl-8809g:       PASS -> FAIL [k.org#200585]

  * igt@kms_pipe_crc_basic@bad-source:
    - fi-cfl-8109u:       PASS -> DMESG-WARN [fdo#105602] / [fdo#106350] +30

  * igt@kms_pipe_crc_basic@hang-read-crc-pipe-b:
    - fi-cfl-8109u:       PASS -> DMESG-FAIL [fdo#105602] +2

  * igt@kms_pipe_crc_basic@read-crc-pipe-a:
    - fi-byt-clapper:     PASS -> FAIL [fdo#107362]

  * igt@kms_pipe_crc_basic@suspend-read-crc-pipe-b:
    - fi-byt-clapper:     PASS -> FAIL [fdo#103191] / [fdo#107362]

  * igt@prime_vgem@basic-fence-flip:
    - fi-ilk-650:         PASS -> FAIL [fdo#104008]

  * {igt@runner@aborted}:
    - fi-icl-y:           NOTRUN -> FAIL [fdo#108915]

  
#### Possible fixes ####

  * igt@i915_selftest@live_execlists:
    - fi-apl-guc:         INCOMPLETE [fdo#103927] / [fdo#108622] -> PASS

  * igt@kms_chamelium@hdmi-hpd-fast:
    - fi-kbl-7500u:       FAIL [fdo#108767] -> PASS

  * igt@kms_frontbuffer_tracking@basic:
    - fi-icl-u2:          FAIL [fdo#103167] -> PASS

  * igt@kms_pipe_crc_basic@nonblocking-crc-pipe-b-frame-sequence:
    - fi-byt-clapper:     FAIL [fdo#103191] / [fdo#107362] -> PASS

  * igt@pm_rpm@basic-rte:
    - fi-bsw-kefka:       FAIL [fdo#108800] -> PASS

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

  [fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167
  [fdo#103191]: https://bugs.freedesktop.org/show_bug.cgi?id=103191
  [fdo#103927]: https://bugs.freedesktop.org/show_bug.cgi?id=103927
  [fdo#104008]: https://bugs.freedesktop.org/show_bug.cgi?id=104008
  [fdo#105602]: https://bugs.freedesktop.org/show_bug.cgi?id=105602
  [fdo#106350]: https://bugs.freedesktop.org/show_bug.cgi?id=106350
  [fdo#107362]: https://bugs.freedesktop.org/show_bug.cgi?id=107362
  [fdo#108455]: https://bugs.freedesktop.org/show_bug.cgi?id=108455
  [fdo#108622]: https://bugs.freedesktop.org/show_bug.cgi?id=108622
  [fdo#108767]: https://bugs.freedesktop.org/show_bug.cgi?id=108767
  [fdo#108800]: https://bugs.freedesktop.org/show_bug.cgi?id=108800
  [fdo#108915]: https://bugs.freedesktop.org/show_bug.cgi?id=108915
  [k.org#200585]: https://bugzilla.kernel.org/show_bug.cgi?id=200585


Participating hosts (49 -> 43)
------------------------------

  Additional (1): fi-icl-y 
  Missing    (7): fi-kbl-soraka fi-ilk-m540 fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-ctg-p8600 fi-bdw-samus 


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

    * Linux: CI_DRM_5338 -> Patchwork_11146

  CI_DRM_5338: 5045a5f1e37e35f2bb7cfa5dff029225e844737b @ git://anongit.freedesktop.org/gfx-ci/linux
  IGT_4752: 321fe77d32fef32ef820f53924045fe6ef0cf6ed @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
  Patchwork_11146: fd33cc4237ef4d899244e9c101d943a2531fe3fe @ git://anongit.freedesktop.org/gfx-ci/linux


== Linux commits ==

fd33cc4237ef drm/i915/params: hide i915_modparams within i915_params.c
b7a1deaff9b1 drm/i915/params: switch to device specific parameters
29ef2d634ac8 drm/i915/params: prevent changing module params runtime
80c374cedf12 drm/i915/debugfs: support bool values for int and uint params
53915b3c08cf drm/i915/params: add i915 parameters to debugfs
a2297526194c drm/i915/params: document I915_PARAMS_FOR_EACH()
305ba63bcf19 drm/i915: move load failure injection to selftests
6a59dbd9d959 drm/i915/params: set i915.enable_hangcheck permissions to 0600
4509a9377d1c drm/i915/uc: add dev_priv parameter to intel_uc_is_using_* functions
0812143284ad drm/i915: add a helper to free the members of i915_params
586195831aff drm/i915: add a helper to make a copy of i915_params

== Logs ==

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

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

end of thread, other threads:[~2018-12-21 15:10 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-21 13:31 [RFC PATCH 00/11] drm/i915: from module params to device params Jani Nikula
2018-12-21 13:31 ` [RFC PATCH 01/11] drm/i915: add a helper to make a copy of i915_params Jani Nikula
2018-12-21 13:31 ` [RFC PATCH 02/11] drm/i915: add a helper to free the members " Jani Nikula
2018-12-21 13:31 ` [RFC PATCH 03/11] drm/i915/uc: add dev_priv parameter to intel_uc_is_using_* functions Jani Nikula
2018-12-21 14:59   ` Michal Wajdeczko
2018-12-21 13:31 ` [RFC PATCH 04/11] drm/i915/params: set i915.enable_hangcheck permissions to 0600 Jani Nikula
2018-12-21 13:31 ` [RFC PATCH 05/11] drm/i915: move load failure injection to selftests Jani Nikula
2018-12-21 13:31 ` [RFC PATCH 06/11] drm/i915/params: document I915_PARAMS_FOR_EACH() Jani Nikula
2018-12-21 13:31 ` [RFC PATCH 07/11] drm/i915/params: add i915 parameters to debugfs Jani Nikula
     [not found] ` <cover.1545396674.git.jani.nikula@intel.com>
2018-12-21 13:31   ` [RFC PATCH 08/11] drm/i915/debugfs: support bool values for int and uint params Jani Nikula
2018-12-21 13:42     ` Jani Nikula
2018-12-21 13:31 ` [RFC PATCH 08/11] drm/i915/params: " Jani Nikula
2018-12-21 13:31 ` [RFC PATCH 09/11] drm/i915/params: prevent changing module params runtime Jani Nikula
2018-12-21 13:31 ` [RFC PATCH 10/11] drm/i915/params: switch to device specific parameters Jani Nikula
2018-12-21 13:31 ` [RFC PATCH 11/11] drm/i915/params: hide i915_modparams within i915_params.c Jani Nikula
2018-12-21 14:53 ` ✗ Fi.CI.CHECKPATCH: warning for drm/i915: from module params to device params Patchwork
2018-12-21 14:58 ` ✗ Fi.CI.SPARSE: " Patchwork
2018-12-21 15:10 ` ✗ Fi.CI.BAT: failure " Patchwork

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.