mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 11:26:02 +09:00
drm/rockchip: debugfs: Add extra enable option for vop dump feature
Currently, the dump vop buffer feature is turned on and off through `CONFIG_ROCKCHIP_DRM_DEBUG` marco. We want to control this at runtime, so this patch adds a new option for enable to dump debugfs. - DUMP_DISABLE: Disable dump and do not record plane info into list. - DUMP_ENABLE: Record plane info into list. - DUMP_KEEP: Record plane info into list and keep to dump plane. Signed-off-by: Chaoyi Chen <chaoyi.chen@rock-chips.com> Change-Id: I96ad88068b383e93071896c63c3cc68aa05c8834
This commit is contained in:
@@ -119,9 +119,10 @@ int rockchip_drm_dump_plane_buffer(struct vop_dump_info *dump_info, int frame_co
|
||||
|
||||
static int rockchip_drm_dump_buffer_show(struct seq_file *m, void *data)
|
||||
{
|
||||
seq_puts(m, " echo dump > dump to dump one frame\n");
|
||||
seq_puts(m, " echo enable > Enable dump feature\n");
|
||||
seq_puts(m, " echo dump > Immediately dump the current frame\n");
|
||||
seq_puts(m, " echo dumpon > dump to start vop keep dumping\n");
|
||||
seq_puts(m, " echo dumpoff > dump to stop keep dumping\n");
|
||||
seq_puts(m, " echo dumpoff > Disable dump feature and stop keep dumping\n");
|
||||
seq_puts(m, " echo dumpn > dump n is the number of dump times\n");
|
||||
seq_puts(m, " dump path is /data\n");
|
||||
|
||||
@@ -180,6 +181,8 @@ rockchip_drm_dump_buffer_write(struct file *file, const char __user *ubuf,
|
||||
drm_modeset_unlock_all(crtc->dev);
|
||||
rockchip_crtc->frame_count++;
|
||||
}
|
||||
} else if (strncmp(buf, "enable", 6) == 0) {
|
||||
rockchip_crtc->vop_dump_status = DUMP_ENABLE;
|
||||
} else {
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
@@ -47,8 +47,14 @@ struct vop_dump_list {
|
||||
struct vop_dump_info dump_info;
|
||||
};
|
||||
|
||||
/**
|
||||
* @DUMP_DISABLE: Disable dump and do not record plane info into list.
|
||||
* @DUMP_ENABLE: Record plane info into list.
|
||||
* @DUMP_KEEP: Record plane info into list and keep to dump plane.
|
||||
*/
|
||||
enum vop_dump_status {
|
||||
DUMP_DISABLE = 0,
|
||||
DUMP_ENABLE,
|
||||
DUMP_KEEP
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user