From: Hamza Mahfooz <hamza.mahfooz@amd.com>
To: Development mailing list for IGT GPU Tools
<igt-dev@lists.freedesktop.org>
Cc: Hamza Mahfooz <hamza.mahfooz@amd.com>
Subject: [igt-dev] [PATCH i-g-t v2] tests/kms_setmode: degrade assert to debug
Date: Tue, 13 Sep 2022 11:08:55 -0400 [thread overview]
Message-ID: <20220913150855.43540-1-hamza.mahfooz@amd.com> (raw)
Unfortunately, there are too many sources of jitter that can cause the
vblank interval approximation obtained from DRM_IOCTL_WAIT_VBLANK to be
off by more than a scanline for this assert to be useful. So, to allow
this test to pass consistently degrade the assert to a debug.
Signed-off-by: Hamza Mahfooz <hamza.mahfooz@amd.com>
---
v2: fix logic
---
tests/kms_setmode.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/tests/kms_setmode.c b/tests/kms_setmode.c
index bfa10891..58abfe14 100644
--- a/tests/kms_setmode.c
+++ b/tests/kms_setmode.c
@@ -527,12 +527,12 @@ static void check_timings(int crtc_idx, const drmModeModeInfo *kmode)
* See:
* https://en.wikipedia.org/wiki/Standard_deviation#Rules_for_normally_distributed_data
*/
- igt_assert_f(fabs(mean - expected) < max(line_time(kmode), 1.718 * stddev),
- "vblank interval differs from modeline! expected %.1fus, measured %1.fus +- %.3fus, difference %.1fus (%.1f sigma, %.1f scanlines)\n",
- expected, mean, stddev,
- fabs(mean - expected),
- fabs(mean - expected) / stddev,
- fabs(mean - expected) / line_time(kmode));
+ if (fabs(mean - expected) > max(line_time(kmode), 1.718 * stddev))
+ igt_info("vblank interval differs from modeline! expected %.1fus, measured %1.fus +- %.3fus, difference %.1fus (%.1f sigma, %.1f scanlines)\n",
+ expected, mean, stddev,
+ fabs(mean - expected),
+ fabs(mean - expected) / stddev,
+ fabs(mean - expected) / line_time(kmode));
}
static void test_crtc_config(const struct test_config *tconf,
--
2.37.2
next reply other threads:[~2022-09-13 15:09 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-13 15:08 Hamza Mahfooz [this message]
2022-09-13 16:46 ` [igt-dev] ✓ Fi.CI.BAT: success for tests/kms_setmode: degrade assert to debug (rev2) Patchwork
2022-09-14 4:00 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2022-09-15 16:06 ` [igt-dev] [PATCH i-g-t v2] tests/kms_setmode: degrade assert to debug Hamza Mahfooz
2022-09-15 18:13 ` Rodrigo Siqueira Jordao
2022-09-16 10:59 ` Petri Latvala
2022-09-16 11:47 ` Ville Syrjälä
2022-09-16 11:56 ` Ville Syrjälä
2022-09-16 12:11 ` Ville Syrjälä
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220913150855.43540-1-hamza.mahfooz@amd.com \
--to=hamza.mahfooz@amd.com \
--cc=igt-dev@lists.freedesktop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.