[PATCH i-g-t] tests/intel/xe_drm_fdinfo: Add test to check for active contexts
Umesh Nerlige Ramappa
umesh.nerlige.ramappa at intel.com
Tue May 20 20:23:44 UTC 2025
Hi Lucas,
Any thoughts on naming this test.
Thanks,
Umesh
On Fri, May 16, 2025 at 10:49:37AM +0530, Riana Tauro wrote:
>Hi Umesh
>
>On 4/26/2025 12:51 AM, Umesh Nerlige Ramappa wrote:
>>Add a test to check if fdinfo returns the correct ticks when querying
>>utilization for a context that is currently active on the engine.
>>
>>Signed-off-by: Umesh Nerlige Ramappa <umesh.nerlige.ramappa at intel.com>
>>---
>> tests/intel/xe_drm_fdinfo.c | 12 ++++++++++++
>> 1 file changed, 12 insertions(+)
>>
>>diff --git a/tests/intel/xe_drm_fdinfo.c b/tests/intel/xe_drm_fdinfo.c
>>index 9a8811b4cd2f..73346ee9b1da 100644
>>--- a/tests/intel/xe_drm_fdinfo.c
>>+++ b/tests/intel/xe_drm_fdinfo.c
>>@@ -48,6 +48,9 @@
>> * SUBTEST: utilization-single-full-load
>> * Description: Check that each engine shows full load
>> *
>>+ * SUBTEST: utilization-single-active-full-load
>>+ * Description: Check that each engine shows full load when active
>>+ *
>> * SUBTEST: utilization-single-full-load-isolation
>> * Description: Check that each engine load does not spill over to other drm clients
>> *
>>@@ -456,6 +459,9 @@ utilization_single(int fd, struct drm_xe_engine_class_instance *hwe, unsigned in
>> if (flags & TEST_ISOLATION)
>> read_engine_cycles(new_fd, pceu2[1]);
>>+ if (cork && !cork->ended)
>>+ xe_cork_sync_end(fd, cork);
>>+
>> expected_load = flags & TEST_BUSY ?
>> EXPECTED_LOAD_FULL : EXPECTED_LOAD_IDLE;
>>@@ -769,6 +775,12 @@ igt_main
>> utilization_single(xe, hwe, 0);
>> }
>>+ igt_subtest("utilization-single-active-full-load") {
>>+ require_engine_utilization_data(xe);
>>+ xe_for_each_engine(xe, hwe)
>>+ utilization_single(xe, hwe, TEST_BUSY);
>>+ }
>>+
>the trailing test can be renamed to load-idle and this to full load
>
>Test looks good to me
>
>Reviewed-by: Riana Tauro <riana.tauro at intel.com>
>
>> igt_subtest("utilization-single-full-load") {
>> require_engine_utilization_data(xe);
>> xe_for_each_engine(xe, hwe)
More information about the igt-dev
mailing list