[Intel-gfx] [PATCH] drm/i915: Squelch nop wait-for-idle trace

Summers, Stuart stuart.summers at intel.com
Tue Jul 23 15:54:56 UTC 2019


On Tue, 2019-07-23 at 10:12 +0100, Chris Wilson wrote:
> If the system is already idle, omit the GEM_TRACE saying we are about
> to
> wait for idle. It looks confusing in the logs to see a continual
> stream
> of wait-for-idle, as one immediately assumes it is stuck in a loop.
> 
> Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>

Reviewed-by: Stuart Summers <stuart.summers at intel.com>

> ---
>  drivers/gpu/drm/i915/i915_gem.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_gem.c
> b/drivers/gpu/drm/i915/i915_gem.c
> index c6ba350e6e4f..01dd0d1d9bf6 100644
> --- a/drivers/gpu/drm/i915/i915_gem.c
> +++ b/drivers/gpu/drm/i915/i915_gem.c
> @@ -951,15 +951,15 @@ wait_for_timelines(struct drm_i915_private
> *i915,
>  int i915_gem_wait_for_idle(struct drm_i915_private *i915,
>  			   unsigned int flags, long timeout)
>  {
> +	/* If the device is asleep, we have no requests outstanding */
> +	if (!READ_ONCE(i915->gt.awake))
> +		return 0;
> +
>  	GEM_TRACE("flags=%x (%s), timeout=%ld%s, awake?=%s\n",
>  		  flags, flags & I915_WAIT_LOCKED ? "locked" :
> "unlocked",
>  		  timeout, timeout == MAX_SCHEDULE_TIMEOUT ? "
> (forever)" : "",
>  		  yesno(i915->gt.awake));
>  
> -	/* If the device is asleep, we have no requests outstanding */
> -	if (!READ_ONCE(i915->gt.awake))
> -		return 0;
> -
>  	timeout = wait_for_timelines(i915, flags, timeout);
>  	if (timeout < 0)
>  		return timeout;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3270 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/intel-gfx/attachments/20190723/cc428480/attachment.bin>


More information about the Intel-gfx mailing list