Files
android/drivers/misc/mediatek/video/mt6765/dispsys/ddp_log.h
T
threeeye bc1d038eac REVVL 6 Pro kernel bring-up: full working tree snapshot (2026-09-12)
Squashed backup commit (no shallow-clone history issues) of
xiaomi-mt6833-dev/kernel_xiaomi_mt6833 (lineage-23.2 branch, upstream
commit 9eece662e) plus all fixes applied to get everpal_defconfig building
clean against a modern (GCC 15.2.0) toolchain -- see the previous commit
message on the lineage-23.2 branch (also in this repo history is not
available here since this is a squashed snapshot; full incremental history
lives in the local DL380 checkout and the upstream GitHub remote).

Upstream: https://github.com/xiaomi-mt6833-dev/kernel_xiaomi_mt6833 (lineage-23.2)
2026-09-12 13:36:46 +00:00

121 lines
3.0 KiB
C

/*
* Copyright (C) 2015 MediaTek Inc.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*/
#ifndef _H_DDP_LOG_
#define _H_DDP_LOG_
#ifdef CONFIG_MTK_AEE_FEATURE
#include "mt-plat/aee.h"
#endif
#include "display_recorder.h"
#include "ddp_debug.h"
#include "disp_drv_log.h"
#ifndef LOG_TAG
#define LOG_TAG
#endif
#define DDPSVPMSG(fmt, args...) DISPMSG(fmt, ##args)
#define DISP_LOG_I(fmt, args...) \
do { \
dprec_logger_pr(DPREC_LOGGER_DEBUG, fmt, ##args); \
if (g_mobilelog) \
pr_info("[DDP/"LOG_TAG"]"fmt, ##args); \
} while (0)
#define DISP_LOG_V(fmt, args...) \
do { \
if (ddp_debug_dbg_log_level() >= 2) { \
DISP_LOG_I(fmt, ##args); \
} \
} while (0)
#define DISP_LOG_D(fmt, args...) \
do { \
if (ddp_debug_dbg_log_level()) { \
DISP_LOG_I(fmt, ##args); \
} \
} while (0)
#define DISP_LOG_W(fmt, args...) \
do { \
dprec_logger_pr(DPREC_LOGGER_DEBUG, fmt, ##args); \
pr_info("[DDP/"LOG_TAG"]warn:"fmt, ##args); \
} while (0)
#define DISP_LOG_E(fmt, args...) \
do { \
dprec_logger_pr(DPREC_LOGGER_ERROR, fmt, ##args); \
pr_info("[DDP/"LOG_TAG"]error:"fmt, ##args); \
} while (0)
#define DDPIRQ(fmt, args...) \
do { \
if (ddp_debug_irq_log_level()) { \
DISP_LOG_I(fmt, ##args); \
} \
} while (0)
#define DDPDBG(fmt, args...) DISP_LOG_D(fmt, ##args)
#define DDPMSG(fmt, args...) DISP_LOG_I(fmt, ##args)
#define DDPWRN(fmt, args...) DISP_LOG_W(fmt, ##args)
#define DDPERR(fmt, args...) DISP_LOG_E(fmt, ##args)
#define DDPDUMP(fmt, ...) \
do { \
if (ddp_debug_analysis_to_buffer()) { \
static char log[512] = {'\0'}; \
scnprintf(log, 511, fmt, ##__VA_ARGS__); \
dprec_logger_dump(log); \
} else { \
dprec_logger_pr(DPREC_LOGGER_DUMP, \
fmt, ##__VA_ARGS__); \
pr_info("[DDP/"LOG_TAG"]"fmt, \
##__VA_ARGS__); \
} \
} while (0)
#ifndef ASSERT
#define ASSERT(expr) \
do { \
if (expr) \
break; \
pr_info("DDP ASSERT FAILED %s, %d\n", __FILE__, __LINE__); \
WARN_ON(1);\
} while (0)
#endif
#ifdef CONFIG_MTK_AEE_FEATURE
#define DDPAEE(string, args...) \
do { \
char str[200] = { 0 }; \
snprintf(str, 199, "DDP:"string, ##args); \
aee_kernel_warning_api(__FILE__, __LINE__, \
DB_OPT_DEFAULT | DB_OPT_MMPROFILE_BUFFER, str, \
string, ##args); \
pr_info("[DDP Error]"string, ##args); \
} while (0)
#else
#define DDPAEE(string, args...) \
do { \
char str[200] = { 0 }; \
snprintf(str, 199, "DDP:"string, ##args);\
pr_info("[DDP Error]"string, ##args); \
} while (0)
#endif
#endif