[igt-dev] [PATCH i-g-t CI 3/4] tests/i915_pm_dc: Simplify runtime pm handling

José Roberto de Souza jose.souza at intel.com
Thu Nov 14 22:45:23 UTC 2019


has_runtime_pm was not used outside of igt_fixture also no need to
print this info, if not supported IGT skip log will contain the line
that was not meet.

Cc: Jeevan B <jeevan.b at intel.com>
Cc: Anshuman Gupta <anshuman.gupta at intel.com>
Cc: Arkadiusz Hiler <arkadiusz.hiler at intel.com>
Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler at intel.com>
Signed-off-by: José Roberto de Souza <jose.souza at intel.com>
---
 tests/i915/i915_pm_dc.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/tests/i915/i915_pm_dc.c b/tests/i915/i915_pm_dc.c
index de3c8722..02b08189 100644
--- a/tests/i915/i915_pm_dc.c
+++ b/tests/i915/i915_pm_dc.c
@@ -390,7 +390,6 @@ static void test_dc_state_dpms(data_t *data, int dc_flag)
 IGT_TEST_DESCRIPTION("These tests validate Display Power DC states");
 int main(int argc, char *argv[])
 {
-	bool has_runtime_pm;
 	data_t data = {};
 
 	igt_skip_on_simulation();
@@ -402,9 +401,7 @@ int main(int argc, char *argv[])
 		kmstest_set_vt_graphics_mode();
 		data.devid = intel_get_drm_devid(data.drm_fd);
 		igt_pm_enable_sata_link_power_management();
-		has_runtime_pm = igt_setup_runtime_pm();
-		igt_info("Runtime PM support: %d\n", has_runtime_pm);
-		igt_require(has_runtime_pm);
+		igt_require(igt_setup_runtime_pm());
 		igt_require(igt_pm_dmc_loaded(data.debugfs_fd));
 		igt_display_require(&data.display, data.drm_fd);
 		igt_require(psr_sink_support(data.debugfs_fd, PSR_MODE_1));
-- 
2.24.0



More information about the igt-dev mailing list