All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chris Wilson <chris@chris-wilson.co.uk>
To: Jesse Barnes <jbarnes@virtuousgeek.org>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/i915: make CSR firmware messages less verbose
Date: Sat, 12 Sep 2015 08:58:35 +0100	[thread overview]
Message-ID: <20150912075835.GZ32324@nuc-i3427.alporthouse.com> (raw)
In-Reply-To: <55F3061C.6030607@virtuousgeek.org>

On Fri, Sep 11, 2015 at 09:49:32AM -0700, Jesse Barnes wrote:
> On 09/11/2015 01:29 AM, Chris Wilson wrote:
> > On Thu, Sep 10, 2015 at 08:20:28AM -0700, Jesse Barnes wrote:
> >> Use WARN_ONCE in a bunch of places and demote a message that would
> >> continually spam us.
> >>
> >> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
> >> ---
> >>  drivers/gpu/drm/i915/intel_csr.c        | 12 +++++------
> >>  drivers/gpu/drm/i915/intel_runtime_pm.c | 36 ++++++++++++++++-----------------
> >>  2 files changed, 24 insertions(+), 24 deletions(-)
> >>
> >> diff --git a/drivers/gpu/drm/i915/intel_csr.c b/drivers/gpu/drm/i915/intel_csr.c
> >> index ba1ae03..765dfcd 100644
> >> --- a/drivers/gpu/drm/i915/intel_csr.c
> >> +++ b/drivers/gpu/drm/i915/intel_csr.c
> >> @@ -454,10 +454,10 @@ void intel_csr_ucode_fini(struct drm_device *dev)
> >>  
> >>  void assert_csr_loaded(struct drm_i915_private *dev_priv)
> >>  {
> >> -	WARN(intel_csr_load_status_get(dev_priv) != FW_LOADED,
> >> -	     "CSR is not loaded.\n");
> >> -	WARN(!I915_READ(CSR_PROGRAM_BASE),
> >> -				"CSR program storage start is NULL\n");
> >> -	WARN(!I915_READ(CSR_SSP_BASE), "CSR SSP Base Not fine\n");
> >> -	WARN(!I915_READ(CSR_HTP_SKL), "CSR HTP Not fine\n");
> >> +	WARN_ONCE(intel_csr_load_status_get(dev_priv) != FW_LOADED,
> >> +		  "CSR is not loaded.\n");
> >> +	WARN_ONCE(!I915_READ(CSR_PROGRAM_BASE),
> >> +		  "CSR program storage start is NULL\n");
> >> +	WARN_ONCE(!I915_READ(CSR_SSP_BASE), "CSR SSP Base Not fine\n");
> >> +	WARN_ONCE(!I915_READ(CSR_HTP_SKL), "CSR HTP Not fine\n");
> > 
> > But why more than one warn in the function? If more than one fire,
> > trying to get the information about what happened is a nightmare.
> > 
> > static int assert_once;
> > if (assert_once)
> >   return;
> > 
> > assert_once |= DRM_ERROR_ON(cond, "message");
> > ...
> > if (assert_once)
> >     WARN("CSR not loaded");
> 
> I'm ok with getting fancier too, as long as the warnings only happen
> one.  How about an ack or r-b on this one and/or a patch to make the
> code more sensible?

Once x 10 is better than ad infinitum x 10, so
Acked-by: Chris Wilson <chris@chris-wilson.co.uk>

Just muttering that we took a serious mistep with the WARNs and forgot
to ask ourselves if adding more makes a problem easier to debug
postmortem or harder. I think we have erred on the latter.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

      reply	other threads:[~2015-09-12  7:58 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-10 15:20 [PATCH] drm/i915: make CSR firmware messages less verbose Jesse Barnes
2015-09-10 15:29 ` Damien Lespiau
2015-09-11  8:29 ` Chris Wilson
2015-09-11 16:49   ` Jesse Barnes
2015-09-12  7:58     ` Chris Wilson [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150912075835.GZ32324@nuc-i3427.alporthouse.com \
    --to=chris@chris-wilson.co.uk \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=jbarnes@virtuousgeek.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.