From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by gabe.freedesktop.org (Postfix) with ESMTPS id DAE0B10F85C for ; Mon, 16 May 2022 11:46:02 +0000 (UTC) From: Riana Tauro To: igt-dev@lists.freedesktop.org Date: Mon, 16 May 2022 17:13:10 +0530 Message-Id: <20220516114311.3130949-3-riana.tauro@intel.com> In-Reply-To: <20220516114311.3130949-1-riana.tauro@intel.com> References: <20220516114311.3130949-1-riana.tauro@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [igt-dev] [PATCH i-g-t v7 2/3] tests/i915/i915_suspend: Add s2idle and s3 subtests without i915 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: petri.latvala@intel.com Errors-To: igt-dev-bounces@lists.freedesktop.org Sender: "igt-dev" List-ID: Add new tests basic-s2idle-without-i915 and basic-s3-without-i915 to exercise s2idle and s3 cycles to know the system wide health of suspend/resume v2: rebase v3: rebase v4: skip s3 when platform default state is s2idle to reduce CI time (Anshuman) v5: modified the log message (Petri) Reviewed-by: Anshuman Gupta Signed-off-by: Riana Tauro --- tests/i915/i915_suspend.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/tests/i915/i915_suspend.c b/tests/i915/i915_suspend.c index d34b7a5d..1c464f7a 100644 --- a/tests/i915/i915_suspend.c +++ b/tests/i915/i915_suspend.c @@ -204,12 +204,14 @@ test_forcewake(int fd, bool hibernate) } static void -test_suspend_without_i915(void) +test_suspend_without_i915(int state) { igt_kmsg(KMSG_INFO "Unloading i915\n"); igt_assert_eq(igt_i915_driver_unload(),0); - igt_system_suspend_autoresume(SUSPEND_STATE_MEM, SUSPEND_TEST_NONE); + igt_skip_on_f(igt_get_memsleep_state() == MEM_SLEEP_FREEZE && state > SUSPEND_STATE_FREEZE, + "Platform default mem_sleep state is s2idle\n"); + igt_system_suspend_autoresume(state, SUSPEND_TEST_NONE); igt_kmsg(KMSG_INFO "Re-loading i915 \n"); igt_assert_eq(igt_i915_driver_load(NULL), 0); @@ -219,9 +221,13 @@ int fd; igt_main { - igt_describe("Validate system suspend cycle without i915 module"); - igt_subtest("system-suspend-without-i915") - test_suspend_without_i915(); + igt_describe("Validate suspend-to-idle without i915 module"); + igt_subtest("basic-s2idle-without-i915") + test_suspend_without_i915(SUSPEND_STATE_FREEZE); + + igt_describe("Validate S3 without i915 module"); + igt_subtest("basic-s3-without-i915") + test_suspend_without_i915(SUSPEND_STATE_MEM); igt_fixture fd = drm_open_driver(DRIVER_INTEL); -- 2.25.1