From: Francois Dugast <francois.dugast@intel.com>
To: igt-dev@lists.freedesktop.org
Cc: Francois Dugast <francois.dugast@intel.com>
Subject: [PATCH i-g-t 4/5] tests/intel/xe_render_copy: Expose render duration
Date: Wed, 5 Mar 2025 10:06:14 +0100 [thread overview]
Message-ID: <20250305090743.16894-5-francois.dugast@intel.com> (raw)
In-Reply-To: <20250305090743.16894-1-francois.dugast@intel.com>
If the argument duration_ns is provided (not NULL), render() writes
into it the duration of the rendering execution, which is only a part
of the overall function. It can be used to observe the relative change
of rendering duration under various hardware stressing conditions.
Signed-off-by: Francois Dugast <francois.dugast@intel.com>
---
tests/intel/xe_render_copy.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/tests/intel/xe_render_copy.c b/tests/intel/xe_render_copy.c
index ffe5f7ef1..2125e0667 100644
--- a/tests/intel/xe_render_copy.c
+++ b/tests/intel/xe_render_copy.c
@@ -260,7 +260,8 @@ static const char * const testname[] = {
static int render(struct buf_ops *bops, uint32_t tiling,
uint32_t width, uint32_t height,
- enum render_copy_testtype testtype)
+ enum render_copy_testtype testtype,
+ uint64_t *duration_ns)
{
struct intel_bb *ibb;
struct intel_buf src, dst, final, grfs;
@@ -271,6 +272,7 @@ static int render(struct buf_ops *bops, uint32_t tiling,
int compression = testtype == COPY_FULL_COMPRESSED ? I915_COMPRESSION_RENDER :
I915_COMPRESSION_NONE;
bool is_compressed;
+ struct timespec tv;
struct posrc {
uint32_t x0, y0;
uint32_t x1, y1;
@@ -329,6 +331,8 @@ static int render(struct buf_ops *bops, uint32_t tiling,
render_copy = igt_get_render_copyfunc(devid);
igt_assert(render_copy);
+ if (duration_ns)
+ igt_gettime(&tv);
switch (testtype) {
case COPY_SQUARE:
case COPY_VSTRIPES:
@@ -404,6 +408,8 @@ static int render(struct buf_ops *bops, uint32_t tiling,
}
intel_bb_sync(ibb);
+ if (duration_ns)
+ *duration_ns = igt_nsec_elapsed(&tv);
intel_bb_destroy(ibb);
if (write_png) {
@@ -491,7 +497,7 @@ igt_main_args("dpiW:H:", NULL, help_str, opt_handler, NULL)
tiling_name = blt_tiling_name(tiling);
tiling = blt_tile_to_i915_tile(tiling);
igt_dynamic_f("render-%s-%ux%u", tiling_name, surfwidth, surfheight)
- render(bops, tiling, surfwidth, surfheight, id);
+ render(bops, tiling, surfwidth, surfheight, id, NULL);
}
}
}
--
2.43.0
next prev parent reply other threads:[~2025-03-05 9:08 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-05 9:06 [PATCH i-g-t 0/5] Stress copy engines during render Francois Dugast
2025-03-05 9:06 ` [PATCH i-g-t 1/5] lib/intel_blt: Promote blt_bo_copy() Francois Dugast
2025-03-19 12:41 ` Thomas Hellström
2025-03-19 19:15 ` Zbigniew Kempczyński
2025-03-05 9:06 ` [PATCH i-g-t 2/5] lib/intel_blt: Allow forcing multiple runs in blt_mem_copy() Francois Dugast
2025-03-19 12:42 ` Thomas Hellström
2025-03-05 9:06 ` [PATCH i-g-t 3/5] lib/intel_blt: Use blt_mem_copy() to stress copy functions Francois Dugast
2025-03-19 12:46 ` Thomas Hellström
2025-03-19 19:21 ` Zbigniew Kempczyński
2025-03-05 9:06 ` Francois Dugast [this message]
2025-03-19 12:48 ` [PATCH i-g-t 4/5] tests/intel/xe_render_copy: Expose render duration Thomas Hellström
2025-03-05 9:06 ` [PATCH i-g-t 5/5] tests/intel/xe_render_copy: Render under copy stress Francois Dugast
2025-03-06 4:30 ` ✓ Xe.CI.BAT: success for Stress copy engines during render (rev2) Patchwork
2025-03-06 4:47 ` ✓ i915.CI.BAT: " Patchwork
2025-03-06 7:00 ` ✗ i915.CI.Full: failure " Patchwork
2025-03-06 10:38 ` ✗ Xe.CI.Full: " Patchwork
2025-03-11 7:31 ` ✓ Xe.CI.BAT: success for Stress copy engines during render (rev3) Patchwork
2025-03-11 8:04 ` ✓ i915.CI.BAT: " Patchwork
2025-03-11 9:24 ` ✗ i915.CI.Full: failure " Patchwork
2025-03-12 1:06 ` ✗ Xe.CI.Full: " Patchwork
2025-03-12 22:53 ` ✗ Xe.CI.BAT: failure for Stress copy engines during render (rev4) Patchwork
2025-03-12 23:04 ` ✓ i915.CI.BAT: success " Patchwork
2025-03-12 23:46 ` ✓ i915.CI.Full: " Patchwork
2025-03-13 14:39 ` ✗ Xe.CI.Full: failure " Patchwork
-- strict thread matches above, loose matches on Subject: below --
2025-03-05 13:57 [PATCH i-g-t 0/5] Stress copy engines during render Francois Dugast
2025-03-05 13:57 ` [PATCH i-g-t 4/5] tests/intel/xe_render_copy: Expose render duration Francois Dugast
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=20250305090743.16894-5-francois.dugast@intel.com \
--to=francois.dugast@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