diff mbox series

drm/i915: Always enable mmio debugging for CI

Message ID 20180824092633.11126-1-chris@chris-wilson.co.uk (mailing list archive)
State New, archived
Headers show
Series drm/i915: Always enable mmio debugging for CI | expand

Commit Message

Chris Wilson Aug. 24, 2018, 9:26 a.m. UTC
The default behaviour is to periodically check for a mmio access error,
and once detected enable mmio access checking. However this is useless
if the error only occurs once.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Mika Kuoppala <mika.kuoppala@intel.com>
---
 drivers/gpu/drm/i915/Kconfig.debug | 12 ++++++++++++
 drivers/gpu/drm/i915/i915_params.h |  8 +++++++-
 2 files changed, 19 insertions(+), 1 deletion(-)

Comments

Mika Kuoppala Aug. 24, 2018, 1:43 p.m. UTC | #1
Chris Wilson <chris@chris-wilson.co.uk> writes:

> The default behaviour is to periodically check for a mmio access error,
> and once detected enable mmio access checking. However this is useless
> if the error only occurs once.
>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Mika Kuoppala <mika.kuoppala@intel.com>

This could help onto zeroing on those handful of
unclaimed mmio bugs we have atm. Also this
will have a nice effect on preventing any
simple ones getting past under our radar.

Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>

> ---
>  drivers/gpu/drm/i915/Kconfig.debug | 12 ++++++++++++
>  drivers/gpu/drm/i915/i915_params.h |  8 +++++++-
>  2 files changed, 19 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/Kconfig.debug b/drivers/gpu/drm/i915/Kconfig.debug
> index 9e36ffb5eb7c..ca947ed64d4e 100644
> --- a/drivers/gpu/drm/i915/Kconfig.debug
> +++ b/drivers/gpu/drm/i915/Kconfig.debug
> @@ -31,6 +31,7 @@ config DRM_I915_DEBUG
>  	select DRM_I915_SW_FENCE_DEBUG_OBJECTS
>  	select DRM_I915_SELFTEST
>  	select DRM_I915_DEBUG_RUNTIME_PM
> +	select DRM_I915_DEBUG_MMIO
>          default n
>          help
>            Choose this option to turn on extra driver debugging that may affect
> @@ -40,6 +41,17 @@ config DRM_I915_DEBUG
>  
>            If in doubt, say "N".
>  
> +config DRM_I915_DEBUG_MMIO
> +        bool "Always insert extra checks around mmio access"
> +        default n
> +        help
> +	  Always enables the extra sanity checks (extra register reads)
> +	  around every mmio (register) access that will slow the system down.
> +
> +          Recommended for driver developers only.
> +
> +          If in doubt, say "N".
> +
>  config DRM_I915_DEBUG_GEM
>          bool "Insert extra checks into the GEM internals"
>          default n
> diff --git a/drivers/gpu/drm/i915/i915_params.h b/drivers/gpu/drm/i915/i915_params.h
> index 6c4d4a21474b..6a3308a5dfe1 100644
> --- a/drivers/gpu/drm/i915/i915_params.h
> +++ b/drivers/gpu/drm/i915/i915_params.h
> @@ -33,6 +33,12 @@ struct drm_printer;
>  #define ENABLE_GUC_SUBMISSION		BIT(0)
>  #define ENABLE_GUC_LOAD_HUC		BIT(1)
>  
> +#if IS_ENABLED(CONFIG_DRM_I915_DEBUG_MMIO)
> +#define MMIO_DEBUG_DFL -1
> +#else
> +#define MMIO_DEBUG_DFL 0
> +#endif
> +
>  #define I915_PARAMS_FOR_EACH(param) \
>  	param(char *, vbt_firmware, NULL) \
>  	param(int, modeset, -1) \
> @@ -51,7 +57,7 @@ struct drm_printer;
>  	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, mmio_debug, MMIO_DEBUG_DFL) \
>  	param(int, edp_vswing, 0) \
>  	param(int, reset, 2) \
>  	param(unsigned int, inject_load_failure, 0) \
> -- 
> 2.18.0
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/Kconfig.debug b/drivers/gpu/drm/i915/Kconfig.debug
index 9e36ffb5eb7c..ca947ed64d4e 100644
--- a/drivers/gpu/drm/i915/Kconfig.debug
+++ b/drivers/gpu/drm/i915/Kconfig.debug
@@ -31,6 +31,7 @@  config DRM_I915_DEBUG
 	select DRM_I915_SW_FENCE_DEBUG_OBJECTS
 	select DRM_I915_SELFTEST
 	select DRM_I915_DEBUG_RUNTIME_PM
+	select DRM_I915_DEBUG_MMIO
         default n
         help
           Choose this option to turn on extra driver debugging that may affect
@@ -40,6 +41,17 @@  config DRM_I915_DEBUG
 
           If in doubt, say "N".
 
+config DRM_I915_DEBUG_MMIO
+        bool "Always insert extra checks around mmio access"
+        default n
+        help
+	  Always enables the extra sanity checks (extra register reads)
+	  around every mmio (register) access that will slow the system down.
+
+          Recommended for driver developers only.
+
+          If in doubt, say "N".
+
 config DRM_I915_DEBUG_GEM
         bool "Insert extra checks into the GEM internals"
         default n
diff --git a/drivers/gpu/drm/i915/i915_params.h b/drivers/gpu/drm/i915/i915_params.h
index 6c4d4a21474b..6a3308a5dfe1 100644
--- a/drivers/gpu/drm/i915/i915_params.h
+++ b/drivers/gpu/drm/i915/i915_params.h
@@ -33,6 +33,12 @@  struct drm_printer;
 #define ENABLE_GUC_SUBMISSION		BIT(0)
 #define ENABLE_GUC_LOAD_HUC		BIT(1)
 
+#if IS_ENABLED(CONFIG_DRM_I915_DEBUG_MMIO)
+#define MMIO_DEBUG_DFL -1
+#else
+#define MMIO_DEBUG_DFL 0
+#endif
+
 #define I915_PARAMS_FOR_EACH(param) \
 	param(char *, vbt_firmware, NULL) \
 	param(int, modeset, -1) \
@@ -51,7 +57,7 @@  struct drm_printer;
 	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, mmio_debug, MMIO_DEBUG_DFL) \
 	param(int, edp_vswing, 0) \
 	param(int, reset, 2) \
 	param(unsigned int, inject_load_failure, 0) \