Loading drivers/video/msm/mdss/mdss_debug.h +8 −3 Original line number Diff line number Diff line Loading @@ -47,7 +47,11 @@ enum mdss_dbg_xlog_flag { ##__VA_ARGS__, DATA_LIMITER) #define MDSS_XLOG_TOUT_HANDLER(...) \ mdss_xlog_tout_handler_default(__func__, ##__VA_ARGS__, \ mdss_xlog_tout_handler_default(false, __func__, ##__VA_ARGS__, \ XLOG_TOUT_DATA_LIMITER) #define MDSS_XLOG_TOUT_HANDLER_WQ(...) \ mdss_xlog_tout_handler_default(true, __func__, ##__VA_ARGS__, \ XLOG_TOUT_DATA_LIMITER) #define MDSS_XLOG_DBG(...) mdss_xlog(__func__, __LINE__, MDSS_XLOG_DBG, \ Loading Loading @@ -130,7 +134,7 @@ void mdss_misr_crc_collect(struct mdss_data_type *mdata, int block_id); int mdss_create_xlog_debug(struct mdss_debug_data *mdd); void mdss_xlog(const char *name, int line, int flag, ...); void mdss_xlog_tout_handler_default(const char *name, ...); void mdss_xlog_tout_handler_default(bool queue, const char *name, ...); int mdss_xlog_tout_handler_iommu(struct iommu_domain *domain, struct device *dev, unsigned long iova, int flags, void *token); #else Loading Loading @@ -159,7 +163,8 @@ static inline int create_xlog_debug(struct mdss_data_type *mdata) { return 0; } static inline void mdss_xlog_dump(void) { } static inline void mdss_xlog(const char *name, int line, int flag...) { } static inline void mdss_dsi_debug_check_te(struct mdss_panel_data *pdata) { } static inline void mdss_xlog_tout_handler_default(const char *name, ...) { } static inline void mdss_xlog_tout_handler_default(bool queue, const char *name, ...) { } static inline int mdss_xlog_tout_handler_iommu(struct iommu_domain *domain, struct device *dev, unsigned long iova, int flags, void *token) { } #endif Loading drivers/video/msm/mdss/mdss_debug_xlog.c +24 −2 Original line number Diff line number Diff line Loading @@ -45,7 +45,9 @@ struct mdss_dbg_xlog { u32 xlog_enable; u32 panic_on_err; u32 enable_reg_dump; struct work_struct xlog_dump_work; struct mdss_debug_base *blk_arr[MDSS_DEBUG_BASE_MAX]; bool work_panic; } mdss_dbg_xlog; static inline bool mdss_xlog_is_enabled(u32 flag) Loading Loading @@ -364,7 +366,15 @@ static void mdss_xlog_dump_array(struct mdss_debug_base *blk_arr[], panic(name); } void mdss_xlog_tout_handler_default(const char *name, ...) static void xlog_debug_work(struct work_struct *work) { mdss_xlog_dump_array(mdss_dbg_xlog.blk_arr, ARRAY_SIZE(mdss_dbg_xlog.blk_arr), mdss_dbg_xlog.work_panic, "xlog_workitem"); } void mdss_xlog_tout_handler_default(bool queue, const char *name, ...) { int i, index = 0; bool dead = false; Loading @@ -377,6 +387,9 @@ void mdss_xlog_tout_handler_default(const char *name, ...) if (!mdss_xlog_is_enabled(MDSS_XLOG_DEFAULT)) return; if (queue && work_pending(&mdss_dbg_xlog.xlog_dump_work)) return; blk_arr = &mdss_dbg_xlog.blk_arr[0]; blk_len = ARRAY_SIZE(mdss_dbg_xlog.blk_arr); Loading @@ -399,8 +412,14 @@ void mdss_xlog_tout_handler_default(const char *name, ...) } va_end(args); if (queue) { /* schedule work to dump later */ mdss_dbg_xlog.work_panic = dead; schedule_work(&mdss_dbg_xlog.xlog_dump_work); } else { mdss_xlog_dump_array(blk_arr, blk_len, dead, name); } } int mdss_xlog_tout_handler_iommu(struct iommu_domain *domain, struct device *dev, unsigned long iova, int flags, void *token) Loading Loading @@ -470,6 +489,9 @@ int mdss_create_xlog_debug(struct mdss_debug_data *mdd) return -ENODEV; } INIT_WORK(&mdss_dbg_xlog.xlog_dump_work, xlog_debug_work); mdss_dbg_xlog.work_panic = false; debugfs_create_file("dump", 0644, mdss_dbg_xlog.xlog, NULL, &mdss_xlog_fops); debugfs_create_u32("enable", 0644, mdss_dbg_xlog.xlog, Loading drivers/video/msm/mdss/mdss_mdp_intf_video.c +1 −2 Original line number Diff line number Diff line Loading @@ -634,8 +634,7 @@ static void mdss_mdp_video_underrun_intr_done(void *arg) ctl->underrun_cnt++; MDSS_XLOG(ctl->num, ctl->underrun_cnt); MDSS_XLOG_TOUT_HANDLER("mdp", "dsi0_ctrl", "dsi0_phy", "dsi1_ctrl", "dsi1_phy", "panic"); MDSS_XLOG_TOUT_HANDLER_WQ("mdp", "vbif", "panic"); trace_mdp_video_underrun_done(ctl->num, ctl->underrun_cnt); pr_debug("display underrun detected for ctl=%d count=%d\n", ctl->num, ctl->underrun_cnt); Loading Loading
drivers/video/msm/mdss/mdss_debug.h +8 −3 Original line number Diff line number Diff line Loading @@ -47,7 +47,11 @@ enum mdss_dbg_xlog_flag { ##__VA_ARGS__, DATA_LIMITER) #define MDSS_XLOG_TOUT_HANDLER(...) \ mdss_xlog_tout_handler_default(__func__, ##__VA_ARGS__, \ mdss_xlog_tout_handler_default(false, __func__, ##__VA_ARGS__, \ XLOG_TOUT_DATA_LIMITER) #define MDSS_XLOG_TOUT_HANDLER_WQ(...) \ mdss_xlog_tout_handler_default(true, __func__, ##__VA_ARGS__, \ XLOG_TOUT_DATA_LIMITER) #define MDSS_XLOG_DBG(...) mdss_xlog(__func__, __LINE__, MDSS_XLOG_DBG, \ Loading Loading @@ -130,7 +134,7 @@ void mdss_misr_crc_collect(struct mdss_data_type *mdata, int block_id); int mdss_create_xlog_debug(struct mdss_debug_data *mdd); void mdss_xlog(const char *name, int line, int flag, ...); void mdss_xlog_tout_handler_default(const char *name, ...); void mdss_xlog_tout_handler_default(bool queue, const char *name, ...); int mdss_xlog_tout_handler_iommu(struct iommu_domain *domain, struct device *dev, unsigned long iova, int flags, void *token); #else Loading Loading @@ -159,7 +163,8 @@ static inline int create_xlog_debug(struct mdss_data_type *mdata) { return 0; } static inline void mdss_xlog_dump(void) { } static inline void mdss_xlog(const char *name, int line, int flag...) { } static inline void mdss_dsi_debug_check_te(struct mdss_panel_data *pdata) { } static inline void mdss_xlog_tout_handler_default(const char *name, ...) { } static inline void mdss_xlog_tout_handler_default(bool queue, const char *name, ...) { } static inline int mdss_xlog_tout_handler_iommu(struct iommu_domain *domain, struct device *dev, unsigned long iova, int flags, void *token) { } #endif Loading
drivers/video/msm/mdss/mdss_debug_xlog.c +24 −2 Original line number Diff line number Diff line Loading @@ -45,7 +45,9 @@ struct mdss_dbg_xlog { u32 xlog_enable; u32 panic_on_err; u32 enable_reg_dump; struct work_struct xlog_dump_work; struct mdss_debug_base *blk_arr[MDSS_DEBUG_BASE_MAX]; bool work_panic; } mdss_dbg_xlog; static inline bool mdss_xlog_is_enabled(u32 flag) Loading Loading @@ -364,7 +366,15 @@ static void mdss_xlog_dump_array(struct mdss_debug_base *blk_arr[], panic(name); } void mdss_xlog_tout_handler_default(const char *name, ...) static void xlog_debug_work(struct work_struct *work) { mdss_xlog_dump_array(mdss_dbg_xlog.blk_arr, ARRAY_SIZE(mdss_dbg_xlog.blk_arr), mdss_dbg_xlog.work_panic, "xlog_workitem"); } void mdss_xlog_tout_handler_default(bool queue, const char *name, ...) { int i, index = 0; bool dead = false; Loading @@ -377,6 +387,9 @@ void mdss_xlog_tout_handler_default(const char *name, ...) if (!mdss_xlog_is_enabled(MDSS_XLOG_DEFAULT)) return; if (queue && work_pending(&mdss_dbg_xlog.xlog_dump_work)) return; blk_arr = &mdss_dbg_xlog.blk_arr[0]; blk_len = ARRAY_SIZE(mdss_dbg_xlog.blk_arr); Loading @@ -399,8 +412,14 @@ void mdss_xlog_tout_handler_default(const char *name, ...) } va_end(args); if (queue) { /* schedule work to dump later */ mdss_dbg_xlog.work_panic = dead; schedule_work(&mdss_dbg_xlog.xlog_dump_work); } else { mdss_xlog_dump_array(blk_arr, blk_len, dead, name); } } int mdss_xlog_tout_handler_iommu(struct iommu_domain *domain, struct device *dev, unsigned long iova, int flags, void *token) Loading Loading @@ -470,6 +489,9 @@ int mdss_create_xlog_debug(struct mdss_debug_data *mdd) return -ENODEV; } INIT_WORK(&mdss_dbg_xlog.xlog_dump_work, xlog_debug_work); mdss_dbg_xlog.work_panic = false; debugfs_create_file("dump", 0644, mdss_dbg_xlog.xlog, NULL, &mdss_xlog_fops); debugfs_create_u32("enable", 0644, mdss_dbg_xlog.xlog, Loading
drivers/video/msm/mdss/mdss_mdp_intf_video.c +1 −2 Original line number Diff line number Diff line Loading @@ -634,8 +634,7 @@ static void mdss_mdp_video_underrun_intr_done(void *arg) ctl->underrun_cnt++; MDSS_XLOG(ctl->num, ctl->underrun_cnt); MDSS_XLOG_TOUT_HANDLER("mdp", "dsi0_ctrl", "dsi0_phy", "dsi1_ctrl", "dsi1_phy", "panic"); MDSS_XLOG_TOUT_HANDLER_WQ("mdp", "vbif", "panic"); trace_mdp_video_underrun_done(ctl->num, ctl->underrun_cnt); pr_debug("display underrun detected for ctl=%d count=%d\n", ctl->num, ctl->underrun_cnt); Loading