video: driver: add support to bugon for requested types

Added change to enable bugon at handle_system_error for
error types requested via debugfs property.

Fatal:
adb shell "echo 0x1 > /d/msm_vidc/enable_bugon"

NoC:
adb shell "echo 0x2 > /d/msm_vidc/enable_bugon"

WD Timeout:
adb shell "echo 0x4 > /d/msm_vidc/enable_bugon".

Change-Id: Iecc1b076c7ca53acee837d68e1a7446dbaef6e94
Signed-off-by: Govindaraj Rajagopal <grajagop@codeaurora.org>
This commit is contained in:
Govindaraj Rajagopal
2021-07-09 15:59:10 +05:30
parent c7b23776f2
commit 63614e76b8
3 changed files with 36 additions and 1 deletions

View File

@@ -35,6 +35,7 @@ extern bool msm_vidc_lossless_encode;
extern bool msm_vidc_syscache_disable;
extern int msm_vidc_clock_voting;
extern bool msm_vidc_fw_dump;
extern unsigned int msm_vidc_enable_bugon;
/* To enable messages OR these values and
* echo the result to debugfs file.
@@ -120,6 +121,14 @@ enum vidc_msg_prio {
} \
} while (0)
#define MSM_VIDC_FATAL(value) \
do { \
if (value) { \
d_vpr_e("bug on\n"); \
BUG_ON(value); \
} \
} while (0)
enum msm_vidc_debugfs_event {
MSM_VIDC_DEBUGFS_EVENT_ETB,
MSM_VIDC_DEBUGFS_EVENT_EBD,
@@ -127,6 +136,12 @@ enum msm_vidc_debugfs_event {
MSM_VIDC_DEBUGFS_EVENT_FBD,
};
enum msm_vidc_bug_on_error {
MSM_VIDC_BUG_ON_FATAL = BIT(0),
MSM_VIDC_BUG_ON_NOC = BIT(1),
MSM_VIDC_BUG_ON_WD_TIMEOUT = BIT(2),
};
struct dentry *msm_vidc_debugfs_init_drv(void);
struct dentry *msm_vidc_debugfs_init_core(void *core);
struct dentry *msm_vidc_debugfs_init_inst(void *inst,