* [igt-dev] [PATCH i-g-t 0/6] DEBUG DC states igt tests patch series
@ 2019-06-13 10:47 Anshuman Gupta
2019-06-13 10:47 ` [igt-dev] [PATCH i-g-t 1/6] lib/igt_pm: igt lib helper routines to support DC5/6 tests Anshuman Gupta
` (6 more replies)
0 siblings, 7 replies; 11+ messages in thread
From: Anshuman Gupta @ 2019-06-13 10:47 UTC (permalink / raw)
To: igt-dev; +Cc: jyoti.r.yadav
This is a resubmission of series https://patchwork.freedesktop.org/series/56713/
to collect DC6 igt test failure report from CI Bat test.
This series adds DC state IGT test to CI Fast feedback list.
Anshuman Gupta (1):
DO_NOT_MERGE: Debug patch to cover DC IGT test.
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 | 190 ++++++++++++---
lib/igt_pm.h | 6 +-
tests/Makefile.sources | 3 +
tests/i915/i915_pm_backlight.c | 6 +-
tests/i915/i915_pm_dc.c | 339 ++++++++++++++++++++++++++
tests/i915/i915_pm_rpm.c | 24 +-
tests/intel-ci/fast-feedback.testlist | 4 +
tests/meson.build | 1 +
8 files changed, 506 insertions(+), 67 deletions(-)
create mode 100644 tests/i915/i915_pm_dc.c
--
2.21.0
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
^ permalink raw reply [flat|nested] 11+ messages in thread* [igt-dev] [PATCH i-g-t 1/6] lib/igt_pm: igt lib helper routines to support DC5/6 tests 2019-06-13 10:47 [igt-dev] [PATCH i-g-t 0/6] DEBUG DC states igt tests patch series Anshuman Gupta @ 2019-06-13 10:47 ` Anshuman Gupta 2019-06-13 10:47 ` [igt-dev] [PATCH i-g-t 3/6] tests/i915/i915_pm_dc: Added test for DC6 during PSR Anshuman Gupta ` (5 subsequent siblings) 6 siblings, 0 replies; 11+ messages in thread From: Anshuman Gupta @ 2019-06-13 10:47 UTC (permalink / raw) To: igt-dev; +Cc: jyoti.r.yadav From: Jyoti Yadav <jyoti.r.yadav@intel.com> This patch does the following chnegs 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. Signed-off-by: Jyoti Yadav <jyoti.r.yadav@intel.com> Signed-off-by: Anshuman Gupta <anshuman.gupta@intel.com> --- lib/igt_pm.c | 190 ++++++++++++++++++++++++++------- lib/igt_pm.h | 6 +- tests/i915/i915_pm_backlight.c | 6 +- tests/i915/i915_pm_rpm.c | 24 +---- 4 files changed, 159 insertions(+), 67 deletions(-) diff --git a/lib/igt_pm.c b/lib/igt_pm.c index fd22273a..9b83fbb5 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]; +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,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); @@ -313,6 +302,9 @@ int8_t *igt_pm_enable_sata_link_power_management(void) "/sys/class/scsi_host/host%d/link_power_management_policy", i); + /* 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; @@ -333,11 +325,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 +349,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", @@ -421,7 +403,53 @@ void igt_pm_restore_sata_link_power_management(int8_t *pm_data) close(fd); } free(file_name); + free(__sata_link_pm_policies); + __sata_link_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. + * Returns: Void + */ +void 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(); +} + +/** + * 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) +{ + int err; + + if (!__sata_link_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 +613,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 +711,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 10cc6794..979b3463 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,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_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 a2c9d0ed..2d2f77be 100644 --- a/tests/i915/i915_pm_rpm.c +++ b/tests/i915/i915_pm_rpm.c @@ -122,8 +122,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); @@ -710,21 +708,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; @@ -751,7 +734,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(); @@ -759,7 +742,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); @@ -776,8 +759,7 @@ static void teardown_environment(void) igt_restore_runtime_pm(); - igt_pm_restore_sata_link_power_management(pm_data); - free(pm_data); + igt_pm_restore_sata_link_power_management(); fini_mode_set_data(&ms_data); -- 2.21.0 _______________________________________________ igt-dev mailing list igt-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/igt-dev ^ permalink raw reply related [flat|nested] 11+ messages in thread
* [igt-dev] [PATCH i-g-t 3/6] tests/i915/i915_pm_dc: Added test for DC6 during PSR 2019-06-13 10:47 [igt-dev] [PATCH i-g-t 0/6] DEBUG DC states igt tests patch series Anshuman Gupta 2019-06-13 10:47 ` [igt-dev] [PATCH i-g-t 1/6] lib/igt_pm: igt lib helper routines to support DC5/6 tests Anshuman Gupta @ 2019-06-13 10:47 ` Anshuman Gupta 2019-06-13 10:47 ` [igt-dev] [PATCH i-g-t 4/6] tests/i915/i915_pm_dc: Added test for DC5 during DPMS Anshuman Gupta ` (4 subsequent siblings) 6 siblings, 0 replies; 11+ messages in thread From: Anshuman Gupta @ 2019-06-13 10:47 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 94890e2a..f261ecbf 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.21.0 _______________________________________________ igt-dev mailing list igt-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/igt-dev ^ permalink raw reply related [flat|nested] 11+ messages in thread
* [igt-dev] [PATCH i-g-t 4/6] tests/i915/i915_pm_dc: Added test for DC5 during DPMS 2019-06-13 10:47 [igt-dev] [PATCH i-g-t 0/6] DEBUG DC states igt tests patch series Anshuman Gupta 2019-06-13 10:47 ` [igt-dev] [PATCH i-g-t 1/6] lib/igt_pm: igt lib helper routines to support DC5/6 tests Anshuman Gupta 2019-06-13 10:47 ` [igt-dev] [PATCH i-g-t 3/6] tests/i915/i915_pm_dc: Added test for DC6 during PSR Anshuman Gupta @ 2019-06-13 10:47 ` Anshuman Gupta 2019-06-13 10:47 ` [igt-dev] [PATCH i-g-t 5/6] tests/i915/i915_pm_dc: Added test for DC6 " Anshuman Gupta ` (3 subsequent siblings) 6 siblings, 0 replies; 11+ messages in thread From: Anshuman Gupta @ 2019-06-13 10:47 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 f261ecbf..0f78b6b4 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.21.0 _______________________________________________ igt-dev mailing list igt-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/igt-dev ^ permalink raw reply related [flat|nested] 11+ messages in thread
* [igt-dev] [PATCH i-g-t 5/6] tests/i915/i915_pm_dc: Added test for DC6 during DPMS 2019-06-13 10:47 [igt-dev] [PATCH i-g-t 0/6] DEBUG DC states igt tests patch series Anshuman Gupta ` (2 preceding siblings ...) 2019-06-13 10:47 ` [igt-dev] [PATCH i-g-t 4/6] tests/i915/i915_pm_dc: Added test for DC5 during DPMS Anshuman Gupta @ 2019-06-13 10:47 ` Anshuman Gupta 2019-06-13 10:47 ` [igt-dev] [PATCH i-g-t 6/6] DO_NOT_MERGE: Debug patch to cover DC IGT test Anshuman Gupta ` (2 subsequent siblings) 6 siblings, 0 replies; 11+ messages in thread From: Anshuman Gupta @ 2019-06-13 10:47 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 0f78b6b4..ba891d85 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.21.0 _______________________________________________ igt-dev mailing list igt-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/igt-dev ^ permalink raw reply related [flat|nested] 11+ messages in thread
* [igt-dev] [PATCH i-g-t 6/6] DO_NOT_MERGE: Debug patch to cover DC IGT test. 2019-06-13 10:47 [igt-dev] [PATCH i-g-t 0/6] DEBUG DC states igt tests patch series Anshuman Gupta ` (3 preceding siblings ...) 2019-06-13 10:47 ` [igt-dev] [PATCH i-g-t 5/6] tests/i915/i915_pm_dc: Added test for DC6 " Anshuman Gupta @ 2019-06-13 10:47 ` Anshuman Gupta 2019-06-13 12:09 ` [igt-dev] ✓ Fi.CI.BAT: success for DEBUG DC states igt tests patch series Patchwork 2019-06-14 21:45 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork 6 siblings, 0 replies; 11+ messages in thread From: Anshuman Gupta @ 2019-06-13 10:47 UTC (permalink / raw) To: igt-dev; +Cc: jyoti.r.yadav This patch make sure DC state IGT patches run on CI Bat test. This patch print package c state counter also. Signed-off-by: Anshuman Gupta <anshuman.gupta@intel.com> --- tests/i915/i915_pm_dc.c | 53 +++++++++++++++++++++++++++ tests/intel-ci/fast-feedback.testlist | 4 ++ 2 files changed, 57 insertions(+) diff --git a/tests/i915/i915_pm_dc.c b/tests/i915/i915_pm_dc.c index ba891d85..fde27623 100644 --- a/tests/i915/i915_pm_dc.c +++ b/tests/i915/i915_pm_dc.c @@ -32,6 +32,7 @@ #include "intel_bufmgr.h" #include "intel_io.h" #include "limits.h" +#include "igt_kmod.h" /* DC State Flags */ #define CHECK_DC5 1 @@ -49,9 +50,55 @@ typedef struct { bool runtime_suspend_disabled; } data_t; +int pmc_debugfs; +bool pmc_loaded; + bool dc_state_wait_entry(int drm_fd, int dc_flag, int prev_dc_count); void check_dc_counter(int drm_fd, int dc_flag, uint32_t prev_dc_count); +static bool setup_pmc(void) +{ + const char *debugfs_root; + char path[200]; + + /* Make sure our intel_pmc_core module is loaded. */ + pmc_loaded = igt_kmod_is_loaded("intel_pmc_core"); + + if (!pmc_loaded) + pmc_loaded = igt_kmod_load("intel_pmc_core", NULL) == 0; + + if (!pmc_loaded) { + igt_info("intel_pmc_core module not loaded\n"); + return; + } + + debugfs_root = igt_debugfs_mount(); + igt_assert(debugfs_root); + snprintf(path, sizeof(path), "%s/pmc_core", debugfs_root); + pmc_debugfs = open(path, O_RDONLY); + igt_require(pmc_debugfs != -1); +} + +static void dump_file(int dir, const char *filename) +{ + char *contents; + + contents = igt_sysfs_get(dir, filename); + if (!contents) + return; + + igt_info("%s:\n%s\n", filename, contents); + free(contents); +} + +static void pmc_dump_file(int fd, const char *file) +{ + if (!pmc_loaded) + return; + + dump_file(fd, file); +} + static void setup_output(data_t *data) { igt_display_t *display = &data->display; @@ -249,6 +296,9 @@ 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); + setup_pmc(); + igt_info("Initial PC state residencies before test\n"); + pmc_dump_file(pmc_debugfs, "package_cstate_show"); } igt_subtest("dc5-psr") { @@ -278,7 +328,10 @@ int main(int argc, char *argv[]) } igt_fixture { + igt_info("PC state residencies after test\n"); + pmc_dump_file(pmc_debugfs, "package_cstate_show"); close(data.debugfs_fd); + close(pmc_debugfs); display_fini(&data); } diff --git a/tests/intel-ci/fast-feedback.testlist b/tests/intel-ci/fast-feedback.testlist index 9b711946..f28c306d 100644 --- a/tests/intel-ci/fast-feedback.testlist +++ b/tests/intel-ci/fast-feedback.testlist @@ -229,6 +229,10 @@ igt@kms_setmode@basic-clone-single-crtc igt@i915_pm_backlight@basic-brightness igt@i915_pm_rpm@basic-pci-d3-state igt@i915_pm_rpm@basic-rte +igt@i915_pm_dc@dc5-psr +igt@i915_pm_dc@dc6-psr +igt@i915_pm_dc@dc5-dpms +igt@i915_pm_dc@dc6-dpms igt@i915_pm_rps@basic-api igt@prime_busy@basic-after-default igt@prime_busy@basic-before-default -- 2.21.0 _______________________________________________ igt-dev mailing list igt-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/igt-dev ^ permalink raw reply related [flat|nested] 11+ messages in thread
* [igt-dev] ✓ Fi.CI.BAT: success for DEBUG DC states igt tests patch series 2019-06-13 10:47 [igt-dev] [PATCH i-g-t 0/6] DEBUG DC states igt tests patch series Anshuman Gupta ` (4 preceding siblings ...) 2019-06-13 10:47 ` [igt-dev] [PATCH i-g-t 6/6] DO_NOT_MERGE: Debug patch to cover DC IGT test Anshuman Gupta @ 2019-06-13 12:09 ` Patchwork 2019-06-13 15:27 ` Gupta, Anshuman 2019-06-14 21:45 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork 6 siblings, 1 reply; 11+ messages in thread From: Patchwork @ 2019-06-13 12:09 UTC (permalink / raw) To: Anshuman Gupta; +Cc: igt-dev == Series Details == Series: DEBUG DC states igt tests patch series URL : https://patchwork.freedesktop.org/series/62008/ State : success == Summary == CI Bug Log - changes from CI_DRM_6257 -> IGTPW_3144 ==================================================== Summary ------- **SUCCESS** No regressions found. External URL: https://patchwork.freedesktop.org/api/1.0/series/62008/revisions/1/mbox/ Possible new issues ------------------- Here are the unknown changes that may have been introduced in IGTPW_3144: ### IGT changes ### #### Possible regressions #### * {igt@i915_pm_dc@dc6-dpms} (NEW): - fi-skl-6260u: NOTRUN -> [FAIL][1] [1]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3144/fi-skl-6260u/igt@i915_pm_dc@dc6-dpms.html - fi-skl-6770hq: NOTRUN -> [FAIL][2] [2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3144/fi-skl-6770hq/igt@i915_pm_dc@dc6-dpms.html - fi-skl-lmem: NOTRUN -> [FAIL][3] [3]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3144/fi-skl-lmem/igt@i915_pm_dc@dc6-dpms.html - fi-kbl-guc: NOTRUN -> [FAIL][4] [4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3144/fi-kbl-guc/igt@i915_pm_dc@dc6-dpms.html - fi-kbl-r: NOTRUN -> [FAIL][5] [5]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3144/fi-kbl-r/igt@i915_pm_dc@dc6-dpms.html - fi-cfl-8700k: NOTRUN -> [FAIL][6] [6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3144/fi-cfl-8700k/igt@i915_pm_dc@dc6-dpms.html - fi-skl-guc: NOTRUN -> [FAIL][7] [7]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3144/fi-skl-guc/igt@i915_pm_dc@dc6-dpms.html - fi-kbl-7567u: NOTRUN -> [FAIL][8] [8]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3144/fi-kbl-7567u/igt@i915_pm_dc@dc6-dpms.html - fi-cfl-guc: NOTRUN -> [FAIL][9] [9]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3144/fi-cfl-guc/igt@i915_pm_dc@dc6-dpms.html - fi-kbl-x1275: NOTRUN -> [FAIL][10] [10]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3144/fi-kbl-x1275/igt@i915_pm_dc@dc6-dpms.html - fi-skl-6700k2: NOTRUN -> [FAIL][11] [11]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3144/fi-skl-6700k2/igt@i915_pm_dc@dc6-dpms.html - fi-skl-iommu: NOTRUN -> [FAIL][12] [12]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3144/fi-skl-iommu/igt@i915_pm_dc@dc6-dpms.html - fi-whl-u: NOTRUN -> [FAIL][13] +2 similar issues [13]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3144/fi-whl-u/igt@i915_pm_dc@dc6-dpms.html - fi-kbl-7500u: NOTRUN -> [FAIL][14] [14]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3144/fi-kbl-7500u/igt@i915_pm_dc@dc6-dpms.html - fi-cfl-8109u: NOTRUN -> [FAIL][15] [15]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3144/fi-cfl-8109u/igt@i915_pm_dc@dc6-dpms.html * {igt@i915_pm_dc@dc6-psr} (NEW): - fi-cml-u2: NOTRUN -> [FAIL][16] +1 similar issue [16]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3144/fi-cml-u2/igt@i915_pm_dc@dc6-psr.html - fi-skl-6600u: NOTRUN -> [FAIL][17] +1 similar issue [17]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3144/fi-skl-6600u/igt@i915_pm_dc@dc6-psr.html New tests --------- New tests have been introduced between CI_DRM_6257 and IGTPW_3144: ### New IGT tests (4) ### * igt@i915_pm_dc@dc5-dpms: - Statuses : 20 pass(s) 24 skip(s) - Exec time: [0.0, 5.24] s * igt@i915_pm_dc@dc5-psr: - Statuses : 1 fail(s) 4 pass(s) 39 skip(s) - Exec time: [0.0, 3.39] s * igt@i915_pm_dc@dc6-dpms: - Statuses : 17 fail(s) 3 pass(s) 24 skip(s) - Exec time: [0.0, 9.90] s * igt@i915_pm_dc@dc6-psr: - Statuses : 3 fail(s) 2 pass(s) 39 skip(s) - Exec time: [0.0, 3.98] s Known issues ------------ Here are the changes found in IGTPW_3144 that come from known issues: ### IGT changes ### #### Issues hit #### * igt@gem_ctx_switch@basic-default: - fi-icl-u2: [PASS][18] -> [INCOMPLETE][19] ([fdo#107713] / [fdo#108569]) [18]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6257/fi-icl-u2/igt@gem_ctx_switch@basic-default.html [19]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3144/fi-icl-u2/igt@gem_ctx_switch@basic-default.html * igt@kms_frontbuffer_tracking@basic: - fi-hsw-peppy: [PASS][20] -> [DMESG-WARN][21] ([fdo#102614]) [20]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6257/fi-hsw-peppy/igt@kms_frontbuffer_tracking@basic.html [21]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3144/fi-hsw-peppy/igt@kms_frontbuffer_tracking@basic.html #### Possible fixes #### * igt@gem_exec_fence@basic-busy-default: - fi-icl-y: [INCOMPLETE][22] ([fdo#107713]) -> [PASS][23] [22]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6257/fi-icl-y/igt@gem_exec_fence@basic-busy-default.html [23]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3144/fi-icl-y/igt@gem_exec_fence@basic-busy-default.html * igt@gem_exec_suspend@basic-s3: - fi-blb-e6850: [INCOMPLETE][24] ([fdo#107718]) -> [PASS][25] [24]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6257/fi-blb-e6850/igt@gem_exec_suspend@basic-s3.html [25]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3144/fi-blb-e6850/igt@gem_exec_suspend@basic-s3.html {name}: This element is suppressed. This means it is ignored when computing the status of the difference (SUCCESS, WARNING, or FAILURE). [fdo#102614]: https://bugs.freedesktop.org/show_bug.cgi?id=102614 [fdo#107713]: https://bugs.freedesktop.org/show_bug.cgi?id=107713 [fdo#107718]: https://bugs.freedesktop.org/show_bug.cgi?id=107718 [fdo#108569]: https://bugs.freedesktop.org/show_bug.cgi?id=108569 Participating hosts (53 -> 45) ------------------------------ Additional (1): fi-icl-dsi Missing (9): fi-kbl-soraka fi-ilk-m540 fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-icl-u3 fi-icl-guc fi-byt-clapper fi-bdw-samus Build changes ------------- * IGT: IGT_5055 -> IGTPW_3144 CI_DRM_6257: e941a46d520ab5d255071d8bf84f97feec92a20b @ git://anongit.freedesktop.org/gfx-ci/linux IGTPW_3144: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3144/ IGT_5055: 495287320225e7f180d384cad7b207b77154438f @ 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_3144/ _______________________________________________ igt-dev mailing list igt-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/igt-dev ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [igt-dev] ✓ Fi.CI.BAT: success for DEBUG DC states igt tests patch series 2019-06-13 12:09 ` [igt-dev] ✓ Fi.CI.BAT: success for DEBUG DC states igt tests patch series Patchwork @ 2019-06-13 15:27 ` Gupta, Anshuman 0 siblings, 0 replies; 11+ messages in thread From: Gupta, Anshuman @ 2019-06-13 15:27 UTC (permalink / raw) To: imre.deak; +Cc: igt-dev, jyoti.r.yadav, suresh.kumar.kurmi Hi Imre , It has been observed that CI platform which has limited the package c state below PC8 from BIOS are failing to reach DC6 state. Same behavior has been observed on local DUT. DC6 igt tests were passing when package C state were limited to PC10, when we limited it to PC7, DC6 igt test started failing. if this behavior is correct (will confirm from H/W folks), we should skip the DC6 igt test if package C state limited below PC8. DC6 IGT test summary report : As of now DC6 igt test are only passing on fi-icl-dsi, fi-icl-y, fi-cml-u platform. DC6 igt test are failing on fi-whl-u and fi-kbl-r despite reaching to PC8 (this need to be addressed separately). https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3144/fi-whl-u/igt@i915_pm_dc@dc6-dpms.html https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3144/fi-kbl-r/igt@i915_pm_dc@dc6-dpms.html Below platform has failed DC6 state because these platform failed to reach PC8. fi-cml-u2 fi-cfl-8109u fi-kbl-7567u fi-skl-6600u Rest all DC6 failures are due to that fact that BIOS has limited the package c state (these all platform are skipping the pc8 residencies IGT test). Thanks , Anshuman Gupta. On 6/13/2019 5:39 PM, Patchwork wrote: > == Series Details == > > Series: DEBUG DC states igt tests patch series > URL : https://patchwork.freedesktop.org/series/62008/ > State : success > > == Summary == > > CI Bug Log - changes from CI_DRM_6257 -> IGTPW_3144 > ==================================================== > > Summary > ------- > > **SUCCESS** > > No regressions found. > > External URL: https://patchwork.freedesktop.org/api/1.0/series/62008/revisions/1/mbox/ > > Possible new issues > ------------------- > > Here are the unknown changes that may have been introduced in IGTPW_3144: > > ### IGT changes ### > > #### Possible regressions #### > > * {igt@i915_pm_dc@dc6-dpms} (NEW): > - fi-skl-6260u: NOTRUN -> [FAIL][1] > [1]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3144/fi-skl-6260u/igt@i915_pm_dc@dc6-dpms.html > - fi-skl-6770hq: NOTRUN -> [FAIL][2] > [2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3144/fi-skl-6770hq/igt@i915_pm_dc@dc6-dpms.html > - fi-skl-lmem: NOTRUN -> [FAIL][3] > [3]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3144/fi-skl-lmem/igt@i915_pm_dc@dc6-dpms.html > - fi-kbl-guc: NOTRUN -> [FAIL][4] > [4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3144/fi-kbl-guc/igt@i915_pm_dc@dc6-dpms.html > - fi-kbl-r: NOTRUN -> [FAIL][5] > [5]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3144/fi-kbl-r/igt@i915_pm_dc@dc6-dpms.html > - fi-cfl-8700k: NOTRUN -> [FAIL][6] > [6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3144/fi-cfl-8700k/igt@i915_pm_dc@dc6-dpms.html > - fi-skl-guc: NOTRUN -> [FAIL][7] > [7]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3144/fi-skl-guc/igt@i915_pm_dc@dc6-dpms.html > - fi-kbl-7567u: NOTRUN -> [FAIL][8] > [8]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3144/fi-kbl-7567u/igt@i915_pm_dc@dc6-dpms.html > - fi-cfl-guc: NOTRUN -> [FAIL][9] > [9]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3144/fi-cfl-guc/igt@i915_pm_dc@dc6-dpms.html > - fi-kbl-x1275: NOTRUN -> [FAIL][10] > [10]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3144/fi-kbl-x1275/igt@i915_pm_dc@dc6-dpms.html > - fi-skl-6700k2: NOTRUN -> [FAIL][11] > [11]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3144/fi-skl-6700k2/igt@i915_pm_dc@dc6-dpms.html > - fi-skl-iommu: NOTRUN -> [FAIL][12] > [12]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3144/fi-skl-iommu/igt@i915_pm_dc@dc6-dpms.html > - fi-whl-u: NOTRUN -> [FAIL][13] +2 similar issues > [13]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3144/fi-whl-u/igt@i915_pm_dc@dc6-dpms.html > - fi-kbl-7500u: NOTRUN -> [FAIL][14] > [14]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3144/fi-kbl-7500u/igt@i915_pm_dc@dc6-dpms.html > - fi-cfl-8109u: NOTRUN -> [FAIL][15] > [15]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3144/fi-cfl-8109u/igt@i915_pm_dc@dc6-dpms.html > > * {igt@i915_pm_dc@dc6-psr} (NEW): > - fi-cml-u2: NOTRUN -> [FAIL][16] +1 similar issue > [16]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3144/fi-cml-u2/igt@i915_pm_dc@dc6-psr.html > - fi-skl-6600u: NOTRUN -> [FAIL][17] +1 similar issue > [17]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3144/fi-skl-6600u/igt@i915_pm_dc@dc6-psr.html > > > New tests > --------- > > New tests have been introduced between CI_DRM_6257 and IGTPW_3144: > > ### New IGT tests (4) ### > > * igt@i915_pm_dc@dc5-dpms: > - Statuses : 20 pass(s) 24 skip(s) > - Exec time: [0.0, 5.24] s > > * igt@i915_pm_dc@dc5-psr: > - Statuses : 1 fail(s) 4 pass(s) 39 skip(s) > - Exec time: [0.0, 3.39] s > > * igt@i915_pm_dc@dc6-dpms: > - Statuses : 17 fail(s) 3 pass(s) 24 skip(s) > - Exec time: [0.0, 9.90] s > > * igt@i915_pm_dc@dc6-psr: > - Statuses : 3 fail(s) 2 pass(s) 39 skip(s) > - Exec time: [0.0, 3.98] s > > > > Known issues > ------------ > > Here are the changes found in IGTPW_3144 that come from known issues: > > ### IGT changes ### > > #### Issues hit #### > > * igt@gem_ctx_switch@basic-default: > - fi-icl-u2: [PASS][18] -> [INCOMPLETE][19] ([fdo#107713] / [fdo#108569]) > [18]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6257/fi-icl-u2/igt@gem_ctx_switch@basic-default.html > [19]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3144/fi-icl-u2/igt@gem_ctx_switch@basic-default.html > > * igt@kms_frontbuffer_tracking@basic: > - fi-hsw-peppy: [PASS][20] -> [DMESG-WARN][21] ([fdo#102614]) > [20]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6257/fi-hsw-peppy/igt@kms_frontbuffer_tracking@basic.html > [21]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3144/fi-hsw-peppy/igt@kms_frontbuffer_tracking@basic.html > > > #### Possible fixes #### > > * igt@gem_exec_fence@basic-busy-default: > - fi-icl-y: [INCOMPLETE][22] ([fdo#107713]) -> [PASS][23] > [22]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6257/fi-icl-y/igt@gem_exec_fence@basic-busy-default.html > [23]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3144/fi-icl-y/igt@gem_exec_fence@basic-busy-default.html > > * igt@gem_exec_suspend@basic-s3: > - fi-blb-e6850: [INCOMPLETE][24] ([fdo#107718]) -> [PASS][25] > [24]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6257/fi-blb-e6850/igt@gem_exec_suspend@basic-s3.html > [25]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3144/fi-blb-e6850/igt@gem_exec_suspend@basic-s3.html > > > {name}: This element is suppressed. This means it is ignored when computing > the status of the difference (SUCCESS, WARNING, or FAILURE). > > [fdo#102614]: https://bugs.freedesktop.org/show_bug.cgi?id=102614 > [fdo#107713]: https://bugs.freedesktop.org/show_bug.cgi?id=107713 > [fdo#107718]: https://bugs.freedesktop.org/show_bug.cgi?id=107718 > [fdo#108569]: https://bugs.freedesktop.org/show_bug.cgi?id=108569 > > > Participating hosts (53 -> 45) > ------------------------------ > > Additional (1): fi-icl-dsi > Missing (9): fi-kbl-soraka fi-ilk-m540 fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-icl-u3 fi-icl-guc fi-byt-clapper fi-bdw-samus > > > Build changes > ------------- > > * IGT: IGT_5055 -> IGTPW_3144 > > CI_DRM_6257: e941a46d520ab5d255071d8bf84f97feec92a20b @ git://anongit.freedesktop.org/gfx-ci/linux > IGTPW_3144: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3144/ > IGT_5055: 495287320225e7f180d384cad7b207b77154438f @ 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_3144/ > _______________________________________________ igt-dev mailing list igt-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/igt-dev ^ permalink raw reply [flat|nested] 11+ messages in thread
* [igt-dev] ✗ Fi.CI.IGT: failure for DEBUG DC states igt tests patch series 2019-06-13 10:47 [igt-dev] [PATCH i-g-t 0/6] DEBUG DC states igt tests patch series Anshuman Gupta ` (5 preceding siblings ...) 2019-06-13 12:09 ` [igt-dev] ✓ Fi.CI.BAT: success for DEBUG DC states igt tests patch series Patchwork @ 2019-06-14 21:45 ` Patchwork 6 siblings, 0 replies; 11+ messages in thread From: Patchwork @ 2019-06-14 21:45 UTC (permalink / raw) To: Anshuman Gupta; +Cc: igt-dev == Series Details == Series: DEBUG DC states igt tests patch series URL : https://patchwork.freedesktop.org/series/62008/ State : failure == Summary == CI Bug Log - changes from CI_DRM_6257_full -> IGTPW_3144_full ==================================================== Summary ------- **FAILURE** Serious unknown changes coming with IGTPW_3144_full absolutely need to be verified manually. If you think the reported changes have nothing to do with the changes introduced in IGTPW_3144_full, 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/62008/revisions/1/mbox/ Possible new issues ------------------- Here are the unknown changes that may have been introduced in IGTPW_3144_full: ### IGT changes ### #### Possible regressions #### * igt@gem_ctx_shared@exec-shared-gtt-render: - shard-glk: [PASS][1] -> [FAIL][2] [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6257/shard-glk9/igt@gem_ctx_shared@exec-shared-gtt-render.html [2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3144/shard-glk2/igt@gem_ctx_shared@exec-shared-gtt-render.html * {igt@i915_pm_dc@dc6-dpms} (NEW): - shard-kbl: NOTRUN -> [FAIL][3] [3]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3144/shard-kbl6/igt@i915_pm_dc@dc6-dpms.html New tests --------- New tests have been introduced between CI_DRM_6257_full and IGTPW_3144_full: ### New IGT tests (4) ### * igt@i915_pm_dc@dc5-dpms: - Statuses : 1 pass(s) 4 skip(s) - Exec time: [0.0, 0.61] s * igt@i915_pm_dc@dc5-psr: - Statuses : 1 pass(s) 5 skip(s) - Exec time: [0.0, 3.38] s * igt@i915_pm_dc@dc6-dpms: - Statuses : 1 fail(s) 4 skip(s) - Exec time: [0.0, 3.36] s * igt@i915_pm_dc@dc6-psr: - Statuses : 1 pass(s) 5 skip(s) - Exec time: [0.0, 3.33] s Known issues ------------ Here are the changes found in IGTPW_3144_full that come from known issues: ### IGT changes ### #### Issues hit #### * igt@gem_ctx_isolation@rcs0-s3: - shard-apl: [PASS][4] -> [DMESG-WARN][5] ([fdo#108566]) +1 similar issue [4]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6257/shard-apl8/igt@gem_ctx_isolation@rcs0-s3.html [5]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3144/shard-apl8/igt@gem_ctx_isolation@rcs0-s3.html * igt@gem_eio@execbuf: - shard-glk: [PASS][6] -> [DMESG-WARN][7] ([fdo#110913 ]) +2 similar issues [6]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6257/shard-glk5/igt@gem_eio@execbuf.html [7]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3144/shard-glk9/igt@gem_eio@execbuf.html * igt@gem_eio@in-flight-contexts-1us: - shard-iclb: [PASS][8] -> [DMESG-WARN][9] ([fdo#110913 ]) +1 similar issue [8]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6257/shard-iclb5/igt@gem_eio@in-flight-contexts-1us.html [9]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3144/shard-iclb8/igt@gem_eio@in-flight-contexts-1us.html * igt@gem_persistent_relocs@forked-faulting-reloc-thrashing: - shard-kbl: [PASS][10] -> [DMESG-WARN][11] ([fdo#110913 ]) +3 similar issues [10]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6257/shard-kbl3/igt@gem_persistent_relocs@forked-faulting-reloc-thrashing.html [11]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3144/shard-kbl6/igt@gem_persistent_relocs@forked-faulting-reloc-thrashing.html - shard-apl: [PASS][12] -> [DMESG-WARN][13] ([fdo#110913 ]) [12]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6257/shard-apl2/igt@gem_persistent_relocs@forked-faulting-reloc-thrashing.html [13]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3144/shard-apl1/igt@gem_persistent_relocs@forked-faulting-reloc-thrashing.html * igt@gem_persistent_relocs@forked-thrash-inactive: - shard-snb: [PASS][14] -> [INCOMPLETE][15] ([fdo#105411]) [14]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6257/shard-snb6/igt@gem_persistent_relocs@forked-thrash-inactive.html [15]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3144/shard-snb4/igt@gem_persistent_relocs@forked-thrash-inactive.html * igt@gem_persistent_relocs@forked-thrashing: - shard-hsw: [PASS][16] -> [DMESG-WARN][17] ([fdo#110789] / [fdo#110913 ]) [16]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6257/shard-hsw7/igt@gem_persistent_relocs@forked-thrashing.html [17]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3144/shard-hsw4/igt@gem_persistent_relocs@forked-thrashing.html * igt@gem_userptr_blits@map-fixed-invalidate-busy-gup: - shard-hsw: [PASS][18] -> [DMESG-WARN][19] ([fdo#110913 ]) +1 similar issue [18]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6257/shard-hsw7/igt@gem_userptr_blits@map-fixed-invalidate-busy-gup.html [19]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3144/shard-hsw6/igt@gem_userptr_blits@map-fixed-invalidate-busy-gup.html * igt@gem_userptr_blits@sync-unmap-cycles: - shard-snb: [PASS][20] -> [DMESG-WARN][21] ([fdo#110913 ]) +2 similar issues [20]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6257/shard-snb6/igt@gem_userptr_blits@sync-unmap-cycles.html [21]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3144/shard-snb7/igt@gem_userptr_blits@sync-unmap-cycles.html * igt@i915_suspend@fence-restore-tiled2untiled: - shard-kbl: [PASS][22] -> [DMESG-WARN][23] ([fdo#108566]) [22]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6257/shard-kbl1/igt@i915_suspend@fence-restore-tiled2untiled.html [23]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3144/shard-kbl3/igt@i915_suspend@fence-restore-tiled2untiled.html * igt@kms_cursor_legacy@pipe-b-torture-bo: - shard-iclb: [PASS][24] -> [INCOMPLETE][25] ([fdo#107713]) +1 similar issue [24]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6257/shard-iclb6/igt@kms_cursor_legacy@pipe-b-torture-bo.html [25]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3144/shard-iclb1/igt@kms_cursor_legacy@pipe-b-torture-bo.html * igt@kms_flip@2x-plain-flip-ts-check-interruptible: - shard-hsw: [PASS][26] -> [SKIP][27] ([fdo#109271]) +26 similar issues [26]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6257/shard-hsw6/igt@kms_flip@2x-plain-flip-ts-check-interruptible.html [27]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3144/shard-hsw1/igt@kms_flip@2x-plain-flip-ts-check-interruptible.html * igt@kms_frontbuffer_tracking@fbc-1p-primscrn-cur-indfb-move: - shard-iclb: [PASS][28] -> [FAIL][29] ([fdo#103167]) +3 similar issues [28]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6257/shard-iclb8/igt@kms_frontbuffer_tracking@fbc-1p-primscrn-cur-indfb-move.html [29]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3144/shard-iclb7/igt@kms_frontbuffer_tracking@fbc-1p-primscrn-cur-indfb-move.html * igt@kms_plane_lowres@pipe-a-tiling-y: - shard-iclb: [PASS][30] -> [FAIL][31] ([fdo#103166]) [30]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6257/shard-iclb6/igt@kms_plane_lowres@pipe-a-tiling-y.html [31]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3144/shard-iclb7/igt@kms_plane_lowres@pipe-a-tiling-y.html * igt@kms_psr@no_drrs: - shard-iclb: [PASS][32] -> [FAIL][33] ([fdo#108341]) [32]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6257/shard-iclb8/igt@kms_psr@no_drrs.html [33]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3144/shard-iclb1/igt@kms_psr@no_drrs.html * igt@kms_psr@psr2_sprite_plane_move: - shard-iclb: [PASS][34] -> [SKIP][35] ([fdo#109441]) +2 similar issues [34]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6257/shard-iclb2/igt@kms_psr@psr2_sprite_plane_move.html [35]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3144/shard-iclb3/igt@kms_psr@psr2_sprite_plane_move.html * igt@kms_setmode@basic: - shard-apl: [PASS][36] -> [FAIL][37] ([fdo#99912]) [36]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6257/shard-apl2/igt@kms_setmode@basic.html [37]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3144/shard-apl1/igt@kms_setmode@basic.html * igt@kms_vblank@pipe-a-query-forked-hang: - shard-apl: [PASS][38] -> [INCOMPLETE][39] ([fdo#103927]) [38]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6257/shard-apl6/igt@kms_vblank@pipe-a-query-forked-hang.html [39]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3144/shard-apl7/igt@kms_vblank@pipe-a-query-forked-hang.html * igt@perf@blocking: - shard-iclb: [PASS][40] -> [FAIL][41] ([fdo#110728]) [40]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6257/shard-iclb3/igt@perf@blocking.html [41]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3144/shard-iclb2/igt@perf@blocking.html #### Possible fixes #### * igt@gem_persistent_relocs@forked-faulting-reloc-thrashing: - shard-snb: [DMESG-WARN][42] ([fdo#110789] / [fdo#110913 ]) -> [PASS][43] [42]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6257/shard-snb7/igt@gem_persistent_relocs@forked-faulting-reloc-thrashing.html [43]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3144/shard-snb5/igt@gem_persistent_relocs@forked-faulting-reloc-thrashing.html * igt@gem_persistent_relocs@forked-interruptible-faulting-reloc-thrashing: - shard-apl: [DMESG-WARN][44] ([fdo#110913 ]) -> [PASS][45] +1 similar issue [44]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6257/shard-apl6/igt@gem_persistent_relocs@forked-interruptible-faulting-reloc-thrashing.html [45]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3144/shard-apl1/igt@gem_persistent_relocs@forked-interruptible-faulting-reloc-thrashing.html - shard-glk: [DMESG-WARN][46] ([fdo#110913 ]) -> [PASS][47] +2 similar issues [46]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6257/shard-glk9/igt@gem_persistent_relocs@forked-interruptible-faulting-reloc-thrashing.html [47]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3144/shard-glk7/igt@gem_persistent_relocs@forked-interruptible-faulting-reloc-thrashing.html - shard-hsw: [DMESG-WARN][48] ([fdo#110789] / [fdo#110913 ]) -> [PASS][49] +1 similar issue [48]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6257/shard-hsw6/igt@gem_persistent_relocs@forked-interruptible-faulting-reloc-thrashing.html [49]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3144/shard-hsw2/igt@gem_persistent_relocs@forked-interruptible-faulting-reloc-thrashing.html * igt@gem_tiled_swapping@non-threaded: - shard-apl: [DMESG-WARN][50] ([fdo#108686]) -> [PASS][51] [50]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6257/shard-apl1/igt@gem_tiled_swapping@non-threaded.html [51]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3144/shard-apl5/igt@gem_tiled_swapping@non-threaded.html * igt@gem_userptr_blits@map-fixed-invalidate-busy: - shard-snb: [DMESG-WARN][52] ([fdo#110913 ]) -> [PASS][53] [52]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6257/shard-snb5/igt@gem_userptr_blits@map-fixed-invalidate-busy.html [53]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3144/shard-snb7/igt@gem_userptr_blits@map-fixed-invalidate-busy.html - shard-hsw: [DMESG-WARN][54] ([fdo#110913 ]) -> [PASS][55] [54]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6257/shard-hsw2/igt@gem_userptr_blits@map-fixed-invalidate-busy.html [55]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3144/shard-hsw5/igt@gem_userptr_blits@map-fixed-invalidate-busy.html * igt@gem_userptr_blits@map-fixed-invalidate-overlap-busy: - shard-iclb: [DMESG-WARN][56] ([fdo#110913 ]) -> [PASS][57] +4 similar issues [56]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6257/shard-iclb2/igt@gem_userptr_blits@map-fixed-invalidate-overlap-busy.html [57]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3144/shard-iclb8/igt@gem_userptr_blits@map-fixed-invalidate-overlap-busy.html * igt@gem_userptr_blits@sync-unmap-cycles: - shard-kbl: [DMESG-WARN][58] ([fdo#110913 ]) -> [PASS][59] +3 similar issues [58]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6257/shard-kbl4/igt@gem_userptr_blits@sync-unmap-cycles.html [59]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3144/shard-kbl3/igt@gem_userptr_blits@sync-unmap-cycles.html * igt@kms_cursor_crc@pipe-c-cursor-128x128-sliding: - shard-kbl: [FAIL][60] ([fdo#103232]) -> [PASS][61] [60]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6257/shard-kbl2/igt@kms_cursor_crc@pipe-c-cursor-128x128-sliding.html [61]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3144/shard-kbl4/igt@kms_cursor_crc@pipe-c-cursor-128x128-sliding.html - shard-apl: [FAIL][62] ([fdo#103232]) -> [PASS][63] [62]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6257/shard-apl7/igt@kms_cursor_crc@pipe-c-cursor-128x128-sliding.html [63]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3144/shard-apl1/igt@kms_cursor_crc@pipe-c-cursor-128x128-sliding.html * igt@kms_cursor_legacy@2x-long-flip-vs-cursor-atomic: - shard-hsw: [SKIP][64] ([fdo#109271]) -> [PASS][65] +20 similar issues [64]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6257/shard-hsw1/igt@kms_cursor_legacy@2x-long-flip-vs-cursor-atomic.html [65]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3144/shard-hsw4/igt@kms_cursor_legacy@2x-long-flip-vs-cursor-atomic.html * igt@kms_cursor_legacy@flip-vs-cursor-toggle: - shard-iclb: [INCOMPLETE][66] ([fdo#107713]) -> [PASS][67] [66]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6257/shard-iclb7/igt@kms_cursor_legacy@flip-vs-cursor-toggle.html [67]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3144/shard-iclb4/igt@kms_cursor_legacy@flip-vs-cursor-toggle.html * igt@kms_flip@flip-vs-suspend: - shard-hsw: [INCOMPLETE][68] ([fdo#103540]) -> [PASS][69] [68]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6257/shard-hsw6/igt@kms_flip@flip-vs-suspend.html [69]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3144/shard-hsw1/igt@kms_flip@flip-vs-suspend.html * igt@kms_frontbuffer_tracking@fbc-suspend: - shard-kbl: [DMESG-WARN][70] ([fdo#108566]) -> [PASS][71] [70]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6257/shard-kbl7/igt@kms_frontbuffer_tracking@fbc-suspend.html [71]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3144/shard-kbl1/igt@kms_frontbuffer_tracking@fbc-suspend.html * igt@kms_frontbuffer_tracking@fbcpsr-1p-pri-indfb-multidraw: - shard-iclb: [INCOMPLETE][72] ([fdo#106978] / [fdo#107713]) -> [PASS][73] [72]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6257/shard-iclb7/igt@kms_frontbuffer_tracking@fbcpsr-1p-pri-indfb-multidraw.html [73]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3144/shard-iclb3/igt@kms_frontbuffer_tracking@fbcpsr-1p-pri-indfb-multidraw.html * igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-pri-shrfb-draw-render: - shard-iclb: [FAIL][74] ([fdo#103167]) -> [PASS][75] +5 similar issues [74]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6257/shard-iclb2/igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-pri-shrfb-draw-render.html [75]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3144/shard-iclb5/igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-pri-shrfb-draw-render.html * igt@kms_plane@plane-panning-bottom-right-suspend-pipe-c-planes: - shard-iclb: [INCOMPLETE][76] ([fdo#107713] / [fdo#110042]) -> [PASS][77] [76]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6257/shard-iclb3/igt@kms_plane@plane-panning-bottom-right-suspend-pipe-c-planes.html [77]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3144/shard-iclb7/igt@kms_plane@plane-panning-bottom-right-suspend-pipe-c-planes.html * igt@kms_plane_lowres@pipe-a-tiling-x: - shard-iclb: [FAIL][78] ([fdo#103166]) -> [PASS][79] [78]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6257/shard-iclb7/igt@kms_plane_lowres@pipe-a-tiling-x.html [79]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3144/shard-iclb2/igt@kms_plane_lowres@pipe-a-tiling-x.html * igt@kms_psr@psr2_cursor_plane_move: - shard-iclb: [SKIP][80] ([fdo#109441]) -> [PASS][81] [80]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6257/shard-iclb4/igt@kms_psr@psr2_cursor_plane_move.html [81]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3144/shard-iclb2/igt@kms_psr@psr2_cursor_plane_move.html * igt@kms_vblank@pipe-c-ts-continuation-suspend: - shard-apl: [DMESG-WARN][82] ([fdo#108566]) -> [PASS][83] +5 similar issues [82]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6257/shard-apl6/igt@kms_vblank@pipe-c-ts-continuation-suspend.html [83]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3144/shard-apl4/igt@kms_vblank@pipe-c-ts-continuation-suspend.html * igt@perf_pmu@rc6-runtime-pm: - shard-hsw: [FAIL][84] ([fdo#105010]) -> [PASS][85] [84]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6257/shard-hsw5/igt@perf_pmu@rc6-runtime-pm.html [85]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3144/shard-hsw5/igt@perf_pmu@rc6-runtime-pm.html {name}: This element is suppressed. This means it is ignored when computing the status of the difference (SUCCESS, WARNING, or FAILURE). [fdo#103166]: https://bugs.freedesktop.org/show_bug.cgi?id=103166 [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#105010]: https://bugs.freedesktop.org/show_bug.cgi?id=105010 [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#108341]: https://bugs.freedesktop.org/show_bug.cgi?id=108341 [fdo#108566]: https://bugs.freedesktop.org/show_bug.cgi?id=108566 [fdo#108686]: https://bugs.freedesktop.org/show_bug.cgi?id=108686 [fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271 [fdo#109441]: https://bugs.freedesktop.org/show_bug.cgi?id=109441 [fdo#110042]: https://bugs.freedesktop.org/show_bug.cgi?id=110042 [fdo#110728]: https://bugs.freedesktop.org/show_bug.cgi?id=110728 [fdo#110789]: https://bugs.freedesktop.org/show_bug.cgi?id=110789 [fdo#110913 ]: https://bugs.freedesktop.org/show_bug.cgi?id=110913 [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 ------------- * IGT: IGT_5055 -> IGTPW_3144 * Piglit: piglit_4509 -> None CI_DRM_6257: e941a46d520ab5d255071d8bf84f97feec92a20b @ git://anongit.freedesktop.org/gfx-ci/linux IGTPW_3144: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3144/ IGT_5055: 495287320225e7f180d384cad7b207b77154438f @ 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_3144/ _______________________________________________ igt-dev mailing list igt-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/igt-dev ^ permalink raw reply [flat|nested] 11+ messages in thread
* [igt-dev] [PATCH i-g-t 0/6] DEBUG DC states igt tests patch series @ 2019-06-18 17:56 Anshuman Gupta 2019-06-18 17:56 ` [igt-dev] [PATCH i-g-t 1/6] lib/igt_pm: igt lib helper routines to support DC5/6 tests Anshuman Gupta 0 siblings, 1 reply; 11+ messages in thread From: Anshuman Gupta @ 2019-06-18 17:56 UTC (permalink / raw) To: igt-dev; +Cc: jyoti.r.yadav This is a resubmission of series https://patchwork.freedesktop.org/series/56713/ to collect DC6 igt test failure report from CI Bat test. This series skip the DC6 test if in case PC8+ residencies limited by BIOS. This series adds DC state IGT test to CI Fast feedback list. Anshuman Gupta (1): DO_NOT_MERGE: Debug patch to cover DC IGT test. 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 | 190 ++++++++++--- lib/igt_pm.h | 6 +- tests/Makefile.sources | 3 + tests/i915/i915_pm_backlight.c | 6 +- tests/i915/i915_pm_dc.c | 387 ++++++++++++++++++++++++++ tests/i915/i915_pm_rpm.c | 24 +- tests/intel-ci/fast-feedback.testlist | 4 + tests/meson.build | 1 + 8 files changed, 554 insertions(+), 67 deletions(-) create mode 100644 tests/i915/i915_pm_dc.c -- 2.21.0 _______________________________________________ igt-dev mailing list igt-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/igt-dev ^ permalink raw reply [flat|nested] 11+ messages in thread
* [igt-dev] [PATCH i-g-t 1/6] lib/igt_pm: igt lib helper routines to support DC5/6 tests 2019-06-18 17:56 [igt-dev] [PATCH i-g-t 0/6] " Anshuman Gupta @ 2019-06-18 17:56 ` Anshuman Gupta 2019-08-12 12:04 ` Imre Deak 0 siblings, 1 reply; 11+ messages in thread From: Anshuman Gupta @ 2019-06-18 17:56 UTC (permalink / raw) To: igt-dev; +Cc: jyoti.r.yadav From: Jyoti Yadav <jyoti.r.yadav@intel.com> This patch does the following chnegs 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. Signed-off-by: Jyoti Yadav <jyoti.r.yadav@intel.com> Signed-off-by: Anshuman Gupta <anshuman.gupta@intel.com> --- lib/igt_pm.c | 190 ++++++++++++++++++++++++++------- lib/igt_pm.h | 6 +- tests/i915/i915_pm_backlight.c | 6 +- tests/i915/i915_pm_rpm.c | 24 +---- 4 files changed, 159 insertions(+), 67 deletions(-) diff --git a/lib/igt_pm.c b/lib/igt_pm.c index fd22273a..9b83fbb5 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]; +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,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); @@ -313,6 +302,9 @@ int8_t *igt_pm_enable_sata_link_power_management(void) "/sys/class/scsi_host/host%d/link_power_management_policy", i); + /* 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; @@ -333,11 +325,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 +349,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", @@ -421,7 +403,53 @@ void igt_pm_restore_sata_link_power_management(int8_t *pm_data) close(fd); } free(file_name); + free(__sata_link_pm_policies); + __sata_link_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. + * Returns: Void + */ +void 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(); +} + +/** + * 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) +{ + int err; + + if (!__sata_link_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 +613,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 +711,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 10cc6794..979b3463 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,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_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 a2c9d0ed..2d2f77be 100644 --- a/tests/i915/i915_pm_rpm.c +++ b/tests/i915/i915_pm_rpm.c @@ -122,8 +122,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); @@ -710,21 +708,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; @@ -751,7 +734,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(); @@ -759,7 +742,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); @@ -776,8 +759,7 @@ static void teardown_environment(void) igt_restore_runtime_pm(); - igt_pm_restore_sata_link_power_management(pm_data); - free(pm_data); + igt_pm_restore_sata_link_power_management(); fini_mode_set_data(&ms_data); -- 2.21.0 _______________________________________________ igt-dev mailing list igt-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/igt-dev ^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [igt-dev] [PATCH i-g-t 1/6] lib/igt_pm: igt lib helper routines to support DC5/6 tests 2019-06-18 17:56 ` [igt-dev] [PATCH i-g-t 1/6] lib/igt_pm: igt lib helper routines to support DC5/6 tests Anshuman Gupta @ 2019-08-12 12:04 ` Imre Deak 0 siblings, 0 replies; 11+ messages in thread From: Imre Deak @ 2019-08-12 12:04 UTC (permalink / raw) To: Anshuman Gupta; +Cc: igt-dev, jyoti.r.yadav On Tue, Jun 18, 2019 at 11:26:12PM +0530, Anshuman Gupta wrote: > From: Jyoti Yadav <jyoti.r.yadav@intel.com> > > This patch does the following chnegs 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. > > Signed-off-by: Jyoti Yadav <jyoti.r.yadav@intel.com> > Signed-off-by: Anshuman Gupta <anshuman.gupta@intel.com> > --- > lib/igt_pm.c | 190 ++++++++++++++++++++++++++------- > lib/igt_pm.h | 6 +- > tests/i915/i915_pm_backlight.c | 6 +- > tests/i915/i915_pm_rpm.c | 24 +---- > 4 files changed, 159 insertions(+), 67 deletions(-) > > diff --git a/lib/igt_pm.c b/lib/igt_pm.c > index fd22273a..9b83fbb5 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]; > > +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,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); > @@ -313,6 +302,9 @@ int8_t *igt_pm_enable_sata_link_power_management(void) > "/sys/class/scsi_host/host%d/link_power_management_policy", > i); > > + /* 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; > @@ -333,11 +325,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); Missing indentation. > > - link_pm_policies[i] = policy; > - link_pm_policies[i + 1] = 0; Not added by this patch, but can't see the purpose of this 0 termination. > + __sata_link_pm_policies[i] = policy; > + __sata_link_pm_policies[i + 1] = 0; > + igt_install_exit_handler(__igt_pm_sata_link_pm_exit_handler); This would restore uninitialized values to subsequent SATA hosts, if some failure would happen before the loop ends. So I'd rather: for (sata_host_count = 0; ; sata_host_count++) save the link policiy install exit handler for (i = 0; i < sata_host_count; i++) set link policy to min power > > /* If the policy is something we don't know about, > * don't touch it, since we might potentially break things. > @@ -355,39 +349,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) This can't happen now. > 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", > @@ -421,7 +403,53 @@ void igt_pm_restore_sata_link_power_management(int8_t *pm_data) > close(fd); > } > free(file_name); > + free(__sata_link_pm_policies); > + __sata_link_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. > + * Returns: Void > + */ > +void igt_pm_enable_sata_link_power_management(void) > +{ > + int err; Unused var. > + > + /* Check if has been already saved. */ > + if (__sata_link_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) > +{ > + int err; Ditto. > + > + if (!__sata_link_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 +613,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 +711,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); This is misplaced and probably not needed. > + 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 10cc6794..979b3463 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,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_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 a2c9d0ed..2d2f77be 100644 > --- a/tests/i915/i915_pm_rpm.c > +++ b/tests/i915/i915_pm_rpm.c > @@ -122,8 +122,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); > @@ -710,21 +708,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; > @@ -751,7 +734,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(); > @@ -759,7 +742,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); > @@ -776,8 +759,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] 11+ messages in thread
end of thread, other threads:[~2019-08-12 12:05 UTC | newest] Thread overview: 11+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2019-06-13 10:47 [igt-dev] [PATCH i-g-t 0/6] DEBUG DC states igt tests patch series Anshuman Gupta 2019-06-13 10:47 ` [igt-dev] [PATCH i-g-t 1/6] lib/igt_pm: igt lib helper routines to support DC5/6 tests Anshuman Gupta 2019-06-13 10:47 ` [igt-dev] [PATCH i-g-t 3/6] tests/i915/i915_pm_dc: Added test for DC6 during PSR Anshuman Gupta 2019-06-13 10:47 ` [igt-dev] [PATCH i-g-t 4/6] tests/i915/i915_pm_dc: Added test for DC5 during DPMS Anshuman Gupta 2019-06-13 10:47 ` [igt-dev] [PATCH i-g-t 5/6] tests/i915/i915_pm_dc: Added test for DC6 " Anshuman Gupta 2019-06-13 10:47 ` [igt-dev] [PATCH i-g-t 6/6] DO_NOT_MERGE: Debug patch to cover DC IGT test Anshuman Gupta 2019-06-13 12:09 ` [igt-dev] ✓ Fi.CI.BAT: success for DEBUG DC states igt tests patch series Patchwork 2019-06-13 15:27 ` Gupta, Anshuman 2019-06-14 21:45 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork -- strict thread matches above, loose matches on Subject: below -- 2019-06-18 17:56 [igt-dev] [PATCH i-g-t 0/6] " Anshuman Gupta 2019-06-18 17:56 ` [igt-dev] [PATCH i-g-t 1/6] lib/igt_pm: igt lib helper routines to support DC5/6 tests Anshuman Gupta 2019-08-12 12:04 ` Imre Deak
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox