[prev in list] [next in list] [prev in thread] [next in thread] 

List:       freedesktop-igt-dev
Subject:    [igt-dev] [PATCH i-g-t] tests/i915_pm_lpsp: Don't always fail pfit subtest on 13x7 panels
From:       Matt Roper <matthew.d.roper () intel ! com>
Date:       2019-08-29 17:16:39
Message-ID: 20190829171639.30767-1-matthew.d.roper () intel ! com
[Download RAW message or body]

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@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 b319dbe9..756df710 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.20.1

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic