[Intel-gfx] [PATCH] drm/i915: hangcheck disable parameter

Chris Wilson chris at chris-wilson.co.uk
Wed Jun 29 10:26:39 CEST 2011


On Tue, 28 Jun 2011 17:09:54 -0700, Ben Widawsky <ben at bwidawsk.net> wrote:
> Provide a parameter to disable hanghcheck. This is useful mostly for
> developers trying to debug known problems, and probably should not be
> touched by normal users.

Looks good, comments inline.

> Cc: Chris Wilson <chris at chris-wilson.co.uk>
> Signed-off-by: Ben Widawsky <ben at bwidawsk.net>
> ---
>  drivers/gpu/drm/i915/i915_dma.c |    2 ++
>  drivers/gpu/drm/i915/i915_drv.c |    3 +++
>  drivers/gpu/drm/i915/i915_gem.c |    9 +++++++--
>  drivers/gpu/drm/i915/i915_irq.c |   17 +++++++++++++----
>  4 files changed, 25 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c
> index 2b79588..279e357 100644
> --- a/drivers/gpu/drm/i915/i915_dma.c
> +++ b/drivers/gpu/drm/i915/i915_dma.c
> @@ -43,6 +43,8 @@
>  #include <linux/slab.h>
>  #include <acpi/video.h>
>  
> +extern unsigned int i915_enable_hangcheck;

Put this in i915_drv.h along with the other module parameters. And
consider making it __read_mostly.

>  static void gen6_pm_rps_work(struct work_struct *work)
> @@ -1664,6 +1668,11 @@ void i915_hangcheck_elapsed(unsigned long data)
>  	uint32_t acthd, instdone, instdone1;
>  	bool err = false;
>  
> +	if (!i915_enable_hangcheck) {
> +		DRM_DEBUG_DRIVER("Ignoring disabled hangcheck\n");

I'm not convinced of the value of this debug message since it is 99%
likely to occur after setting the i915_enable_hangcheck to 0 and just
means that the timer expired and nothing more.

DRM_DEBUG_DRIVER("Hangcheck disabled per user request\n");
is marginally more informative.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre



More information about the Intel-gfx mailing list