drm/nouveau: add default debug level override
Subsystems (3)
PATCH 1/1 drm/nouveau: add default debug level override
Useful when we don't know which subsystem is failing.
--- drivers/gpu/drm/nouveau/core/core/option.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)
drivers/gpu/drm/nouveau/core/core/option.c +8 -1
@@ -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,",=" );
Signature · 1 line
1.7.12
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 1 line · Marcin Slusarz
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.
Quoted 39 lines
Signed-off-by Marcin Slusarz <[email protected]>--- drivers/gpu/drm/nouveau/core/core/option.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)drivers/gpu/drm/nouveau/core/core/option.c +8
-1@@ -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,",=" );Signature · 1 line
1.7.12
A message that is not in the archive (sent off-list or not yet received): 20120913020920.GA11828-7ZJhIA9XobDzA+JJ9lL7d4GKTjYczspe@public.gmane.org
Quoted 3 lines · Ben Skeggs
Quoted 1 line · Marcin Slusarz
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)
Quoted 39 lines
Quoted 39 lines
Signed-off-by Marcin Slusarz <[email protected]>--- drivers/gpu/drm/nouveau/core/core/option.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)drivers/gpu/drm/nouveau/core/core/option.c +8
-1@@ -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,",=" );Signature · 1 line
1.7.12
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 8 lines · Marcin Slusarz
Quoted 3 lines · Ben Skeggs
Quoted 1 line · Marcin Slusarz
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.
Quoted 30 lines
(ignore gpio debugging messages - I'm looking for suspend regression)
Quoted 8 lines
Review
Quoted 8 lines
Signed-off-by Marcin Slusarz <[email protected] <javascript:;>--- drivers/gpu/drm/nouveau/core/core/option.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)(quoted diff) +0
-0
b/drivers/gpu/drm/nouveau/core/core/option.cQuoted 11 lines
Quoted 11 lines
index 62a432e..fde06b0 100644
drivers/gpu/drm/nouveau/core/core/option.c +1
-0@@ -22,9 +22,16 @@* Authors: Ben Skeggs */ +#include <linux/module.h> #include <core/option.h> #include <core/debug.h> Quoted 7 lines
drivers/gpu/drm/nouveau/core/core/option.c
Quoted 7 lines
drivers/gpu/drm/nouveau/core/core/option.c +6
-0+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' */
Quoted 16 lines
Quoted 3 lines
drivers/gpu/drm/nouveau/core/core/option.c nouveau_boolopt(const char *optstr, const char *opt,
Quoted 3 lines
drivers/gpu/drm/nouveau/core/core/option.c +0
-0static 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)
Quoted 11 lines
Quoted 11 lines
drivers/gpu/drm/nouveau/core/core/option.c +1
-2int 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
_______________________________________________
Nouveau mailing list [email protected]
http://lists.freedesktop.org/mailman/listinfo/nouveau
A message that is not in the archive (sent off-list or not yet received): CACAvsv4QTGOjVDZPNyg1UMxEWkRrOQVceDXfaO7nVoWmP8YMWg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org
Quoted 10 lines · Ben Skeggs
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/
Quoted 3 lines
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
Hey,
Op 13-09-12 00:50, Marcin Slusarz schreef:
Quoted 14 lines
Useful when we don't know which subsystem is failing.
Signed-off-by Marcin Slusarz <[email protected]>--- drivers/gpu/drm/nouveau/core/core/option.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)drivers/gpu/drm/nouveau/core/core/option.c +0
-0@@ -22,9 +22,16 @@* Authors: Ben Skeggs */
drivers/gpu/drm/nouveau/core/core/option.c line 33
Quoted 10 lines
drivers/gpu/drm/nouveau/core/core/option.c +6
-0+#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
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 22 lines · Maarten Lankhorst
Hey,
Op 13-09-12 00:50, Marcin Slusarz schreef:
Quoted 19 lines
Useful when we don't know which subsystem is failing.
Signed-off-by Marcin Slusarz <[email protected]>--- drivers/gpu/drm/nouveau/core/core/option.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)drivers/gpu/drm/nouveau/core/core/option.c +1
-0@@ -22,9 +22,16 @@* Authors: Ben Skeggs */ +#include <linux/module.h> #include <core/option.h> #include <core/debug.h>
Quoted 6 lines
drivers/gpu/drm/nouveau/core/core/option.c line 33
Quoted 5 lines
drivers/gpu/drm/nouveau/core/core/option.c +5
-0+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