[igt-dev] [PATCH i-g-t v6 3/4] igt/i915/i915_pm_lpsp: panel-fitter subtest modifications.

Anshuman Gupta anshuman.gupta at intel.com
Thu May 30 12:21:30 UTC 2019


It makes sense to skip the test if edp-panel native resoultion
is limted to 1024x768 rather than failing the test.
Dumping i915_runtime_pm_status and i915_power_domain_info if
test fails.
Small improvment in panel-fitter condition which check
lpsp_enabled().

Cc: imre.deak at intel.com
Signed-off-by: Anshuman Gupta <anshuman.gupta at intel.com>
---
 tests/i915/i915_pm_lpsp.c | 20 +++++++++-----------
 1 file changed, 9 insertions(+), 11 deletions(-)

diff --git a/tests/i915/i915_pm_lpsp.c b/tests/i915/i915_pm_lpsp.c
index 53cb7843..028124c6 100644
--- a/tests/i915/i915_pm_lpsp.c
+++ b/tests/i915/i915_pm_lpsp.c
@@ -197,10 +197,10 @@ 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);
+			igt_require(c->count_modes &&
+				    c->modes[0].vdisplay > 768);
 			mode = &std_1024_mode;
 			break;
 		}
@@ -219,16 +219,14 @@ static void edp_subtest(int drm_fd, drmModeResPtr drm_res,
 			    &connector->connector_id, 1, mode);
 	igt_assert_eq(rc, 0);
 
-	if (use_panel_fitter) {
-		if (IS_HASWELL(devid))
-			igt_assert(!lpsp_is_enabled(devid));
-		else
-			igt_assert(lpsp_is_enabled(devid));
-	} else {
+	if (use_panel_fitter && IS_HASWELL(devid))
+		igt_assert_f(!lpsp_is_enabled(devid),
+			     DUMP_DBGFS("i915_runtime_pm_status",
+					"i915_power_domain_info", fd));
+	else
 		igt_assert_f(lpsp_is_enabled(devid),
 			     DUMP_DBGFS("i915_runtime_pm_status",
 					"i915_power_domain_info", fd));
-	}
 }
 
 static void non_edp_subtest(int drm_fd, drmModeResPtr drm_res, uint32_t devid,
-- 
2.21.0



More information about the igt-dev mailing list