[igt-dev] [PATCH i-g-t] pm_rpm: Require DMC loaded before testing runtime_pm for gen9+

Rodrigo Vivi rodrigo.vivi at intel.com
Fri Aug 17 20:51:25 UTC 2018


Since we block runtime PM if DMC is not loaded, let's skip
the test.

Cc: Chris Wilson <chris at chris-wilson.co.uk>
Cc: Imre Deak <imre.deak at intel.com>
Cc: Anusha Srivatsa <anusha.srivatsa at intel.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi at intel.com>
---
 tests/pm_rpm.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/tests/pm_rpm.c b/tests/pm_rpm.c
index bbe36e59..f8442e4a 100644
--- a/tests/pm_rpm.c
+++ b/tests/pm_rpm.c
@@ -693,6 +693,16 @@ static void setup_pc8(void)
 	has_pc8 = true;
 }
 
+static bool dmc_loaded(void)
+{
+	char buf[15];
+
+	igt_debugfs_read(drm_fd, "i915_dmc_info", buf);
+
+	igt_info("DMC: %s\n", buf);
+	return strstr(buf, "fw loaded: yes");
+}
+
 static bool setup_environment(void)
 {
 	if (has_runtime_pm)
@@ -716,6 +726,9 @@ static bool setup_environment(void)
 	igt_info("PC8 residency support: %d\n", has_pc8);
 	igt_require(has_runtime_pm);
 
+	if (intel_gen(ms_data.devid) >= 9)
+		igt_require(dmc_loaded());
+
 out:
 	disable_all_screens(&ms_data);
 	return wait_for_suspended();
-- 
2.17.1



More information about the igt-dev mailing list