diff mbox

[2/2] drm/i915: demote opregion excessive timeout WARN_ONCE to DRM_INFO_ONCE

Message ID 1391176148-9703-2-git-send-email-jani.nikula@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Jani Nikula Jan. 31, 2014, 1:49 p.m. UTC
The WARN_ONCE is a bit too verbose, make it a DRM_INFO_ONCE.

While at it, add a #define for MAX_DSLP and make the message a bit more
informative.

v2: use DRM_INFO_ONCE, add MAX_DSLP, pimp the message.

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 |    9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

Comments

Chris Wilson Jan. 31, 2014, 1:48 p.m. UTC | #1
On Fri, Jan 31, 2014 at 03:49:08PM +0200, Jani Nikula wrote:
> The WARN_ONCE is a bit too verbose, make it a DRM_INFO_ONCE.
> 
> While at it, add a #define for MAX_DSLP and make the message a bit more
> informative.
> 
> v2: use DRM_INFO_ONCE, add MAX_DSLP, pimp the message.
> 
> Suggested-by: Chris Wilson <chris@chris-wilson.co.uk>
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Both Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
-Chris
Daniel Vetter Feb. 4, 2014, 8:09 p.m. UTC | #2
On Fri, Jan 31, 2014 at 01:48:39PM +0000, Chris Wilson wrote:
> On Fri, Jan 31, 2014 at 03:49:08PM +0200, Jani Nikula wrote:
> > The WARN_ONCE is a bit too verbose, make it a DRM_INFO_ONCE.
> > 
> > While at it, add a #define for MAX_DSLP and make the message a bit more
> > informative.
> > 
> > v2: use DRM_INFO_ONCE, add MAX_DSLP, pimp the message.
> > 
> > Suggested-by: Chris Wilson <chris@chris-wilson.co.uk>
> > Signed-off-by: Jani Nikula <jani.nikula@intel.com>
> Both Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>

Both merged to -fixes with Dave's ack on the drm pach.
-Daniel
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/intel_opregion.c b/drivers/gpu/drm/i915/intel_opregion.c
index 46d288055345..68459605bd12 100644
--- a/drivers/gpu/drm/i915/intel_opregion.c
+++ b/drivers/gpu/drm/i915/intel_opregion.c
@@ -227,6 +227,8 @@  struct opregion_asle {
 #define ACPI_DIGITAL_OUTPUT (3<<8)
 #define ACPI_LVDS_OUTPUT (4<<8)
 
+#define MAX_DSLP	1500
+
 #ifdef CONFIG_ACPI
 static int swsci(struct drm_device *dev, u32 function, u32 parm, u32 *parm_out)
 {
@@ -261,10 +263,11 @@  static int swsci(struct drm_device *dev, u32 function, u32 parm, u32 *parm_out)
 		/* The spec says 2ms should be the default, but it's too small
 		 * for some machines. */
 		dslp = 50;
-	} else if (dslp > 1500) {
+	} else if (dslp > MAX_DSLP) {
 		/* Hey bios, trust must be earned. */
-		WARN_ONCE(1, "excessive driver sleep timeout (DSPL) %u\n", dslp);
-		dslp = 1500;
+		DRM_INFO_ONCE("ACPI BIOS requests an excessive sleep of %u ms, "
+			      "using %u ms instead\n", dslp, MAX_DSLP);
+		dslp = MAX_DSLP;
 	}
 
 	/* The spec tells us to do this, but we are the only user... */