Commit bdfdd9e7 authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab

media: atomisp: make it use dbg_level to control debug level

This driver has 3 different types of debug messages:

	- dev_dbg()
	- dbg_level
	- ia_css_debug_trace_level

Which is crazy. Ideally, it shold just use dev_dbg()
everywhere, but for now let's unify the last two machanisms.
Acked-by: default avatarSakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
parent 6b3a422b
......@@ -85,7 +85,7 @@ void atomisp_css_debug_set_dtrace_level(const unsigned int trace_level)
unsigned int atomisp_css_debug_get_dtrace_level(void)
{
return ia_css_debug_trace_level;
return dbg_level;
}
static void atomisp_css2_hw_store_8(hrt_address addr, uint8_t data)
......
......@@ -83,7 +83,7 @@ MODULE_PARM_DESC(defer_fw_load,
/* cross componnet debug message flag */
int dbg_level;
module_param(dbg_level, int, 0644);
MODULE_PARM_DESC(dbg_level, "debug message on/off (default:off)");
MODULE_PARM_DESC(dbg_level, "debug message level (default:0)");
/* log function switch */
int dbg_func = 2;
......
......@@ -44,8 +44,9 @@
#define IA_CSS_DEBUG_PARAM 8
/*! Level for tracing info messages */
#define IA_CSS_DEBUG_INFO 9
/* Global variable which controls the verbosity levels of the debug tracing */
extern unsigned int ia_css_debug_trace_level;
extern int dbg_level;
/*! @brief Enum defining the different isp parameters to dump.
* Values can be combined to dump a combination of sets.
......@@ -130,7 +131,7 @@ enum ia_css_debug_enable_param_dump {
static inline void
ia_css_debug_vdtrace(unsigned int level, const char *fmt, va_list args)
{
if (ia_css_debug_trace_level >= level)
if (dbg_level >= level)
sh_css_vprint(fmt, args);
}
......
......@@ -103,9 +103,6 @@
#include "gc/gc_2/ia_css_gc2.host.h"
#include "ynr/ynr_2/ia_css_ynr2.host.h"
/* Global variable to store the dtrace verbosity level */
unsigned int ia_css_debug_trace_level = IA_CSS_DEBUG_WARNING;
#define DPG_START "ia_css_debug_pipe_graph_dump_start "
#define DPG_END " ia_css_debug_pipe_graph_dump_end\n"
......@@ -244,13 +241,13 @@ void ia_css_debug_dump_sp_stack_info(void)
void ia_css_debug_set_dtrace_level(const unsigned int trace_level)
{
ia_css_debug_trace_level = trace_level;
dbg_level = trace_level;
return;
}
unsigned int ia_css_debug_get_dtrace_level(void)
{
return ia_css_debug_trace_level;
return dbg_level;
}
static const char *debug_stream_format2str(const enum atomisp_input_format
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment