[Intel-gfx] [PATCH] drm/i915: demote opregion excessive timeout WARN_ONCE to DRM_INFO

Ville Syrjälä ville.syrjala at linux.intel.com
Fri Jan 31 12:41:30 CET 2014


On Fri, Jan 31, 2014 at 01:41:08PM +0200, Jani Nikula wrote:
> The WARN is a bit too verbose, make it a DRM_INFO that gets printed
> once.
> 
> While at it, fix the typo in DSLP.
> 
> Suggested-by: Chris Wilson <chris at chris-wilson.co.uk>
> Signed-off-by: Jani Nikula <jani.nikula at intel.com>
> ---
>  drivers/gpu/drm/i915/intel_opregion.c |    6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_opregion.c b/drivers/gpu/drm/i915/intel_opregion.c
> index 46d288055345..0fae017c4c7b 100644
> --- a/drivers/gpu/drm/i915/intel_opregion.c
> +++ b/drivers/gpu/drm/i915/intel_opregion.c
> @@ -263,7 +263,11 @@ static int swsci(struct drm_device *dev, u32 function, u32 parm, u32 *parm_out)
>  		dslp = 50;
>  	} else if (dslp > 1500) {
>  		/* Hey bios, trust must be earned. */
> -		WARN_ONCE(1, "excessive driver sleep timeout (DSPL) %u\n", dslp);
> +		static bool warned;
> +		if (!warned) {
> +			DRM_INFO("excessive driver sleep timeout (DSLP) %u\n", dslp);
> +			warned = true;
> +		}

This is the second "print once" thing I've seen in a few days. Seems
like we should add DRM_INFO_ONCE() & co. to hide the ugliness a bit.

>  		dslp = 1500;
>  	}
>  
> -- 
> 1.7.9.5
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Ville Syrjälä
Intel OTC



More information about the Intel-gfx mailing list