diff options
| author | Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com> | 2026-07-17 14:00:31 -0700 |
|---|---|---|
| committer | Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com> | 2026-08-04 13:00:33 -0700 |
| commit | e76f33f222f247190440db67f5c40bbba7485541 (patch) | |
| tree | b7ccb83053de78c4ef82abb49d3180c59d59dc69 | |
| parent | 03bf8a85ba39bc624447303d987667da3835caaa (diff) | |
tests/intel/xe_oa: Enable capture just prior to reading OA data
When running the test in a loop, sometimes the buffer overflow error was
seen with smaller buffer sizes. To make the non-zero-reason test more
robust, enable capture just before reading the data and surround the read with
the load helper calls.
Signed-off-by: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com>
Reviewed-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
| -rw-r--r-- | tests/intel/xe_oa.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/tests/intel/xe_oa.c b/tests/intel/xe_oa.c index 98f00d377..4f652b187 100644 --- a/tests/intel/xe_oa.c +++ b/tests/intel/xe_oa.c @@ -2678,6 +2678,7 @@ test_non_zero_reason(const struct drm_xe_oa_unit *oau, size_t oa_buffer_size) DRM_XE_OA_PROPERTY_OA_METRIC_SET, test_set->perf_oa_metrics_set, DRM_XE_OA_PROPERTY_OA_FORMAT, __ff(fmt), DRM_XE_OA_PROPERTY_OA_PERIOD_EXPONENT, oa_exponent, + DRM_XE_OA_PROPERTY_OA_DISABLED, true, DRM_XE_OA_PROPERTY_OA_BUFFER_SIZE, oa_buffer_size ?: buffer_fill_size }; struct intel_xe_oa_open_prop param = { @@ -2705,16 +2706,16 @@ test_non_zero_reason(const struct drm_xe_oa_unit *oau, size_t oa_buffer_size) igt_assert(buf); igt_debug("Ready to read about %u bytes\n", buf_size); - - load_helper_init(); - load_helper_run(HIGH); - if (!oa_buffer_size) param.num_properties = param.num_properties - 1; stream_fd = __perf_open(drm_fd, ¶m, true /* prevent_pm */); set_fd_flags(stream_fd, O_CLOEXEC); + load_helper_init(); + load_helper_run(HIGH); + + do_ioctl(stream_fd, DRM_XE_OBSERVATION_IOCTL_ENABLE, 0); while (total_len < buf_size && ((len = read(stream_fd, &buf[total_len], buf_size - total_len)) > 0 || (len == -1 && (errno == EINTR || errno == EIO)))) { |
