[PATCH i-g-t] tests/intel/xe_oa: Keep OA user buffer size dynamic

Dixit, Ashutosh ashutosh.dixit at intel.com
Mon Mar 17 17:46:09 UTC 2025


On Mon, 17 Mar 2025 10:30:28 -0700, Sai Teja Pottumuttu wrote:
>
> non-zero-reason OA test has a hardcoded user buffer size for
> any kernel OA buffer. This makes the test act differently for
> different sizes. Thus make the user buffer size to be in line
> with the kernel OA buffer being allocated.
>
> Signed-off-by: Sai Teja Pottumuttu <sai.teja.pottumuttu at intel.com>
> ---
>  tests/intel/xe_oa.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tests/intel/xe_oa.c b/tests/intel/xe_oa.c
> index 9bc62c5b9..fbf4034aa 100644
> --- a/tests/intel/xe_oa.c
> +++ b/tests/intel/xe_oa.c
> @@ -2480,7 +2480,7 @@ test_non_zero_reason(const struct drm_xe_engine_class_instance *hwe, size_t oa_b
>		.num_properties = ARRAY_SIZE(properties) / 2,
>		.properties_ptr = to_user_pointer(properties),
>	};
> -	uint32_t buf_size = 3 * 65536 * report_size;
> +	uint32_t buf_size = 3 * oa_buffer_size ?: buffer_fill_size;

Shouldn't this be:

	3 * (oa_buffer_size ?: buffer_fill_size);


More information about the igt-dev mailing list