[PATCH i-g-t v2 43/66] tests/xe_exec_sip: Add sanity-after-timeout test
Piatkowski, Dominik Karol
dominik.karol.piatkowski at intel.com
Thu Aug 1 07:08:14 UTC 2024
Reviewed-by: Dominik Karol Piątkowski <dominik.karol.piatkowski at intel.com>
> -----Original Message-----
> From: Manszewski, Christoph <christoph.manszewski at intel.com>
> Sent: Tuesday, July 30, 2024 1:45 PM
> To: igt-dev at lists.freedesktop.org
> Cc: Kempczynski, Zbigniew <zbigniew.kempczynski at intel.com>; Kamil
> Konieczny <kamil.konieczny at linux.intel.com>; Grzegorzek, Dominik
> <dominik.grzegorzek at intel.com>; Patelczyk, Maciej
> <maciej.patelczyk at intel.com>; Piatkowski, Dominik Karol
> <dominik.karol.piatkowski at intel.com>; Sikora, Pawel
> <pawel.sikora at intel.com>; Hajda, Andrzej <andrzej.hajda at intel.com>;
> Kolanupaka Naveena <kolanupaka.naveena at intel.com>; Kuoppala, Mika
> <mika.kuoppala at intel.com>; Mun, Gwan-gyeong <gwan-
> gyeong.mun at intel.com>
> Subject: [PATCH i-g-t v2 43/66] tests/xe_exec_sip: Add sanity-after-timeout
> test
>
> From: Karolina Stolarek <karolina.stolarek at intel.com>
>
> Introduce sanity-after-timeout test to check if the shader gets executed after a
> hang.
>
> Signed-off-by: Karolina Stolarek <karolina.stolarek at intel.com>
> Cc: Christoph Manszewski <christoph.manszewski at intel.com>
> Cc: Dominik Karol Piątkowski <dominik.karol.piatkowski at intel.com>
> ---
> tests/intel/xe_exec_sip.c | 24 +++++++++++++++++++++---
> 1 file changed, 21 insertions(+), 3 deletions(-)
>
> diff --git a/tests/intel/xe_exec_sip.c b/tests/intel/xe_exec_sip.c index
> 7b4305576..92da8f14d 100644
> --- a/tests/intel/xe_exec_sip.c
> +++ b/tests/intel/xe_exec_sip.c
> @@ -38,9 +38,10 @@
> #define SHADER_BREAKPOINT 0
> #define SHADER_WRITE 1
> #define SHADER_WAIT 2
> -#define SIP_WRITE 3
> -#define SIP_NULL 4
> -#define SIP_WAIT 5
> +#define SHADER_HANG 3
> +#define SIP_WRITE 4
> +#define SIP_NULL 5
> +#define SIP_WAIT 6
>
> #define F_SUBMIT_TWICE (1 << 0)
>
> @@ -71,6 +72,11 @@ static struct gpgpu_shader *get_shader(int fd, const
> int shadertype)
> gpgpu_shader__write_dword(shader, SHADER_CANARY, 0);
>
> switch (shadertype) {
> + case SHADER_HANG:
> + gpgpu_shader__label(shader, 0);
> + gpgpu_shader__nop(shader);
> + gpgpu_shader__jump(shader, 0);
> + break;
> case SHADER_WAIT:
> gpgpu_shader__wait(shader);
> break;
> @@ -255,6 +261,9 @@ xe_sysfs_get_job_timeout_ms(int fd, struct
> drm_xe_engine_class_instance *eci)
> * Description: check basic shader with write operation
> * Run type: BAT
> *
> + * SUBTEST: sanity-after-timeout
> + * Description: check basic shader execution after job timeout
> + *
> * SUBTEST: wait-writesip-nodebug
> * Description: verify that we don't enter SIP after wait with debugging
> disabled.
> *
> @@ -342,6 +351,15 @@ igt_main
> test_render_and_compute("sanity", fd, eci)
> test_sip(SHADER_WRITE, SIP_NULL, eci, 0);
>
> + test_render_and_compute("sanity-after-timeout", fd, eci) {
> + test_sip(SHADER_HANG, SIP_NULL, eci, 0);
> +
> + xe_for_each_engine(fd, eci)
> + if (eci->engine_class ==
> DRM_XE_ENGINE_CLASS_RENDER ||
> + eci->engine_class ==
> DRM_XE_ENGINE_CLASS_COMPUTE)
> + test_sip(SHADER_WRITE, SIP_NULL, eci, 0);
> + }
> +
> /* Debugger disabled (TD_CTL not set) */
> igt_subtest_group {
> igt_fixture {
> --
> 2.34.1
More information about the igt-dev
mailing list