[PATCH i-g-t] tests/kms_cursor_legacy: Change child sched priority cursor-vs-flip

Vidya Srinivas vidya.srinivas at intel.com
Fri Dec 15 12:03:44 UTC 2023


From: vsrini4 <vidya.srinivas at intel.com>

Current test causes chromebook to crash/reboot during test execution.
Change child sched priority to fix the issue

Signed-off-by: Vidya Srinivas <vidya.srinivas at intel.com>
---
 tests/kms_cursor_legacy.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/tests/kms_cursor_legacy.c b/tests/kms_cursor_legacy.c
index 0017659d4..dc645e0ba 100644
--- a/tests/kms_cursor_legacy.c
+++ b/tests/kms_cursor_legacy.c
@@ -1384,6 +1384,14 @@ static void cursor_vs_flip(igt_display_t *display, enum flip_test mode, int nloo
 		shared[0] = 0;
 		igt_fork(child, 1) {
 			unsigned long count = 0;
+			struct sched_param parm = { .sched_priority = 1 };
+			cpu_set_t allowed;
+
+			sched_setscheduler(getpid(), SCHED_RR, &parm);
+			CPU_ZERO(&allowed);
+			CPU_SET(child, &allowed);
+			sched_setaffinity(getpid(), sizeof(cpu_set_t), &allowed);
+
 			while (!shared[0]) {
 				do_ioctl(display->drm_fd, DRM_IOCTL_MODE_CURSOR, &arg[i & 1]);
 				count++;
-- 
2.33.0



More information about the Intel-gfx-trybot mailing list