public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Dingchen Zhang <dingchen.zhang@amd.com>
To: igt-dev@lists.freedesktop.org
Subject: [igt-dev] [PATCH i-g-t 3/4] lib/igt_debugfs: add function to set pipe crc source name.
Date: Mon, 24 Jun 2019 10:31:43 -0400	[thread overview]
Message-ID: <20190624143144.3403-3-dingchen.zhang@amd.com> (raw)
In-Reply-To: <20190624143144.3403-1-dingchen.zhang@amd.com>

need to get CRC from different pipe crc source.

frees the existed pipe crc source and replace it with the new.

Cc: Harry Wentland <Harry.Wentland@amd.com>
Cc: Nick Kazlauskas <Nicholas.Kazlauskas@amd.com>
Change-Id: I41edae38f6c11525722295e975e77e497344ea71
Signed-off-by: Dingchen Zhang <dingchen.zhang@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);
-- 
2.17.1

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

  parent reply	other threads:[~2019-06-24 14:45 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-24 14:31 [igt-dev] [PATCH i-g-t 1/4] lib/igt_fb: add functionality of getting framebuffer 16-bit CRC Dingchen Zhang
2019-06-24 14:31 ` [igt-dev] [PATCH i-g-t 2/4] lib/igt_debugfs: add AMDGPU pipe crc sources Dingchen Zhang
2019-06-25 16:23   ` Kazlauskas, Nicholas
2019-06-24 14:31 ` Dingchen Zhang [this message]
2019-06-25 16:26   ` [igt-dev] [PATCH i-g-t 3/4] lib/igt_debugfs: add function to set pipe crc source name Kazlauskas, Nicholas
2019-06-24 14:31 ` [igt-dev] [PATCH i-g-t 4/4] tests/amdgpu: add 8bpc bypass mode test Dingchen Zhang
2019-06-25 16:29   ` Kazlauskas, Nicholas
2019-06-24 15:48 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/4] lib/igt_fb: add functionality of getting framebuffer 16-bit CRC Patchwork
2019-06-24 19:05 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
2019-06-25  6:54 ` [igt-dev] ✓ Fi.CI.IGT: success " Patchwork
2019-06-25 16:20 ` [igt-dev] [PATCH i-g-t 1/4] " Kazlauskas, Nicholas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190624143144.3403-3-dingchen.zhang@amd.com \
    --to=dingchen.zhang@amd.com \
    --cc=igt-dev@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox