[PATCH i-g-t] tests/intel/xe_oa: Print oa_status value in the helper

Dixit, Ashutosh ashutosh.dixit at intel.com
Wed Mar 26 22:24:20 UTC 2025


On Wed, 26 Mar 2025 15:17:29 -0700, Umesh Nerlige Ramappa wrote:
>
> OA status value is useful when any bits are set. Print the value in the
> helper, so that each call to fetch the oa_status does not need to print
> the debug message explicitly.
>
> Signed-off-by: Umesh Nerlige Ramappa <umesh.nerlige.ramappa at intel.com>
> ---
>  tests/intel/xe_oa.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/tests/intel/xe_oa.c b/tests/intel/xe_oa.c
> index caf713c2a6df..0e9fa966464a 100644
> --- a/tests/intel/xe_oa.c
> +++ b/tests/intel/xe_oa.c
> @@ -383,6 +383,9 @@ static u32 get_stream_status(int fd)
>
>	do_ioctl(fd, DRM_XE_OBSERVATION_IOCTL_STATUS, &status);
>
> +	if (status.oa_status)

Maybe we should even delete this if, just print unconditionally? Can do it
while merging, no need to resend patch. In any case:

Reviewed-by: Ashutosh Dixit <ashutosh.dixit at intel.com>

> +		igt_debug("oa status %llx\n", status.oa_status);
> +
>	return status.oa_status;
>  }
>
> @@ -1337,7 +1340,6 @@ read_2_oa_reports(int format_id,
>			;
>		if (errno == EIO) {
>			oa_status = get_stream_status(stream_fd);
> -			igt_debug("oa_status %#x\n", oa_status);
>			continue;
>		}
>
> @@ -1773,7 +1775,6 @@ static void test_oa_exponents(const struct drm_xe_engine_class_instance *hwe)
>				;
>			if (errno == EIO) {
>				oa_status = get_stream_status(stream_fd);
> -				igt_debug("oa_status %#x\n", oa_status);
>				continue;
>			}
>
> @@ -2505,7 +2506,6 @@ test_non_zero_reason(const struct drm_xe_engine_class_instance *hwe, size_t oa_b
>		(len == -1 && (errno == EINTR || errno == EIO)))) {
>		if (errno == EIO) {
>			oa_status = get_stream_status(stream_fd);
> -			igt_debug("oa_status %#x\n", oa_status);
>			igt_assert(!(oa_status & DRM_XE_OASTATUS_BUFFER_OVERFLOW));
>		}
>		if (len > 0)
> --
> 2.43.0
>


More information about the igt-dev mailing list