diff options
author | Fabien Dessenne <fabien.dessenne@st.com> | 2015-05-12 13:02:11 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2015-06-09 18:12:28 -0300 |
commit | 34b6beb65beb7f7726baa771661c671310445265 (patch) | |
tree | 1c419de647756c9de8cb07aaede3534bc46d7a2a /drivers/media/platform/sti/bdisp/bdisp.h | |
parent | 28ffeebbb7bdc0dd7899286b63f3c359d43d0a1a (diff) |
[media] bdisp: add debug file system
Creates 5 debugfs entries to dump the last HW request, the last HW node
(=command), the HW registers and the recent HW performance (time & fps)
Signed-off-by: Fabien Dessenne <fabien.dessenne@st.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers/media/platform/sti/bdisp/bdisp.h')
-rw-r--r-- | drivers/media/platform/sti/bdisp/bdisp.h | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/drivers/media/platform/sti/bdisp/bdisp.h b/drivers/media/platform/sti/bdisp/bdisp.h index 013678a4428b..0cf98577222c 100644 --- a/drivers/media/platform/sti/bdisp/bdisp.h +++ b/drivers/media/platform/sti/bdisp/bdisp.h @@ -141,6 +141,29 @@ struct bdisp_m2m_device { }; /** + * struct bdisp_dbg - debug info + * + * @debugfs_entry: debugfs + * @copy_node: array of last used nodes + * @copy_request: last bdisp request + * @hw_start: start time of last HW request + * @last_duration: last HW processing duration in microsecs + * @min_duration: min HW processing duration in microsecs + * @max_duration: max HW processing duration in microsecs + * @tot_duration: total HW processing duration in microsecs + */ +struct bdisp_dbg { + struct dentry *debugfs_entry; + struct bdisp_node *copy_node[MAX_NB_NODE]; + struct bdisp_request copy_request; + ktime_t hw_start; + s64 last_duration; + s64 min_duration; + s64 max_duration; + s64 tot_duration; +}; + +/** * struct bdisp_dev - abstraction for bdisp entity * * @v4l2_dev: v4l2 device @@ -158,6 +181,7 @@ struct bdisp_m2m_device { * @irq_queue: interrupt handler waitqueue * @work_queue: workqueue to handle timeouts * @timeout_work: IRQ timeout structure + * @dbg: debug info */ struct bdisp_dev { struct v4l2_device v4l2_dev; @@ -175,6 +199,7 @@ struct bdisp_dev { wait_queue_head_t irq_queue; struct workqueue_struct *work_queue; struct delayed_work timeout_work; + struct bdisp_dbg dbg; }; void bdisp_hw_free_nodes(struct bdisp_ctx *ctx); @@ -184,3 +209,8 @@ int bdisp_hw_alloc_filters(struct device *dev); int bdisp_hw_reset(struct bdisp_dev *bdisp); int bdisp_hw_get_and_clear_irq(struct bdisp_dev *bdisp); int bdisp_hw_update(struct bdisp_ctx *ctx); + +void bdisp_debugfs_remove(struct bdisp_dev *bdisp); +int bdisp_debugfs_create(struct bdisp_dev *bdisp); +void bdisp_dbg_perf_begin(struct bdisp_dev *bdisp); +void bdisp_dbg_perf_end(struct bdisp_dev *bdisp); |