[PATCH i-g-t v2 44/66] tests/xe_exec_sip: Add breakpoint-waitsip-heavy test
Christoph Manszewski
christoph.manszewski at intel.com
Tue Jul 30 11:45:01 UTC 2024
From: Dominik Karol Piątkowski <dominik.karol.piatkowski at intel.com>
Add breakpoint-waitsip-heavy test that walks checks if we reset
after seeing the attention from heavy SIP without the debugger.
Signed-off-by: Dominik Karol Piątkowski <dominik.karol.piatkowski at intel.com>
Cc: Christoph Manszewski <christoph.manszewski at intel.com>
---
tests/intel/xe_exec_sip.c | 27 ++++++++++++++++++++++++++-
1 file changed, 26 insertions(+), 1 deletion(-)
diff --git a/tests/intel/xe_exec_sip.c b/tests/intel/xe_exec_sip.c
index 92da8f14d..a27d3cba6 100644
--- a/tests/intel/xe_exec_sip.c
+++ b/tests/intel/xe_exec_sip.c
@@ -42,6 +42,7 @@
#define SIP_WRITE 4
#define SIP_NULL 5
#define SIP_WAIT 6
+#define SIP_HEAVY 7
#define F_SUBMIT_TWICE (1 << 0)
@@ -107,6 +108,23 @@ static struct gpgpu_shader *get_sip(int fd, const int siptype,
case SIP_WRITE:
break;
case SIP_WAIT:
+ gpgpu_shader__wait(sip);
+ break;
+ case SIP_HEAVY:
+ /* Depending on the generation, the production sip
+ * executes between 145 to 157 instructions.
+ * It performs at most 45 data port writes and 5 data port reads.
+ * Make sure our heavy sip is at least twice heavy as production one.
+ */
+ gpgpu_shader__loop_begin(sip, 0);
+ gpgpu_shader__write_dword(sip, 0xdeadbeef, y_offset);
+ gpgpu_shader__write_dword(sip, SIP_CANARY, y_offset);
+ gpgpu_shader__loop_end(sip, 0, 45);
+
+ gpgpu_shader__loop_begin(sip, 1);
+ gpgpu_shader__jump_neq(sip, 1, y_offset, SIP_CANARY);
+ gpgpu_shader__loop_end(sip, 1, 10);
+
gpgpu_shader__wait(sip);
break;
}
@@ -209,7 +227,7 @@ static void check_usercoredump(int fd, int sip, int dispatched)
unsigned int before, after;
char match[256];
- if (sip != SIP_WAIT)
+ if (sip != SIP_WAIT && sip != SIP_HEAVY)
return;
/* XXX reinstate when offline coredumps are implemented */
@@ -276,6 +294,10 @@ xe_sysfs_get_job_timeout_ms(int fd, struct drm_xe_engine_class_instance *eci)
* SUBTEST: breakpoint-waitsip
* Description: Test that we reset after seeing the attention without the debugger.
*
+ * SUBTEST: breakpoint-waitsip-heavy
+ * Description:
+ * Test that we reset after seeing the attention from heavy SIP, that resembles
+ * the production one, without the debugger.
*/
static void test_sip(int shader, int sip, struct drm_xe_engine_class_instance *eci, uint32_t flags)
{
@@ -389,6 +411,9 @@ igt_main
test_render_and_compute("breakpoint-waitsip", fd, eci)
test_sip(SHADER_BREAKPOINT, SIP_WAIT, eci, 0);
+ test_render_and_compute("breakpoint-waitsip-heavy", fd, eci)
+ test_sip(SHADER_BREAKPOINT, SIP_HEAVY, eci, 0);
+
igt_fixture
xe_eudebug_enable(fd, was_enabled);
}
--
2.34.1
More information about the igt-dev
mailing list