diff mbox

[4/6] drm/i915: Add i915.debug parameter

Message ID 1450380351-28397-5-git-send-email-joonas.lahtinen@linux.intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Joonas Lahtinen Dec. 17, 2015, 7:25 p.m. UTC
Add i915.debug parameter to control output in cases where the debug output
amount will be massive and as such is unsuitable for everyday use, but still
significant in value when solving bugs.

Cc: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
---
 drivers/gpu/drm/i915/i915_drv.h    | 1 -
 drivers/gpu/drm/i915/i915_params.c | 6 ++++++
 drivers/gpu/drm/i915/i915_params.h | 1 +
 3 files changed, 7 insertions(+), 1 deletion(-)

Comments

Chris Wilson Dec. 17, 2015, 9:02 p.m. UTC | #1
On Thu, Dec 17, 2015 at 09:25:49PM +0200, Joonas Lahtinen wrote:
> Add i915.debug parameter to control output in cases where the debug output
> amount will be massive and as such is unsuitable for everyday use, but still
> significant in value when solving bugs.
> 
> Cc: Chris Wilson <chris@chris-wilson.co.uk>
> Signed-off-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>

Maybe i915.verbose_checks ?

Too similar to i915.verbose_state_checks though?

Just trying to differentiate from drm.debug which we will also be
settings.
-Chris
Joonas Lahtinen Dec. 18, 2015, 10:01 a.m. UTC | #2
On to, 2015-12-17 at 21:02 +0000, Chris Wilson wrote:
> On Thu, Dec 17, 2015 at 09:25:49PM +0200, Joonas Lahtinen wrote:
> > Add i915.debug parameter to control output in cases where the debug
> > output
> > amount will be massive and as such is unsuitable for everyday use,
> > but still
> > significant in value when solving bugs.
> > 
> > Cc: Chris Wilson <chris@chris-wilson.co.uk>
> > Signed-off-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
> 
> Maybe i915.verbose_checks ?
> 
> Too similar to i915.verbose_state_checks though?
> 
> Just trying to differentiate from drm.debug which we will also be
> settings.

As discussed in IRC, I will go with WARN_RECUR and i915.warn_recurring,
those can potentially be pushed upstream all the way to kernel core.

Regards, Joonas

> -Chris
>
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index ae4b433..37fce5a 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -2659,7 +2659,6 @@  extern int i915_max_ioctl;
 extern int i915_suspend_switcheroo(struct drm_device *dev, pm_message_t state);
 extern int i915_resume_switcheroo(struct drm_device *dev);
 
-/* i915_dma.c */
 extern int i915_driver_load(struct drm_device *, unsigned long flags);
 extern int i915_driver_unload(struct drm_device *);
 extern int i915_driver_open(struct drm_device *dev, struct drm_file *file);
diff --git a/drivers/gpu/drm/i915/i915_params.c b/drivers/gpu/drm/i915/i915_params.c
index 8d90c25..e76af8d 100644
--- a/drivers/gpu/drm/i915/i915_params.c
+++ b/drivers/gpu/drm/i915/i915_params.c
@@ -57,6 +57,7 @@  struct i915_params i915 __read_mostly = {
 	.edp_vswing = 0,
 	.enable_guc_submission = false,
 	.guc_log_level = -1,
+	.debug = false,
 };
 
 module_param_named(modeset, i915.modeset, int, 0400);
@@ -203,3 +204,8 @@  MODULE_PARM_DESC(enable_guc_submission, "Enable GuC submission (default:false)")
 module_param_named(guc_log_level, i915.guc_log_level, int, 0400);
 MODULE_PARM_DESC(guc_log_level,
 	"GuC firmware logging level (-1:disabled (default), 0-3:enabled)");
+
+module_param_named(debug, i915.debug, bool, 0600);
+MODULE_PARM_DESC(debug,
+	"Enable verbose debug output unsuitable for everyday use (default: false). "
+	"For developers only.");
diff --git a/drivers/gpu/drm/i915/i915_params.h b/drivers/gpu/drm/i915/i915_params.h
index a748ebc..9a7c540 100644
--- a/drivers/gpu/drm/i915/i915_params.h
+++ b/drivers/gpu/drm/i915/i915_params.h
@@ -60,6 +60,7 @@  struct i915_params {
 	bool enable_guc_submission;
 	bool verbose_state_checks;
 	bool nuclear_pageflip;
+	bool debug;
 };
 
 extern struct i915_params i915 __read_mostly;