diff options
author | Ruofei Ma <ruofeim@google.com> | 2023-01-18 21:36:18 -0800 |
---|---|---|
committer | Szu-Wei (Wesley) Lee <szuweilee@google.com> | 2023-01-19 22:55:34 +0000 |
commit | f44b200782bb0a0f4ed833924f4a3654b43b74f4 (patch) | |
tree | f4809d36b986d5a7c74864d5bec44fea74793e35 | |
parent | 95afa3cb9d14db657ce022f250cf283a18919ba7 (diff) | |
download | gchips-f44b200782bb0a0f4ed833924f4a3654b43b74f4.tar.gz |
Add debug node for timeout
Change-Id: I40976bc69f1707edc6fa48409eb564e370ef3f7e
Signed-off-by: Ruofei Ma <ruofeim@google.com>
-rw-r--r-- | bigo.c | 2 | ||||
-rw-r--r-- | bigo_debug.c | 4 | ||||
-rw-r--r-- | bigo_priv.h | 1 |
3 files changed, 6 insertions, 1 deletions
@@ -245,7 +245,7 @@ static int bigo_run_job(struct bigo_core *core, struct bigo_job *job) bigo_push_regs(core, job->regs); bigo_core_enable(core); ret = wait_for_completion_timeout(&core->frame_done, - msecs_to_jiffies(JOB_COMPLETE_TIMEOUT_MS)); + msecs_to_jiffies(core->debugfs.timeout)); if (!ret) { pr_err("timed out waiting for HW\n"); diff --git a/bigo_debug.c b/bigo_debug.c index a8c539d..2c1af7a 100644 --- a/bigo_debug.c +++ b/bigo_debug.c @@ -12,6 +12,7 @@ #include <linux/seq_file.h> #include "bigo_debug.h" +#include "bigo_io.h" static int avail_freq_show(struct seq_file *s, void *unused) { @@ -42,6 +43,7 @@ void bigo_init_debugfs(struct bigo_core *core) debugfs->set_freq = 0; debugfs->trigger_ssr = 0; + debugfs->timeout = JOB_COMPLETE_TIMEOUT_MS; debugfs->root = debugfs_create_dir("bigo", NULL); debugfs_create_file("avail_freqs", 0400, debugfs->root, core, @@ -49,6 +51,8 @@ void bigo_init_debugfs(struct bigo_core *core) debugfs_create_u32("set_freq", 0200, debugfs->root, &debugfs->set_freq); debugfs_create_u32("trigger_ssr", 0600, debugfs->root, &debugfs->trigger_ssr); + debugfs_create_u32("timeout", 0644, debugfs->root, + &debugfs->timeout); } void bigo_uninit_debugfs(struct bigo_core *core) diff --git a/bigo_priv.h b/bigo_priv.h index dcb8ff1..a646e59 100644 --- a/bigo_priv.h +++ b/bigo_priv.h @@ -84,6 +84,7 @@ struct bigo_debugfs { struct dentry *root; u32 set_freq; u32 trigger_ssr; + u32 timeout; }; struct bigo_prio_array { |