* [PATCH] drm/nouveau: add default debug level override
@ 2012-09-12 22:50 Marcin Slusarz
[not found] ` <20120912225006.GC8067-OI9uyE9O0yo@public.gmane.org>
0 siblings, 1 reply; 7+ messages in thread
From: Marcin Slusarz @ 2012-09-12 22:50 UTC (permalink / raw)
To: Ben Skeggs; +Cc: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
Useful when we don't know which subsystem is failing.
Signed-off-by: Marcin Slusarz <marcin.slusarz-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
---
drivers/gpu/drm/nouveau/core/core/option.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/nouveau/core/core/option.c b/drivers/gpu/drm/nouveau/core/core/option.c
index 62a432e..fde06b0 100644
--- a/drivers/gpu/drm/nouveau/core/core/option.c
+++ b/drivers/gpu/drm/nouveau/core/core/option.c
@@ -22,9 +22,16 @@
* Authors: Ben Skeggs
*/
+#include <linux/module.h>
#include <core/option.h>
#include <core/debug.h>
+MODULE_PARM_DESC(debug_level, "nv_printk level (0-"
+ __stringify(CONFIG_NOUVEAU_DEBUG) ", default "
+ __stringify(CONFIG_NOUVEAU_DEBUG_DEFAULT) ")");
+static int nouveau_debug_level = CONFIG_NOUVEAU_DEBUG_DEFAULT;
+module_param_named(debug_level, nouveau_debug_level, int, 0400);
+
/* compares unterminated string 'str' with zero-terminated string 'cmp' */
static inline int
strncasecmpz(const char *str, const char *cmp, size_t len)
@@ -86,7 +93,7 @@ nouveau_boolopt(const char *optstr, const char *opt, bool value)
int
nouveau_dbgopt(const char *optstr, const char *sub)
{
- int mode = 1, level = CONFIG_NOUVEAU_DEBUG_DEFAULT;
+ int mode = 1, level = nouveau_debug_level;
while (optstr) {
int len = strcspn(optstr, ",=");
--
1.7.12
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH] drm/nouveau: add default debug level override
[not found] ` <20120912225006.GC8067-OI9uyE9O0yo@public.gmane.org>
@ 2012-09-13 2:09 ` Ben Skeggs
[not found] ` <20120913020920.GA11828-7ZJhIA9XobDzA+JJ9lL7d4GKTjYczspe@public.gmane.org>
2012-09-13 4:33 ` Maarten Lankhorst
1 sibling, 1 reply; 7+ messages in thread
From: Ben Skeggs @ 2012-09-13 2:09 UTC (permalink / raw)
To: Marcin Slusarz; +Cc: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
On Thu, Sep 13, 2012 at 12:50:06AM +0200, Marcin Slusarz wrote:
> Useful when we don't know which subsystem is failing.
This is really unnecessary unless I'm missing something. You can pass nouveau.debug=LEVEL (without specifying a subdev name) to set the default already.
>
> Signed-off-by: Marcin Slusarz <marcin.slusarz-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> ---
> drivers/gpu/drm/nouveau/core/core/option.c | 9 ++++++++-
> 1 file changed, 8 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/nouveau/core/core/option.c b/drivers/gpu/drm/nouveau/core/core/option.c
> index 62a432e..fde06b0 100644
> --- a/drivers/gpu/drm/nouveau/core/core/option.c
> +++ b/drivers/gpu/drm/nouveau/core/core/option.c
> @@ -22,9 +22,16 @@
> * Authors: Ben Skeggs
> */
>
> +#include <linux/module.h>
> #include <core/option.h>
> #include <core/debug.h>
>
> +MODULE_PARM_DESC(debug_level, "nv_printk level (0-"
> + __stringify(CONFIG_NOUVEAU_DEBUG) ", default "
> + __stringify(CONFIG_NOUVEAU_DEBUG_DEFAULT) ")");
> +static int nouveau_debug_level = CONFIG_NOUVEAU_DEBUG_DEFAULT;
> +module_param_named(debug_level, nouveau_debug_level, int, 0400);
> +
> /* compares unterminated string 'str' with zero-terminated string 'cmp' */
> static inline int
> strncasecmpz(const char *str, const char *cmp, size_t len)
> @@ -86,7 +93,7 @@ nouveau_boolopt(const char *optstr, const char *opt, bool value)
> int
> nouveau_dbgopt(const char *optstr, const char *sub)
> {
> - int mode = 1, level = CONFIG_NOUVEAU_DEBUG_DEFAULT;
> + int mode = 1, level = nouveau_debug_level;
>
> while (optstr) {
> int len = strcspn(optstr, ",=");
> --
> 1.7.12
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] drm/nouveau: add default debug level override
[not found] ` <20120912225006.GC8067-OI9uyE9O0yo@public.gmane.org>
2012-09-13 2:09 ` Ben Skeggs
@ 2012-09-13 4:33 ` Maarten Lankhorst
[not found] ` <50516236.6000405-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org>
1 sibling, 1 reply; 7+ messages in thread
From: Maarten Lankhorst @ 2012-09-13 4:33 UTC (permalink / raw)
To: Marcin Slusarz; +Cc: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
Hey,
Op 13-09-12 00:50, Marcin Slusarz schreef:
> Useful when we don't know which subsystem is failing.
>
> Signed-off-by: Marcin Slusarz <marcin.slusarz-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> ---
> drivers/gpu/drm/nouveau/core/core/option.c | 9 ++++++++-
> 1 file changed, 8 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/nouveau/core/core/option.c b/drivers/gpu/drm/nouveau/core/core/option.c
> index 62a432e..fde06b0 100644
> --- a/drivers/gpu/drm/nouveau/core/core/option.c
> +++ b/drivers/gpu/drm/nouveau/core/core/option.c
> @@ -22,9 +22,16 @@
> * Authors: Ben Skeggs
> */
>
> +#include <linux/module.h>
> #include <core/option.h>
> #include <core/debug.h>
>
> +MODULE_PARM_DESC(debug_level, "nv_printk level (0-"
> + __stringify(CONFIG_NOUVEAU_DEBUG) ", default "
> + __stringify(CONFIG_NOUVEAU_DEBUG_DEFAULT) ")");
> +static int nouveau_debug_level = CONFIG_NOUVEAU_DEBUG_DEFAULT;
> +module_param_named(debug_level, nouveau_debug_level, int, 0400);
Why make default 0400? 0600 or 0644 would make more sense..
~Maarten
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] drm/nouveau: add default debug level override
[not found] ` <20120913020920.GA11828-7ZJhIA9XobDzA+JJ9lL7d4GKTjYczspe@public.gmane.org>
@ 2012-09-13 11:25 ` Marcin Slusarz
[not found] ` <20120913112516.GA3243-OI9uyE9O0yo@public.gmane.org>
0 siblings, 1 reply; 7+ messages in thread
From: Marcin Slusarz @ 2012-09-13 11:25 UTC (permalink / raw)
To: Ben Skeggs; +Cc: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
On Thu, Sep 13, 2012 at 12:09:20PM +1000, Ben Skeggs wrote:
> On Thu, Sep 13, 2012 at 12:50:06AM +0200, Marcin Slusarz wrote:
> > Useful when we don't know which subsystem is failing.
> This is really unnecessary unless I'm missing something. You can pass nouveau.debug=LEVEL (without specifying a subdev name) to set the default already.
Does not work for me: http://bpaste.net/show/45252/
(ignore gpio debugging messages - I'm looking for suspend regression)
> >
> > Signed-off-by: Marcin Slusarz <marcin.slusarz-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> > ---
> > drivers/gpu/drm/nouveau/core/core/option.c | 9 ++++++++-
> > 1 file changed, 8 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/gpu/drm/nouveau/core/core/option.c b/drivers/gpu/drm/nouveau/core/core/option.c
> > index 62a432e..fde06b0 100644
> > --- a/drivers/gpu/drm/nouveau/core/core/option.c
> > +++ b/drivers/gpu/drm/nouveau/core/core/option.c
> > @@ -22,9 +22,16 @@
> > * Authors: Ben Skeggs
> > */
> >
> > +#include <linux/module.h>
> > #include <core/option.h>
> > #include <core/debug.h>
> >
> > +MODULE_PARM_DESC(debug_level, "nv_printk level (0-"
> > + __stringify(CONFIG_NOUVEAU_DEBUG) ", default "
> > + __stringify(CONFIG_NOUVEAU_DEBUG_DEFAULT) ")");
> > +static int nouveau_debug_level = CONFIG_NOUVEAU_DEBUG_DEFAULT;
> > +module_param_named(debug_level, nouveau_debug_level, int, 0400);
> > +
> > /* compares unterminated string 'str' with zero-terminated string 'cmp' */
> > static inline int
> > strncasecmpz(const char *str, const char *cmp, size_t len)
> > @@ -86,7 +93,7 @@ nouveau_boolopt(const char *optstr, const char *opt, bool value)
> > int
> > nouveau_dbgopt(const char *optstr, const char *sub)
> > {
> > - int mode = 1, level = CONFIG_NOUVEAU_DEBUG_DEFAULT;
> > + int mode = 1, level = nouveau_debug_level;
> >
> > while (optstr) {
> > int len = strcspn(optstr, ",=");
> > --
> > 1.7.12
> >
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] drm/nouveau: add default debug level override
[not found] ` <50516236.6000405-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org>
@ 2012-09-13 11:31 ` Marcin Slusarz
0 siblings, 0 replies; 7+ messages in thread
From: Marcin Slusarz @ 2012-09-13 11:31 UTC (permalink / raw)
To: Maarten Lankhorst; +Cc: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
On Thu, Sep 13, 2012 at 06:33:58AM +0200, Maarten Lankhorst wrote:
> Hey,
>
> Op 13-09-12 00:50, Marcin Slusarz schreef:
> > Useful when we don't know which subsystem is failing.
> >
> > Signed-off-by: Marcin Slusarz <marcin.slusarz-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> > ---
> > drivers/gpu/drm/nouveau/core/core/option.c | 9 ++++++++-
> > 1 file changed, 8 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/gpu/drm/nouveau/core/core/option.c b/drivers/gpu/drm/nouveau/core/core/option.c
> > index 62a432e..fde06b0 100644
> > --- a/drivers/gpu/drm/nouveau/core/core/option.c
> > +++ b/drivers/gpu/drm/nouveau/core/core/option.c
> > @@ -22,9 +22,16 @@
> > * Authors: Ben Skeggs
> > */
> >
> > +#include <linux/module.h>
> > #include <core/option.h>
> > #include <core/debug.h>
> >
> > +MODULE_PARM_DESC(debug_level, "nv_printk level (0-"
> > + __stringify(CONFIG_NOUVEAU_DEBUG) ", default "
> > + __stringify(CONFIG_NOUVEAU_DEBUG_DEFAULT) ")");
> > +static int nouveau_debug_level = CONFIG_NOUVEAU_DEBUG_DEFAULT;
> > +module_param_named(debug_level, nouveau_debug_level, int, 0400);
> Why make default 0400? 0600 or 0644 would make more sense..
No particular reason. I copied it from other module parameter (_all_ of
them use 0400). 0644 sounds ok.
Marcin
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] drm/nouveau: add default debug level override
[not found] ` <20120913112516.GA3243-OI9uyE9O0yo@public.gmane.org>
@ 2012-09-13 12:09 ` Ben Skeggs
[not found] ` <CACAvsv4QTGOjVDZPNyg1UMxEWkRrOQVceDXfaO7nVoWmP8YMWg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
0 siblings, 1 reply; 7+ messages in thread
From: Ben Skeggs @ 2012-09-13 12:09 UTC (permalink / raw)
To: Marcin Slusarz; +Cc: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
[-- Attachment #1.1: Type: text/plain, Size: 2217 bytes --]
On Thursday, September 13, 2012, Marcin Slusarz wrote:
> On Thu, Sep 13, 2012 at 12:09:20PM +1000, Ben Skeggs wrote:
> > On Thu, Sep 13, 2012 at 12:50:06AM +0200, Marcin Slusarz wrote:
> > > Useful when we don't know which subsystem is failing.
> > This is really unnecessary unless I'm missing something. You can pass
> nouveau.debug=LEVEL (without specifying a subdev name) to set the default
> already.
>
> Does not work for me: http://bpaste.net/show/45252/
nouveau.debug=paranoia ;)
As mentioned previously, i'll document this somewhere.
> (ignore gpio debugging messages - I'm looking for suspend regression)
>
> > >
> > > Signed-off-by: Marcin Slusarz <marcin.slusarz-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org <javascript:;>
> >
> > > ---
> > > drivers/gpu/drm/nouveau/core/core/option.c | 9 ++++++++-
> > > 1 file changed, 8 insertions(+), 1 deletion(-)
> > >
> > > diff --git a/drivers/gpu/drm/nouveau/core/core/option.c
> b/drivers/gpu/drm/nouveau/core/core/option.c
> > > index 62a432e..fde06b0 100644
> > > --- a/drivers/gpu/drm/nouveau/core/core/option.c
> > > +++ b/drivers/gpu/drm/nouveau/core/core/option.c
> > > @@ -22,9 +22,16 @@
> > > * Authors: Ben Skeggs
> > > */
> > >
> > > +#include <linux/module.h>
> > > #include <core/option.h>
> > > #include <core/debug.h>
> > >
> > > +MODULE_PARM_DESC(debug_level, "nv_printk level (0-"
> > > + __stringify(CONFIG_NOUVEAU_DEBUG) ", default "
> > > + __stringify(CONFIG_NOUVEAU_DEBUG_DEFAULT) ")");
> > > +static int nouveau_debug_level = CONFIG_NOUVEAU_DEBUG_DEFAULT;
> > > +module_param_named(debug_level, nouveau_debug_level, int, 0400);
> > > +
> > > /* compares unterminated string 'str' with zero-terminated string
> 'cmp' */
> > > static inline int
> > > strncasecmpz(const char *str, const char *cmp, size_t len)
> > > @@ -86,7 +93,7 @@ nouveau_boolopt(const char *optstr, const char *opt,
> bool value)
> > > int
> > > nouveau_dbgopt(const char *optstr, const char *sub)
> > > {
> > > - int mode = 1, level = CONFIG_NOUVEAU_DEBUG_DEFAULT;
> > > + int mode = 1, level = nouveau_debug_level;
> > >
> > > while (optstr) {
> > > int len = strcspn(optstr, ",=");
> > > --
> > > 1.7.12
> > >
>
[-- Attachment #1.2: Type: text/html, Size: 3152 bytes --]
[-- Attachment #2: Type: text/plain, Size: 181 bytes --]
_______________________________________________
Nouveau mailing list
Nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
http://lists.freedesktop.org/mailman/listinfo/nouveau
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] drm/nouveau: add default debug level override
[not found] ` <CACAvsv4QTGOjVDZPNyg1UMxEWkRrOQVceDXfaO7nVoWmP8YMWg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2012-09-13 12:20 ` Marcin Slusarz
0 siblings, 0 replies; 7+ messages in thread
From: Marcin Slusarz @ 2012-09-13 12:20 UTC (permalink / raw)
To: Ben Skeggs; +Cc: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
On Thu, Sep 13, 2012 at 10:09:33PM +1000, Ben Skeggs wrote:
> On Thursday, September 13, 2012, Marcin Slusarz wrote:
>
> On Thu, Sep 13, 2012 at 12:09:20PM +1000, Ben Skeggs wrote:
> > On Thu, Sep 13, 2012 at 12:50:06AM +0200, Marcin Slusarz wrote:
> > > Useful when we don't know which subsystem is failing.
> > This is really unnecessary unless I'm missing something. You can
> pass nouveau.debug=LEVEL (without specifying a subdev name) to set
> the default already.
> Does not work for me: [1]http://bpaste.net/show/45252/
>
> nouveau.debug=paranoia ;)
>
> As mentioned previously, i'll document this somewhere.
Now it works, thanks.
But please make it accept numbered levels... (optional, of course)
Marcin
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2012-09-13 12:20 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-12 22:50 [PATCH] drm/nouveau: add default debug level override Marcin Slusarz
[not found] ` <20120912225006.GC8067-OI9uyE9O0yo@public.gmane.org>
2012-09-13 2:09 ` Ben Skeggs
[not found] ` <20120913020920.GA11828-7ZJhIA9XobDzA+JJ9lL7d4GKTjYczspe@public.gmane.org>
2012-09-13 11:25 ` Marcin Slusarz
[not found] ` <20120913112516.GA3243-OI9uyE9O0yo@public.gmane.org>
2012-09-13 12:09 ` Ben Skeggs
[not found] ` <CACAvsv4QTGOjVDZPNyg1UMxEWkRrOQVceDXfaO7nVoWmP8YMWg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-09-13 12:20 ` Marcin Slusarz
2012-09-13 4:33 ` Maarten Lankhorst
[not found] ` <50516236.6000405-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org>
2012-09-13 11:31 ` Marcin Slusarz
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.