All of lore.kernel.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 v2 3/4] tests/perf: rename MAX_OA_BUFFER_SIZE
Date: Mon, 15 Oct 2018 17:20:40 +0100	[thread overview]
Message-ID: <20181015162041.29140-4-lionel.g.landwerlin@intel.com> (raw)
In-Reply-To: <20181015162041.29140-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 72e00132..6c448036 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;
@@ -1716,7 +1716,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;
@@ -2372,7 +2372,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;
@@ -2514,7 +2514,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;
@@ -3196,7 +3196,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-15 16:20 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-15 16:20 [igt-dev] [PATCH i-g-t v2 0/4] tests/perf: add support for new oa buffer size parameter Lionel Landwerlin
2018-10-15 16:20 ` [igt-dev] [PATCH i-g-t v2 1/4] include: bump drm uAPI headers Lionel Landwerlin
2018-10-22 18:36   ` Matthew Auld
2018-10-15 16:20 ` [igt-dev] [PATCH i-g-t v2 2/4] tests/perf: buffer-fill: drop load helper usage Lionel Landwerlin
2018-10-22 17:34   ` Matthew Auld
2018-10-15 16:20 ` Lionel Landwerlin [this message]
2018-10-22 17:44   ` [igt-dev] [PATCH i-g-t v2 3/4] tests/perf: rename MAX_OA_BUFFER_SIZE Matthew Auld
2018-10-15 16:20 ` [igt-dev] [PATCH i-g-t v2 4/4] tests/perf: add new tests for configurable OA buffer size Lionel Landwerlin
2018-10-22 18:33   ` Matthew Auld
2018-10-15 17:53 ` [igt-dev] ✓ Fi.CI.BAT: success for tests/perf: add support for new oa buffer size parameter (rev2) Patchwork
2018-10-15 23:12 ` [igt-dev] ✓ Fi.CI.IGT: " 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=20181015162041.29140-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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.