Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Pottumuttu, Sai Teja" <sai.teja.pottumuttu@intel.com>
To: "Dixit, Ashutosh" <ashutosh.dixit@intel.com>
Cc: <igt-dev@lists.freedesktop.org>
Subject: Re: [PATCH i-g-t v2 1/1] tests/intel/xe_oa: Extend non-zero-reason test
Date: Tue, 21 Jan 2025 19:52:58 +0530	[thread overview]
Message-ID: <105dcb0e-95bc-45b4-907e-150a00c30dab@intel.com> (raw)
In-Reply-To: <85o706dzns.wl-ashutosh.dixit@intel.com>

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@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, &param, 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
>>

  parent reply	other threads:[~2025-01-21 14:23 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-16 13:54 [PATCH i-g-t v2 0/1] Add test for configurable OA buffer size Sai Teja Pottumuttu
2025-01-16 13:54 ` [PATCH i-g-t v2 1/1] tests/intel/xe_oa: Extend non-zero-reason test Sai Teja Pottumuttu
2025-01-17  0:58   ` Dixit, Ashutosh
2025-01-17  1:00     ` Dixit, Ashutosh
2025-01-21 14:22     ` Pottumuttu, Sai Teja [this message]
2025-01-17  4:00 ` ✓ Xe.CI.BAT: success for Add test for configurable OA buffer size (rev2) Patchwork
2025-01-17  4:01 ` ✓ i915.CI.BAT: " Patchwork
2025-01-17  8:18 ` ✗ Xe.CI.Full: failure " Patchwork
2025-01-18  1:43 ` ✗ i915.CI.Full: " Patchwork

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=105dcb0e-95bc-45b4-907e-150a00c30dab@intel.com \
    --to=sai.teja.pottumuttu@intel.com \
    --cc=ashutosh.dixit@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