[igt-dev] [PATCH i-g-t 3/4] lib/igt_debugfs: add function to set pipe crc source name.
Kazlauskas, Nicholas
Nicholas.Kazlauskas at amd.com
Tue Jun 25 16:26:03 UTC 2019
On 6/24/19 10:31 AM, Dingchen Zhang wrote:
> need to get CRC from different pipe crc source. >
> frees the existed pipe crc source and replace it with the new.
This patch works for changing the CRC source dynamically but I don't
think we actually need this for anything right now.
Might be better to just leave this be for now.
Nicholas Kazlauskas
>
> Cc: Harry Wentland <Harry.Wentland at amd.com>
> Cc: Nick Kazlauskas <Nicholas.Kazlauskas at amd.com>
> Change-Id: I41edae38f6c11525722295e975e77e497344ea71
> Signed-off-by: Dingchen Zhang <dingchen.zhang at amd.com>
> ---
> lib/igt_debugfs.c | 15 +++++++++++++++
> lib/igt_debugfs.h | 1 +
> 2 files changed, 16 insertions(+)
>
> diff --git a/lib/igt_debugfs.c b/lib/igt_debugfs.c
> index 82ce1834..6dd7c537 100644
> --- a/lib/igt_debugfs.c
> +++ b/lib/igt_debugfs.c
> @@ -994,6 +994,21 @@ void igt_pipe_crc_collect_crc(igt_pipe_crc_t *pipe_crc, igt_crc_t *out_crc)
> igt_pipe_crc_stop(pipe_crc);
> }
>
> +/**
> + * igt_pipe_crc_set_source:
> + * @pipe_crc: pipe CRC object
> + * @src: pipe CRC source name
> + *
> + * The functions frees the current existed pipe CRC source name and replace
> + * it with the new given name 'source'
> + */
> +void igt_pipe_crc_set_source(igt_pipe_crc_t *pipe_crc, const char *src)
> +{
> + free(pipe_crc->source);
> + pipe_crc->source = strdup(src);
> + igt_assert(pipe_crc->source);
> +}
> +
> /**
> * igt_reset_fifo_underrun_reporting:
> * @drm_fd: drm device file descriptor
> diff --git a/lib/igt_debugfs.h b/lib/igt_debugfs.h
> index b49dd2b6..640ec248 100644
> --- a/lib/igt_debugfs.h
> +++ b/lib/igt_debugfs.h
> @@ -108,6 +108,7 @@ void igt_pipe_crc_get_single(igt_pipe_crc_t *pipe_crc, igt_crc_t *out_crc);
> void igt_pipe_crc_get_current(int drm_fd, igt_pipe_crc_t *pipe_crc, igt_crc_t *crc);
>
> void igt_pipe_crc_collect_crc(igt_pipe_crc_t *pipe_crc, igt_crc_t *out_crc);
> +void igt_pipe_crc_set_source(igt_pipe_crc_t *pipe_crc, const char *src);
>
> void igt_hpd_storm_set_threshold(int fd, unsigned int threshold);
> void igt_hpd_storm_reset(int fd);
>
More information about the igt-dev
mailing list