[Intel-gfx] [PATCH 01/11] drm/i915: Avoid using msleep under kdb and wait_for()

Jesse Barnes jbarnes at virtuousgeek.org
Wed Aug 11 17:20:22 CEST 2010


On Wed, 11 Aug 2010 10:31:26 +0100
Chris Wilson <chris at chris-wilson.co.uk> wrote:

> wait_for() uses msleep() to yield the cpu whilst spinning waiting for a
> register to change. kdb asserts that mode changes are atomic and so
> prohibits msleep. The alternative would be to use mdelay or to simply
> probe the register more often instead of busy waiting.
> 
> Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
> ---
>  drivers/gpu/drm/i915/intel_drv.h |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h
> index e6351e6..d93b7f0 100644
> --- a/drivers/gpu/drm/i915/intel_drv.h
> +++ b/drivers/gpu/drm/i915/intel_drv.h
> @@ -41,7 +41,7 @@
>  			ret__ = -ETIMEDOUT;				\
>  			break;						\
>  		}							\
> -		if (W) msleep(W);					\
> +		if (W && !in_dbg_master()) msleep(W);			\
>  	}								\
>  	ret__;								\
>  })

Reviewed-by: Jesse Barnes <jbarnes at virtuousgeek.org>

-- 
Jesse Barnes, Intel Open Source Technology Center



More information about the Intel-gfx mailing list