mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-13 08:07:32 -04:00
Merge "msm: vidc: fix f/w logging route"
This commit is contained in:
commit
d12358a8ff
2 changed files with 24 additions and 3 deletions
|
|
@ -3239,7 +3239,7 @@ static void __process_sys_error(struct venus_hfi_device *device)
|
|||
static void __flush_debug_queue(struct venus_hfi_device *device, u8 *packet)
|
||||
{
|
||||
bool local_packet = false;
|
||||
enum vidc_msg_prio log_level = msm_vidc_debug;
|
||||
enum vidc_msg_prio log_level = msm_vidc_debug & FW_LOGMASK;
|
||||
|
||||
if (!device) {
|
||||
dprintk(VIDC_ERR, "%s: Invalid params\n", __func__);
|
||||
|
|
@ -3260,7 +3260,7 @@ static void __flush_debug_queue(struct venus_hfi_device *device, u8 *packet)
|
|||
* Local packek is used when error occurred.
|
||||
* It is good to print these logs to printk as well.
|
||||
*/
|
||||
log_level |= VIDC_PRINTK;
|
||||
log_level |= FW_PRINTK;
|
||||
}
|
||||
|
||||
while (!__iface_dbgq_read(device, packet)) {
|
||||
|
|
@ -3286,7 +3286,7 @@ static void __flush_debug_queue(struct venus_hfi_device *device, u8 *packet)
|
|||
* from the message fixes this to print it in a single
|
||||
* line.
|
||||
*/
|
||||
dprintk(log_level, "%s", &pkt->rg_msg_data[1]);
|
||||
dprintk_firmware(log_level, "%s", &pkt->rg_msg_data[1]);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -89,6 +89,27 @@ extern bool msm_vidc_cvp_usage;
|
|||
} \
|
||||
} while (0)
|
||||
|
||||
#define dprintk_firmware(__level, __fmt, ...) \
|
||||
do { \
|
||||
if (msm_vidc_debug & __level) { \
|
||||
if (msm_vidc_debug & FW_FTRACE) { \
|
||||
char trace_logbuf[MAX_TRACER_LOG_LENGTH]; \
|
||||
int log_length = snprintf(trace_logbuf, \
|
||||
MAX_TRACER_LOG_LENGTH, \
|
||||
VIDC_DBG_TAG __fmt, \
|
||||
get_debug_level_str(__level), \
|
||||
##__VA_ARGS__); \
|
||||
trace_msm_vidc_printf(trace_logbuf, \
|
||||
log_length); \
|
||||
} \
|
||||
if (msm_vidc_debug & FW_PRINTK) { \
|
||||
pr_info(VIDC_DBG_TAG __fmt, \
|
||||
get_debug_level_str(__level), \
|
||||
##__VA_ARGS__); \
|
||||
} \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
#define dprintk_ratelimit(__level, __fmt, arg...) \
|
||||
do { \
|
||||
if (msm_vidc_check_ratelimit()) { \
|
||||
|
|
|
|||
Loading…
Reference in a new issue