* [PATCH] drm/i915: Increase OpRegion timeout
@ 2014-01-31 9:31 Daniel Vetter
2014-01-31 9:38 ` Chris Wilson
2014-01-31 11:42 ` [PATCH] drm/i915: Increase OpRegion timeout Jani Nikula
0 siblings, 2 replies; 14+ messages in thread
From: Daniel Vetter @ 2014-01-31 9:31 UTC (permalink / raw)
To: Intel Graphics Development; +Cc: Daniel Vetter
I have a machine here which hits this (a g33):
[ 13.368536] excessive driver sleep timeout (DSPL) 1024
Apparently people love pot numbers, and one second isn't that
unreasonable (for a bios writer at least) I guess.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
---
drivers/gpu/drm/i915/intel_opregion.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/i915/intel_opregion.c b/drivers/gpu/drm/i915/intel_opregion.c
index 3da259e280ba..3c7e38c7ed87 100644
--- a/drivers/gpu/drm/i915/intel_opregion.c
+++ b/drivers/gpu/drm/i915/intel_opregion.c
@@ -261,10 +261,10 @@ 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 > 500) {
+ } else if (dslp > 1500) {
/* Hey bios, trust must be earned. */
WARN_ONCE(1, "excessive driver sleep timeout (DSPL) %u\n", dslp);
- dslp = 500;
+ dslp = 1500;
}
/* The spec tells us to do this, but we are the only user... */
--
1.8.3.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* Re: [PATCH] drm/i915: Increase OpRegion timeout
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:42 ` [PATCH] drm/i915: Increase OpRegion timeout Jani Nikula
1 sibling, 1 reply; 14+ messages in thread
From: Chris Wilson @ 2014-01-31 9:38 UTC (permalink / raw)
To: Daniel Vetter; +Cc: Intel Graphics Development
On Fri, Jan 31, 2014 at 10:31:16AM +0100, Daniel Vetter wrote:
> I have a machine here which hits this (a g33):
>
> [ 13.368536] excessive driver sleep timeout (DSPL) 1024
>
> Apparently people love pot numbers, and one second isn't that
> unreasonable (for a bios writer at least) I guess.
Reference https://bugs.freedesktop.org/show_bug.cgi?id=74266
excessive driver sleep timeout (DSPL) 1280
Quirks are DRM_INFO not full blown oops!
-Chris
--
Chris Wilson, Intel Open Source Technology Centre
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH] drm/i915: demote opregion excessive timeout WARN_ONCE to DRM_INFO
2014-01-31 9:38 ` Chris Wilson
@ 2014-01-31 11:41 ` Jani Nikula
2014-01-31 11:41 ` Ville Syrjälä
` (2 more replies)
0 siblings, 3 replies; 14+ messages in thread
From: Jani Nikula @ 2014-01-31 11:41 UTC (permalink / raw)
To: intel-gfx; +Cc: jani.nikula
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;
+ }
dslp = 1500;
}
--
1.7.9.5
^ permalink raw reply related [flat|nested] 14+ messages in thread
* Re: [PATCH] drm/i915: demote opregion excessive timeout WARN_ONCE to DRM_INFO
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 11:43 ` 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
2 siblings, 1 reply; 14+ messages in thread
From: Ville Syrjälä @ 2014-01-31 11:41 UTC (permalink / raw)
To: Jani Nikula; +Cc: intel-gfx
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.
> dslp = 1500;
> }
>
> --
> 1.7.9.5
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
Ville Syrjälä
Intel OTC
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] drm/i915: Increase OpRegion timeout
2014-01-31 9:31 [PATCH] drm/i915: Increase OpRegion timeout Daniel Vetter
2014-01-31 9:38 ` Chris Wilson
@ 2014-01-31 11:42 ` Jani Nikula
1 sibling, 0 replies; 14+ messages in thread
From: Jani Nikula @ 2014-01-31 11:42 UTC (permalink / raw)
To: Intel Graphics Development; +Cc: Daniel Vetter
On Fri, 31 Jan 2014, Daniel Vetter <daniel.vetter@ffwll.ch> wrote:
> I have a machine here which hits this (a g33):
>
> [ 13.368536] excessive driver sleep timeout (DSPL) 1024
>
> Apparently people love pot numbers, and one second isn't that
> unreasonable (for a bios writer at least) I guess.
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
> ---
> drivers/gpu/drm/i915/intel_opregion.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_opregion.c b/drivers/gpu/drm/i915/intel_opregion.c
> index 3da259e280ba..3c7e38c7ed87 100644
> --- a/drivers/gpu/drm/i915/intel_opregion.c
> +++ b/drivers/gpu/drm/i915/intel_opregion.c
> @@ -261,10 +261,10 @@ 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 > 500) {
> + } else if (dslp > 1500) {
> /* Hey bios, trust must be earned. */
> WARN_ONCE(1, "excessive driver sleep timeout (DSPL) %u\n", dslp);
> - dslp = 500;
> + dslp = 1500;
> }
>
> /* The spec tells us to do this, but we are the only user... */
> --
> 1.8.3.1
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
Jani Nikula, Intel Open Source Technology Center
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] drm/i915: demote opregion excessive timeout WARN_ONCE to DRM_INFO
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 11:43 ` Chris Wilson
2014-01-31 11:55 ` Jani Nikula
2014-01-31 13:49 ` [PATCH 1/2] drm: add DRM_INFO_ONCE() to print a one-time DRM_INFO() message Jani Nikula
2 siblings, 1 reply; 14+ messages in thread
From: Chris Wilson @ 2014-01-31 11:43 UTC (permalink / raw)
To: Jani Nikula; +Cc: intel-gfx
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);
DRM_INFO("ACPI BIOS requests an excessive sleep of %d ms, using %d instead\n", dslp, MAX_DSLP);
> + warned = true;
> + }
> dslp = 1500;
> }
>
> --
> 1.7.9.5
>
--
Chris Wilson, Intel Open Source Technology Centre
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] drm/i915: demote opregion excessive timeout WARN_ONCE to DRM_INFO
2014-01-31 11:43 ` Chris Wilson
@ 2014-01-31 11:55 ` Jani Nikula
2014-01-31 11:56 ` Chris Wilson
0 siblings, 1 reply; 14+ messages in thread
From: Jani Nikula @ 2014-01-31 11:55 UTC (permalink / raw)
To: Chris Wilson; +Cc: intel-gfx
On Fri, 31 Jan 2014, Chris Wilson <chris@chris-wilson.co.uk> 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);
>
> DRM_INFO("ACPI BIOS requests an excessive sleep of %d ms, using %d instead\n", dslp, MAX_DSLP);
You're just saying that because I didn't dare to write the new value
back to opregion! :p
>
>> + warned = true;
>> + }
>> dslp = 1500;
>> }
>>
>> --
>> 1.7.9.5
>>
>
> --
> Chris Wilson, Intel Open Source Technology Centre
--
Jani Nikula, Intel Open Source Technology Center
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] drm/i915: demote opregion excessive timeout WARN_ONCE to DRM_INFO
2014-01-31 11:55 ` Jani Nikula
@ 2014-01-31 11:56 ` Chris Wilson
0 siblings, 0 replies; 14+ messages in thread
From: Chris Wilson @ 2014-01-31 11:56 UTC (permalink / raw)
To: Jani Nikula; +Cc: intel-gfx
On Fri, Jan 31, 2014 at 01:55:47PM +0200, Jani Nikula wrote:
> On Fri, 31 Jan 2014, Chris Wilson <chris@chris-wilson.co.uk> 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);
> >
> > DRM_INFO("ACPI BIOS requests an excessive sleep of %d ms, using %d instead\n", dslp, MAX_DSLP);
>
> You're just saying that because I didn't dare to write the new value
> back to opregion! :p
I'm just trying to clarify that it is not our fault we want to sleep for
several seconds during startup, but the manufacturer...
But yes, you are a coward. ;-)
-Chris
--
Chris Wilson, Intel Open Source Technology Centre
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] drm/i915: demote opregion excessive timeout WARN_ONCE to DRM_INFO
2014-01-31 11:41 ` Ville Syrjälä
@ 2014-01-31 13:21 ` Jani Nikula
2014-01-31 13:26 ` Ville Syrjälä
0 siblings, 1 reply; 14+ messages in thread
From: Jani Nikula @ 2014-01-31 13:21 UTC (permalink / raw)
To: Ville Syrjälä; +Cc: intel-gfx
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.
BR,
Jani.
--
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] drm/i915: demote opregion excessive timeout WARN_ONCE to DRM_INFO
2014-01-31 13:21 ` Jani Nikula
@ 2014-01-31 13:26 ` Ville Syrjälä
0 siblings, 0 replies; 14+ messages in thread
From: Ville Syrjälä @ 2014-01-31 13:26 UTC (permalink / raw)
To: Jani Nikula; +Cc: intel-gfx
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
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 2/2] drm/i915: demote opregion excessive timeout WARN_ONCE to DRM_INFO_ONCE
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
0 siblings, 1 reply; 14+ messages in thread
From: Chris Wilson @ 2014-01-31 13:48 UTC (permalink / raw)
To: Jani Nikula; +Cc: intel-gfx, dri-devel
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
--
Chris Wilson, Intel Open Source Technology Centre
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH 1/2] drm: add DRM_INFO_ONCE() to print a one-time DRM_INFO() message
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 11:43 ` Chris Wilson
@ 2014-01-31 13:49 ` Jani Nikula
2014-01-31 13:49 ` [PATCH 2/2] drm/i915: demote opregion excessive timeout WARN_ONCE to DRM_INFO_ONCE Jani Nikula
2 siblings, 1 reply; 14+ messages in thread
From: Jani Nikula @ 2014-01-31 13:49 UTC (permalink / raw)
To: intel-gfx, dri-devel
Just like DRM_INFO(), but only do it once.
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
include/drm/drmP.h | 3 +++
1 file changed, 3 insertions(+)
diff --git a/include/drm/drmP.h b/include/drm/drmP.h
index 04086c5be930..04a7f31301f8 100644
--- a/include/drm/drmP.h
+++ b/include/drm/drmP.h
@@ -199,6 +199,9 @@ int drm_err(const char *func, const char *format, ...);
#define DRM_INFO(fmt, ...) \
printk(KERN_INFO "[" DRM_NAME "] " fmt, ##__VA_ARGS__)
+#define DRM_INFO_ONCE(fmt, ...) \
+ printk_once(KERN_INFO "[" DRM_NAME "] " fmt, ##__VA_ARGS__)
+
/**
* Debug output.
*
--
1.7.9.5
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH 2/2] drm/i915: demote opregion excessive timeout WARN_ONCE to DRM_INFO_ONCE
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 ` Jani Nikula
2014-01-31 13:48 ` Chris Wilson
0 siblings, 1 reply; 14+ messages in thread
From: Jani Nikula @ 2014-01-31 13:49 UTC (permalink / raw)
To: intel-gfx, dri-devel
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(-)
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... */
--
1.7.9.5
^ permalink raw reply related [flat|nested] 14+ messages in thread
* Re: [PATCH 2/2] drm/i915: demote opregion excessive timeout WARN_ONCE to DRM_INFO_ONCE
2014-01-31 13:48 ` Chris Wilson
@ 2014-02-04 20:09 ` Daniel Vetter
0 siblings, 0 replies; 14+ messages in thread
From: Daniel Vetter @ 2014-02-04 20:09 UTC (permalink / raw)
To: Chris Wilson, Jani Nikula, intel-gfx, dri-devel, daniel,
ville.syrjala
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
--
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2014-02-04 20:09 UTC | newest]
Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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ä
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
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox