public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
* [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
  0 siblings, 0 replies; 15+ 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] 15+ 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-06 14:05 [igt-dev] [PATCH i-g-t v14 0/6] DC states igt tests patch series Anshuman Gupta
@ 2019-09-06 14:05 ` Anshuman Gupta
  2019-09-17 16:55   ` Imre Deak
  0 siblings, 1 reply; 15+ messages in thread
From: Anshuman Gupta @ 2019-09-06 14:05 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] 15+ messages in thread

* Re: [igt-dev] [PATCH i-g-t v14 1/6] lib/igt_pm: igt lib helper routines to support DC5/6 tests
  2019-09-06 14:05 ` [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-17 16:55   ` Imre Deak
  0 siblings, 0 replies; 15+ messages in thread
From: Imre Deak @ 2019-09-17 16:55 UTC (permalink / raw)
  To: Anshuman Gupta; +Cc: igt-dev, jyoti.r.yadav

On Fri, Sep 06, 2019 at 07:35:23PM +0530, Anshuman Gupta wrote:
> 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.
> +

The DocBook header is misformatted.

> + * 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:

For library functions we need a proper prefix and I think something like

	igt_pm_pc8_plus_residencies_disabled

would be more descriptive.

> +

Misformatted DocBook header.

With the above fixed, on the whole series:
Reviewed-by: Imre Deak <imre.deak@intel.com>

Note that the new tests will fail consistenctly on a bunch of machines,
but those failures are most probably caused by another device blocking a
low-power state (and thus preventing DC6 entry/exit). Imo we should
still merge these patches since we want the coverage on machines w/o
such problematic devices and we could follow up trying to enable the low
power states for other devices too later (for instance by tweaking the
corresponding BIOS power setup settings).

> + * 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	[flat|nested] 15+ messages in thread

* [igt-dev] [PATCH i-g-t v14 0/6] DC states igt tests patch series
@ 2019-09-19 17:30 Anshuman Gupta
  2019-09-19 17:30 ` [igt-dev] [PATCH i-g-t v14 1/6] lib/igt_pm: igt lib helper routines to support DC5/6 tests Anshuman Gupta
                   ` (6 more replies)
  0 siblings, 7 replies; 15+ messages in thread
From: Anshuman Gupta @ 2019-09-19 17:30 UTC (permalink / raw)
  To: igt-dev; +Cc: jyoti.r.yadav, petri.latvala

Sending v14 series again after doing minor cosmetics fixes in order to add 
Imre's RB (Imre has provided RB with some minor cosmetics fixes) 
Also added more descriptive Documentation suggested by Petri.

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        | 310 +++++++++++++++++++++++++++++++++
 tests/i915/i915_pm_rpm.c       |  39 +----
 tests/meson.build              |   1 +
 7 files changed, 493 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] 15+ 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-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
  2019-09-19 17:30 ` [igt-dev] [PATCH i-g-t v14 3/6] tests/i915/i915_pm_dc: Added test for DC6 during PSR Anshuman Gupta
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 15+ messages in thread
From: Anshuman Gupta @ 2019-09-19 17:30 UTC (permalink / raw)
  To: igt-dev; +Cc: jyoti.r.yadav, petri.latvala

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 igt_pm_pc8_plus_residencies_enabled() 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>
Reviewed-by: Imre Deak <imre.deak@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..64ce240e 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");
+}
+
+/**
+ * igt_pm_pc8_plus_residencies_enabled:
+ * @msr_fd: fd to /dev/cpu/0/msr
+ * Check whether BIOS has disabled the PC8 package deeper state.
+ *
+ * Returns:
+ * True if PC8+ package deeper state enabled on machine otherwise false.
+ */
+bool igt_pm_pc8_plus_residencies_enabled(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..7dc24174 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 igt_pm_pc8_plus_residencies_enabled(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..20c4ff90 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 igt_pm_pc8_plus_residencies_enabled(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] 15+ 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-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 1/6] lib/igt_pm: igt lib helper routines to support DC5/6 tests Anshuman Gupta
@ 2019-09-19 17:30 ` Anshuman Gupta
  2019-09-19 17:30 ` [igt-dev] [PATCH i-g-t v14 4/6] tests/i915/i915_pm_dc: Added test for DC5 during DPMS Anshuman Gupta
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 15+ messages in thread
From: Anshuman Gupta @ 2019-09-19 17:30 UTC (permalink / raw)
  To: igt-dev; +Cc: jyoti.r.yadav, petri.latvala

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>
Reviewed-by: Imre Deak <imre.deak@intel.com>
---
 tests/i915/i915_pm_dc.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/tests/i915/i915_pm_dc.c b/tests/i915/i915_pm_dc.c
index 438be7a5..944618a1 100644
--- a/tests/i915/i915_pm_dc.c
+++ b/tests/i915/i915_pm_dc.c
@@ -203,6 +203,16 @@ int main(int argc, char *argv[])
 		test_dc_state_psr(&data, CHECK_DC5);
 	}
 
+	igt_describe("This test validates display engine entry to DC6 state "
+		     "while PSR is active");
+	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] 15+ 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-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 1/6] lib/igt_pm: igt lib helper routines to support DC5/6 tests Anshuman Gupta
  2019-09-19 17:30 ` [igt-dev] [PATCH i-g-t v14 3/6] tests/i915/i915_pm_dc: Added test for DC6 during PSR Anshuman Gupta
@ 2019-09-19 17:30 ` Anshuman Gupta
  2019-09-19 17:30 ` [igt-dev] [PATCH i-g-t v14 5/6] tests/i915/i915_pm_dc: Added test for DC6 " Anshuman Gupta
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 15+ messages in thread
From: Anshuman Gupta @ 2019-09-19 17:30 UTC (permalink / raw)
  To: igt-dev; +Cc: jyoti.r.yadav, petri.latvala

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 | 68 +++++++++++++++++++++++++++++++++++++++++
 1 file changed, 68 insertions(+)

diff --git a/tests/i915/i915_pm_dc.c b/tests/i915/i915_pm_dc.c
index 944618a1..553f8407 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);
+}
+
 IGT_TEST_DESCRIPTION("These tests validate Display Power DC states");
 int main(int argc, char *argv[])
 {
@@ -213,6 +275,12 @@ int main(int argc, char *argv[])
 		test_dc_state_psr(&data, CHECK_DC6);
 	}
 
+	igt_describe("This test validates display engine entry to DC5 state "
+		     "while all connectors's DPMS property set to OFF");
+	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] 15+ 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-19 17:30 [igt-dev] [PATCH i-g-t v14 0/6] DC states igt tests patch series Anshuman Gupta
                   ` (2 preceding siblings ...)
  2019-09-19 17:30 ` [igt-dev] [PATCH i-g-t v14 4/6] tests/i915/i915_pm_dc: Added test for DC5 during DPMS Anshuman Gupta
@ 2019-09-19 17:30 ` 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
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 15+ messages in thread
From: Anshuman Gupta @ 2019-09-19 17:30 UTC (permalink / raw)
  To: igt-dev; +Cc: jyoti.r.yadav, petri.latvala

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() in order 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>
Reviewed-by: Imre Deak <imre.deak@intel.com>
---
 tests/i915/i915_pm_dc.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/tests/i915/i915_pm_dc.c b/tests/i915/i915_pm_dc.c
index 553f8407..2ea27b00 100644
--- a/tests/i915/i915_pm_dc.c
+++ b/tests/i915/i915_pm_dc.c
@@ -281,6 +281,12 @@ int main(int argc, char *argv[])
 		test_dc_state_dpms(&data, CHECK_DC5);
 	}
 
+	igt_describe("This test validates display engine entry to DC5 state "
+		     "while all connectors's DPMS property set to OFF");
+	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] 15+ 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
                   ` (3 preceding siblings ...)
  2019-09-19 17:30 ` [igt-dev] [PATCH i-g-t v14 5/6] tests/i915/i915_pm_dc: Added test for DC6 " Anshuman Gupta
@ 2019-09-19 17:30 ` Anshuman Gupta
  2019-09-19 18:53 ` [igt-dev] ✓ Fi.CI.BAT: success for DC states igt tests patch series (rev21) Patchwork
  2019-09-20  5:46 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
  6 siblings, 0 replies; 15+ 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] 15+ messages in thread

* [igt-dev] ✓ Fi.CI.BAT: success for DC states igt tests patch series (rev21)
  2019-09-19 17:30 [igt-dev] [PATCH i-g-t v14 0/6] DC states igt tests patch series Anshuman Gupta
                   ` (4 preceding siblings ...)
  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
@ 2019-09-19 18:53 ` Patchwork
  2019-09-20  5:46 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
  6 siblings, 0 replies; 15+ messages in thread
From: Patchwork @ 2019-09-19 18:53 UTC (permalink / raw)
  To: Gupta, Anshuman; +Cc: igt-dev

== Series Details ==

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

== Summary ==

CI Bug Log - changes from CI_DRM_6923 -> IGTPW_3480
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

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

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

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

### IGT changes ###

#### Issues hit ####

  * igt@gem_ctx_create@basic-files:
    - fi-bxt-dsi:         [PASS][1] -> [INCOMPLETE][2] ([fdo#103927])
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6923/fi-bxt-dsi/igt@gem_ctx_create@basic-files.html
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3480/fi-bxt-dsi/igt@gem_ctx_create@basic-files.html

  * igt@gem_mmap_gtt@basic:
    - fi-icl-u3:          [PASS][3] -> [DMESG-WARN][4] ([fdo#107724]) +1 similar issue
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6923/fi-icl-u3/igt@gem_mmap_gtt@basic.html
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3480/fi-icl-u3/igt@gem_mmap_gtt@basic.html

  * igt@kms_frontbuffer_tracking@basic:
    - fi-icl-u2:          [PASS][5] -> [FAIL][6] ([fdo#103167])
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6923/fi-icl-u2/igt@kms_frontbuffer_tracking@basic.html
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3480/fi-icl-u2/igt@kms_frontbuffer_tracking@basic.html

  
#### Possible fixes ####

  * igt@gem_ctx_switch@rcs0:
    - {fi-icl-guc}:       [INCOMPLETE][7] ([fdo#107713]) -> [PASS][8]
   [7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6923/fi-icl-guc/igt@gem_ctx_switch@rcs0.html
   [8]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3480/fi-icl-guc/igt@gem_ctx_switch@rcs0.html

  * igt@i915_module_load@reload-no-display:
    - {fi-icl-u4}:        [DMESG-WARN][9] ([fdo#105602]) -> [PASS][10]
   [9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6923/fi-icl-u4/igt@i915_module_load@reload-no-display.html
   [10]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3480/fi-icl-u4/igt@i915_module_load@reload-no-display.html

  * igt@vgem_basic@second-client:
    - fi-icl-u3:          [DMESG-WARN][11] ([fdo#107724]) -> [PASS][12] +1 similar issue
   [11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6923/fi-icl-u3/igt@vgem_basic@second-client.html
   [12]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3480/fi-icl-u3/igt@vgem_basic@second-client.html

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

  [fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167
  [fdo#103927]: https://bugs.freedesktop.org/show_bug.cgi?id=103927
  [fdo#105602]: https://bugs.freedesktop.org/show_bug.cgi?id=105602
  [fdo#106107]: https://bugs.freedesktop.org/show_bug.cgi?id=106107
  [fdo#106350]: https://bugs.freedesktop.org/show_bug.cgi?id=106350
  [fdo#107713]: https://bugs.freedesktop.org/show_bug.cgi?id=107713
  [fdo#107724]: https://bugs.freedesktop.org/show_bug.cgi?id=107724
  [fdo#109100]: https://bugs.freedesktop.org/show_bug.cgi?id=109100


Participating hosts (54 -> 42)
------------------------------

  Missing    (12): fi-ilk-m540 fi-tgl-u fi-tgl-u2 fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-whl-u fi-gdg-551 fi-icl-y fi-byt-clapper fi-bdw-samus fi-kbl-r 


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

  * CI: CI-20190529 -> None
  * IGT: IGT_5193 -> IGTPW_3480

  CI-20190529: 20190529
  CI_DRM_6923: eb267f56d12379c508533b77b89ca1faeeeaf053 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGTPW_3480: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3480/
  IGT_5193: 924e5c59dbb82938e743efd6b0812eeb5760b70d @ 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_3480/
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

* [igt-dev] ✓ Fi.CI.IGT: success for DC states igt tests patch series (rev21)
  2019-09-19 17:30 [igt-dev] [PATCH i-g-t v14 0/6] DC states igt tests patch series Anshuman Gupta
                   ` (5 preceding siblings ...)
  2019-09-19 18:53 ` [igt-dev] ✓ Fi.CI.BAT: success for DC states igt tests patch series (rev21) Patchwork
@ 2019-09-20  5:46 ` Patchwork
  2019-09-20 10:04   ` Petri Latvala
  6 siblings, 1 reply; 15+ messages in thread
From: Patchwork @ 2019-09-20  5:46 UTC (permalink / raw)
  To: Gupta, Anshuman; +Cc: igt-dev

== Series Details ==

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

== Summary ==

CI Bug Log - changes from CI_DRM_6923_full -> IGTPW_3480_full
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

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

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

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

### IGT changes ###

#### Possible regressions ####

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

  
New tests
---------

  New tests have been introduced between CI_DRM_6923_full and IGTPW_3480_full:

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

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

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

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

  * igt@i915_pm_dc@dc6-psr:
    - Statuses : 1 pass(s) 5 skip(s)
    - Exec time: [0.0, 3.37] s

  

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

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

### IGT changes ###

#### Issues hit ####

  * igt@gem_exec_schedule@preempt-other-bsd1:
    - shard-iclb:         [PASS][3] -> [SKIP][4] ([fdo#109276]) +16 similar issues
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6923/shard-iclb1/igt@gem_exec_schedule@preempt-other-bsd1.html
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3480/shard-iclb3/igt@gem_exec_schedule@preempt-other-bsd1.html

  * igt@gem_exec_schedule@preemptive-hang-bsd:
    - shard-iclb:         [PASS][5] -> [SKIP][6] ([fdo#111325]) +6 similar issues
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6923/shard-iclb8/igt@gem_exec_schedule@preemptive-hang-bsd.html
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3480/shard-iclb2/igt@gem_exec_schedule@preemptive-hang-bsd.html

  * igt@i915_pm_rc6_residency@rc6-accuracy:
    - shard-snb:          [PASS][7] -> [SKIP][8] ([fdo#109271])
   [7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6923/shard-snb5/igt@i915_pm_rc6_residency@rc6-accuracy.html
   [8]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3480/shard-snb1/igt@i915_pm_rc6_residency@rc6-accuracy.html

  * igt@i915_suspend@fence-restore-tiled2untiled:
    - shard-apl:          [PASS][9] -> [DMESG-WARN][10] ([fdo#108566]) +4 similar issues
   [9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6923/shard-apl2/igt@i915_suspend@fence-restore-tiled2untiled.html
   [10]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3480/shard-apl6/igt@i915_suspend@fence-restore-tiled2untiled.html

  * igt@kms_cursor_crc@pipe-b-cursor-128x42-onscreen:
    - shard-apl:          [PASS][11] -> [FAIL][12] ([fdo#103232])
   [11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6923/shard-apl4/igt@kms_cursor_crc@pipe-b-cursor-128x42-onscreen.html
   [12]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3480/shard-apl1/igt@kms_cursor_crc@pipe-b-cursor-128x42-onscreen.html
    - shard-kbl:          [PASS][13] -> [FAIL][14] ([fdo#103232])
   [13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6923/shard-kbl4/igt@kms_cursor_crc@pipe-b-cursor-128x42-onscreen.html
   [14]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3480/shard-kbl4/igt@kms_cursor_crc@pipe-b-cursor-128x42-onscreen.html

  * igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-cur-indfb-draw-mmap-gtt:
    - shard-iclb:         [PASS][15] -> [FAIL][16] ([fdo#103167]) +5 similar issues
   [15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6923/shard-iclb4/igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-cur-indfb-draw-mmap-gtt.html
   [16]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3480/shard-iclb3/igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-cur-indfb-draw-mmap-gtt.html

  * igt@kms_psr@psr2_suspend:
    - shard-iclb:         [PASS][17] -> [SKIP][18] ([fdo#109441])
   [17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6923/shard-iclb2/igt@kms_psr@psr2_suspend.html
   [18]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3480/shard-iclb1/igt@kms_psr@psr2_suspend.html

  
#### Possible fixes ####

  * igt@gem_ctx_shared@exec-single-timeline-bsd:
    - shard-iclb:         [SKIP][19] ([fdo#110841]) -> [PASS][20]
   [19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6923/shard-iclb4/igt@gem_ctx_shared@exec-single-timeline-bsd.html
   [20]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3480/shard-iclb8/igt@gem_ctx_shared@exec-single-timeline-bsd.html

  * igt@gem_exec_schedule@preempt-bsd1:
    - shard-iclb:         [SKIP][21] ([fdo#109276]) -> [PASS][22] +17 similar issues
   [21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6923/shard-iclb7/igt@gem_exec_schedule@preempt-bsd1.html
   [22]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3480/shard-iclb1/igt@gem_exec_schedule@preempt-bsd1.html

  * igt@gem_exec_schedule@preempt-other-chain-bsd:
    - shard-iclb:         [SKIP][23] ([fdo#111325]) -> [PASS][24] +4 similar issues
   [23]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6923/shard-iclb1/igt@gem_exec_schedule@preempt-other-chain-bsd.html
   [24]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3480/shard-iclb3/igt@gem_exec_schedule@preempt-other-chain-bsd.html

  * igt@gem_workarounds@suspend-resume-context:
    - shard-apl:          [INCOMPLETE][25] ([fdo#103927]) -> [PASS][26] +1 similar issue
   [25]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6923/shard-apl1/igt@gem_workarounds@suspend-resume-context.html
   [26]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3480/shard-apl6/igt@gem_workarounds@suspend-resume-context.html

  * igt@i915_pm_rc6_residency@rc6-accuracy:
    - shard-kbl:          [SKIP][27] ([fdo#109271]) -> [PASS][28] +1 similar issue
   [27]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6923/shard-kbl1/igt@i915_pm_rc6_residency@rc6-accuracy.html
   [28]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3480/shard-kbl1/igt@i915_pm_rc6_residency@rc6-accuracy.html

  * igt@kms_cursor_crc@pipe-b-cursor-64x64-random:
    - shard-iclb:         [INCOMPLETE][29] ([fdo#107713]) -> [PASS][30]
   [29]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6923/shard-iclb7/igt@kms_cursor_crc@pipe-b-cursor-64x64-random.html
   [30]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3480/shard-iclb4/igt@kms_cursor_crc@pipe-b-cursor-64x64-random.html

  * igt@kms_cursor_crc@pipe-c-cursor-256x256-random:
    - shard-kbl:          [FAIL][31] ([fdo#103232]) -> [PASS][32] +2 similar issues
   [31]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6923/shard-kbl2/igt@kms_cursor_crc@pipe-c-cursor-256x256-random.html
   [32]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3480/shard-kbl2/igt@kms_cursor_crc@pipe-c-cursor-256x256-random.html

  * igt@kms_cursor_crc@pipe-c-cursor-64x21-random:
    - shard-apl:          [FAIL][33] ([fdo#103232]) -> [PASS][34]
   [33]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6923/shard-apl6/igt@kms_cursor_crc@pipe-c-cursor-64x21-random.html
   [34]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3480/shard-apl1/igt@kms_cursor_crc@pipe-c-cursor-64x21-random.html

  * igt@kms_flip@flip-vs-suspend-interruptible:
    - shard-apl:          [DMESG-WARN][35] ([fdo#108566]) -> [PASS][36] +2 similar issues
   [35]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6923/shard-apl1/igt@kms_flip@flip-vs-suspend-interruptible.html
   [36]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3480/shard-apl3/igt@kms_flip@flip-vs-suspend-interruptible.html
    - shard-hsw:          [INCOMPLETE][37] ([fdo#103540]) -> [PASS][38]
   [37]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6923/shard-hsw4/igt@kms_flip@flip-vs-suspend-interruptible.html
   [38]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3480/shard-hsw1/igt@kms_flip@flip-vs-suspend-interruptible.html

  * igt@kms_frontbuffer_tracking@fbc-1p-primscrn-cur-indfb-draw-render:
    - shard-iclb:         [FAIL][39] ([fdo#103167]) -> [PASS][40] +1 similar issue
   [39]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6923/shard-iclb7/igt@kms_frontbuffer_tracking@fbc-1p-primscrn-cur-indfb-draw-render.html
   [40]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3480/shard-iclb5/igt@kms_frontbuffer_tracking@fbc-1p-primscrn-cur-indfb-draw-render.html

  * igt@kms_frontbuffer_tracking@psr-1p-offscren-pri-shrfb-draw-render:
    - shard-iclb:         [INCOMPLETE][41] ([fdo#106978] / [fdo#107713]) -> [PASS][42]
   [41]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6923/shard-iclb7/igt@kms_frontbuffer_tracking@psr-1p-offscren-pri-shrfb-draw-render.html
   [42]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3480/shard-iclb4/igt@kms_frontbuffer_tracking@psr-1p-offscren-pri-shrfb-draw-render.html

  * igt@kms_psr@psr2_primary_mmap_cpu:
    - shard-iclb:         [SKIP][43] ([fdo#109441]) -> [PASS][44] +2 similar issues
   [43]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6923/shard-iclb3/igt@kms_psr@psr2_primary_mmap_cpu.html
   [44]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3480/shard-iclb2/igt@kms_psr@psr2_primary_mmap_cpu.html

  * igt@kms_setmode@basic:
    - shard-apl:          [FAIL][45] ([fdo#99912]) -> [PASS][46]
   [45]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6923/shard-apl6/igt@kms_setmode@basic.html
   [46]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3480/shard-apl8/igt@kms_setmode@basic.html

  
#### Warnings ####

  * igt@gem_mocs_settings@mocs-reset-bsd2:
    - shard-iclb:         [SKIP][47] ([fdo#109276]) -> [FAIL][48] ([fdo#111330])
   [47]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6923/shard-iclb5/igt@gem_mocs_settings@mocs-reset-bsd2.html
   [48]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3480/shard-iclb4/igt@gem_mocs_settings@mocs-reset-bsd2.html

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

  [fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167
  [fdo#103232]: https://bugs.freedesktop.org/show_bug.cgi?id=103232
  [fdo#103540]: https://bugs.freedesktop.org/show_bug.cgi?id=103540
  [fdo#103927]: https://bugs.freedesktop.org/show_bug.cgi?id=103927
  [fdo#105411]: https://bugs.freedesktop.org/show_bug.cgi?id=105411
  [fdo#106978]: https://bugs.freedesktop.org/show_bug.cgi?id=106978
  [fdo#107713]: https://bugs.freedesktop.org/show_bug.cgi?id=107713
  [fdo#108566]: https://bugs.freedesktop.org/show_bug.cgi?id=108566
  [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#110841]: https://bugs.freedesktop.org/show_bug.cgi?id=110841
  [fdo#111325]: https://bugs.freedesktop.org/show_bug.cgi?id=111325
  [fdo#111330]: https://bugs.freedesktop.org/show_bug.cgi?id=111330
  [fdo#99912]: https://bugs.freedesktop.org/show_bug.cgi?id=99912


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_5193 -> IGTPW_3480
  * Piglit: piglit_4509 -> None

  CI-20190529: 20190529
  CI_DRM_6923: eb267f56d12379c508533b77b89ca1faeeeaf053 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGTPW_3480: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3480/
  IGT_5193: 924e5c59dbb82938e743efd6b0812eeb5760b70d @ 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_3480/
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

* Re: [igt-dev] ✓ Fi.CI.IGT: success for DC states igt tests patch series (rev21)
  2019-09-20  5:46 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
@ 2019-09-20 10:04   ` Petri Latvala
  2019-09-20 10:13     ` Gupta, Anshuman
  0 siblings, 1 reply; 15+ messages in thread
From: Petri Latvala @ 2019-09-20 10:04 UTC (permalink / raw)
  To: igt-dev; +Cc: Lakshminarayana Vudum

On Fri, Sep 20, 2019 at 05:46:32AM +0000, Patchwork wrote:
> == Series Details ==
> 
> Series: DC states igt tests patch series (rev21)
> URL   : https://patchwork.freedesktop.org/series/56713/
> State : success
> 
> == Summary ==
> 
> CI Bug Log - changes from CI_DRM_6923_full -> IGTPW_3480_full
> ====================================================
> 
> Summary
> -------
> 
>   **SUCCESS**
> 
>   No regressions found.
> 
>   External URL: https://patchwork.freedesktop.org/api/1.0/series/56713/revisions/21/mbox/
> 
> Possible new issues
> -------------------
> 
>   Here are the unknown changes that may have been introduced in IGTPW_3480_full:
> 
> ### IGT changes ###
> 
> #### Possible regressions ####
> 
>   * {igt@i915_pm_dc@dc6-dpms} (NEW):
>     - shard-iclb:         NOTRUN -> [FAIL][1]
>    [1]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3480/shard-iclb3/igt@i915_pm_dc@dc6-dpms.html
>     - shard-kbl:          NOTRUN -> [FAIL][2]
>    [2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3480/shard-kbl1/igt@i915_pm_dc@dc6-dpms.html


The series looks otherwise good to go, but these two fails need an ack
from Martin/Lakshmi first for filing bugs and cibuglog filters for
them.


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

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

* Re: [igt-dev] ✓ Fi.CI.IGT: success for DC states igt tests patch series (rev21)
  2019-09-20 10:04   ` Petri Latvala
@ 2019-09-20 10:13     ` Gupta, Anshuman
  2019-09-20 10:44       ` Lakshmi
  0 siblings, 1 reply; 15+ messages in thread
From: Gupta, Anshuman @ 2019-09-20 10:13 UTC (permalink / raw)
  To: igt-dev, Martin Peres, Lakshminarayana Vudum



On 9/20/2019 3:34 PM, Petri Latvala wrote:
> On Fri, Sep 20, 2019 at 05:46:32AM +0000, Patchwork wrote:
>> == Series Details ==
>>
>> Series: DC states igt tests patch series (rev21)
>> URL   : https://patchwork.freedesktop.org/series/56713/
>> State : success
>>
>> == Summary ==
>>
>> CI Bug Log - changes from CI_DRM_6923_full -> IGTPW_3480_full
>> ====================================================
>>
>> Summary
>> -------
>>
>>    **SUCCESS**
>>
>>    No regressions found.
>>
>>    External URL: https://patchwork.freedesktop.org/api/1.0/series/56713/revisions/21/mbox/
>>
>> Possible new issues
>> -------------------
>>
>>    Here are the unknown changes that may have been introduced in IGTPW_3480_full:
>>
>> ### IGT changes ###
>>
>> #### Possible regressions ####
>>
>>    * {igt@i915_pm_dc@dc6-dpms} (NEW):
>>      - shard-iclb:         NOTRUN -> [FAIL][1]
>>     [1]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3480/shard-iclb3/igt@i915_pm_dc@dc6-dpms.html
>>      - shard-kbl:          NOTRUN -> [FAIL][2]
>>     [2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3480/shard-kbl1/igt@i915_pm_dc@dc6-dpms.html
> 
> 
> The series looks otherwise good to go, but these two fails need an ack
> from Martin/Lakshmi first for filing bugs and cibuglog filters for
> them.
Hi Petri ,
These failures due to the reason few platform are not able to go to PC8 
state.
There is already a bug raised for these failures, 
https://bugs.freedesktop.org/show_bug.cgi?id=110548
I have put my analysis there (PCIe express devices blocking it).
Thanks ,
Anshuman Gupta.

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

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

* Re: [igt-dev] ✓ Fi.CI.IGT: success for DC states igt tests patch series (rev21)
  2019-09-20 10:13     ` Gupta, Anshuman
@ 2019-09-20 10:44       ` Lakshmi
  2019-09-20 10:53         ` Petri Latvala
  0 siblings, 1 reply; 15+ messages in thread
From: Lakshmi @ 2019-09-20 10:44 UTC (permalink / raw)
  To: Gupta, Anshuman, igt-dev, Martin Peres



On 20.09.2019 13:13, Gupta, Anshuman wrote:
> 
> 
> On 9/20/2019 3:34 PM, Petri Latvala wrote:
>> On Fri, Sep 20, 2019 at 05:46:32AM +0000, Patchwork wrote:
>>> == Series Details ==
>>>
>>> Series: DC states igt tests patch series (rev21)
>>> URL   : https://patchwork.freedesktop.org/series/56713/
>>> State : success
>>>
>>> == Summary ==
>>>
>>> CI Bug Log - changes from CI_DRM_6923_full -> IGTPW_3480_full
>>> ====================================================
>>>
>>> Summary
>>> -------
>>>
>>>    **SUCCESS**
>>>
>>>    No regressions found.
>>>
>>>    External URL: 
>>> https://patchwork.freedesktop.org/api/1.0/series/56713/revisions/21/mbox/ 
>>>
>>>
>>> Possible new issues
>>> -------------------
>>>
>>>    Here are the unknown changes that may have been introduced in 
>>> IGTPW_3480_full:
>>>
>>> ### IGT changes ###
>>>
>>> #### Possible regressions ####
>>>
>>>    * {igt@i915_pm_dc@dc6-dpms} (NEW):
>>>      - shard-iclb:         NOTRUN -> [FAIL][1]
>>>     [1]: 
>>> https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3480/shard-iclb3/igt@i915_pm_dc@dc6-dpms.html 
>>>
>>>      - shard-kbl:          NOTRUN -> [FAIL][2]
>>>     [2]: 
>>> https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3480/shard-kbl1/igt@i915_pm_dc@dc6-dpms.html 
>>>
>>
>>
>> The series looks otherwise good to go, but these two fails need an ack
>> from Martin/Lakshmi first for filing bugs and cibuglog filters for
>> them.
> Hi Petri ,
> These failures due to the reason few platform are not able to go to PC8 
> state.
> There is already a bug raised for these failures, 
> https://bugs.freedesktop.org/show_bug.cgi?id=110548
> I have put my analysis there (PCIe express devices blocking it).
> Thanks ,
> Anshuman Gupta.
> 
Currently I am unable to associate these failures to the Bug 110548 as 
this is a new test which is unavailable in our list in CI bug log. So, I 
will associate these failures to 110548 once I see post-merge results.
>>
>>
---------------------------------------------------------------------
Intel Finland Oy
Registered Address: PL 281, 00181 Helsinki 
Business Identity Code: 0357606 - 4 
Domiciled in Helsinki 

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

* Re: [igt-dev] ✓ Fi.CI.IGT: success for DC states igt tests patch series (rev21)
  2019-09-20 10:44       ` Lakshmi
@ 2019-09-20 10:53         ` Petri Latvala
  0 siblings, 0 replies; 15+ messages in thread
From: Petri Latvala @ 2019-09-20 10:53 UTC (permalink / raw)
  To: Lakshmi; +Cc: igt-dev

On Fri, Sep 20, 2019 at 01:44:17PM +0300, Lakshmi wrote:
> 
> 
> On 20.09.2019 13:13, Gupta, Anshuman wrote:
> > 
> > 
> > On 9/20/2019 3:34 PM, Petri Latvala wrote:
> > > On Fri, Sep 20, 2019 at 05:46:32AM +0000, Patchwork wrote:
> > > > == Series Details ==
> > > > 
> > > > Series: DC states igt tests patch series (rev21)
> > > > URL   : https://patchwork.freedesktop.org/series/56713/
> > > > State : success
> > > > 
> > > > == Summary ==
> > > > 
> > > > CI Bug Log - changes from CI_DRM_6923_full -> IGTPW_3480_full
> > > > ====================================================
> > > > 
> > > > Summary
> > > > -------
> > > > 
> > > >    **SUCCESS**
> > > > 
> > > >    No regressions found.
> > > > 
> > > >    External URL: https://patchwork.freedesktop.org/api/1.0/series/56713/revisions/21/mbox/
> > > > 
> > > > 
> > > > Possible new issues
> > > > -------------------
> > > > 
> > > >    Here are the unknown changes that may have been introduced in
> > > > IGTPW_3480_full:
> > > > 
> > > > ### IGT changes ###
> > > > 
> > > > #### Possible regressions ####
> > > > 
> > > >    * {igt@i915_pm_dc@dc6-dpms} (NEW):
> > > >      - shard-iclb:         NOTRUN -> [FAIL][1]
> > > >     [1]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3480/shard-iclb3/igt@i915_pm_dc@dc6-dpms.html
> > > > 
> > > >      - shard-kbl:          NOTRUN -> [FAIL][2]
> > > >     [2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3480/shard-kbl1/igt@i915_pm_dc@dc6-dpms.html
> > > > 
> > > 
> > > 
> > > The series looks otherwise good to go, but these two fails need an ack
> > > from Martin/Lakshmi first for filing bugs and cibuglog filters for
> > > them.
> > Hi Petri ,
> > These failures due to the reason few platform are not able to go to PC8
> > state.
> > There is already a bug raised for these failures,
> > https://bugs.freedesktop.org/show_bug.cgi?id=110548
> > I have put my analysis there (PCIe express devices blocking it).
> > Thanks ,
> > Anshuman Gupta.
> > 
> Currently I am unable to associate these failures to the Bug 110548 as this
> is a new test which is unavailable in our list in CI bug log. So, I will
> associate these failures to 110548 once I see post-merge results.

Ok, thanks.

Merged the series.


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

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

end of thread, other threads:[~2019-09-20 10:53 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 1/6] lib/igt_pm: igt lib helper routines to support DC5/6 tests Anshuman Gupta
2019-09-19 17:30 ` [igt-dev] [PATCH i-g-t v14 3/6] tests/i915/i915_pm_dc: Added test for DC6 during PSR Anshuman Gupta
2019-09-19 17:30 ` [igt-dev] [PATCH i-g-t v14 4/6] tests/i915/i915_pm_dc: Added test for DC5 during DPMS Anshuman Gupta
2019-09-19 17:30 ` [igt-dev] [PATCH i-g-t v14 5/6] tests/i915/i915_pm_dc: Added test for DC6 " 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
2019-09-19 18:53 ` [igt-dev] ✓ Fi.CI.BAT: success for DC states igt tests patch series (rev21) Patchwork
2019-09-20  5:46 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2019-09-20 10:04   ` Petri Latvala
2019-09-20 10:13     ` Gupta, Anshuman
2019-09-20 10:44       ` Lakshmi
2019-09-20 10:53         ` Petri Latvala
  -- strict thread matches above, loose matches on Subject: below --
2019-09-06 14:05 [igt-dev] [PATCH i-g-t v14 0/6] DC states igt tests patch series Anshuman Gupta
2019-09-06 14:05 ` [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-17 16:55   ` Imre Deak
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox