From patchwork Fri Aug 10 07:01:15 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Wilson X-Patchwork-Id: 10562281 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 5507513BB for ; Fri, 10 Aug 2018 07:01:33 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 475A12B6D6 for ; Fri, 10 Aug 2018 07:01:33 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 452A32B782; Fri, 10 Aug 2018 07:01:33 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 578A82B7BD for ; Fri, 10 Aug 2018 07:01:32 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 7339E6E892; Fri, 10 Aug 2018 07:01:30 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from fireflyinternet.com (mail.fireflyinternet.com [109.228.58.192]) by gabe.freedesktop.org (Postfix) with ESMTPS id 13A366E892; Fri, 10 Aug 2018 07:01:28 +0000 (UTC) X-Default-Received-SPF: pass (skip=forwardok (res=PASS)) x-ip-name=78.156.65.138; Received: from haswell.alporthouse.com (unverified [78.156.65.138]) by fireflyinternet.com (Firefly Internet (M1)) with ESMTP id 12769996-1500050 for multiple; Fri, 10 Aug 2018 08:01:18 +0100 From: Chris Wilson To: intel-gfx@lists.freedesktop.org Date: Fri, 10 Aug 2018 08:01:15 +0100 Message-Id: <20180810070116.29667-1-chris@chris-wilson.co.uk> X-Mailer: git-send-email 2.18.0 Subject: [Intel-gfx] [PATCH i-g-t 1/2] igt/pm_rpm: Test incomplete(debug) suspends vs rpm X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: igt-dev@lists.freedesktop.org, imre.deak@linux.intel.com MIME-Version: 1.0 Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Virus-Scanned: ClamAV using ClamSMTP Check that we restore runtime pm around debug suspends and hibernates. v2: Differentiate between external test setup failure and one of interest Signed-off-by: Chris Wilson --- tests/pm_rpm.c | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/tests/pm_rpm.c b/tests/pm_rpm.c index 4268bb19a..1fbdda4ed 100644 --- a/tests/pm_rpm.c +++ b/tests/pm_rpm.c @@ -707,8 +707,10 @@ static void 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); + + disable_all_screens(&ms_data); + igt_require(wait_for_suspended()); } static void restore_environment(void) @@ -1372,10 +1374,11 @@ static void __attribute__((noreturn)) stay_subtest(void) sleep(600); } -static void system_suspend_subtest(void) +static void system_suspend_subtest(int state, int debug) { disable_all_screens_and_wait(&ms_data); - igt_system_suspend_autoresume(SUSPEND_STATE_MEM, SUSPEND_TEST_NONE); + + igt_system_suspend_autoresume(state, debug); igt_assert(wait_for_suspended()); } @@ -1992,12 +1995,19 @@ int main(int argc, char *argv[]) WAIT_STATUS | WAIT_EXTRA); /* System suspend */ + igt_subtest("system-suspend-devices") + system_suspend_subtest(SUSPEND_STATE_MEM, SUSPEND_TEST_DEVICES); igt_subtest("system-suspend") - system_suspend_subtest(); + system_suspend_subtest(SUSPEND_STATE_MEM, SUSPEND_TEST_NONE); igt_subtest("system-suspend-execbuf") system_suspend_execbuf_subtest(); igt_subtest("system-suspend-modeset") system_suspend_modeset_subtest(); + igt_subtest("system-hibernate-devices") + system_suspend_subtest(SUSPEND_STATE_DISK, + SUSPEND_TEST_DEVICES); + igt_subtest("system-hibernate") + system_suspend_subtest(SUSPEND_STATE_DISK, SUSPEND_TEST_NONE); /* GEM stress */ igt_subtest("gem-execbuf-stress")