From: Jesse Barnes <jbarnes@virtuousgeek.org>
To: Chris Wilson <chris@chris-wilson.co.uk>, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/i915: make CSR firmware messages less verbose
Date: Fri, 11 Sep 2015 09:49:32 -0700 [thread overview]
Message-ID: <55F3061C.6030607@virtuousgeek.org> (raw)
In-Reply-To: <20150911082923.GV32324@nuc-i3427.alporthouse.com>
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?
Thanks,
Jesse
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2015-09-11 16:49 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 [this message]
2015-09-12 7:58 ` Chris Wilson
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=55F3061C.6030607@virtuousgeek.org \
--to=jbarnes@virtuousgeek.org \
--cc=chris@chris-wilson.co.uk \
--cc=intel-gfx@lists.freedesktop.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox