From: Marcin Slusarz <marcin.slusarz@gmail.com>
To: Andy Walls <awalls@md.metrocast.net>
Cc: linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org,
Dave Airlie <airlied@redhat.com>, David Airlie <airlied@linux.ie>
Subject: Re: [PATCH] drm/edid: Don't repeatedly log hex dumps of bad EDIDs by default
Date: Sat, 18 Sep 2010 13:50:43 +0200 [thread overview]
Message-ID: <20100918115043.GB2953@joi.lan> (raw)
In-Reply-To: <1284764006.13604.21.camel@morgan.silverblock.net>
On Fri, Sep 17, 2010 at 06:53:26PM -0400, Andy Walls wrote:
> On my system, every 10 seconds drm_edid_block_valid() gets called 4
> times by radeon_dvi_detect(). This results in 4 instances of a
> multi-line hex dump of the same EDID (non-)data being logged every 10
> seconds.
>
> Silence the hex dump from drm_edid_block_valid() unless a drm_debug
> module parameter flag is set.
>
> Signed-of-by: Andy Walls <awalls@md.metrocast.net>
>
> diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c
> index dce5c4a..33a748c 100644
> --- a/drivers/gpu/drm/drm_edid.c
> +++ b/drivers/gpu/drm/drm_edid.c
> @@ -173,9 +173,12 @@ drm_edid_block_valid(u8 *raw_edid)
>
> bad:
> if (raw_edid) {
> - DRM_ERROR("Raw EDID:\n");
> - print_hex_dump_bytes(KERN_ERR, DUMP_PREFIX_NONE, raw_edid, EDID_LENGTH);
> - printk("\n");
> + DRM_DEBUG("Raw EDID:\n");
> + if (drm_debug & DRM_UT_CORE) {
> + print_hex_dump_bytes(KERN_ERR, DUMP_PREFIX_NONE,
> + raw_edid, EDID_LENGTH);
> + printk("\n");
> + }
> }
> return 0;
> }
>
Why not print it only once on original error level?
Something like:
static bool printed = false;
if (!printed) {
...
printed = true;
}
It has the same effect for you (no spamming by default) and it's still provide some information.
Marcin
next prev parent reply other threads:[~2010-09-18 11:51 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-17 22:53 Andy Walls
2010-09-18 11:50 ` Marcin Slusarz [this message]
2010-09-18 12:48 ` Andy Walls
2010-09-19 18:39 ` Rafał Miłecki
2010-09-19 19:18 ` Andy Walls
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=20100918115043.GB2953@joi.lan \
--to=marcin.slusarz@gmail.com \
--cc=airlied@linux.ie \
--cc=airlied@redhat.com \
--cc=awalls@md.metrocast.net \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.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
all inboxes | Powered by JetHome®