All of lore.kernel.org
 help / color / mirror / Atom feed
* [igt-dev] [PATCH i-g-t v14 0/6] DC states igt tests patch series
@ 2019-09-04 17:51 Anshuman Gupta
  2019-09-04 17:51 ` [igt-dev] [PATCH i-g-t v14 1/6] lib/igt_pm: igt lib helper routines to support DC5/6 tests Anshuman Gupta
                   ` (7 more replies)
  0 siblings, 8 replies; 11+ messages in thread
From: Anshuman Gupta @ 2019-09-04 17:51 UTC (permalink / raw)
  To: igt-dev; +Cc: jyoti.r.yadav

This is v14 of patch series, after some refactoring
and minor review comment fixes. 

Anshuman Gupta (1):
  tests/i915/i915_pm_dc:Skip the DC6 test if BIOS has disabled PC8+

Jyoti Yadav (5):
  lib/igt_pm: igt lib helper routines to support DC5/6 tests
  tests/i915/i915_pm_dc: Added new test to verify Display C States
  tests/i915/i915_pm_dc: Added test for DC6 during PSR
  tests/i915/i915_pm_dc: Added test for DC5 during DPMS
  tests/i915/i915_pm_dc: Added test for DC6 during DPMS

 lib/igt_pm.c                   | 215 ++++++++++++++++++-----
 lib/igt_pm.h                   |   7 +-
 tests/Makefile.sources         |   3 +
 tests/i915/i915_pm_backlight.c |   6 +-
 tests/i915/i915_pm_dc.c        | 301 +++++++++++++++++++++++++++++++++
 tests/i915/i915_pm_rpm.c       |  39 +----
 tests/meson.build              |   1 +
 7 files changed, 484 insertions(+), 88 deletions(-)
 create mode 100644 tests/i915/i915_pm_dc.c

-- 
2.21.0

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [igt-dev] [PATCH i-g-t v14 1/6] lib/igt_pm: igt lib helper routines to support DC5/6 tests
  2019-09-04 17:51 [igt-dev] [PATCH i-g-t v14 0/6] DC states igt tests patch series Anshuman Gupta
@ 2019-09-04 17:51 ` Anshuman Gupta
  2019-09-04 17:51 ` [igt-dev] [PATCH i-g-t v14 3/6] tests/i915/i915_pm_dc: Added test for DC6 during PSR Anshuman Gupta
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 11+ messages in thread
From: Anshuman Gupta @ 2019-09-04 17:51 UTC (permalink / raw)
  To: igt-dev; +Cc: jyoti.r.yadav

From: Jyoti Yadav <jyoti.r.yadav@intel.com>

This patch does the following changes to lib/igt_pm.c

-dmc_loaded() will be used by new test i915_pm_dc.c which will validate
 Display C States. So moving the same to igt_pm library.

-Introduced igt_disable_runtime_pm() in order to disable runtime suspend
 for the function which support dc9.

-Changed the igt_pm_enable_sata_link_power_management() and
 igt_pm_restore_sata_link_power_management() in order to save
 and restore the sata link power policy by an exit handler.

v2: Simplify the comment section.
v3: Remove . from the subject line.
v4: Rebased, resolve conflicts in pm_rpm.c
    Included patch set version change log.
v5: Listing actual change in patch set changelog to make review easier.
v6: igt's lib added support for disabling runtime suspend,
    change in commit log. rebased due to test name pm_rpm changed
    to i915_pm_rpm.
v7: Addressed review comment by saving POWER_DIR values in
    igt_disable_runtime_pm(). [Imre]
v8: Addressed the review comment, igt_pm_enable_sata_link_power_management
    function to restore the original SATA link power policy if things fail
    by using an exit handler. [Imre]
v9: IGT failure fixture in i915_pm_backlight and i915_pm_rpm.
v10:Review comment fixup in sata_link_power_management
    lib functions. [Imre]
v11:Add igt_assert_fd(pm_status_fd) in igt_disable_runtime_pm().
    [Imre & Petri]
v12: Refactor is_bios_limits_pc8_plus_residencies() from
     supports_pc8_plus_residencies().
     Changed igt_disable_runtime_pm()return type. [Imre]

Signed-off-by: Jyoti Yadav <jyoti.r.yadav@intel.com>
Signed-off-by: Anshuman Gupta <anshuman.gupta@intel.com>
---
 lib/igt_pm.c                   | 215 ++++++++++++++++++++++++++-------
 lib/igt_pm.h                   |   7 +-
 tests/i915/i915_pm_backlight.c |   6 +-
 tests/i915/i915_pm_rpm.c       |  39 +-----
 4 files changed, 179 insertions(+), 88 deletions(-)

diff --git a/lib/igt_pm.c b/lib/igt_pm.c
index fd22273a..540a9f92 100644
--- a/lib/igt_pm.c
+++ b/lib/igt_pm.c
@@ -38,6 +38,7 @@
 #include "drmtest.h"
 #include "igt_pm.h"
 #include "igt_aux.h"
+#include "igt_sysfs.h"
 
 /**
  * SECTION:igt_pm
@@ -58,16 +59,30 @@ enum {
 	POLICY_MIN_POWER = 2
 };
 
+#define MSR_PKG_CST_CONFIG_CONTROL	0xE2
+/*
+ * Below PKG CST limit mask and PC8 bits are meant for
+ * HSW,BDW SKL,ICL and Goldmont Microarch and future platforms.
+ * Refer IA S/W developers manual vol3c part3 chapter:35
+ */
+#define  PKG_CST_LIMIT_MASK		0xF
+#define  PKG_CST_LIMIT_C8		0x6
+
 #define MAX_PERFORMANCE_STR	"max_performance\n"
 #define MEDIUM_POWER_STR	"medium_power\n"
 #define MIN_POWER_STR		"min_power\n"
 /* Remember to fix this if adding longer strings */
 #define MAX_POLICY_STRLEN	strlen(MAX_PERFORMANCE_STR)
+int8_t *__sata_pm_policies;
+int __scsi_host_cnt;
 
 static char __igt_pm_audio_runtime_power_save[64];
 static char * __igt_pm_audio_runtime_control_path;
 static char __igt_pm_audio_runtime_control[64];
 
+static void __igt_pm_sata_link_pm_exit_handler(int sig);
+static void __igt_pm_restore_sata_link_power_management(void);
+
 static int __igt_pm_audio_restore_runtime_pm(void)
 {
 	int fd;
@@ -280,39 +295,26 @@ void igt_pm_enable_audio_runtime_pm(void)
 		igt_debug("Failed to enable audio runtime PM! (%d)\n", -err);
 }
 
-/**
- * igt_pm_enable_sata_link_power_management:
- *
- * Enable the min_power policy for SATA link power management.
- * Without this we cannot reach deep runtime power states.
- *
- * We don't have any assertions on open since the system might not have
- * a SATA host.
- *
- * Returns:
- * An opaque pointer to the data needed to restore the default values
- * after the test has terminated, or NULL if SATA link power management
- * is not supported. This pointer should be freed when no longer used
- * (typically after having called restore_sata_link_power_management()).
- */
-int8_t *igt_pm_enable_sata_link_power_management(void)
+static void __igt_pm_enable_sata_link_power_management(void)
 {
 	int fd, i;
 	ssize_t len;
 	char *buf;
 	char *file_name;
-	int8_t *link_pm_policies = NULL;
+	int8_t policy;
 
 	file_name = malloc(PATH_MAX);
 	buf = malloc(MAX_POLICY_STRLEN + 1);
 
-	for (i = 0; ; i++) {
-		int8_t policy;
-
+	for (__scsi_host_cnt = 0; ; __scsi_host_cnt++) {
 		snprintf(file_name, PATH_MAX,
 			 "/sys/class/scsi_host/host%d/link_power_management_policy",
-			 i);
+			 __scsi_host_cnt);
 
+		/*
+		 * We don't have any assertions on open since the system
+		 * might not have a SATA host.
+		 */
 		fd = open(file_name, O_RDWR);
 		if (fd < 0)
 			break;
@@ -332,12 +334,26 @@ int8_t *igt_pm_enable_sata_link_power_management(void)
 		else
 			policy = POLICY_UNKNOWN;
 
-		if (!(i % 256))
-			link_pm_policies = realloc(link_pm_policies,
-						   (i / 256 + 1) * 256 + 1);
+		if (!(__scsi_host_cnt % 256))
+			__sata_pm_policies = realloc(__sata_pm_policies,
+						     (__scsi_host_cnt / 256 + 1)
+						     * 256 + 1);
+
+		__sata_pm_policies[__scsi_host_cnt] = policy;
+		close(fd);
+	}
+
+	igt_install_exit_handler(__igt_pm_sata_link_pm_exit_handler);
+
+	for (i = 0; i < __scsi_host_cnt; i++) {
+		snprintf(file_name, PATH_MAX,
+			 "/sys/class/scsi_host/host%d/link_power_management_policy",
+			 i);
+		fd = open(file_name, O_RDWR);
+		if (fd < 0)
+			break;
 
-		link_pm_policies[i] = policy;
-		link_pm_policies[i + 1] = 0;
+		policy = __sata_pm_policies[i];
 
 		/* If the policy is something we don't know about,
 		 * don't touch it, since we might potentially break things.
@@ -355,39 +371,25 @@ int8_t *igt_pm_enable_sata_link_power_management(void)
 	}
 	free(buf);
 	free(file_name);
-
-	return link_pm_policies;
 }
 
-/**
- * igt_pm_restore_sata_link_power_management:
- * @pm_data: An opaque pointer with saved link PM policies;
- *           If NULL is passed we force enable the "max_performance" policy.
- *
- * Restore the link power management policies to the values
- * prior to enabling min_power.
- *
- * Caveat: If the system supports hotplugging and hotplugging takes
- *         place during our testing so that the hosts change numbers
- *         we might restore the settings to the wrong hosts.
- */
-void igt_pm_restore_sata_link_power_management(int8_t *pm_data)
-
+static void __igt_pm_restore_sata_link_power_management(void)
 {
 	int fd, i;
 	char *file_name;
 
+	if (!__sata_pm_policies)
+		return;
+
 	/* Disk runtime PM policies. */
 	file_name = malloc(PATH_MAX);
-	for (i = 0; ; i++) {
+	for (i = 0; i < __scsi_host_cnt; i++) {
 		int8_t policy;
 
-		if (!pm_data)
-			policy = POLICY_MAX_PERFORMANCE;
-		else if (pm_data[i] == POLICY_UNKNOWN)
+		if (__sata_pm_policies[i] == POLICY_UNKNOWN)
 			continue;
 		else
-			policy = pm_data[i];
+			policy = __sata_pm_policies[i];
 
 		snprintf(file_name, PATH_MAX,
 			 "/sys/class/scsi_host/host%d/link_power_management_policy",
@@ -421,7 +423,48 @@ void igt_pm_restore_sata_link_power_management(int8_t *pm_data)
 		close(fd);
 	}
 	free(file_name);
+	free(__sata_pm_policies);
+	__sata_pm_policies = NULL;
 }
+
+/**
+ * igt_pm_enable_sata_link_power_management:
+ *
+ * Enable the min_power policy for SATA link power management.
+ * Without this we cannot reach deep runtime power states.
+ */
+void igt_pm_enable_sata_link_power_management(void)
+{
+	/* Check if has been already saved. */
+	if (__sata_pm_policies)
+		return;
+
+	 __igt_pm_enable_sata_link_power_management();
+}
+
+/**
+ * igt_pm_restore_sata_link_power_management:
+ *
+ * Restore the link power management policies to the values
+ * prior to enabling min_power.
+ *
+ * Caveat: If the system supports hotplugging and hotplugging takes
+ *         place during our testing so that the hosts change numbers
+ *         we might restore the settings to the wrong hosts.
+ */
+void igt_pm_restore_sata_link_power_management(void)
+{
+	if (!__sata_pm_policies)
+		return;
+
+	 __igt_pm_restore_sata_link_power_management();
+}
+
+static void __igt_pm_sata_link_pm_exit_handler(int sig)
+{
+	__igt_pm_restore_sata_link_power_management();
+}
+
 #define POWER_DIR "/sys/devices/pci0000:00/0000:00:02.0/power"
 /* We just leak this on exit ... */
 int pm_status_fd = -1;
@@ -585,6 +628,34 @@ bool igt_setup_runtime_pm(void)
 	return true;
 }
 
+/**
+ * igt_disable_runtime_pm:
+ *
+ * Disable the runtime pm for i915 device.
+ * igt_disable_runtime_pm assumes that igt_setup_runtime_pm has already
+ * called to save runtime autosuspend and control attributes.
+ */
+void igt_disable_runtime_pm(void)
+{
+	int fd;
+	ssize_t size;
+	char buf[6];
+
+	igt_assert_fd(pm_status_fd);
+
+	/* We know we support runtime PM, let's try to disable it now. */
+	fd = open(POWER_DIR "/control", O_RDWR);
+	igt_assert_f(fd >= 0, "Can't open " POWER_DIR "/control\n");
+
+	size = write(fd, "on\n", 3);
+	igt_assert(size == 3);
+	lseek(fd, 0, SEEK_SET);
+	size = read(fd, buf, ARRAY_SIZE(buf));
+	igt_assert(size == 3);
+	igt_assert(strncmp(buf, "on\n", 3) == 0);
+	close(fd);
+}
+
 /**
  * igt_get_runtime_pm_status:
  *
@@ -628,3 +699,53 @@ bool igt_wait_for_pm_status(enum igt_runtime_pm_status status)
 {
 	return igt_wait(igt_get_runtime_pm_status() == status, 10000, 100);
 }
+
+/**
+ * dmc_loaded:
+ * @debugfs: fd to the debugfs dir.
+
+ * Check whether DMC FW is loaded or not. DMC FW is require for few Display C
+ * states like DC5 and DC6. FW does the Context Save and Restore during Display
+ * C States entry and exit.
+ *
+ * Returns:
+ * True if DMC FW is loaded otherwise false.
+ */
+bool igt_pm_dmc_loaded(int debugfs)
+{
+	char buf[15];
+	int len;
+
+	len = igt_sysfs_read(debugfs, "i915_dmc_info", buf, sizeof(buf) - 1);
+	if (len < 0)
+		return true; /* no CSR support, no DMC requirement */
+
+	buf[len] = '\0';
+
+	igt_info("DMC: %s\n", buf);
+	return strstr(buf, "fw loaded: yes");
+}
+
+/**
+ * is_bios_limits_pc8_plus_residencies:
+
+ * Check whether BIOS has disabled the PC8 package deeper state.
+ *
+ * Returns:
+ * True if PC8+ package deeper state enabled on machine otherwise false.
+ */
+bool is_bios_limits_pc8_plus_residencies(int msr_fd)
+{
+	int rc;
+	uint64_t val;
+
+	rc = pread(msr_fd, &val, sizeof(uint64_t), MSR_PKG_CST_CONFIG_CONTROL);
+	if (rc != sizeof(val))
+		return false;
+	if ((val & PKG_CST_LIMIT_MASK) < PKG_CST_LIMIT_C8) {
+		igt_info("PKG C-states limited below PC8 by the BIOS\n");
+		return false;
+	}
+
+	return true;
+}
diff --git a/lib/igt_pm.h b/lib/igt_pm.h
index 10cc6794..f4d6c496 100644
--- a/lib/igt_pm.h
+++ b/lib/igt_pm.h
@@ -25,8 +25,8 @@
 #define IGT_PM_H
 
 void igt_pm_enable_audio_runtime_pm(void);
-int8_t *igt_pm_enable_sata_link_power_management(void);
-void igt_pm_restore_sata_link_power_management(int8_t *pm_data);
+void igt_pm_enable_sata_link_power_management(void);
+void igt_pm_restore_sata_link_power_management(void);
 
 /**
  * igt_runtime_pm_status:
@@ -47,8 +47,11 @@ enum igt_runtime_pm_status {
 };
 
 bool igt_setup_runtime_pm(void);
+void igt_disable_runtime_pm(void);
 void igt_restore_runtime_pm(void);
 enum igt_runtime_pm_status igt_get_runtime_pm_status(void);
 bool igt_wait_for_pm_status(enum igt_runtime_pm_status status);
+bool igt_pm_dmc_loaded(int debugfs);
+bool is_bios_limits_pc8_plus_residencies(int msr_fd);
 
 #endif /* IGT_PM_H */
diff --git a/tests/i915/i915_pm_backlight.c b/tests/i915/i915_pm_backlight.c
index 4c1bff5b..9a5f4c37 100644
--- a/tests/i915/i915_pm_backlight.c
+++ b/tests/i915/i915_pm_backlight.c
@@ -47,7 +47,6 @@ struct context {
 #define FADESPEED 100 /* milliseconds between steps */
 
 IGT_TEST_DESCRIPTION("Basic backlight sysfs test");
-static int8_t *pm_data = NULL;
 
 static int backlight_read(int *result, const char *fname)
 {
@@ -235,7 +234,7 @@ igt_main
 		igt_plane_set_fb(primary, &fb);
 
 		igt_display_commit2(&display, display.is_atomic ? COMMIT_ATOMIC : COMMIT_LEGACY);
-		pm_data = igt_pm_enable_sata_link_power_management();
+		igt_pm_enable_sata_link_power_management();
 	}
 
 	igt_subtest("basic-brightness")
@@ -255,8 +254,7 @@ igt_main
 
 		igt_display_fini(&display);
 		igt_remove_fb(display.drm_fd, &fb);
-		igt_pm_restore_sata_link_power_management(pm_data);
-		free(pm_data);
+		igt_pm_restore_sata_link_power_management();
 		close(display.drm_fd);
 	}
 }
diff --git a/tests/i915/i915_pm_rpm.c b/tests/i915/i915_pm_rpm.c
index 2168ff72..d0a0bc90 100644
--- a/tests/i915/i915_pm_rpm.c
+++ b/tests/i915/i915_pm_rpm.c
@@ -52,11 +52,6 @@
 #include "igt_device.h"
 #include "igt_edid.h"
 
-#define MSR_PKG_CST_CONFIG_CONTROL	0xE2
-/* HSW/BDW: */
-#define  PKG_CST_LIMIT_MASK		0xF
-#define  PKG_CST_LIMIT_C8		0x6
-
 #define MSR_PC8_RES	0x630
 #define MSR_PC9_RES	0x631
 #define MSR_PC10_RES	0x632
@@ -123,8 +118,6 @@ struct modeset_params lpsp_mode_params;
 struct modeset_params non_lpsp_mode_params;
 struct modeset_params *default_mode_params;
 
-static int8_t *pm_data = NULL;
-
 static int modprobe(const char *driver)
 {
 	return igt_kmod_load(driver, NULL);
@@ -146,15 +139,7 @@ static bool supports_pc8_plus_residencies(void)
 	if (rc != sizeof(val))
 		return false;
 
-	rc = pread(msr_fd, &val, sizeof(uint64_t), MSR_PKG_CST_CONFIG_CONTROL);
-	if (rc != sizeof(val))
-		return false;
-	if ((val & PKG_CST_LIMIT_MASK) < PKG_CST_LIMIT_C8) {
-		igt_info("PKG C-states limited below PC8 by the BIOS\n");
-		return false;
-	}
-
-	return true;
+	return is_bios_limits_pc8_plus_residencies(msr_fd);
 }
 
 static uint64_t get_residency(uint32_t type)
@@ -755,21 +740,6 @@ static void setup_pc8(void)
 	has_pc8 = true;
 }
 
-static bool dmc_loaded(void)
-{
-	char buf[15];
-	int len;
-
-	len = igt_sysfs_read(debugfs, "i915_dmc_info", buf, sizeof(buf) - 1);
-	if (len < 0)
-	    return true; /* no CSR support, no DMC requirement */
-
-	buf[len] = '\0';
-
-	igt_info("DMC: %s\n", buf);
-	return strstr(buf, "fw loaded: yes");
-}
-
 static void dump_file(int dir, const char *filename)
 {
 	char *contents;
@@ -796,7 +766,7 @@ static bool setup_environment(void)
 
 	init_mode_set_data(&ms_data);
 
-	pm_data = igt_pm_enable_sata_link_power_management();
+	igt_pm_enable_sata_link_power_management();
 
 	has_runtime_pm = igt_setup_runtime_pm();
 	setup_pc8();
@@ -804,7 +774,7 @@ static bool setup_environment(void)
 	igt_info("Runtime PM support: %d\n", has_runtime_pm);
 	igt_info("PC8 residency support: %d\n", has_pc8);
 	igt_require(has_runtime_pm);
-	igt_require(dmc_loaded());
+	igt_require(igt_pm_dmc_loaded(debugfs));
 
 out:
 	disable_all_screens(&ms_data);
@@ -821,8 +791,7 @@ static void teardown_environment(void)
 
 	igt_restore_runtime_pm();
 
-	igt_pm_restore_sata_link_power_management(pm_data);
-	free(pm_data);
+	igt_pm_restore_sata_link_power_management();
 
 	fini_mode_set_data(&ms_data);
 
-- 
2.21.0

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [igt-dev] [PATCH i-g-t v14 3/6] tests/i915/i915_pm_dc: Added test for DC6 during PSR
  2019-09-04 17:51 [igt-dev] [PATCH i-g-t v14 0/6] DC states igt tests patch series Anshuman Gupta
  2019-09-04 17:51 ` [igt-dev] [PATCH i-g-t v14 1/6] lib/igt_pm: igt lib helper routines to support DC5/6 tests Anshuman Gupta
@ 2019-09-04 17:51 ` Anshuman Gupta
  2019-09-04 17:51 ` [igt-dev] [PATCH i-g-t v14 4/6] tests/i915/i915_pm_dc: Added test for DC5 during DPMS Anshuman Gupta
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 11+ messages in thread
From: Anshuman Gupta @ 2019-09-04 17:51 UTC (permalink / raw)
  To: igt-dev; +Cc: jyoti.r.yadav

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, to fix compilation error in psr_enable().
    Addressed review comment by fixing typo in comment description
    of DC6 PSR subtest.
v5: Addressed the review comment by removing redundant read_dc_counter(),
    clubbed cleanup() function in test_dc_state_psr() suggested by Imre.
    Listing actual change in patch set changelog to make review easier.
v6: Rebased due to test name pm_dc changed to i915_pm_dc, aligning to
    other PM tests.

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

diff --git a/tests/i915/i915_pm_dc.c b/tests/i915/i915_pm_dc.c
index a93e07a7..8e4f1da4 100644
--- a/tests/i915/i915_pm_dc.c
+++ b/tests/i915/i915_pm_dc.c
@@ -200,6 +200,14 @@ int main(int argc, char *argv[])
 		test_dc_state_psr(&data, CHECK_DC5);
 	}
 
+	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");
+		test_dc_state_psr(&data, CHECK_DC6);
+	}
+
 	igt_fixture {
 		close(data.debugfs_fd);
 		display_fini(&data);
-- 
2.21.0

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [igt-dev] [PATCH i-g-t v14 4/6] tests/i915/i915_pm_dc: Added test for DC5 during DPMS
  2019-09-04 17:51 [igt-dev] [PATCH i-g-t v14 0/6] DC states igt tests patch series Anshuman Gupta
  2019-09-04 17:51 ` [igt-dev] [PATCH i-g-t v14 1/6] lib/igt_pm: igt lib helper routines to support DC5/6 tests Anshuman Gupta
  2019-09-04 17:51 ` [igt-dev] [PATCH i-g-t v14 3/6] tests/i915/i915_pm_dc: Added test for DC6 during PSR Anshuman Gupta
@ 2019-09-04 17:51 ` Anshuman Gupta
  2019-09-04 17:51 ` [igt-dev] [PATCH i-g-t v14 5/6] tests/i915/i915_pm_dc: Added test for DC6 " Anshuman Gupta
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 11+ messages in thread
From: Anshuman Gupta @ 2019-09-04 17:51 UTC (permalink / raw)
  To: igt-dev; +Cc: jyoti.r.yadav

From: Jyoti Yadav <jyoti.r.yadav@intel.com>

Added new subtest for DC5 entry during DPMS on/off cycle.
During DPMS on/off cycle DC5 counter is incremented.

v2: Rename the subtest with meaningful name.
v3: Rebased.
v4: Addressed review comments by removing leftover code
    cleanup().
v5: Addressed the review comment by removing redundant
    read_dc_counter() suggested by Imre.
    Listing actual change in patch set changelog to make review easier.
v6: Three way patch applied, no functional change.
v7: Disabling runtime suspend for the platform which support, DC9.
    rebased due to test name pm_dc changed to i915_pm_dc, aligning to
    other PM tests.
v8: Introduced setup_dc_dpms() in order to disable runtime pm, restoring
    POWER_DIR values to its original and enabling runtime pm  for other
    followed sub-tests.
v9: Check DC5 counter value after DPMS off, broke the dpms_on_off
    function to dpms_on and dpms_off. [Imre]
v10:Added AT_LEAST_Gen11 condition instead of IS_ICELAKE in order to
    disable runtime suspend. [Imre]
v11:Added a cleanup_dc_dpms() function. [Imre]

Signed-off-by: Jyoti Yadav <jyoti.r.yadav@intel.com>
Signed-off-by: Anshuman Gupta <anshuman.gupta@intel.com>
Reviewed-by: Imre Deak <imre.deak@intel.com>
---
 tests/i915/i915_pm_dc.c | 66 +++++++++++++++++++++++++++++++++++++++++
 1 file changed, 66 insertions(+)

diff --git a/tests/i915/i915_pm_dc.c b/tests/i915/i915_pm_dc.c
index 8e4f1da4..c3df2c68 100644
--- a/tests/i915/i915_pm_dc.c
+++ b/tests/i915/i915_pm_dc.c
@@ -44,6 +44,7 @@ typedef struct {
 	enum psr_mode op_psr_mode;
 	drmModeModeInfo *mode;
 	igt_output_t *output;
+	bool runtime_suspend_disabled;
 } data_t;
 
 static bool dc_state_wait_entry(int drm_fd, int dc_flag, int prev_dc_count);
@@ -171,6 +172,67 @@ static void test_dc_state_psr(data_t *data, int dc_flag)
 	cleanup_dc_psr(data);
 }
 
+static void cleanup_dc_dpms(data_t *data)
+{
+	/*
+	 * if runtime PM is disabled for i915 restore it,
+	 * so any other sub-test can use runtime-PM.
+	 */
+	if (data->runtime_suspend_disabled) {
+		igt_restore_runtime_pm();
+		igt_setup_runtime_pm();
+	}
+}
+
+static void setup_dc_dpms(data_t *data)
+{
+	if (IS_BROXTON(data->devid) || IS_GEMINILAKE(data->devid) ||
+	    AT_LEAST_GEN(data->devid, 11)) {
+		igt_disable_runtime_pm();
+		data->runtime_suspend_disabled = true;
+	} else {
+		data->runtime_suspend_disabled = false;
+	}
+}
+
+static void dpms_off(data_t *data)
+{
+	for (int i = 0; i < data->display.n_outputs; i++) {
+		kmstest_set_connector_dpms(data->drm_fd,
+					   data->display.outputs[i].config.connector,
+					   DRM_MODE_DPMS_OFF);
+	}
+
+	if (!data->runtime_suspend_disabled)
+		igt_assert(igt_wait_for_pm_status
+			   (IGT_RUNTIME_PM_STATUS_SUSPENDED));
+}
+
+static void dpms_on(data_t *data)
+{
+	for (int i = 0; i < data->display.n_outputs; i++) {
+		kmstest_set_connector_dpms(data->drm_fd,
+					   data->display.outputs[i].config.connector,
+					   DRM_MODE_DPMS_ON);
+	}
+
+	if (!data->runtime_suspend_disabled)
+		igt_assert(igt_wait_for_pm_status
+			   (IGT_RUNTIME_PM_STATUS_ACTIVE));
+}
+
+static void test_dc_state_dpms(data_t *data, int dc_flag)
+{
+	uint32_t dc_counter;
+
+	setup_dc_dpms(data);
+	dc_counter = read_dc_counter(data->drm_fd, dc_flag);
+	dpms_off(data);
+	check_dc_counter(data->drm_fd, dc_flag, dc_counter);
+	dpms_on(data);
+	cleanup_dc_dpms(data);
+}
+
 int main(int argc, char *argv[])
 {
 	bool has_runtime_pm;
@@ -208,6 +270,10 @@ int main(int argc, char *argv[])
 		test_dc_state_psr(&data, CHECK_DC6);
 	}
 
+	igt_subtest("dc5-dpms") {
+		test_dc_state_dpms(&data, CHECK_DC5);
+	}
+
 	igt_fixture {
 		close(data.debugfs_fd);
 		display_fini(&data);
-- 
2.21.0

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [igt-dev] [PATCH i-g-t v14 5/6] tests/i915/i915_pm_dc: Added test for DC6 during DPMS
  2019-09-04 17:51 [igt-dev] [PATCH i-g-t v14 0/6] DC states igt tests patch series Anshuman Gupta
                   ` (2 preceding siblings ...)
  2019-09-04 17:51 ` [igt-dev] [PATCH i-g-t v14 4/6] tests/i915/i915_pm_dc: Added test for DC5 during DPMS Anshuman Gupta
@ 2019-09-04 17:51 ` Anshuman Gupta
  2019-09-04 17:51 ` [igt-dev] [PATCH i-g-t v14 6/6] tests/i915/i915_pm_dc:Skip the DC6 test if BIOS has disabled PC8+ Anshuman Gupta
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 11+ messages in thread
From: Anshuman Gupta @ 2019-09-04 17:51 UTC (permalink / raw)
  To: igt-dev; +Cc: jyoti.r.yadav

From: Jyoti Yadav <jyoti.r.yadav@intel.com>

Added new subtest for DC6 entry during DPMS on/off cycle.
During DPMS on/off cycle DC6 counter is incremented.

v2: Renamed the subtest name.
v3: Rebased.
v4: Addressed review comment by replacing igt_display_init() to
    igt_display_require(), changes got done in patch set 2.
v5: Addressed the review comment by removing redundant read_dc_counter()
    suggested by Imre.
    Listing actual change in patch set changelog to make review easier.
v6: Rebased due to test name pm_dc changed to i915_pm_dc, aligning to
    other PM tests.
v7: Introduced setup_dc_dpms() inorder to disable i915 runtime PM for
    the platform supports DC9.

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

diff --git a/tests/i915/i915_pm_dc.c b/tests/i915/i915_pm_dc.c
index c3df2c68..34cbb83d 100644
--- a/tests/i915/i915_pm_dc.c
+++ b/tests/i915/i915_pm_dc.c
@@ -274,6 +274,10 @@ int main(int argc, char *argv[])
 		test_dc_state_dpms(&data, CHECK_DC5);
 	}
 
+	igt_subtest("dc6-dpms") {
+		test_dc_state_dpms(&data, CHECK_DC6);
+	}
+
 	igt_fixture {
 		close(data.debugfs_fd);
 		display_fini(&data);
-- 
2.21.0

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [igt-dev] [PATCH i-g-t v14 6/6] tests/i915/i915_pm_dc:Skip the DC6 test if BIOS has disabled PC8+
  2019-09-04 17:51 [igt-dev] [PATCH i-g-t v14 0/6] DC states igt tests patch series Anshuman Gupta
                   ` (3 preceding siblings ...)
  2019-09-04 17:51 ` [igt-dev] [PATCH i-g-t v14 5/6] tests/i915/i915_pm_dc: Added test for DC6 " Anshuman Gupta
@ 2019-09-04 17:51 ` Anshuman Gupta
  2019-09-04 18:55 ` [igt-dev] ✓ Fi.CI.BAT: success for DC states igt tests patch series (rev19) Patchwork
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 11+ messages in thread
From: Anshuman Gupta @ 2019-09-04 17:51 UTC (permalink / raw)
  To: igt-dev; +Cc: jyoti.r.yadav

As DC6 requires platform to enter PC8 package C state.
It make sense to skip the DC6 igt-test, if BIOS configuration
has disabled PC8+ package C states.

Signed-off-by: Anshuman Gupta <anshuman.gupta@intel.com>
---
 tests/i915/i915_pm_dc.c | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/tests/i915/i915_pm_dc.c b/tests/i915/i915_pm_dc.c
index 34cbb83d..b5bbdb37 100644
--- a/tests/i915/i915_pm_dc.c
+++ b/tests/i915/i915_pm_dc.c
@@ -23,10 +23,12 @@
  */
 
 #include <errno.h>
+#include <fcntl.h>
 #include <stdbool.h>
 #include <stdio.h>
 #include <string.h>
 #include "igt.h"
+#include "igt_kmod.h"
 #include "igt_psr.h"
 #include "igt_sysfs.h"
 #include "limits.h"
@@ -37,6 +39,7 @@
 
 typedef struct {
 	int drm_fd;
+	int msr_fd;
 	int debugfs_fd;
 	uint32_t devid;
 	igt_display_t display;
@@ -252,6 +255,12 @@ int main(int argc, char *argv[])
 		igt_require(has_runtime_pm);
 		igt_require(igt_pm_dmc_loaded(data.debugfs_fd));
 		igt_display_require(&data.display, data.drm_fd);
+		/* Make sure our Kernel supports MSR and the module is loaded */
+		igt_require(igt_kmod_load("msr", NULL) == 0);
+
+		data.msr_fd = open("/dev/cpu/0/msr", O_RDONLY);
+		igt_assert_f(data.msr_fd >= 0,
+			     "Can't open /dev/cpu/0/msr.\n");
 	}
 
 	igt_subtest("dc5-psr") {
@@ -267,6 +276,8 @@ int main(int argc, char *argv[])
 		psr_enable(data.debugfs_fd, data.op_psr_mode);
 		igt_require_f(edp_psr_sink_support(&data),
 			      "Sink does not support PSR\n");
+		igt_require_f(is_bios_limits_pc8_plus_residencies(data.msr_fd),
+			      "PC8+ residencies not supported\n");
 		test_dc_state_psr(&data, CHECK_DC6);
 	}
 
@@ -275,11 +286,14 @@ int main(int argc, char *argv[])
 	}
 
 	igt_subtest("dc6-dpms") {
+		igt_require_f(is_bios_limits_pc8_plus_residencies(data.msr_fd),
+			      "PC8+ residencies not supported\n");
 		test_dc_state_dpms(&data, CHECK_DC6);
 	}
 
 	igt_fixture {
 		close(data.debugfs_fd);
+		close(data.msr_fd);
 		display_fini(&data);
 	}
 
-- 
2.21.0

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [igt-dev] ✓ Fi.CI.BAT: success for DC states igt tests patch series (rev19)
  2019-09-04 17:51 [igt-dev] [PATCH i-g-t v14 0/6] DC states igt tests patch series Anshuman Gupta
                   ` (4 preceding siblings ...)
  2019-09-04 17:51 ` [igt-dev] [PATCH i-g-t v14 6/6] tests/i915/i915_pm_dc:Skip the DC6 test if BIOS has disabled PC8+ Anshuman Gupta
@ 2019-09-04 18:55 ` Patchwork
  2019-09-04 20:55 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
  2019-09-05  6:39 ` [igt-dev] [PATCH i-g-t v14 0/6] DC states igt tests patch series Arkadiusz Hiler
  7 siblings, 0 replies; 11+ messages in thread
From: Patchwork @ 2019-09-04 18:55 UTC (permalink / raw)
  To: Anshuman Gupta; +Cc: igt-dev

== Series Details ==

Series: DC states igt tests patch series (rev19)
URL   : https://patchwork.freedesktop.org/series/56713/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_6835 -> IGTPW_3419
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

  External URL: https://patchwork.freedesktop.org/api/1.0/series/56713/revisions/19/mbox/

Known issues
------------

  Here are the changes found in IGTPW_3419 that come from known issues:

### IGT changes ###

#### Issues hit ####

  * igt@i915_selftest@live_gtt:
    - fi-glk-dsi:         [PASS][1] -> [INCOMPLETE][2] ([fdo#103359] / [k.org#198133])
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6835/fi-glk-dsi/igt@i915_selftest@live_gtt.html
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3419/fi-glk-dsi/igt@i915_selftest@live_gtt.html

  * igt@kms_busy@basic-flip-c:
    - fi-skl-6770hq:      [PASS][3] -> [SKIP][4] ([fdo#109271] / [fdo#109278]) +2 similar issues
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6835/fi-skl-6770hq/igt@kms_busy@basic-flip-c.html
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3419/fi-skl-6770hq/igt@kms_busy@basic-flip-c.html

  * igt@kms_flip@basic-flip-vs-dpms:
    - fi-skl-6770hq:      [PASS][5] -> [SKIP][6] ([fdo#109271]) +23 similar issues
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6835/fi-skl-6770hq/igt@kms_flip@basic-flip-vs-dpms.html
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3419/fi-skl-6770hq/igt@kms_flip@basic-flip-vs-dpms.html

  
#### Possible fixes ####

  * igt@gem_exec_suspend@basic-s3:
    - fi-blb-e6850:       [INCOMPLETE][7] ([fdo#107718]) -> [PASS][8]
   [7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6835/fi-blb-e6850/igt@gem_exec_suspend@basic-s3.html
   [8]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3419/fi-blb-e6850/igt@gem_exec_suspend@basic-s3.html

  * igt@prime_busy@basic-before-default:
    - fi-icl-u3:          [DMESG-WARN][9] ([fdo#107724]) -> [PASS][10] +1 similar issue
   [9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6835/fi-icl-u3/igt@prime_busy@basic-before-default.html
   [10]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3419/fi-icl-u3/igt@prime_busy@basic-before-default.html

  
#### Warnings ####

  * igt@kms_chamelium@hdmi-hpd-fast:
    - fi-kbl-7500u:       [FAIL][11] ([fdo#111096]) -> [FAIL][12] ([fdo#111407])
   [11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6835/fi-kbl-7500u/igt@kms_chamelium@hdmi-hpd-fast.html
   [12]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3419/fi-kbl-7500u/igt@kms_chamelium@hdmi-hpd-fast.html

  
  [fdo#103359]: https://bugs.freedesktop.org/show_bug.cgi?id=103359
  [fdo#107718]: https://bugs.freedesktop.org/show_bug.cgi?id=107718
  [fdo#107724]: https://bugs.freedesktop.org/show_bug.cgi?id=107724
  [fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
  [fdo#109278]: https://bugs.freedesktop.org/show_bug.cgi?id=109278
  [fdo#111096]: https://bugs.freedesktop.org/show_bug.cgi?id=111096
  [fdo#111407]: https://bugs.freedesktop.org/show_bug.cgi?id=111407
  [k.org#198133]: https://bugzilla.kernel.org/show_bug.cgi?id=198133


Participating hosts (52 -> 46)
------------------------------

  Missing    (6): fi-ilk-m540 fi-hsw-4200u fi-byt-squawks fi-icl-y fi-byt-clapper fi-bdw-samus 


Build changes
-------------

  * CI: CI-20190529 -> None
  * IGT: IGT_5171 -> IGTPW_3419

  CI-20190529: 20190529
  CI_DRM_6835: cde3db21383e3c077c278ba783e4ec8d006f2e32 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGTPW_3419: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3419/
  IGT_5171: 1911564805fe454919e8a5846534a0c1ef376a33 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools



== Testlist changes ==

+igt@i915_pm_dc@dc5-dpms
+igt@i915_pm_dc@dc5-psr
+igt@i915_pm_dc@dc6-dpms
+igt@i915_pm_dc@dc6-psr

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3419/
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [igt-dev] ✓ Fi.CI.IGT: success for DC states igt tests patch series (rev19)
  2019-09-04 17:51 [igt-dev] [PATCH i-g-t v14 0/6] DC states igt tests patch series Anshuman Gupta
                   ` (5 preceding siblings ...)
  2019-09-04 18:55 ` [igt-dev] ✓ Fi.CI.BAT: success for DC states igt tests patch series (rev19) Patchwork
@ 2019-09-04 20:55 ` Patchwork
  2019-09-05  6:39 ` [igt-dev] [PATCH i-g-t v14 0/6] DC states igt tests patch series Arkadiusz Hiler
  7 siblings, 0 replies; 11+ messages in thread
From: Patchwork @ 2019-09-04 20:55 UTC (permalink / raw)
  To: Anshuman Gupta; +Cc: igt-dev

== Series Details ==

Series: DC states igt tests patch series (rev19)
URL   : https://patchwork.freedesktop.org/series/56713/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_6835_full -> IGTPW_3419_full
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

  External URL: https://patchwork.freedesktop.org/api/1.0/series/56713/revisions/19/mbox/

Possible new issues
-------------------

  Here are the unknown changes that may have been introduced in IGTPW_3419_full:

### IGT changes ###

#### Possible regressions ####

  * {igt@i915_pm_dc@dc6-dpms} (NEW):
    - shard-kbl:          NOTRUN -> [FAIL][1]
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3419/shard-kbl6/igt@i915_pm_dc@dc6-dpms.html

  
New tests
---------

  New tests have been introduced between CI_DRM_6835_full and IGTPW_3419_full:

### New IGT tests (4) ###

  * igt@i915_pm_dc@dc5-dpms:
    - Statuses : 3 pass(s) 2 skip(s)
    - Exec time: [0.0, 1.40] s

  * igt@i915_pm_dc@dc5-psr:
    - Statuses : 1 pass(s) 4 skip(s)
    - Exec time: [0.0, 3.40] s

  * igt@i915_pm_dc@dc6-dpms:
    - Statuses : 1 fail(s) 1 pass(s) 4 skip(s)
    - Exec time: [0.0, 3.57] s

  * igt@i915_pm_dc@dc6-psr:
    - Statuses : 4 skip(s)
    - Exec time: [0.0] s

  

Known issues
------------

  Here are the changes found in IGTPW_3419_full that come from known issues:

### IGT changes ###

#### Issues hit ####

  * igt@gem_ctx_isolation@vecs0-s3:
    - shard-kbl:          [PASS][2] -> [INCOMPLETE][3] ([fdo#103665])
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6835/shard-kbl7/igt@gem_ctx_isolation@vecs0-s3.html
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3419/shard-kbl1/igt@gem_ctx_isolation@vecs0-s3.html

  * igt@gem_eio@in-flight-suspend:
    - shard-apl:          [PASS][4] -> [DMESG-WARN][5] ([fdo#108566]) +1 similar issue
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6835/shard-apl4/igt@gem_eio@in-flight-suspend.html
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3419/shard-apl6/igt@gem_eio@in-flight-suspend.html

  * igt@gem_exec_balancer@smoke:
    - shard-iclb:         [PASS][6] -> [SKIP][7] ([fdo#110854])
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6835/shard-iclb4/igt@gem_exec_balancer@smoke.html
   [7]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3419/shard-iclb7/igt@gem_exec_balancer@smoke.html

  * igt@gem_exec_schedule@fifo-bsd:
    - shard-iclb:         [PASS][8] -> [SKIP][9] ([fdo#111325]) +2 similar issues
   [8]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6835/shard-iclb7/igt@gem_exec_schedule@fifo-bsd.html
   [9]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3419/shard-iclb4/igt@gem_exec_schedule@fifo-bsd.html

  * igt@gem_exec_schedule@out-order-bsd2:
    - shard-iclb:         [PASS][10] -> [SKIP][11] ([fdo#109276]) +9 similar issues
   [10]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6835/shard-iclb1/igt@gem_exec_schedule@out-order-bsd2.html
   [11]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3419/shard-iclb8/igt@gem_exec_schedule@out-order-bsd2.html

  * igt@gem_exec_suspend@basic-s3:
    - shard-snb:          [PASS][12] -> [FAIL][13] ([fdo#103375])
   [12]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6835/shard-snb5/igt@gem_exec_suspend@basic-s3.html
   [13]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3419/shard-snb7/igt@gem_exec_suspend@basic-s3.html

  * igt@gem_pread@uncached:
    - shard-apl:          [PASS][14] -> [INCOMPLETE][15] ([fdo#103927]) +1 similar issue
   [14]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6835/shard-apl3/igt@gem_pread@uncached.html
   [15]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3419/shard-apl1/igt@gem_pread@uncached.html

  * igt@i915_pm_rc6_residency@rc6-accuracy:
    - shard-snb:          [PASS][16] -> [SKIP][17] ([fdo#109271])
   [16]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6835/shard-snb1/igt@i915_pm_rc6_residency@rc6-accuracy.html
   [17]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3419/shard-snb2/igt@i915_pm_rc6_residency@rc6-accuracy.html

  * igt@i915_pm_rpm@modeset-lpsp-stress:
    - shard-iclb:         [PASS][18] -> [INCOMPLETE][19] ([fdo#107713] / [fdo#108840])
   [18]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6835/shard-iclb1/igt@i915_pm_rpm@modeset-lpsp-stress.html
   [19]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3419/shard-iclb2/igt@i915_pm_rpm@modeset-lpsp-stress.html

  * igt@i915_pm_rpm@system-suspend-modeset:
    - shard-hsw:          [PASS][20] -> [FAIL][21] ([fdo#111548])
   [20]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6835/shard-hsw5/igt@i915_pm_rpm@system-suspend-modeset.html
   [21]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3419/shard-hsw8/igt@i915_pm_rpm@system-suspend-modeset.html

  * igt@kms_cursor_crc@pipe-a-cursor-128x128-random:
    - shard-kbl:          [PASS][22] -> [FAIL][23] ([fdo#103232])
   [22]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6835/shard-kbl4/igt@kms_cursor_crc@pipe-a-cursor-128x128-random.html
   [23]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3419/shard-kbl1/igt@kms_cursor_crc@pipe-a-cursor-128x128-random.html
    - shard-apl:          [PASS][24] -> [FAIL][25] ([fdo#103232])
   [24]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6835/shard-apl7/igt@kms_cursor_crc@pipe-a-cursor-128x128-random.html
   [25]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3419/shard-apl7/igt@kms_cursor_crc@pipe-a-cursor-128x128-random.html

  * igt@kms_flip@dpms-vs-vblank-race:
    - shard-kbl:          [PASS][26] -> [FAIL][27] ([fdo#103060])
   [26]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6835/shard-kbl6/igt@kms_flip@dpms-vs-vblank-race.html
   [27]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3419/shard-kbl2/igt@kms_flip@dpms-vs-vblank-race.html

  * igt@kms_flip@flip-vs-expired-vblank:
    - shard-glk:          [PASS][28] -> [FAIL][29] ([fdo#105363])
   [28]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6835/shard-glk7/igt@kms_flip@flip-vs-expired-vblank.html
   [29]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3419/shard-glk7/igt@kms_flip@flip-vs-expired-vblank.html

  * igt@kms_frontbuffer_tracking@fbc-2p-scndscrn-indfb-plflip-blt:
    - shard-glk:          [PASS][30] -> [FAIL][31] ([fdo#103167])
   [30]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6835/shard-glk1/igt@kms_frontbuffer_tracking@fbc-2p-scndscrn-indfb-plflip-blt.html
   [31]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3419/shard-glk3/igt@kms_frontbuffer_tracking@fbc-2p-scndscrn-indfb-plflip-blt.html

  * igt@kms_frontbuffer_tracking@fbcpsr-1p-pri-indfb-multidraw:
    - shard-iclb:         [PASS][32] -> [FAIL][33] ([fdo#103167]) +2 similar issues
   [32]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6835/shard-iclb5/igt@kms_frontbuffer_tracking@fbcpsr-1p-pri-indfb-multidraw.html
   [33]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3419/shard-iclb6/igt@kms_frontbuffer_tracking@fbcpsr-1p-pri-indfb-multidraw.html

  * igt@kms_psr@psr2_sprite_mmap_gtt:
    - shard-iclb:         [PASS][34] -> [SKIP][35] ([fdo#109441])
   [34]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6835/shard-iclb2/igt@kms_psr@psr2_sprite_mmap_gtt.html
   [35]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3419/shard-iclb5/igt@kms_psr@psr2_sprite_mmap_gtt.html

  
#### Possible fixes ####

  * igt@gem_exec_schedule@pi-ringfull-bsd:
    - shard-iclb:         [SKIP][36] ([fdo#111325]) -> [PASS][37] +4 similar issues
   [36]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6835/shard-iclb2/igt@gem_exec_schedule@pi-ringfull-bsd.html
   [37]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3419/shard-iclb5/igt@gem_exec_schedule@pi-ringfull-bsd.html

  * igt@gem_exec_schedule@reorder-wide-bsd1:
    - shard-iclb:         [SKIP][38] ([fdo#109276]) -> [PASS][39] +18 similar issues
   [38]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6835/shard-iclb8/igt@gem_exec_schedule@reorder-wide-bsd1.html
   [39]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3419/shard-iclb1/igt@gem_exec_schedule@reorder-wide-bsd1.html

  * igt@gem_mocs_settings@mocs-rc6-blt:
    - shard-apl:          [SKIP][40] ([fdo#109271]) -> [PASS][41]
   [40]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6835/shard-apl5/igt@gem_mocs_settings@mocs-rc6-blt.html
   [41]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3419/shard-apl6/igt@gem_mocs_settings@mocs-rc6-blt.html

  * igt@gem_tiled_swapping@non-threaded:
    - shard-kbl:          [DMESG-WARN][42] ([fdo#108686]) -> [PASS][43]
   [42]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6835/shard-kbl6/igt@gem_tiled_swapping@non-threaded.html
   [43]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3419/shard-kbl1/igt@gem_tiled_swapping@non-threaded.html

  * igt@gem_workarounds@suspend-resume-context:
    - shard-kbl:          [INCOMPLETE][44] ([fdo#103665]) -> [PASS][45]
   [44]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6835/shard-kbl2/igt@gem_workarounds@suspend-resume-context.html
   [45]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3419/shard-kbl6/igt@gem_workarounds@suspend-resume-context.html

  * igt@i915_pm_rc6_residency@rc6-accuracy:
    - shard-kbl:          [SKIP][46] ([fdo#109271]) -> [PASS][47]
   [46]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6835/shard-kbl4/igt@i915_pm_rc6_residency@rc6-accuracy.html
   [47]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3419/shard-kbl4/igt@i915_pm_rc6_residency@rc6-accuracy.html

  * igt@kms_flip@2x-plain-flip-fb-recreate:
    - shard-glk:          [FAIL][48] ([fdo#100368]) -> [PASS][49]
   [48]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6835/shard-glk3/igt@kms_flip@2x-plain-flip-fb-recreate.html
   [49]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3419/shard-glk8/igt@kms_flip@2x-plain-flip-fb-recreate.html

  * igt@kms_frontbuffer_tracking@fbc-1p-pri-indfb-multidraw:
    - shard-iclb:         [FAIL][50] ([fdo#103167]) -> [PASS][51]
   [50]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6835/shard-iclb2/igt@kms_frontbuffer_tracking@fbc-1p-pri-indfb-multidraw.html
   [51]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3419/shard-iclb3/igt@kms_frontbuffer_tracking@fbc-1p-pri-indfb-multidraw.html

  * igt@kms_frontbuffer_tracking@fbc-suspend:
    - shard-apl:          [FAIL][52] ([fdo#103375]) -> [PASS][53] +1 similar issue
   [52]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6835/shard-apl5/igt@kms_frontbuffer_tracking@fbc-suspend.html
   [53]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3419/shard-apl5/igt@kms_frontbuffer_tracking@fbc-suspend.html

  * igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a:
    - shard-snb:          [FAIL][54] ([fdo#103375]) -> [PASS][55] +2 similar issues
   [54]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6835/shard-snb4/igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a.html
   [55]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3419/shard-snb2/igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a.html

  * igt@kms_psr@no_drrs:
    - shard-iclb:         [FAIL][56] ([fdo#108341]) -> [PASS][57]
   [56]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6835/shard-iclb1/igt@kms_psr@no_drrs.html
   [57]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3419/shard-iclb4/igt@kms_psr@no_drrs.html

  * igt@kms_psr@psr2_cursor_plane_onoff:
    - shard-iclb:         [SKIP][58] ([fdo#109441]) -> [PASS][59] +1 similar issue
   [58]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6835/shard-iclb1/igt@kms_psr@psr2_cursor_plane_onoff.html
   [59]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3419/shard-iclb2/igt@kms_psr@psr2_cursor_plane_onoff.html

  * igt@kms_vblank@pipe-c-ts-continuation-suspend:
    - shard-apl:          [DMESG-WARN][60] ([fdo#108566]) -> [PASS][61] +2 similar issues
   [60]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6835/shard-apl1/igt@kms_vblank@pipe-c-ts-continuation-suspend.html
   [61]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3419/shard-apl1/igt@kms_vblank@pipe-c-ts-continuation-suspend.html

  * igt@perf_pmu@busy-double-start-vcs0:
    - shard-apl:          [FAIL][62] ([fdo#111545]) -> [PASS][63] +4 similar issues
   [62]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6835/shard-apl5/igt@perf_pmu@busy-double-start-vcs0.html
   [63]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3419/shard-apl6/igt@perf_pmu@busy-double-start-vcs0.html

  * igt@perf_pmu@cpu-hotplug:
    - shard-iclb:         [TIMEOUT][64] ([fdo#109673]) -> [PASS][65]
   [64]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6835/shard-iclb8/igt@perf_pmu@cpu-hotplug.html
   [65]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3419/shard-iclb2/igt@perf_pmu@cpu-hotplug.html

  
#### Warnings ####

  * igt@gem_mocs_settings@mocs-settings-bsd2:
    - shard-iclb:         [FAIL][66] ([fdo#111330]) -> [SKIP][67] ([fdo#109276]) +1 similar issue
   [66]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6835/shard-iclb1/igt@gem_mocs_settings@mocs-settings-bsd2.html
   [67]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3419/shard-iclb6/igt@gem_mocs_settings@mocs-settings-bsd2.html

  * igt@perf_pmu@cpu-hotplug:
    - shard-hsw:          [INCOMPLETE][68] ([fdo#103540]) -> [TIMEOUT][69] ([fdo#111546])
   [68]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6835/shard-hsw4/igt@perf_pmu@cpu-hotplug.html
   [69]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3419/shard-hsw8/igt@perf_pmu@cpu-hotplug.html

  
  {name}: This element is suppressed. This means it is ignored when computing
          the status of the difference (SUCCESS, WARNING, or FAILURE).

  [fdo#100368]: https://bugs.freedesktop.org/show_bug.cgi?id=100368
  [fdo#103060]: https://bugs.freedesktop.org/show_bug.cgi?id=103060
  [fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167
  [fdo#103232]: https://bugs.freedesktop.org/show_bug.cgi?id=103232
  [fdo#103375]: https://bugs.freedesktop.org/show_bug.cgi?id=103375
  [fdo#103540]: https://bugs.freedesktop.org/show_bug.cgi?id=103540
  [fdo#103665]: https://bugs.freedesktop.org/show_bug.cgi?id=103665
  [fdo#103927]: https://bugs.freedesktop.org/show_bug.cgi?id=103927
  [fdo#105363]: https://bugs.freedesktop.org/show_bug.cgi?id=105363
  [fdo#107713]: https://bugs.freedesktop.org/show_bug.cgi?id=107713
  [fdo#108341]: https://bugs.freedesktop.org/show_bug.cgi?id=108341
  [fdo#108566]: https://bugs.freedesktop.org/show_bug.cgi?id=108566
  [fdo#108686]: https://bugs.freedesktop.org/show_bug.cgi?id=108686
  [fdo#108840]: https://bugs.freedesktop.org/show_bug.cgi?id=108840
  [fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
  [fdo#109276]: https://bugs.freedesktop.org/show_bug.cgi?id=109276
  [fdo#109441]: https://bugs.freedesktop.org/show_bug.cgi?id=109441
  [fdo#109673]: https://bugs.freedesktop.org/show_bug.cgi?id=109673
  [fdo#110854]: https://bugs.freedesktop.org/show_bug.cgi?id=110854
  [fdo#111325]: https://bugs.freedesktop.org/show_bug.cgi?id=111325
  [fdo#111330]: https://bugs.freedesktop.org/show_bug.cgi?id=111330
  [fdo#111545]: https://bugs.freedesktop.org/show_bug.cgi?id=111545
  [fdo#111546]: https://bugs.freedesktop.org/show_bug.cgi?id=111546
  [fdo#111548]: https://bugs.freedesktop.org/show_bug.cgi?id=111548


Participating hosts (10 -> 6)
------------------------------

  Missing    (4): pig-skl-6260u shard-skl pig-hsw-4770r pig-glk-j5005 


Build changes
-------------

  * CI: CI-20190529 -> None
  * IGT: IGT_5171 -> IGTPW_3419
  * Piglit: piglit_4509 -> None

  CI-20190529: 20190529
  CI_DRM_6835: cde3db21383e3c077c278ba783e4ec8d006f2e32 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGTPW_3419: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3419/
  IGT_5171: 1911564805fe454919e8a5846534a0c1ef376a33 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
  piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ git://anongit.freedesktop.org/piglit

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3419/
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [igt-dev] [PATCH i-g-t v14 0/6] DC states igt tests patch series
  2019-09-04 17:51 [igt-dev] [PATCH i-g-t v14 0/6] DC states igt tests patch series Anshuman Gupta
                   ` (6 preceding siblings ...)
  2019-09-04 20:55 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
@ 2019-09-05  6:39 ` Arkadiusz Hiler
  7 siblings, 0 replies; 11+ messages in thread
From: Arkadiusz Hiler @ 2019-09-05  6:39 UTC (permalink / raw)
  To: Anshuman Gupta; +Cc: igt-dev, jyoti.r.yadav

On Wed, Sep 04, 2019 at 11:21:03PM +0530, Anshuman Gupta wrote:
> This is v14 of patch series, after some refactoring
> and minor review comment fixes. 

Hey,

This series introduces new undocumented tests:

i915_pm_dc
i915_pm_dc@dc5-dpms
i915_pm_dc@dc5-psr
i915_pm_dc@dc6-dpms
i915_pm_dc@dc6-psr

Can you document them as per the requirement in the [CONTRIBUTING.md]?

[Documentation] has more details on how to do this.

Here are few examples:
https://gitlab.freedesktop.org/drm/igt-gpu-tools/commit/0316695d03aa46108296b27f3982ec93200c7a6e
https://gitlab.freedesktop.org/drm/igt-gpu-tools/commit/443cc658e1e6b492ee17bf4f4d891029eb7a205d

Thanks in advance!

[CONTRIBUTING.md]: https://gitlab.freedesktop.org/drm/igt-gpu-tools/blob/master/CONTRIBUTING.md#L19
[Documentation]: https://drm.pages.freedesktop.org/igt-gpu-tools/igt-gpu-tools-Core.html#igt-describe

-- 
Cheers,
Arek
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [igt-dev] [PATCH i-g-t v14 6/6] tests/i915/i915_pm_dc:Skip the DC6 test if BIOS has disabled PC8+
  2019-09-19 17:30 [igt-dev] [PATCH i-g-t v14 0/6] DC states igt tests patch series Anshuman Gupta
@ 2019-09-19 17:30 ` Anshuman Gupta
  0 siblings, 0 replies; 11+ messages in thread
From: Anshuman Gupta @ 2019-09-19 17:30 UTC (permalink / raw)
  To: igt-dev; +Cc: jyoti.r.yadav, petri.latvala

As DC6 requires platform to enter PC8 package C state.
It make sense to skip the DC6 igt-test, if BIOS configuration
has disabled PC8+ package C states.

Signed-off-by: Anshuman Gupta <anshuman.gupta@intel.com>
Reviewed-by: Imre Deak <imre.deak@intel.com>
---
 tests/i915/i915_pm_dc.c | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/tests/i915/i915_pm_dc.c b/tests/i915/i915_pm_dc.c
index 2ea27b00..ce3319b7 100644
--- a/tests/i915/i915_pm_dc.c
+++ b/tests/i915/i915_pm_dc.c
@@ -23,10 +23,12 @@
  */
 
 #include <errno.h>
+#include <fcntl.h>
 #include <stdbool.h>
 #include <stdio.h>
 #include <string.h>
 #include "igt.h"
+#include "igt_kmod.h"
 #include "igt_psr.h"
 #include "igt_sysfs.h"
 #include "limits.h"
@@ -37,6 +39,7 @@
 
 typedef struct {
 	int drm_fd;
+	int msr_fd;
 	int debugfs_fd;
 	uint32_t devid;
 	igt_display_t display;
@@ -253,6 +256,12 @@ int main(int argc, char *argv[])
 		igt_require(has_runtime_pm);
 		igt_require(igt_pm_dmc_loaded(data.debugfs_fd));
 		igt_display_require(&data.display, data.drm_fd);
+		/* Make sure our Kernel supports MSR and the module is loaded */
+		igt_require(igt_kmod_load("msr", NULL) == 0);
+
+		data.msr_fd = open("/dev/cpu/0/msr", O_RDONLY);
+		igt_assert_f(data.msr_fd >= 0,
+			     "Can't open /dev/cpu/0/msr.\n");
 	}
 
 	igt_describe("This test validates display engine entry to DC5 state "
@@ -272,6 +281,8 @@ int main(int argc, char *argv[])
 		psr_enable(data.debugfs_fd, data.op_psr_mode);
 		igt_require_f(edp_psr_sink_support(&data),
 			      "Sink does not support PSR\n");
+		igt_require_f(igt_pm_pc8_plus_residencies_enabled(data.msr_fd),
+			      "PC8+ residencies not supported\n");
 		test_dc_state_psr(&data, CHECK_DC6);
 	}
 
@@ -284,11 +295,14 @@ int main(int argc, char *argv[])
 	igt_describe("This test validates display engine entry to DC5 state "
 		     "while all connectors's DPMS property set to OFF");
 	igt_subtest("dc6-dpms") {
+		igt_require_f(igt_pm_pc8_plus_residencies_enabled(data.msr_fd),
+			      "PC8+ residencies not supported\n");
 		test_dc_state_dpms(&data, CHECK_DC6);
 	}
 
 	igt_fixture {
 		close(data.debugfs_fd);
+		close(data.msr_fd);
 		display_fini(&data);
 	}
 
-- 
2.21.0

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [igt-dev] [PATCH i-g-t v14 6/6] tests/i915/i915_pm_dc:Skip the DC6 test if BIOS has disabled PC8+
  2019-09-06 14:05 Anshuman Gupta
@ 2019-09-06 14:05 ` Anshuman Gupta
  0 siblings, 0 replies; 11+ messages in thread
From: Anshuman Gupta @ 2019-09-06 14:05 UTC (permalink / raw)
  To: igt-dev; +Cc: jyoti.r.yadav

As DC6 requires platform to enter PC8 package C state.
It make sense to skip the DC6 igt-test, if BIOS configuration
has disabled PC8+ package C states.

Signed-off-by: Anshuman Gupta <anshuman.gupta@intel.com>
---
 tests/i915/i915_pm_dc.c | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/tests/i915/i915_pm_dc.c b/tests/i915/i915_pm_dc.c
index b93466a7..86c12adf 100644
--- a/tests/i915/i915_pm_dc.c
+++ b/tests/i915/i915_pm_dc.c
@@ -23,10 +23,12 @@
  */
 
 #include <errno.h>
+#include <fcntl.h>
 #include <stdbool.h>
 #include <stdio.h>
 #include <string.h>
 #include "igt.h"
+#include "igt_kmod.h"
 #include "igt_psr.h"
 #include "igt_sysfs.h"
 #include "limits.h"
@@ -37,6 +39,7 @@
 
 typedef struct {
 	int drm_fd;
+	int msr_fd;
 	int debugfs_fd;
 	uint32_t devid;
 	igt_display_t display;
@@ -253,6 +256,12 @@ int main(int argc, char *argv[])
 		igt_require(has_runtime_pm);
 		igt_require(igt_pm_dmc_loaded(data.debugfs_fd));
 		igt_display_require(&data.display, data.drm_fd);
+		/* Make sure our Kernel supports MSR and the module is loaded */
+		igt_require(igt_kmod_load("msr", NULL) == 0);
+
+		data.msr_fd = open("/dev/cpu/0/msr", O_RDONLY);
+		igt_assert_f(data.msr_fd >= 0,
+			     "Can't open /dev/cpu/0/msr.\n");
 	}
 
 	igt_describe("DC5 igt test with PSR Sleep state");
@@ -270,6 +279,8 @@ int main(int argc, char *argv[])
 		psr_enable(data.debugfs_fd, data.op_psr_mode);
 		igt_require_f(edp_psr_sink_support(&data),
 			      "Sink does not support PSR\n");
+		igt_require_f(is_bios_limits_pc8_plus_residencies(data.msr_fd),
+			      "PC8+ residencies not supported\n");
 		test_dc_state_psr(&data, CHECK_DC6);
 	}
 
@@ -280,11 +291,14 @@ int main(int argc, char *argv[])
 
 	igt_describe("DC6 igt test with all connectors DPMS OFF/ON");
 	igt_subtest("dc6-dpms") {
+		igt_require_f(is_bios_limits_pc8_plus_residencies(data.msr_fd),
+			      "PC8+ residencies not supported\n");
 		test_dc_state_dpms(&data, CHECK_DC6);
 	}
 
 	igt_fixture {
 		close(data.debugfs_fd);
+		close(data.msr_fd);
 		display_fini(&data);
 	}
 
-- 
2.21.0

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2019-09-19 17:37 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-04 17:51 [igt-dev] [PATCH i-g-t v14 0/6] DC states igt tests patch series Anshuman Gupta
2019-09-04 17:51 ` [igt-dev] [PATCH i-g-t v14 1/6] lib/igt_pm: igt lib helper routines to support DC5/6 tests Anshuman Gupta
2019-09-04 17:51 ` [igt-dev] [PATCH i-g-t v14 3/6] tests/i915/i915_pm_dc: Added test for DC6 during PSR Anshuman Gupta
2019-09-04 17:51 ` [igt-dev] [PATCH i-g-t v14 4/6] tests/i915/i915_pm_dc: Added test for DC5 during DPMS Anshuman Gupta
2019-09-04 17:51 ` [igt-dev] [PATCH i-g-t v14 5/6] tests/i915/i915_pm_dc: Added test for DC6 " Anshuman Gupta
2019-09-04 17:51 ` [igt-dev] [PATCH i-g-t v14 6/6] tests/i915/i915_pm_dc:Skip the DC6 test if BIOS has disabled PC8+ Anshuman Gupta
2019-09-04 18:55 ` [igt-dev] ✓ Fi.CI.BAT: success for DC states igt tests patch series (rev19) Patchwork
2019-09-04 20:55 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2019-09-05  6:39 ` [igt-dev] [PATCH i-g-t v14 0/6] DC states igt tests patch series Arkadiusz Hiler
2019-09-06 14:05 Anshuman Gupta
2019-09-06 14:05 ` [igt-dev] [PATCH i-g-t v14 6/6] tests/i915/i915_pm_dc:Skip the DC6 test if BIOS has disabled PC8+ Anshuman Gupta
2019-09-19 17:30 [igt-dev] [PATCH i-g-t v14 0/6] DC states igt tests patch series Anshuman Gupta
2019-09-19 17:30 ` [igt-dev] [PATCH i-g-t v14 6/6] tests/i915/i915_pm_dc:Skip the DC6 test if BIOS has disabled PC8+ Anshuman Gupta

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.