* [igt-dev] [PATCH i-g-t] kms_busy: Use igt_waitchildren_timeout()
@ 2019-03-30 23:50 Chris Wilson
2019-03-30 23:54 ` Chris Wilson
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Chris Wilson @ 2019-03-30 23:50 UTC (permalink / raw)
To: intel-gfx; +Cc: igt-dev
Replace the convoluted raising of SIGALRM from the child with an
interruptible sleep in the parent with the equivalent and far more
natural igt_waitchildren_timeout().
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=103182
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
tests/kms_busy.c | 19 ++-----------------
1 file changed, 2 insertions(+), 17 deletions(-)
diff --git a/tests/kms_busy.c b/tests/kms_busy.c
index ed3caae4c..329961b2c 100644
--- a/tests/kms_busy.c
+++ b/tests/kms_busy.c
@@ -114,24 +114,13 @@ static void flip_to_fb(igt_display_t *dpy, int pipe,
DRM_MODE_ATOMIC_ALLOW_MODESET, NULL);
}
- kill(getppid(), SIGALRM);
- igt_assert(gem_bo_busy(dpy->drm_fd, fb->gem_handle));
igt_assert_f(poll(&pfd, 1, modeset ? 8500 : TIMEOUT) == 0,
"flip completed whilst %s was busy [%d]\n",
name, gem_bo_busy(dpy->drm_fd, fb->gem_handle));
+ igt_assert(gem_bo_busy(dpy->drm_fd, fb->gem_handle));
}
- igt_assert_f(nanosleep(&tv, NULL) == -1,
- "flip to %s blocked waiting for busy fb", name);
-
- igt_waitchildren();
-
- if (!modeset) {
- tv.tv_sec = 0;
- tv.tv_nsec = (2 * TIMEOUT) * 1000000ULL;
- nanosleep(&tv, NULL);
- }
-
+ igt_waitchildren_timeout(5, "flip blocked waiting for busy bo\n");
igt_spin_batch_end(t);
igt_assert(read(dpy->drm_fd, &ev, sizeof(ev)) == sizeof(ev));
@@ -160,8 +149,6 @@ static void test_flip(igt_display_t *dpy, unsigned ring, int pipe, bool modeset)
if (modeset)
igt_require(dpy->is_atomic);
- signal(SIGALRM, sighandler);
-
output = set_fb_on_crtc(dpy, pipe, &fb[0]);
igt_display_commit2(dpy, COMMIT_LEGACY);
@@ -194,8 +181,6 @@ static void test_flip(igt_display_t *dpy, unsigned ring, int pipe, bool modeset)
do_cleanup_display(dpy);
igt_remove_fb(dpy->drm_fd, &fb[1]);
igt_remove_fb(dpy->drm_fd, &fb[0]);
-
- signal(SIGALRM, SIG_DFL);
}
static void test_atomic_commit_hang(igt_display_t *dpy, igt_plane_t *primary,
--
2.20.1
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [igt-dev] [PATCH i-g-t] kms_busy: Use igt_waitchildren_timeout()
2019-03-30 23:50 [igt-dev] [PATCH i-g-t] kms_busy: Use igt_waitchildren_timeout() Chris Wilson
@ 2019-03-30 23:54 ` Chris Wilson
2019-04-01 7:32 ` [igt-dev] [Intel-gfx] " Daniel Vetter
2019-03-31 1:02 ` [igt-dev] ✓ Fi.CI.BAT: success for kms_busy: Use igt_waitchildren_timeout() (rev2) Patchwork
2019-03-31 2:03 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2 siblings, 1 reply; 6+ messages in thread
From: Chris Wilson @ 2019-03-30 23:54 UTC (permalink / raw)
To: intel-gfx; +Cc: igt-dev
Replace the convoluted raising of SIGALRM from the child with an
interruptible sleep in the parent with the equivalent and far more
natural igt_waitchildren_timeout().
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=103182
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
tests/kms_busy.c | 31 +++++--------------------------
1 file changed, 5 insertions(+), 26 deletions(-)
diff --git a/tests/kms_busy.c b/tests/kms_busy.c
index ed3caae4c..321db8207 100644
--- a/tests/kms_busy.c
+++ b/tests/kms_busy.c
@@ -29,9 +29,6 @@
IGT_TEST_DESCRIPTION("Basic check of KMS ABI with busy framebuffers.");
-#define FRAME_TIME 16 /* milleseconds */
-#define TIMEOUT (6*16)
-
static igt_output_t *
set_fb_on_crtc(igt_display_t *dpy, int pipe, struct igt_fb *fb)
{
@@ -70,17 +67,13 @@ static void do_cleanup_display(igt_display_t *dpy)
igt_display_commit2(dpy, dpy->is_atomic ? COMMIT_ATOMIC : COMMIT_LEGACY);
}
-static void sighandler(int sig)
-{
-}
-
static void flip_to_fb(igt_display_t *dpy, int pipe,
igt_output_t *output,
struct igt_fb *fb, unsigned ring,
const char *name, bool modeset)
{
struct pollfd pfd = { .fd = dpy->drm_fd, .events = POLLIN };
- struct timespec tv = { 1, 0 };
+ const int timeout = modeset ? 8500 : 100;
struct drm_event_vblank ev;
igt_spin_t *t = igt_spin_batch_new(dpy->drm_fd,
@@ -114,24 +107,14 @@ static void flip_to_fb(igt_display_t *dpy, int pipe,
DRM_MODE_ATOMIC_ALLOW_MODESET, NULL);
}
- kill(getppid(), SIGALRM);
- igt_assert(gem_bo_busy(dpy->drm_fd, fb->gem_handle));
- igt_assert_f(poll(&pfd, 1, modeset ? 8500 : TIMEOUT) == 0,
+ igt_assert_f(poll(&pfd, 1, timeout) == 0,
"flip completed whilst %s was busy [%d]\n",
name, gem_bo_busy(dpy->drm_fd, fb->gem_handle));
+ igt_assert(gem_bo_busy(dpy->drm_fd, fb->gem_handle));
}
- igt_assert_f(nanosleep(&tv, NULL) == -1,
- "flip to %s blocked waiting for busy fb", name);
-
- igt_waitchildren();
-
- if (!modeset) {
- tv.tv_sec = 0;
- tv.tv_nsec = (2 * TIMEOUT) * 1000000ULL;
- nanosleep(&tv, NULL);
- }
-
+ igt_waitchildren_timeout(5 * timeout,
+ "flip blocked waiting for busy bo\n");
igt_spin_batch_end(t);
igt_assert(read(dpy->drm_fd, &ev, sizeof(ev)) == sizeof(ev));
@@ -160,8 +143,6 @@ static void test_flip(igt_display_t *dpy, unsigned ring, int pipe, bool modeset)
if (modeset)
igt_require(dpy->is_atomic);
- signal(SIGALRM, sighandler);
-
output = set_fb_on_crtc(dpy, pipe, &fb[0]);
igt_display_commit2(dpy, COMMIT_LEGACY);
@@ -194,8 +175,6 @@ static void test_flip(igt_display_t *dpy, unsigned ring, int pipe, bool modeset)
do_cleanup_display(dpy);
igt_remove_fb(dpy->drm_fd, &fb[1]);
igt_remove_fb(dpy->drm_fd, &fb[0]);
-
- signal(SIGALRM, SIG_DFL);
}
static void test_atomic_commit_hang(igt_display_t *dpy, igt_plane_t *primary,
--
2.20.1
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [igt-dev] ✓ Fi.CI.BAT: success for kms_busy: Use igt_waitchildren_timeout() (rev2)
2019-03-30 23:50 [igt-dev] [PATCH i-g-t] kms_busy: Use igt_waitchildren_timeout() Chris Wilson
2019-03-30 23:54 ` Chris Wilson
@ 2019-03-31 1:02 ` Patchwork
2019-03-31 2:03 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2 siblings, 0 replies; 6+ messages in thread
From: Patchwork @ 2019-03-31 1:02 UTC (permalink / raw)
To: Chris Wilson; +Cc: igt-dev
== Series Details ==
Series: kms_busy: Use igt_waitchildren_timeout() (rev2)
URL : https://patchwork.freedesktop.org/series/58779/
State : success
== Summary ==
CI Bug Log - changes from CI_DRM_5844 -> IGTPW_2743
====================================================
Summary
-------
**SUCCESS**
No regressions found.
External URL: https://patchwork.freedesktop.org/api/1.0/series/58779/revisions/2/mbox/
Known issues
------------
Here are the changes found in IGTPW_2743 that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@gem_exec_basic@basic-vebox:
- fi-ivb-3770: NOTRUN -> SKIP [fdo#109271] +48
* igt@i915_selftest@live_contexts:
- fi-bdw-gvtdvm: PASS -> DMESG-FAIL [fdo#110235 ]
* igt@i915_selftest@live_uncore:
- fi-ivb-3770: NOTRUN -> DMESG-FAIL [fdo#110210]
* igt@kms_frontbuffer_tracking@basic:
- fi-byt-clapper: PASS -> FAIL [fdo#103167]
* igt@kms_pipe_crc_basic@nonblocking-crc-pipe-b-frame-sequence:
- fi-byt-clapper: PASS -> FAIL [fdo#103191] / [fdo#107362]
* igt@kms_pipe_crc_basic@read-crc-pipe-b:
- fi-byt-clapper: PASS -> FAIL [fdo#107362]
* igt@kms_psr@primary_mmap_gtt:
- fi-blb-e6850: NOTRUN -> SKIP [fdo#109271] +27
#### Possible fixes ####
* igt@kms_busy@basic-flip-b:
- fi-gdg-551: FAIL [fdo#103182] -> PASS
* igt@kms_frontbuffer_tracking@basic:
- fi-icl-u3: FAIL [fdo#103167] -> PASS
* igt@kms_pipe_crc_basic@read-crc-pipe-a-frame-sequence:
- fi-byt-clapper: FAIL [fdo#103191] / [fdo#107362] -> PASS
* igt@kms_pipe_crc_basic@suspend-read-crc-pipe-b:
- fi-blb-e6850: INCOMPLETE [fdo#107718] -> PASS
* igt@prime_vgem@basic-fence-flip:
- fi-gdg-551: DMESG-FAIL [fdo#103182] -> PASS
#### Warnings ####
* igt@kms_chamelium@common-hpd-after-suspend:
- fi-kbl-7567u: DMESG-FAIL [fdo#105079] -> DMESG-WARN [fdo#103558] / [fdo#105079] / [fdo#105602]
[fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167
[fdo#103182]: https://bugs.freedesktop.org/show_bug.cgi?id=103182
[fdo#103191]: https://bugs.freedesktop.org/show_bug.cgi?id=103191
[fdo#103558]: https://bugs.freedesktop.org/show_bug.cgi?id=103558
[fdo#105079]: https://bugs.freedesktop.org/show_bug.cgi?id=105079
[fdo#105602]: https://bugs.freedesktop.org/show_bug.cgi?id=105602
[fdo#107362]: https://bugs.freedesktop.org/show_bug.cgi?id=107362
[fdo#107718]: https://bugs.freedesktop.org/show_bug.cgi?id=107718
[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[fdo#110210]: https://bugs.freedesktop.org/show_bug.cgi?id=110210
[fdo#110235 ]: https://bugs.freedesktop.org/show_bug.cgi?id=110235
Participating hosts (47 -> 42)
------------------------------
Additional (1): fi-ivb-3770
Missing (6): fi-kbl-soraka fi-ilk-m540 fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-bdw-samus
Build changes
-------------
* IGT: IGT_4914 -> IGTPW_2743
CI_DRM_5844: 18be13866b3b97316fd2cba143e47ec8a3950b47 @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_2743: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2743/
IGT_4914: b93309b7823dcbbd2c52adb4ebb98e3cb060f910 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2743/
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
^ permalink raw reply [flat|nested] 6+ messages in thread
* [igt-dev] ✓ Fi.CI.IGT: success for kms_busy: Use igt_waitchildren_timeout() (rev2)
2019-03-30 23:50 [igt-dev] [PATCH i-g-t] kms_busy: Use igt_waitchildren_timeout() Chris Wilson
2019-03-30 23:54 ` Chris Wilson
2019-03-31 1:02 ` [igt-dev] ✓ Fi.CI.BAT: success for kms_busy: Use igt_waitchildren_timeout() (rev2) Patchwork
@ 2019-03-31 2:03 ` Patchwork
2 siblings, 0 replies; 6+ messages in thread
From: Patchwork @ 2019-03-31 2:03 UTC (permalink / raw)
To: Chris Wilson; +Cc: igt-dev
== Series Details ==
Series: kms_busy: Use igt_waitchildren_timeout() (rev2)
URL : https://patchwork.freedesktop.org/series/58779/
State : success
== Summary ==
CI Bug Log - changes from CI_DRM_5844_full -> IGTPW_2743_full
====================================================
Summary
-------
**SUCCESS**
No regressions found.
External URL: https://patchwork.freedesktop.org/api/1.0/series/58779/revisions/2/mbox/
Possible new issues
-------------------
Here are the unknown changes that may have been introduced in IGTPW_2743_full:
### IGT changes ###
#### Suppressed ####
The following results come from untrusted machines, tests, or statuses.
They do not affect the overall result.
* {igt@kms_plane@pixel-format-pipe-b-planes-source-clamping}:
- shard-hsw: NOTRUN -> FAIL
Known issues
------------
Here are the changes found in IGTPW_2743_full that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@gem_exec_schedule@deep-bsd:
- shard-snb: NOTRUN -> SKIP [fdo#109271] +220
* igt@gem_tiled_swapping@non-threaded:
- shard-glk: PASS -> SKIP [fdo#109271]
- shard-kbl: PASS -> SKIP [fdo#109271] +1
- shard-apl: PASS -> SKIP [fdo#109271]
* igt@i915_pm_rc6_residency@rc6-accuracy:
- shard-snb: PASS -> SKIP [fdo#109271]
* igt@kms_atomic_transition@plane-toggle-modeset-transition:
- shard-apl: PASS -> INCOMPLETE [fdo#103927]
* igt@kms_busy@extended-modeset-hang-newfb-render-a:
- shard-hsw: PASS -> DMESG-WARN [fdo#110222] +1
* igt@kms_busy@extended-modeset-hang-newfb-render-b:
- shard-snb: NOTRUN -> DMESG-WARN [fdo#110222] +1
* igt@kms_busy@extended-modeset-hang-newfb-with-reset-render-b:
- shard-kbl: PASS -> DMESG-WARN [fdo#110222] +1
- shard-snb: PASS -> DMESG-WARN [fdo#110222]
* igt@kms_busy@extended-pageflip-modeset-hang-oldfb-render-b:
- shard-glk: NOTRUN -> DMESG-WARN [fdo#110222]
* igt@kms_ccs@pipe-c-bad-pixel-format:
- shard-glk: NOTRUN -> SKIP [fdo#109271] +16
* igt@kms_chamelium@hdmi-edid-change-during-suspend:
- shard-apl: NOTRUN -> SKIP [fdo#109271] +3
* igt@kms_cursor_crc@cursor-256x256-sliding:
- shard-glk: NOTRUN -> FAIL [fdo#103232]
* igt@kms_cursor_crc@cursor-64x64-suspend:
- shard-kbl: PASS -> DMESG-WARN [fdo#108566]
* igt@kms_cursor_legacy@2x-long-flip-vs-cursor-legacy:
- shard-glk: PASS -> FAIL [fdo#104873]
* igt@kms_flip@flip-vs-expired-vblank-interruptible:
- shard-apl: PASS -> FAIL [fdo#102887] / [fdo#105363]
* igt@kms_flip@flip-vs-suspend-interruptible:
- shard-hsw: PASS -> INCOMPLETE [fdo#103540]
* igt@kms_frontbuffer_tracking@fbcpsr-2p-scndscrn-pri-shrfb-draw-render:
- shard-kbl: NOTRUN -> SKIP [fdo#109271] +4
* igt@kms_pipe_crc_basic@suspend-read-crc-pipe-f:
- shard-glk: NOTRUN -> SKIP [fdo#109271] / [fdo#109278]
* igt@kms_plane_alpha_blend@pipe-a-alpha-7efc:
- shard-hsw: NOTRUN -> SKIP [fdo#109271] / [fdo#109278]
* igt@kms_plane_alpha_blend@pipe-c-alpha-opaque-fb:
- shard-snb: NOTRUN -> SKIP [fdo#109271] / [fdo#109278] +22
* igt@kms_plane_scaling@pipe-c-scaler-with-rotation:
- shard-glk: PASS -> SKIP [fdo#109271] / [fdo#109278]
* igt@kms_setmode@basic:
- shard-glk: NOTRUN -> FAIL [fdo#99912]
- shard-kbl: NOTRUN -> FAIL [fdo#99912]
* igt@perf_pmu@semaphore-wait-idle-vcs0:
- shard-hsw: NOTRUN -> SKIP [fdo#109271] +24
#### Possible fixes ####
* igt@gem_create@create-clear:
- shard-snb: INCOMPLETE [fdo#105411] -> PASS
* igt@kms_busy@extended-modeset-hang-newfb-render-b:
- shard-hsw: DMESG-WARN [fdo#110222] -> PASS
* igt@kms_busy@extended-modeset-hang-newfb-with-reset-render-a:
- shard-kbl: DMESG-WARN [fdo#110222] -> PASS
* igt@kms_cursor_crc@cursor-256x85-sliding:
- shard-kbl: FAIL [fdo#103232] -> PASS
- shard-apl: FAIL [fdo#103232] -> PASS
* igt@kms_plane@plane-panning-bottom-right-suspend-pipe-c-planes:
- shard-apl: DMESG-WARN [fdo#108566] -> PASS +1
* igt@kms_plane_alpha_blend@pipe-a-alpha-opaque-fb:
- shard-glk: FAIL [fdo#108145] -> PASS
* igt@kms_vblank@pipe-b-ts-continuation-dpms-rpm:
- shard-apl: FAIL [fdo#104894] -> PASS
* igt@kms_vblank@pipe-b-ts-continuation-modeset-rpm:
- shard-kbl: FAIL [fdo#104894] -> PASS
{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).
[fdo#102887]: https://bugs.freedesktop.org/show_bug.cgi?id=102887
[fdo#103232]: https://bugs.freedesktop.org/show_bug.cgi?id=103232
[fdo#103540]: https://bugs.freedesktop.org/show_bug.cgi?id=103540
[fdo#103927]: https://bugs.freedesktop.org/show_bug.cgi?id=103927
[fdo#104873]: https://bugs.freedesktop.org/show_bug.cgi?id=104873
[fdo#104894]: https://bugs.freedesktop.org/show_bug.cgi?id=104894
[fdo#105363]: https://bugs.freedesktop.org/show_bug.cgi?id=105363
[fdo#105411]: https://bugs.freedesktop.org/show_bug.cgi?id=105411
[fdo#108145]: https://bugs.freedesktop.org/show_bug.cgi?id=108145
[fdo#108566]: https://bugs.freedesktop.org/show_bug.cgi?id=108566
[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[fdo#109278]: https://bugs.freedesktop.org/show_bug.cgi?id=109278
[fdo#110222]: https://bugs.freedesktop.org/show_bug.cgi?id=110222
[fdo#110278]: https://bugs.freedesktop.org/show_bug.cgi?id=110278
[fdo#99912]: https://bugs.freedesktop.org/show_bug.cgi?id=99912
Participating hosts (10 -> 5)
------------------------------
Missing (5): shard-skl pig-hsw-4770r pig-glk-j5005 shard-iclb pig-skl-6260u
Build changes
-------------
* IGT: IGT_4914 -> IGTPW_2743
* Piglit: piglit_4509 -> None
CI_DRM_5844: 18be13866b3b97316fd2cba143e47ec8a3950b47 @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_2743: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2743/
IGT_4914: b93309b7823dcbbd2c52adb4ebb98e3cb060f910 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ git://anongit.freedesktop.org/piglit
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2743/
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [igt-dev] [Intel-gfx] [PATCH i-g-t] kms_busy: Use igt_waitchildren_timeout()
2019-03-30 23:54 ` Chris Wilson
@ 2019-04-01 7:32 ` Daniel Vetter
2019-04-01 7:39 ` Chris Wilson
0 siblings, 1 reply; 6+ messages in thread
From: Daniel Vetter @ 2019-04-01 7:32 UTC (permalink / raw)
To: Chris Wilson; +Cc: igt-dev, intel-gfx
On Sat, Mar 30, 2019 at 11:54:48PM +0000, Chris Wilson wrote:
> Replace the convoluted raising of SIGALRM from the child with an
> interruptible sleep in the parent with the equivalent and far more
> natural igt_waitchildren_timeout().
>
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=103182
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
I guess v2 missing here somewhere? Either way nice cleanup!
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
> ---
> tests/kms_busy.c | 31 +++++--------------------------
> 1 file changed, 5 insertions(+), 26 deletions(-)
>
> diff --git a/tests/kms_busy.c b/tests/kms_busy.c
> index ed3caae4c..321db8207 100644
> --- a/tests/kms_busy.c
> +++ b/tests/kms_busy.c
> @@ -29,9 +29,6 @@
>
> IGT_TEST_DESCRIPTION("Basic check of KMS ABI with busy framebuffers.");
>
> -#define FRAME_TIME 16 /* milleseconds */
> -#define TIMEOUT (6*16)
> -
> static igt_output_t *
> set_fb_on_crtc(igt_display_t *dpy, int pipe, struct igt_fb *fb)
> {
> @@ -70,17 +67,13 @@ static void do_cleanup_display(igt_display_t *dpy)
> igt_display_commit2(dpy, dpy->is_atomic ? COMMIT_ATOMIC : COMMIT_LEGACY);
> }
>
> -static void sighandler(int sig)
> -{
> -}
> -
> static void flip_to_fb(igt_display_t *dpy, int pipe,
> igt_output_t *output,
> struct igt_fb *fb, unsigned ring,
> const char *name, bool modeset)
> {
> struct pollfd pfd = { .fd = dpy->drm_fd, .events = POLLIN };
> - struct timespec tv = { 1, 0 };
> + const int timeout = modeset ? 8500 : 100;
> struct drm_event_vblank ev;
>
> igt_spin_t *t = igt_spin_batch_new(dpy->drm_fd,
> @@ -114,24 +107,14 @@ static void flip_to_fb(igt_display_t *dpy, int pipe,
> DRM_MODE_ATOMIC_ALLOW_MODESET, NULL);
> }
>
> - kill(getppid(), SIGALRM);
> - igt_assert(gem_bo_busy(dpy->drm_fd, fb->gem_handle));
> - igt_assert_f(poll(&pfd, 1, modeset ? 8500 : TIMEOUT) == 0,
> + igt_assert_f(poll(&pfd, 1, timeout) == 0,
> "flip completed whilst %s was busy [%d]\n",
> name, gem_bo_busy(dpy->drm_fd, fb->gem_handle));
> + igt_assert(gem_bo_busy(dpy->drm_fd, fb->gem_handle));
> }
>
> - igt_assert_f(nanosleep(&tv, NULL) == -1,
> - "flip to %s blocked waiting for busy fb", name);
> -
> - igt_waitchildren();
> -
> - if (!modeset) {
> - tv.tv_sec = 0;
> - tv.tv_nsec = (2 * TIMEOUT) * 1000000ULL;
> - nanosleep(&tv, NULL);
> - }
> -
> + igt_waitchildren_timeout(5 * timeout,
> + "flip blocked waiting for busy bo\n");
> igt_spin_batch_end(t);
>
> igt_assert(read(dpy->drm_fd, &ev, sizeof(ev)) == sizeof(ev));
> @@ -160,8 +143,6 @@ static void test_flip(igt_display_t *dpy, unsigned ring, int pipe, bool modeset)
> if (modeset)
> igt_require(dpy->is_atomic);
>
> - signal(SIGALRM, sighandler);
> -
> output = set_fb_on_crtc(dpy, pipe, &fb[0]);
> igt_display_commit2(dpy, COMMIT_LEGACY);
>
> @@ -194,8 +175,6 @@ static void test_flip(igt_display_t *dpy, unsigned ring, int pipe, bool modeset)
> do_cleanup_display(dpy);
> igt_remove_fb(dpy->drm_fd, &fb[1]);
> igt_remove_fb(dpy->drm_fd, &fb[0]);
> -
> - signal(SIGALRM, SIG_DFL);
> }
>
> static void test_atomic_commit_hang(igt_display_t *dpy, igt_plane_t *primary,
> --
> 2.20.1
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [igt-dev] [Intel-gfx] [PATCH i-g-t] kms_busy: Use igt_waitchildren_timeout()
2019-04-01 7:32 ` [igt-dev] [Intel-gfx] " Daniel Vetter
@ 2019-04-01 7:39 ` Chris Wilson
0 siblings, 0 replies; 6+ messages in thread
From: Chris Wilson @ 2019-04-01 7:39 UTC (permalink / raw)
To: Daniel Vetter; +Cc: igt-dev, intel-gfx
Quoting Daniel Vetter (2019-04-01 08:32:27)
> On Sat, Mar 30, 2019 at 11:54:48PM +0000, Chris Wilson wrote:
> > Replace the convoluted raising of SIGALRM from the child with an
> > interruptible sleep in the parent with the equivalent and far more
> > natural igt_waitchildren_timeout().
> >
> > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=103182
> > Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
>
> I guess v2 missing here somewhere? Either way nice cleanup!
gcc pointed out the dead code that I could remove.
-Chris
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2019-04-01 7:39 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-03-30 23:50 [igt-dev] [PATCH i-g-t] kms_busy: Use igt_waitchildren_timeout() Chris Wilson
2019-03-30 23:54 ` Chris Wilson
2019-04-01 7:32 ` [igt-dev] [Intel-gfx] " Daniel Vetter
2019-04-01 7:39 ` Chris Wilson
2019-03-31 1:02 ` [igt-dev] ✓ Fi.CI.BAT: success for kms_busy: Use igt_waitchildren_timeout() (rev2) Patchwork
2019-03-31 2:03 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox