[igt-dev] [PATCH i-g-t] tests/pm_backlight.c: Fix brightness failure with system suspend

Jyoti Yadav jyoti.r.yadav at intel.com
Thu Nov 8 11:20:18 UTC 2018


This patch tries to fix the faliure occuring during subtest
"fade_with_suspend". Failure is occuring because, brightness
value is being checked before driver initializes fully after resume.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=107847
Signed-off-by: Jyoti Yadav <jyoti.r.yadav at intel.com>
Signed-off-by: Jani Nikula <jani.nikula at intel.com>
---
 tests/pm_backlight.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/tests/pm_backlight.c b/tests/pm_backlight.c
index 32808cd..159366c 100644
--- a/tests/pm_backlight.c
+++ b/tests/pm_backlight.c
@@ -177,12 +177,8 @@ test_fade_with_suspend(struct context *context, igt_output_t *output)
 {
 	igt_require(igt_setup_runtime_pm());
 
-	kmstest_set_connector_dpms(output->display->drm_fd,
-				   output->config.connector,
-				   DRM_MODE_DPMS_OFF);
-	igt_require(igt_wait_for_pm_status(IGT_RUNTIME_PM_STATUS_SUSPENDED));
-
 	igt_system_suspend_autoresume(SUSPEND_STATE_MEM, SUSPEND_TEST_NONE);
+	igt_require(igt_wait_for_pm_status(IGT_RUNTIME_PM_STATUS_ACTIVE));
 
 	test_fade(context);
 }
-- 
1.9.1



More information about the igt-dev mailing list