From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Jani Nikula <jani.nikula@intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/i915: demote opregion excessive timeout WARN_ONCE to DRM_INFO
Date: Fri, 31 Jan 2014 15:26:08 +0200 [thread overview]
Message-ID: <20140131132608.GX9454@intel.com> (raw)
In-Reply-To: <87r47o2so8.fsf@intel.com>
On Fri, Jan 31, 2014 at 03:21:27PM +0200, Jani Nikula wrote:
> On Fri, 31 Jan 2014, Ville Syrjälä <ville.syrjala@linux.intel.com> wrote:
> > 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@chris-wilson.co.uk>
> >> Signed-off-by: Jani Nikula <jani.nikula@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.
>
> I'm adding DRM_INFO_ONCE() in the next version, but if you're referring
> to
>
> commit 53a4c6b26ddef1f2969f8bc17178bcda4782d18d
> Author: Chris Wilson <chris@chris-wilson.co.uk>
> Date: Thu Jan 30 14:38:15 2014 +0000
>
> drm/i915: Only print information for filing bug reports once
>
> it's probably better to keep that as it is.
Oh right that's multiple DRM_INFO()s. Can't it be done with one
DRM_INFO(), or would that exceed some limit?
--
Ville Syrjälä
Intel OTC
next prev parent reply other threads:[~2014-01-31 14:50 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-31 9:31 [PATCH] drm/i915: Increase OpRegion timeout Daniel Vetter
2014-01-31 9:38 ` Chris Wilson
2014-01-31 11:41 ` [PATCH] drm/i915: demote opregion excessive timeout WARN_ONCE to DRM_INFO Jani Nikula
2014-01-31 11:41 ` Ville Syrjälä
2014-01-31 13:21 ` Jani Nikula
2014-01-31 13:26 ` Ville Syrjälä [this message]
2014-01-31 11:43 ` Chris Wilson
2014-01-31 11:55 ` Jani Nikula
2014-01-31 11:56 ` Chris Wilson
2014-01-31 13:49 ` [PATCH 1/2] drm: add DRM_INFO_ONCE() to print a one-time DRM_INFO() message Jani Nikula
2014-01-31 13:49 ` [PATCH 2/2] drm/i915: demote opregion excessive timeout WARN_ONCE to DRM_INFO_ONCE Jani Nikula
2014-01-31 13:48 ` Chris Wilson
2014-02-04 20:09 ` Daniel Vetter
2014-01-31 11:42 ` [PATCH] drm/i915: Increase OpRegion timeout Jani Nikula
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=20140131132608.GX9454@intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=jani.nikula@intel.com \
/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