[Intel-gfx] [PATCH 006/190] drm/i915: Add GEM debugging Kconfig option

Dave Gordon david.s.gordon at intel.com
Tue Jan 12 09:44:56 PST 2016


On 11/01/16 09:16, Chris Wilson wrote:
> Currently there is a #define to enable extra BUG_ON for debugging
> requests and associated activities. I want to expand its use to cover
> all of GEM internals (so that we can saturate the code with asserts).
> We can add a Kconfig option to make it easier to enable - with the usual
> caveats of not enabling unless explicitly requested.
>
> Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
> Cc: Tvrtko Ursulin <tvrtko.ursulin at intel.com>
> ---
>   drivers/gpu/drm/i915/Kconfig.debug |  8 ++++++++
>   drivers/gpu/drm/i915/i915_drv.h    |  6 ++++++
>   drivers/gpu/drm/i915/i915_gem.c    | 12 +++++-------
>   3 files changed, 19 insertions(+), 7 deletions(-)
> diff --git a/drivers/gpu/drm/i915/Kconfig.debug b/drivers/gpu/drm/i915/Kconfig.debug
> index 1f10ee228eda..7fa6b97635e5 100644
> --- a/drivers/gpu/drm/i915/Kconfig.debug
> +++ b/drivers/gpu/drm/i915/Kconfig.debug
> @@ -10,3 +10,11 @@ config DRM_I915_WERROR
>   	---help---
>   	  Add -Werror to the build flags for (and only for) i915.ko.
>   	  Do not enable this unless you are writing code for the i915.ko module.
> +
> +config DRM_I915_DEBUG_GEM
> +	bool "Insert extra checks into the GEM internals"
> +	default n
> +	depends on DRM_I915_WERROR

This comes up as an option only if DRM_I915_WERROR is already selected? 
Surely it should be orthogonal to compile-time checks, with each as 
independent options but both restricted to EXPERT mode. So the line 
above should be "depends on EXPERT" not "depends on DRM_I915_WERROR"?

> +	---help---
> +	  Enable extra sanity checks (including BUGs) that may slow the
> +          system down and if hit hang the machine.

"hang the machine if hit". Unless you want commas round "if hit"?

Otherwise looks OK.

.Dave.



More information about the Intel-gfx mailing list