public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
To: igt-dev@lists.freedesktop.org
Subject: [igt-dev] [PATCH i-g-t 3/4] tests/perf: rename MAX_OA_BUFFER_SIZE
Date: Wed, 10 Oct 2018 17:57:46 +0100	[thread overview]
Message-ID: <20181010165747.23667-4-lionel.g.landwerlin@intel.com> (raw)
In-Reply-To: <20181010165747.23667-1-lionel.g.landwerlin@intel.com>

We'll make this size configurable in the following commit, so make it
clear what this value is about to become.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
---
 tests/perf.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/tests/perf.c b/tests/perf.c
index 36877917..ab3aed35 100644
--- a/tests/perf.c
+++ b/tests/perf.c
@@ -82,7 +82,7 @@ IGT_TEST_DESCRIPTION("Test the i915 perf metrics streaming interface");
 #define PIPE_CONTROL_PPGTT_WRITE	(0 << 2)
 #define PIPE_CONTROL_GLOBAL_GTT_WRITE   (1 << 2)
 
-#define MAX_OA_BUF_SIZE (16 * 1024 * 1024)
+#define DEFAULT_OA_BUF_SIZE (16 * 1024 * 1024)
 
 struct accumulator {
 #define MAX_RAW_OA_COUNTERS 62
@@ -1240,7 +1240,7 @@ read_2_oa_reports(int format_id,
 	 * to indicate that the OA unit may be over taxed if lots of reports
 	 * are being lost.
 	 */
-	int max_reports = MAX_OA_BUF_SIZE / format_size;
+	int max_reports = DEFAULT_OA_BUF_SIZE / format_size;
 	int buf_size = sample_size * max_reports * 1.5;
 	uint8_t *buf = malloc(buf_size);
 	int n = 0;
@@ -1703,7 +1703,7 @@ test_oa_exponents(void)
 		size_t format_size = get_oa_format(test_oa_format).size;
 		size_t sample_size = (sizeof(struct drm_i915_perf_record_header) +
 				      format_size);
-		int max_reports = MAX_OA_BUF_SIZE / format_size;
+		int max_reports = DEFAULT_OA_BUF_SIZE / format_size;
 		int buf_size = sample_size * max_reports * 1.5;
 		uint8_t *buf = calloc(1, buf_size);
 		int ret, n_timer_reports = 0;
@@ -2358,7 +2358,7 @@ test_buffer_fill(void)
 	int buf_size = 65536 * (256 + sizeof(struct drm_i915_perf_record_header));
 	uint8_t *buf = malloc(buf_size);
 	int len;
-	size_t oa_buf_size = MAX_OA_BUF_SIZE;
+	size_t oa_buf_size = DEFAULT_OA_BUF_SIZE;
 	size_t report_size = get_oa_format(test_oa_format).size;
 	int n_full_oa_reports = oa_buf_size / report_size;
 	uint64_t fill_duration = n_full_oa_reports * oa_period;
@@ -2500,7 +2500,7 @@ test_enable_disable(void)
 	};
 	int buf_size = 65536 * (256 + sizeof(struct drm_i915_perf_record_header));
 	uint8_t *buf = malloc(buf_size);
-	size_t oa_buf_size = MAX_OA_BUF_SIZE;
+	size_t oa_buf_size = DEFAULT_OA_BUF_SIZE;
 	size_t report_size = get_oa_format(test_oa_format).size;
 	int n_full_oa_reports = oa_buf_size / report_size;
 	uint64_t fill_duration = n_full_oa_reports * oa_period;
@@ -3182,7 +3182,7 @@ gen8_test_single_ctx_render_target_writes_a_counter(void)
 	size_t format_size = get_oa_format(test_oa_format).size;
 	size_t sample_size = (sizeof(struct drm_i915_perf_record_header) +
 			      format_size);
-	int max_reports = MAX_OA_BUF_SIZE / format_size;
+	int max_reports = DEFAULT_OA_BUF_SIZE / format_size;
 	int buf_size = sample_size * max_reports * 1.5;
 	int child_ret;
 	uint8_t *buf = malloc(buf_size);
-- 
2.19.1

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

  parent reply	other threads:[~2018-10-10 16:57 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-10 16:57 [igt-dev] [PATCH i-g-t 0/4] tests/perf: add support for new oa buffer size parameter Lionel Landwerlin
2018-10-10 16:57 ` [igt-dev] [PATCH i-g-t 1/4] include: bump drm uAPI headers Lionel Landwerlin
2018-10-10 16:57 ` [igt-dev] [PATCH i-g-t 2/4] tests/perf: buffer-fill: drop load helper usage Lionel Landwerlin
2018-10-10 16:57 ` Lionel Landwerlin [this message]
2018-10-10 16:57 ` [igt-dev] [PATCH i-g-t 4/4] tests/perf: add new tests for configurable OA buffer size Lionel Landwerlin
2018-10-10 17:12   ` Chris Wilson
2018-10-10 17:38     ` Lionel Landwerlin
2018-10-10 17:50 ` [igt-dev] ✓ Fi.CI.BAT: success for tests/perf: add support for new oa buffer size parameter Patchwork
2018-10-10 23:56 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork

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=20181010165747.23667-4-lionel.g.landwerlin@intel.com \
    --to=lionel.g.landwerlin@intel.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