[PATCH i-g-t v2 1/1] tests/intel/xe_oa: Extend non-zero-reason test
Pottumuttu, Sai Teja
sai.teja.pottumuttu at intel.com
Tue Jan 21 14:22:58 UTC 2025
On 17-01-2025 06:28, Dixit, Ashutosh wrote:
> On Thu, 16 Jan 2025 05:54:56 -0800, Sai Teja Pottumuttu wrote:
>>
>
> Hi Sai Teja,
>
>> Extend non-zero-reason test to use configurable OA buffer sizes and
>> execute the test for three different sizes 8,16 and 32MB.
>
> I made a few changes to the patch and posted a v2. Please take a look. I
> have tested these changes, so no need to test again.
Hello Ashutosh,
Thanks for the changes. As discussed, I have posted a v3 with the changes.
Link: https://patchwork.freedesktop.org/series/142128/#rev3
>
> A single patch generally doesn't need a cover letter.
I just thought that it would be good to have all these patch variants
grouped together, so had the cover letter.
>
> I am seeing consistent failures with 32 MB OA buffer size (reason seems to
> 0 somehow) on Xe1. Did you see these failures on Xe2? So I think we should
> drop the 32 MB size test.
Yeah, looks like there is a consistent failure for 32MB size especially
with Xe1 integrated platforms, we will look into this.
I didn't see any failures with Xe2 though.
>
> Rest looks good and I have R-b'd the v2. If you like my changes you can R-b
> v2 too :-)
I didn't retain the R-b on my v3 as there were changes, it would be
great if you can take a look and R-b again
Thank You,
Sai Teja
>
> Thanks.
> --
> Ashutosh
>
>
>>
>> Signed-off-by: Sai Teja Pottumuttu <sai.teja.pottumuttu at intel.com>
>> ---
>> tests/intel/xe_oa.c | 30 +++++++++++++++++++++++++++---
>> 1 file changed, 27 insertions(+), 3 deletions(-)
>>
>> diff --git a/tests/intel/xe_oa.c b/tests/intel/xe_oa.c
>> index 492a6b5d6..f28156a66 100644
>> --- a/tests/intel/xe_oa.c
>> +++ b/tests/intel/xe_oa.c
>> @@ -2504,7 +2504,7 @@ again_1:
>> * Description: Test reason field is non-zero. Can also check OA buffer wraparound issues
>> */
>> static void
>> -test_non_zero_reason(const struct drm_xe_engine_class_instance *hwe)
>> +test_non_zero_reason(const struct drm_xe_engine_class_instance *hwe, size_t oa_buffer_size)
>> {
>> /* ~20 micro second period */
>> int oa_exponent = max_oa_exponent_for_period_lte(20000);
>> @@ -2522,6 +2522,7 @@ test_non_zero_reason(const struct drm_xe_engine_class_instance *hwe)
>> DRM_XE_OA_PROPERTY_OA_FORMAT, __ff(fmt),
>> DRM_XE_OA_PROPERTY_OA_PERIOD_EXPONENT, oa_exponent,
>> DRM_XE_OA_PROPERTY_OA_ENGINE_INSTANCE, hwe->engine_instance,
>> + DRM_XE_OA_PROPERTY_OA_BUFFER_SIZE, oa_buffer_size,
>> };
>> struct intel_xe_oa_open_prop param = {
>> .num_properties = ARRAY_SIZE(properties) / 2,
>> @@ -2541,6 +2542,9 @@ test_non_zero_reason(const struct drm_xe_engine_class_instance *hwe)
>> 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);
>>
>> @@ -4867,8 +4871,28 @@ igt_main
>> test_buffer_fill(hwe);
>>
>> igt_subtest_with_dynamic("non-zero-reason") {
>> - __for_one_hwe_in_oag(hwe)
>> - test_non_zero_reason(hwe);
>> + struct drm_xe_query_oa_units *qoa = xe_oa_units(drm_fd);
>> + struct drm_xe_oa_unit *oau = (struct drm_xe_oa_unit *)&qoa->oa_units[0];
>> +
>> + if (oau->capabilities & DRM_XE_OA_CAPS_OA_BUFFER_SIZE) {
>> + hwe = oa_unit_engine(drm_fd, 0);
>> + if (hwe) {
>> + igt_dynamic_f("%s-%d-%s", xe_engine_class_name(hwe->engine_class),
>> + hwe->engine_instance, "8MB")
>> + test_non_zero_reason(hwe, SZ_8M);
>> +
>> + igt_dynamic_f("%s-%d-%s", xe_engine_class_name(hwe->engine_class),
>> + hwe->engine_instance, "16MB")
>> + test_non_zero_reason(hwe, SZ_16M);
>> +
>> + igt_dynamic_f("%s-%d-%s", xe_engine_class_name(hwe->engine_class),
>> + hwe->engine_instance, "32MB")
>> + test_non_zero_reason(hwe, SZ_32M);
>> + }
>> + } else {
>> + __for_one_hwe_in_oag(hwe)
>> + test_non_zero_reason(hwe, 0);
>> + }
>> }
>>
>> igt_subtest("disabled-read-error")
>> --
>> 2.34.1
>>
More information about the igt-dev
mailing list