[igt-dev] [PATCH i-g-t] tests/i915_pm_lpsp: Don't always fail pfit subtest on 13x7 panels

Matt Roper matthew.d.roper at intel.com
Fri Oct 25 23:50:31 UTC 2019


This test currently does two separate asserts to ensure that
hdisplay > 1024 and vdisplay > 768 to ensure that we're not running on a
system with a native 10x7 panel.  However the second assert here will
also fail on 13x7 panels, even though the panel fitter would have been
used in that case.  Combine the two tests to make sure we're checking
for exactly the 10x7 mode.

Also, if the assumption that no platform with LPSP would ever have a
10x7 panel turns out to be false, we should just skip this subtest
rather than failing it, so change the igt_assert() to igt_require.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=106602
Signed-off-by: Matt Roper <matthew.d.roper at intel.com>
---
 tests/i915/i915_pm_lpsp.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/tests/i915/i915_pm_lpsp.c b/tests/i915/i915_pm_lpsp.c
index 42938e10..a1ade58d 100644
--- a/tests/i915/i915_pm_lpsp.c
+++ b/tests/i915/i915_pm_lpsp.c
@@ -109,10 +109,9 @@ static void edp_subtest(int drm_fd, drmModeResPtr drm_res,
 			 * support LPSP are too new for panels with native
 			 * 1024x768 resolution, so this should force the panel
 			 * fitter. */
-			igt_assert(c->count_modes &&
-				   c->modes[0].hdisplay > 1024);
-			igt_assert(c->count_modes &&
-				   c->modes[0].vdisplay > 768);
+			igt_require(c->count_modes &&
+				    (c->modes[0].hdisplay != 1024 ||
+				     c->modes[0].vdisplay != 768));
 			mode = &std_1024_mode;
 			break;
 		}
-- 
2.21.0



More information about the igt-dev mailing list