From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ville =?iso-8859-1?Q?Syrj=E4l=E4?= Subject: Re: [PATCH] drm/i915: demote opregion excessive timeout WARN_ONCE to DRM_INFO Date: Fri, 31 Jan 2014 15:26:08 +0200 Message-ID: <20140131132608.GX9454@intel.com> References: <20140131093802.GR29091@nuc-i3427.alporthouse.com> <1391168468-9072-1-git-send-email-jani.nikula@intel.com> <20140131114130.GW9454@intel.com> <87r47o2so8.fsf@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by gabe.freedesktop.org (Postfix) with ESMTP id 34764FA92C for ; Fri, 31 Jan 2014 06:50:48 -0800 (PST) Content-Disposition: inline In-Reply-To: <87r47o2so8.fsf@intel.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces@lists.freedesktop.org Errors-To: intel-gfx-bounces@lists.freedesktop.org To: Jani Nikula Cc: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org On Fri, Jan 31, 2014 at 03:21:27PM +0200, Jani Nikula wrote: > On Fri, 31 Jan 2014, Ville Syrj=E4l=E4 wr= ote: > > 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 > >> Signed-off-by: Jani Nikula > >> --- > >> 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/i= 915/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 func= tion, u32 parm, u32 *parm_out) > >> dslp =3D 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 =3D 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 > 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=E4l=E4 Intel OTC