[v4,3/5] tests/pm_dc: Added test for DC6 during PSR

Submitted by Anshuman Gupta on Feb. 1, 2019, 4:13 p.m.

Details

Message ID 1549037582-22449-4-git-send-email-anshuman.gupta@intel.com
State New
Headers show
Series "DC states igt tests patch series" ( rev: 1 ) in IGT (deprecated)

Not browsing as part of any series.

Commit Message

Anshuman Gupta Feb. 1, 2019, 4:13 p.m.
From: Jyoti Yadav <jyoti.r.yadav@intel.com>

This patch add subtest to check DC6 entry on PSR for the supported
platforms.

v2: Rename the subtest with more meaningful name.
v3: Rebased.
v4: Rebased and addressed review comment.

Signed-off-by: Jyoti Yadav <jyoti.r.yadav@intel.com>
Signed-off-by: Anshuman Gupta <anshuman.gupta@intel.com>
---
 tests/pm_dc.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)

Patch hide | download patch | download mbox

diff --git a/tests/pm_dc.c b/tests/pm_dc.c
index d59be94..ea612a7 100644
--- a/tests/pm_dc.c
+++ b/tests/pm_dc.c
@@ -196,6 +196,19 @@  int main(int argc, char *argv[])
 		test_dc_state_psr(&data, CHECK_DC5);
 		cleanup(&data);
 	}
+
+	igt_subtest("dc6-psr") {
+		data.op_psr_mode = PSR_MODE_1;
+		psr_enable(data.debugfs_fd, data.op_psr_mode);
+		igt_require_f(edp_psr_sink_support(&data),
+			      "Sink does not support PSR\n");
+		/* Check DC6 counter is available for the platform.
+		 * Skip the test if counter is not available.
+		 */
+		read_dc_counter(data.drm_fd, CHECK_DC6);
+		test_dc_state_psr(&data, CHECK_DC6);
+		cleanup(&data);
+	}
 	igt_fixture {
 		close(data.debugfs_fd);
 		display_fini(&data);