* [igt-dev] [PATCH i-g-t v11 0/5] DC states igt tests patch series v11.
@ 2019-05-06 16:06 Anshuman Gupta
2019-05-06 16:06 ` [igt-dev] [PATCH i-g-t v11 1/5] lib/igt_pm: igt lib helper routines to support DC5/6 tests Anshuman Gupta
` (4 more replies)
0 siblings, 5 replies; 7+ messages in thread
From: Anshuman Gupta @ 2019-05-06 16:06 UTC (permalink / raw)
To: igt-dev; +Cc: jyoti.r.yadav
(This is just a resubmit as last submission was failed due to some
issue with drm-tip)
This patch series adds new tests to validate Display C states.
DC states like DC5 and DC6 are validated during PSR entry/exit and during DPMS on/off cycle.
Sending new revision of patch series after addressing review comments.
Below is the list of major chnages since first revision.
1. Changing the name of test from "pm_dc" to "i915_pm_dc" alinged to other PM tests.
2. Changing the DC5/6 counter check timeout from 1 sec to 3 sec,
as in case of PSR on some platfrom like KBL it requires more than 2 second to
disable 'DC off' power well after vblank event.
3. Changed the test name from tests/pm_dc to tests tests/i915/i915_pm_dc in
name of individual patch.
4. Addressed the review comment by saving POWER_DIR values in igt_disable_runtime_pm().
5. CI fixures for dc5-dpms failure.
Checking DC5 counter value after DPMS off, broke the dpms_on_off
function to dpms_on and dpms_off.
6. Used igt_pm_enable_sata_link_power_management() function in order to use
min_power policy for SATA.
7. igt_pm_enable_sata_link_power_management() function to restore the
original SATA link power policy using an exit handler.
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 | 201 ++++++++++++++++++++++++++-------
lib/igt_pm.h | 2 +
tests/Makefile.sources | 3 +
tests/i915/i915_pm_dc.c | 286 +++++++++++++++++++++++++++++++++++++++++++++++
tests/i915/i915_pm_rpm.c | 17 +--
tests/meson.build | 1 +
6 files changed, 454 insertions(+), 56 deletions(-)
create mode 100644 tests/i915/i915_pm_dc.c
--
2.7.4
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
^ permalink raw reply [flat|nested] 7+ messages in thread* [igt-dev] [PATCH i-g-t v11 1/5] lib/igt_pm: igt lib helper routines to support DC5/6 tests 2019-05-06 16:06 [igt-dev] [PATCH i-g-t v11 0/5] DC states igt tests patch series v11 Anshuman Gupta @ 2019-05-06 16:06 ` Anshuman Gupta 2019-05-06 16:06 ` [igt-dev] [PATCH i-g-t v11 3/5] tests/i915/i915_pm_dc: Added test for DC6 during PSR Anshuman Gupta ` (3 subsequent siblings) 4 siblings, 0 replies; 7+ messages in thread From: Anshuman Gupta @ 2019-05-06 16:06 UTC (permalink / raw) To: igt-dev; +Cc: jyoti.r.yadav From: Jyoti Yadav <jyoti.r.yadav@intel.com> 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. 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] Signed-off-by: Jyoti Yadav <jyoti.r.yadav@intel.com> Signed-off-by: Anshuman Gupta <anshuman.gupta@intel.com> --- lib/igt_pm.c | 201 +++++++++++++++++++++++++++++++++++++---------- lib/igt_pm.h | 2 + tests/i915/i915_pm_rpm.c | 17 +--- 3 files changed, 164 insertions(+), 56 deletions(-) diff --git a/lib/igt_pm.c b/lib/igt_pm.c index fd22273..5d49bca 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 @@ -63,11 +64,15 @@ enum { #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_link_pm_policies; 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]; +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,28 +285,12 @@ 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; file_name = malloc(PATH_MAX); buf = malloc(MAX_POLICY_STRLEN + 1); @@ -333,11 +322,13 @@ int8_t *igt_pm_enable_sata_link_power_management(void) policy = POLICY_UNKNOWN; if (!(i % 256)) - link_pm_policies = realloc(link_pm_policies, - (i / 256 + 1) * 256 + 1); + __sata_link_pm_policies = + realloc(__sata_link_pm_policies, + (i / 256 + 1) * 256 + 1); - link_pm_policies[i] = policy; - link_pm_policies[i + 1] = 0; + __sata_link_pm_policies[i] = policy; + __sata_link_pm_policies[i + 1] = 0; + igt_install_exit_handler(__igt_pm_sata_link_pm_exit_handler); /* If the policy is something we don't know about, * don't touch it, since we might potentially break things. @@ -355,39 +346,27 @@ 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_link_pm_policies) + return; + /* Disk runtime PM policies. */ file_name = malloc(PATH_MAX); for (i = 0; ; i++) { int8_t policy; - if (!pm_data) + if (!__sata_link_pm_policies) policy = POLICY_MAX_PERFORMANCE; - else if (pm_data[i] == POLICY_UNKNOWN) + else if (__sata_link_pm_policies[i] == POLICY_UNKNOWN) continue; else - policy = pm_data[i]; + policy = __sata_link_pm_policies[i]; snprintf(file_name, PATH_MAX, "/sys/class/scsi_host/host%d/link_power_management_policy", @@ -422,6 +401,66 @@ void igt_pm_restore_sata_link_power_management(int8_t *pm_data) } free(file_name); } + +/** + * 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) +{ + int err; + + /* Check if has been already saved. */ + if (__sata_link_pm_policies) + return; + + __igt_pm_enable_sata_link_power_management(); + + /* Fixme: + * Need to obey the function prototype as returning a int8_t *, + * it is getting used at multiple places. + */ + return __sata_link_pm_policies; +} + +/** + * igt_pm_restore_sata_link_power_management: + * @pm_data: An opaque pointer with saved link PM policies; + * + * 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) + +{ + int err; + + if (!__sata_link_pm_policies) + return; + + __igt_pm_restore_sata_link_power_management(); +} + +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 +624,61 @@ bool igt_setup_runtime_pm(void) return true; } +bool igt_disable_runtime_pm(void) +{ + int fd; + ssize_t size; + char buf[6]; + + if (pm_status_fd < 0) { + fd = open(POWER_DIR "/autosuspend_delay_ms", O_RDWR); + if (fd < 0) + return false; + + size = read(fd, __igt_pm_runtime_autosuspend, + sizeof(__igt_pm_runtime_autosuspend)); + + if (size <= 0) { + close(fd); + return false; + } + + strchomp(__igt_pm_runtime_autosuspend); + igt_install_exit_handler(__igt_pm_runtime_exit_handler); + close(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"); + + if (pm_status_fd < 0) { + igt_assert(read(fd, __igt_pm_runtime_control, + sizeof(__igt_pm_runtime_control)) > 0); + strchomp(__igt_pm_runtime_control); + + igt_debug("Saved runtime power management as '%s' and '%s'\n", + __igt_pm_runtime_autosuspend, + __igt_pm_runtime_control); + } + + 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); + + if (pm_status_fd < 0) { + pm_status_fd = open(POWER_DIR "/runtime_status", O_RDONLY); + igt_assert_f(pm_status_fd >= 0, + "Can't open " POWER_DIR "/runtime_status\n"); + } + + return true; +} + /** * igt_get_runtime_pm_status: * @@ -628,3 +722,30 @@ 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) +{ + igt_require(debugfs != -1); + 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"); +} diff --git a/lib/igt_pm.h b/lib/igt_pm.h index 10cc679..6c4617a 100644 --- a/lib/igt_pm.h +++ b/lib/igt_pm.h @@ -47,8 +47,10 @@ enum igt_runtime_pm_status { }; bool igt_setup_runtime_pm(void); +bool 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); #endif /* IGT_PM_H */ diff --git a/tests/i915/i915_pm_rpm.c b/tests/i915/i915_pm_rpm.c index a2c9d0e..0c3b4e5 100644 --- a/tests/i915/i915_pm_rpm.c +++ b/tests/i915/i915_pm_rpm.c @@ -710,21 +710,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; @@ -759,7 +744,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); -- 2.7.4 _______________________________________________ igt-dev mailing list igt-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/igt-dev ^ permalink raw reply related [flat|nested] 7+ messages in thread
* [igt-dev] [PATCH i-g-t v11 3/5] tests/i915/i915_pm_dc: Added test for DC6 during PSR 2019-05-06 16:06 [igt-dev] [PATCH i-g-t v11 0/5] DC states igt tests patch series v11 Anshuman Gupta 2019-05-06 16:06 ` [igt-dev] [PATCH i-g-t v11 1/5] lib/igt_pm: igt lib helper routines to support DC5/6 tests Anshuman Gupta @ 2019-05-06 16:06 ` Anshuman Gupta 2019-05-06 16:06 ` [igt-dev] [PATCH i-g-t v11 4/5] tests/i915/i915_pm_dc: Added test for DC5 during DPMS Anshuman Gupta ` (2 subsequent siblings) 4 siblings, 0 replies; 7+ messages in thread From: Anshuman Gupta @ 2019-05-06 16:06 UTC (permalink / raw) To: igt-dev; +Cc: jyoti.r.yadav From: Jyoti Yadav <jyoti.r.yadav@intel.com> This patch add subtest to check DC6 entry on PSR for the supported platforms. v2: Rename the subtest with more meaningful name. v3: Rebased. v4: Rebased, to fix compilation error in psr_enable(). Addressed review comment by fixing typo in comment description of DC6 PSR subtest. v5: Addressed the review comment by removing redundant read_dc_counter(), clubbed cleanup() function in test_dc_state_psr() suggested by Imre. Listing actual change in patch set changelog to make review easier. v6: Rebased due to test name pm_dc changed to i915_pm_dc, aligning to other PM tests. Signed-off-by: Jyoti Yadav <jyoti.r.yadav@intel.com> Signed-off-by: Anshuman Gupta <anshuman.gupta@intel.com> --- tests/i915/i915_pm_dc.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/i915/i915_pm_dc.c b/tests/i915/i915_pm_dc.c index 94890e2..f261ecb 100644 --- a/tests/i915/i915_pm_dc.c +++ b/tests/i915/i915_pm_dc.c @@ -202,6 +202,14 @@ int main(int argc, char *argv[]) test_dc_state_psr(&data, CHECK_DC5); } + igt_subtest("dc6-psr") { + data.op_psr_mode = PSR_MODE_1; + psr_enable(data.debugfs_fd, data.op_psr_mode); + igt_require_f(edp_psr_sink_support(&data), + "Sink does not support PSR\n"); + test_dc_state_psr(&data, CHECK_DC6); + } + igt_fixture { close(data.debugfs_fd); display_fini(&data); -- 2.7.4 _______________________________________________ igt-dev mailing list igt-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/igt-dev ^ permalink raw reply related [flat|nested] 7+ messages in thread
* [igt-dev] [PATCH i-g-t v11 4/5] tests/i915/i915_pm_dc: Added test for DC5 during DPMS 2019-05-06 16:06 [igt-dev] [PATCH i-g-t v11 0/5] DC states igt tests patch series v11 Anshuman Gupta 2019-05-06 16:06 ` [igt-dev] [PATCH i-g-t v11 1/5] lib/igt_pm: igt lib helper routines to support DC5/6 tests Anshuman Gupta 2019-05-06 16:06 ` [igt-dev] [PATCH i-g-t v11 3/5] tests/i915/i915_pm_dc: Added test for DC6 during PSR Anshuman Gupta @ 2019-05-06 16:06 ` Anshuman Gupta 2019-05-06 16:06 ` [igt-dev] [PATCH i-g-t v11 5/5] tests/i915/i915_pm_dc: Added test for DC6 " Anshuman Gupta 2019-05-06 17:23 ` [igt-dev] ✗ Fi.CI.BAT: failure for DC states igt tests patch series v11. (rev2) Patchwork 4 siblings, 0 replies; 7+ messages in thread From: Anshuman Gupta @ 2019-05-06 16:06 UTC (permalink / raw) To: igt-dev; +Cc: jyoti.r.yadav From: Jyoti Yadav <jyoti.r.yadav@intel.com> Added new subtest for DC5 entry during DPMS on/off cycle. During DPMS on/off cycle DC5 counter is incremented. v2: Rename the subtest with meaningful name. v3: Rebased. v4: Addressed review comments by removing leftover code cleanup(). v5: Addressed the review comment by removing redundant read_dc_counter() suggested by Imre. Listing actual change in patch set changelog to make review easier. v6: Three way patch applied, no functional change. v7: Disabling runtime suspend for the platform which support, DC9. rebased due to test name pm_dc changed to i915_pm_dc, aligning to other PM tests. v8: Introduced setup_dc_dpms() in order to disable runtime pm, restoring POWER_DIR values to its original and enabling runtime pm for other followed sub-tests. v9: Check DC5 counter value after DPMS off, broke the dpms_on_off function to dpms_on and dpms_off. [Imre] Signed-off-by: Jyoti Yadav <jyoti.r.yadav@intel.com> Signed-off-by: Anshuman Gupta <anshuman.gupta@intel.com> --- tests/i915/i915_pm_dc.c | 62 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) diff --git a/tests/i915/i915_pm_dc.c b/tests/i915/i915_pm_dc.c index f261ecb..0f78b6b 100644 --- a/tests/i915/i915_pm_dc.c +++ b/tests/i915/i915_pm_dc.c @@ -46,6 +46,7 @@ typedef struct { enum psr_mode op_psr_mode; drmModeModeInfo *mode; igt_output_t *output; + bool runtime_suspend_disabled; } data_t; bool dc_state_wait_entry(int drm_fd, int dc_flag, int prev_dc_count); @@ -173,6 +174,62 @@ static void test_dc_state_psr(data_t *data, int dc_flag) cleanup(data); } +static void setup_dc_dpms(data_t *data) +{ + if (IS_BROXTON(data->devid) || IS_GEMINILAKE(data->devid) || + IS_ICELAKE(data->devid)) { + data->runtime_suspend_disabled = igt_disable_runtime_pm(); + igt_require_f(data->runtime_suspend_disabled, + "unable to disable runtime pm for i915\n"); + } 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; + + 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); + + /* 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(); + } +} + int main(int argc, char *argv[]) { bool has_runtime_pm; @@ -210,6 +267,11 @@ int main(int argc, char *argv[]) test_dc_state_psr(&data, CHECK_DC6); } + igt_subtest("dc5-dpms") { + setup_dc_dpms(&data); + test_dc_state_dpms(&data, CHECK_DC5); + } + igt_fixture { close(data.debugfs_fd); display_fini(&data); -- 2.7.4 _______________________________________________ igt-dev mailing list igt-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/igt-dev ^ permalink raw reply related [flat|nested] 7+ messages in thread
* [igt-dev] [PATCH i-g-t v11 5/5] tests/i915/i915_pm_dc: Added test for DC6 during DPMS 2019-05-06 16:06 [igt-dev] [PATCH i-g-t v11 0/5] DC states igt tests patch series v11 Anshuman Gupta ` (2 preceding siblings ...) 2019-05-06 16:06 ` [igt-dev] [PATCH i-g-t v11 4/5] tests/i915/i915_pm_dc: Added test for DC5 during DPMS Anshuman Gupta @ 2019-05-06 16:06 ` Anshuman Gupta 2019-05-06 17:23 ` [igt-dev] ✗ Fi.CI.BAT: failure for DC states igt tests patch series v11. (rev2) Patchwork 4 siblings, 0 replies; 7+ messages in thread From: Anshuman Gupta @ 2019-05-06 16:06 UTC (permalink / raw) To: igt-dev; +Cc: jyoti.r.yadav From: Jyoti Yadav <jyoti.r.yadav@intel.com> Added new subtest for DC6 entry during DPMS on/off cycle. During DPMS on/off cycle DC6 counter is incremented. v2: Renamed the subtest name. v3: Rebased. v4: Addressed review comment by replacing igt_display_init() to igt_display_require(), changes got done in patch set 2. v5: Addressed the review comment by removing redundant read_dc_counter() suggested by Imre. Listing actual change in patch set changelog to make review easier. v6: Rebased due to test name pm_dc changed to i915_pm_dc, aligning to other PM tests. v7: Introduced setup_dc_dpms() inorder to disable i915 runtime PM for the platform supports DC9. Signed-off-by: Jyoti Yadav <jyoti.r.yadav@intel.com> Signed-off-by: Anshuman Gupta <anshuman.gupta@intel.com> --- tests/i915/i915_pm_dc.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/i915/i915_pm_dc.c b/tests/i915/i915_pm_dc.c index 0f78b6b..ba891d8 100644 --- a/tests/i915/i915_pm_dc.c +++ b/tests/i915/i915_pm_dc.c @@ -272,6 +272,11 @@ int main(int argc, char *argv[]) test_dc_state_dpms(&data, CHECK_DC5); } + igt_subtest("dc6-dpms") { + setup_dc_dpms(&data); + test_dc_state_dpms(&data, CHECK_DC6); + } + igt_fixture { close(data.debugfs_fd); display_fini(&data); -- 2.7.4 _______________________________________________ igt-dev mailing list igt-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/igt-dev ^ permalink raw reply related [flat|nested] 7+ messages in thread
* [igt-dev] ✗ Fi.CI.BAT: failure for DC states igt tests patch series v11. (rev2) 2019-05-06 16:06 [igt-dev] [PATCH i-g-t v11 0/5] DC states igt tests patch series v11 Anshuman Gupta ` (3 preceding siblings ...) 2019-05-06 16:06 ` [igt-dev] [PATCH i-g-t v11 5/5] tests/i915/i915_pm_dc: Added test for DC6 " Anshuman Gupta @ 2019-05-06 17:23 ` Patchwork 4 siblings, 0 replies; 7+ messages in thread From: Patchwork @ 2019-05-06 17:23 UTC (permalink / raw) To: Anshuman Gupta; +Cc: igt-dev == Series Details == Series: DC states igt tests patch series v11. (rev2) URL : https://patchwork.freedesktop.org/series/59820/ State : failure == Summary == CI Bug Log - changes from CI_DRM_6051 -> IGTPW_2945 ==================================================== Summary ------- **FAILURE** Serious unknown changes coming with IGTPW_2945 absolutely need to be verified manually. If you think the reported changes have nothing to do with the changes introduced in IGTPW_2945, please notify your bug team to allow them to document this new failure mode, which will reduce false positives in CI. External URL: https://patchwork.freedesktop.org/api/1.0/series/59820/revisions/2/mbox/ Possible new issues ------------------- Here are the unknown changes that may have been introduced in IGTPW_2945: ### IGT changes ### #### Possible regressions #### * igt@i915_pm_rpm@module-reload: - fi-cfl-8700k: [PASS][1] -> [CRASH][2] [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6051/fi-cfl-8700k/igt@i915_pm_rpm@module-reload.html [2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2945/fi-cfl-8700k/igt@i915_pm_rpm@module-reload.html - fi-whl-u: [PASS][3] -> [CRASH][4] [3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6051/fi-whl-u/igt@i915_pm_rpm@module-reload.html [4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2945/fi-whl-u/igt@i915_pm_rpm@module-reload.html - fi-byt-n2820: [PASS][5] -> [CRASH][6] [5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6051/fi-byt-n2820/igt@i915_pm_rpm@module-reload.html [6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2945/fi-byt-n2820/igt@i915_pm_rpm@module-reload.html - fi-bdw-5557u: [PASS][7] -> [CRASH][8] [7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6051/fi-bdw-5557u/igt@i915_pm_rpm@module-reload.html [8]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2945/fi-bdw-5557u/igt@i915_pm_rpm@module-reload.html - fi-apl-guc: [PASS][9] -> [CRASH][10] [9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6051/fi-apl-guc/igt@i915_pm_rpm@module-reload.html [10]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2945/fi-apl-guc/igt@i915_pm_rpm@module-reload.html - fi-skl-lmem: [PASS][11] -> [CRASH][12] [11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6051/fi-skl-lmem/igt@i915_pm_rpm@module-reload.html [12]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2945/fi-skl-lmem/igt@i915_pm_rpm@module-reload.html - fi-skl-6600u: [PASS][13] -> [CRASH][14] [13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6051/fi-skl-6600u/igt@i915_pm_rpm@module-reload.html [14]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2945/fi-skl-6600u/igt@i915_pm_rpm@module-reload.html - fi-bsw-n3050: [PASS][15] -> [INCOMPLETE][16] [15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6051/fi-bsw-n3050/igt@i915_pm_rpm@module-reload.html [16]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2945/fi-bsw-n3050/igt@i915_pm_rpm@module-reload.html - fi-byt-j1900: [PASS][17] -> [CRASH][18] [17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6051/fi-byt-j1900/igt@i915_pm_rpm@module-reload.html [18]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2945/fi-byt-j1900/igt@i915_pm_rpm@module-reload.html - fi-bxt-dsi: [PASS][19] -> [CRASH][20] [19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6051/fi-bxt-dsi/igt@i915_pm_rpm@module-reload.html [20]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2945/fi-bxt-dsi/igt@i915_pm_rpm@module-reload.html - fi-icl-u3: [PASS][21] -> [CRASH][22] [21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6051/fi-icl-u3/igt@i915_pm_rpm@module-reload.html [22]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2945/fi-icl-u3/igt@i915_pm_rpm@module-reload.html - fi-hsw-4770: [PASS][23] -> [CRASH][24] [23]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6051/fi-hsw-4770/igt@i915_pm_rpm@module-reload.html [24]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2945/fi-hsw-4770/igt@i915_pm_rpm@module-reload.html - fi-glk-dsi: [PASS][25] -> [CRASH][26] [25]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6051/fi-glk-dsi/igt@i915_pm_rpm@module-reload.html [26]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2945/fi-glk-dsi/igt@i915_pm_rpm@module-reload.html #### Suppressed #### The following results come from untrusted machines, tests, or statuses. They do not affect the overall result. * igt@i915_pm_rpm@module-reload: - {fi-cml-u}: [PASS][27] -> [INCOMPLETE][28] [27]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6051/fi-cml-u/igt@i915_pm_rpm@module-reload.html [28]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2945/fi-cml-u/igt@i915_pm_rpm@module-reload.html - {fi-cml-u2}: [PASS][29] -> [CRASH][30] [29]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6051/fi-cml-u2/igt@i915_pm_rpm@module-reload.html [30]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2945/fi-cml-u2/igt@i915_pm_rpm@module-reload.html Known issues ------------ Here are the changes found in IGTPW_2945 that come from known issues: ### IGT changes ### #### Issues hit #### * igt@gem_ctx_switch@basic-default: - fi-icl-y: [PASS][31] -> [INCOMPLETE][32] ([fdo#107713] / [fdo#108569]) [31]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6051/fi-icl-y/igt@gem_ctx_switch@basic-default.html [32]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2945/fi-icl-y/igt@gem_ctx_switch@basic-default.html * igt@i915_pm_rpm@module-reload: - fi-kbl-x1275: [PASS][33] -> [CRASH][34] ([fdo#109963]) [33]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6051/fi-kbl-x1275/igt@i915_pm_rpm@module-reload.html [34]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2945/fi-kbl-x1275/igt@i915_pm_rpm@module-reload.html - fi-skl-guc: [PASS][35] -> [INCOMPLETE][36] ([fdo#107807]) [35]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6051/fi-skl-guc/igt@i915_pm_rpm@module-reload.html [36]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2945/fi-skl-guc/igt@i915_pm_rpm@module-reload.html - fi-kbl-7567u: [PASS][37] -> [INCOMPLETE][38] ([fdo#107807]) [37]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6051/fi-kbl-7567u/igt@i915_pm_rpm@module-reload.html [38]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2945/fi-kbl-7567u/igt@i915_pm_rpm@module-reload.html - fi-cfl-guc: [PASS][39] -> [INCOMPLETE][40] ([fdo#107802]) [39]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6051/fi-cfl-guc/igt@i915_pm_rpm@module-reload.html [40]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2945/fi-cfl-guc/igt@i915_pm_rpm@module-reload.html - fi-skl-iommu: [PASS][41] -> [INCOMPLETE][42] ([fdo#107807]) [41]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6051/fi-skl-iommu/igt@i915_pm_rpm@module-reload.html [42]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2945/fi-skl-iommu/igt@i915_pm_rpm@module-reload.html - fi-skl-6260u: [PASS][43] -> [INCOMPLETE][44] ([fdo#107807]) [43]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6051/fi-skl-6260u/igt@i915_pm_rpm@module-reload.html [44]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2945/fi-skl-6260u/igt@i915_pm_rpm@module-reload.html - fi-skl-6770hq: [PASS][45] -> [INCOMPLETE][46] ([fdo#107807]) [45]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6051/fi-skl-6770hq/igt@i915_pm_rpm@module-reload.html [46]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2945/fi-skl-6770hq/igt@i915_pm_rpm@module-reload.html - fi-kbl-r: [PASS][47] -> [CRASH][48] ([fdo#109963]) [47]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6051/fi-kbl-r/igt@i915_pm_rpm@module-reload.html [48]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2945/fi-kbl-r/igt@i915_pm_rpm@module-reload.html - fi-hsw-peppy: [PASS][49] -> [INCOMPLETE][50] ([fdo#107807]) [49]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6051/fi-hsw-peppy/igt@i915_pm_rpm@module-reload.html [50]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2945/fi-hsw-peppy/igt@i915_pm_rpm@module-reload.html - fi-skl-6700k2: [PASS][51] -> [INCOMPLETE][52] ([fdo#107807]) [51]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6051/fi-skl-6700k2/igt@i915_pm_rpm@module-reload.html [52]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2945/fi-skl-6700k2/igt@i915_pm_rpm@module-reload.html - fi-kbl-7500u: [PASS][53] -> [CRASH][54] ([fdo#109963]) [53]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6051/fi-kbl-7500u/igt@i915_pm_rpm@module-reload.html [54]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2945/fi-kbl-7500u/igt@i915_pm_rpm@module-reload.html {name}: This element is suppressed. This means it is ignored when computing the status of the difference (SUCCESS, WARNING, or FAILURE). [fdo#107713]: https://bugs.freedesktop.org/show_bug.cgi?id=107713 [fdo#107802]: https://bugs.freedesktop.org/show_bug.cgi?id=107802 [fdo#107807]: https://bugs.freedesktop.org/show_bug.cgi?id=107807 [fdo#108569]: https://bugs.freedesktop.org/show_bug.cgi?id=108569 [fdo#109963]: https://bugs.freedesktop.org/show_bug.cgi?id=109963 Participating hosts (53 -> 45) ------------------------------ Additional (1): fi-pnv-d510 Missing (9): fi-kbl-soraka fi-ilk-m540 fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-ctg-p8600 fi-ivb-3770 fi-byt-clapper fi-bdw-samus Build changes ------------- * IGT: IGT_4972 -> IGTPW_2945 CI_DRM_6051: fac89f79a454771f6595bcd11d9a119d5acc42d0 @ git://anongit.freedesktop.org/gfx-ci/linux IGTPW_2945: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_2945/ IGT_4972: f052e49a43cc9704ea5f240df15dd9d3dfed68ab @ 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_2945/ _______________________________________________ igt-dev mailing list igt-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/igt-dev ^ permalink raw reply [flat|nested] 7+ messages in thread
* [igt-dev] [PATCH i-g-t v11 0/5] DC states igt tests patch series v11. @ 2019-04-23 11:15 Anshuman Gupta 0 siblings, 0 replies; 7+ messages in thread From: Anshuman Gupta @ 2019-04-23 11:15 UTC (permalink / raw) To: igt-dev; +Cc: jyoti.r.yadav This patch series adds new tests to validate Display C states. DC states like DC5 and DC6 are validated during PSR entry/exit and during DPMS on/off cycle. Sending new revision of patch series after addressing review comments. Below is the list of major chnages since first revision. 1. Changing the name of test from "pm_dc" to "i915_pm_dc" alinged to other PM tests. 2. Changing the DC5/6 counter check timeout from 1 sec to 3 sec, as in case of PSR on some platfrom like KBL it requires more than 2 second to disable 'DC off' power well after vblank event. 3. Changed the test name from tests/pm_dc to tests tests/i915/i915_pm_dc in name of individual patch. 4. Addressed the review comment by saving POWER_DIR values in igt_disable_runtime_pm(). 5. CI fixures for dc5-dpms failure. Checking DC5 counter value after DPMS off, broke the dpms_on_off function to dpms_on and dpms_off. 6. Used igt_pm_enable_sata_link_power_management() function in order to use min_power policy for SATA. 7. igt_pm_enable_sata_link_power_management() function to restore the original SATA link power policy using an exit handler. 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 | 201 ++++++++++++++++++++++++++------- lib/igt_pm.h | 2 + tests/Makefile.sources | 3 + tests/i915/i915_pm_dc.c | 286 +++++++++++++++++++++++++++++++++++++++++++++++ tests/i915/i915_pm_rpm.c | 17 +-- tests/meson.build | 1 + 6 files changed, 454 insertions(+), 56 deletions(-) create mode 100644 tests/i915/i915_pm_dc.c -- 2.7.4 _______________________________________________ igt-dev mailing list igt-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/igt-dev ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2019-05-06 17:23 UTC | newest] Thread overview: 7+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2019-05-06 16:06 [igt-dev] [PATCH i-g-t v11 0/5] DC states igt tests patch series v11 Anshuman Gupta 2019-05-06 16:06 ` [igt-dev] [PATCH i-g-t v11 1/5] lib/igt_pm: igt lib helper routines to support DC5/6 tests Anshuman Gupta 2019-05-06 16:06 ` [igt-dev] [PATCH i-g-t v11 3/5] tests/i915/i915_pm_dc: Added test for DC6 during PSR Anshuman Gupta 2019-05-06 16:06 ` [igt-dev] [PATCH i-g-t v11 4/5] tests/i915/i915_pm_dc: Added test for DC5 during DPMS Anshuman Gupta 2019-05-06 16:06 ` [igt-dev] [PATCH i-g-t v11 5/5] tests/i915/i915_pm_dc: Added test for DC6 " Anshuman Gupta 2019-05-06 17:23 ` [igt-dev] ✗ Fi.CI.BAT: failure for DC states igt tests patch series v11. (rev2) Patchwork -- strict thread matches above, loose matches on Subject: below -- 2019-04-23 11:15 [igt-dev] [PATCH i-g-t v11 0/5] DC states igt tests patch series v11 Anshuman Gupta
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox