CamX中如何控制KMD的Log和Trace打印

在CamX中,如何控制KMD的log和trace打印呢?

请先 登录 后评论

1 个回答

凡乐

1. 控制打开哪些模块的Log

/sys/module/camera/parameters/debug_mdl
具体的模块定义在:techpack/camera/drivers/cam_utils/cam_debug_util.h
/* Module IDs used for debug logging */
#define CAM_CDM        (1 << 0)
#define CAM_CORE       (1 << 1)
#define CAM_CPAS       (1 << 2)
#define CAM_ISP        (1 << 3)
#define CAM_CRM        (1 << 4)
#define CAM_SENSOR     (1 << 5)
#define CAM_SMMU       (1 << 6)
#define CAM_SYNC       (1 << 7)
#define CAM_ICP        (1 << 8)
#define CAM_JPEG       (1 << 9)
#define CAM_FD         (1 << 10)
#define CAM_LRME       (1 << 11)
#define CAM_FLASH      (1 << 12)
#define CAM_ACTUATOR   (1 << 13)
#define CAM_CCI        (1 << 14)
#define CAM_CSIPHY     (1 << 15)
#define CAM_EEPROM     (1 << 16)
#define CAM_UTIL       (1 << 17)
#define CAM_HFI        (1 << 18)
#define CAM_CTXT       (1 << 19)
#define CAM_OIS        (1 << 20)
#define CAM_RES        (1 << 21)
#define CAM_MEM        (1 << 22)
#define CAM_IRQ_CTRL   (1 << 23)
#define CAM_REQ        (1 << 24)
#define CAM_PERF       (1 << 25)
#define CAM_CUSTOM     (1 << 26)
#define CAM_PRESIL     (1 << 27)
#define CAM_OPE        (1 << 28)
#define CAM_IO_ACCESS  (1 << 29)
#define CAM_SFE        (1 << 30)
举例:
echo 0x20008 > /sys/module/camera/parameters/debug_mdl
2. 控制debug type
表示日志是打印在log里面,还是打印在trace里面:/sys/module/camera/parameters/debug_type
- 0x0 - only logs 
- 0x1 - only trace
- 0x2 - logs + trace
请先 登录 后评论