[PATCH RFC i-g-t 0/2] helper function

Zeng, Oak oak.zeng at intel.com
Wed May 1 03:34:19 UTC 2024


@Brost, Matthew This is the improved version of the igt helpers. It has some clear concepts of creating buffer and command buffer, and command submission. With those simple concepts, we are able to write an igt test in <20 LOC, see patch 2.

We might still fine tune those helpers but roughly the concept shouldn't change much. 

Do you think we can simplify existing igt tests such as xe-exec-fault-mode using those helpers? Do you suggest us to give it a try? If not, we will just use those helpers for svm test only.

Hi Krishna, 

See comments inline

> -----Original Message-----
> From: Bommu, Krishnaiah <krishnaiah.bommu at intel.com>
> Sent: Tuesday, April 30, 2024 2:28 PM
> To: igt-dev at lists.freedesktop.org
> Cc: Bommu, Krishnaiah <krishnaiah.bommu at intel.com>; Zeng, Oak
> <oak.zeng at intel.com>; Ghimiray, Himal Prasad
> <himal.prasad.ghimiray at intel.com>
> Subject: [PATCH RFC i-g-t 0/2] helper function

The subject can be something like: Introduce helper functions for buffer creation and command submission etc

Oak

> 
> Introduce helper functions for object creation, binding, submission,
> and destruction, applicable for SVM and other tests
> 
> xe_svm test is validating the helper function introduced in 'lib/xe/xe_util:
> helper function'
> 
> In this test I haven’t included the svm functionality, next patch I will include
> svm functionality
> 
> Test results
> root at DUT7032PVCMella:/home/gta/xe/new/igt-gpu-
> tools# ./build/tests/xe_svm
> IGT-Version: 1.28-g365f81646 (x86_64) (Linux: 6.8.0-rc5-xedrmtip+ x86_64)
> Using IGT_SRANDOM=1714498247 for randomisation
> Opened device: /dev/dri/card1
> Starting subtest: svm-basic-malloc
> Subtest svm-basic-malloc: SUCCESS (0.022s)
> 
> Signed-off-by: Bommu Krishnaiah <krishnaiah.bommu at intel.com>
> Cc: Oak Zeng <oak.zeng at intel.com>
> Cc: Himal Prasad Ghimiray <himal.prasad.ghimiray at intel.com>
> 
> Bommu Krishnaiah (2):
>   lib/xe/xe_util: helper function
>   tests/intel/xe_svm: basic xe_svm test
> 
>  lib/xe/xe_util.c     | 113
> +++++++++++++++++++++++++++++++++++++++++++
>  lib/xe/xe_util.h     |  32 ++++++++++++
>  tests/intel/xe_svm.c |  99 +++++++++++++++++++++++++++++++++++++
>  tests/meson.build    |   1 +
>  4 files changed, 245 insertions(+)
>  create mode 100644 tests/intel/xe_svm.c
> 
> --
> 2.25.1



More information about the igt-dev mailing list