drm/i915: Stop CRC gathering when the ctl file is closed
Subsystems (2)
PATCH 1/1 drm/i915: Stop CRC gathering when the ctl file is closed
From: Ville Syrjälä <[email protected]>
If no one is looking at the CRCs, stop gathering them.
--- drivers/gpu/drm/i915/i915_debugfs.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-)
drivers/gpu/drm/i915/i915_debugfs.c +14 -1
@@ -2294,12 +2294,25 @@ out:return len; } +static int display_crc_ctl_release (struct inode *inode,struct file *file) +{ +struct seq_file *m = file->private_data; +struct drm_device *dev = m->private; +enum pipe pipe; + +/* stop gathering CRCs */ +for_each_pipe (pipe) +pipe_crc_set_source (dev, pipe,INTEL_PIPE_CRC_SOURCE_NONE ); + +return single_release (inode, file); +} +static const struct file_operations i915_display_crc_ctl_fops = { .owner =THIS_MODULE , .open = display_crc_ctl_open, .read = seq_read, .llseek = seq_lseek, - .release = single_release, + .release = display_crc_ctl_release, .write = display_crc_ctl_write };
Signature · 6 lines
1.8.1.5 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 5 lines · On Mon, Oct 21, 2013 at 6:01 PM, <[email protected]> wrote:
From: Ville Syrjälä <[email protected]>
If no one is looking at the CRCs, stop gathering them.
Signed-off-by Ville Syrjälä <[email protected]>
As discussed on irc this prevents fools like me from wreaking havoc directly with the cli, at least if you still want to interactively test stuff easily (background processes and all would work around this). Imo it's better to disable (and maybe re-enable) the CRC stuff when we disable/enable the pipe.
-Daniel
Signature · 3 lines
Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch
Quoted 5 lines · Daniel Vetter
Quoted 4 lines · On Mon, Oct 21, 2013 at 6:01 PM, <[email protected]> wrote:
From: Ville Syrjälä <[email protected]>
If no one is looking at the CRCs, stop gathering them.
Quoted 7 lines
Quoted 1 line
Signed-off-by Ville Syrjälä <[email protected]>As discussed on irc this prevents fools like me from wreaking havoc directly with the cli, at least if you still want to interactively test stuff easily (background processes and all would work around this). Imo it's better to disable (and maybe re-enable) the CRC stuff when we disable/enable the pipe.
I would still suggest using exec for keeping the file open.
Especially if we go for the auto re-enable, since then we'd essientially never turn off the crc capture once it's started unless someone explicitly writes to the ctl file. We'd just pause it while the pipe is off.
Also I would assume we want to avoid full modesets in the future if possible, so relying on that doesn't feel very robust to me.
Signature · 2 lines
Ville Syrjälä Intel OTC