From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 6EAB0CF58E5 for ; Fri, 20 Sep 2024 07:56:39 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 1888B10E7C7; Fri, 20 Sep 2024 07:56:39 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="U7uCHr6X"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.18]) by gabe.freedesktop.org (Postfix) with ESMTPS id BBDDD10E7C7 for ; Fri, 20 Sep 2024 07:56:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1726818998; x=1758354998; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=x3X59CDWJiM+FftYu0DfTy8jzR0duaNtwSbhXPNUABw=; b=U7uCHr6XVaogqWU9LHPXKzRxVS5lIrh8KN91wM6JyCJ2fn5LdhTv4RgZ V+Y4lC10cKxIlZyIpu5lcRnEqJ2f4HYw8Qt91x5zExcxoYGFpwoHGX6wn sKtncS4rOQxzpdEeeCO42bt0uXPx6bv3E14D7iT1GRQ7Mz70mHahi3Y+H b5m7SuX92ey0d8SahjP2/aue0OwBXj/j+3+C+Cw2CAwN99eQYjTUsPtkE RgybjfOHoGnhwtjwGf8Q/emr7P1JTIwXBkGFzCwjIomhBhDes4yV+ApRm I8vnuclxcAHNd530reD33dwds4u6Cp7ePlfL+1oh3bjkNvEOiVCZQmF5J Q==; X-CSE-ConnectionGUID: qU0qyGd7Rve/lAbxwsJbMw== X-CSE-MsgGUID: Tq5h3zN7SeWxnofkes6ZJw== X-IronPort-AV: E=McAfee;i="6700,10204,11200"; a="25290604" X-IronPort-AV: E=Sophos;i="6.10,243,1719903600"; d="scan'208";a="25290604" Received: from orviesa007.jf.intel.com ([10.64.159.147]) by fmvoesa112.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Sep 2024 00:56:37 -0700 X-CSE-ConnectionGUID: GmTncYLZQn2/rkIRe1G2+A== X-CSE-MsgGUID: NJwW4GDPTTi11A01lBZ9hw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.10,243,1719903600"; d="scan'208";a="70658700" Received: from rgsanthosh-z690i-a-ultra-plus.iind.intel.com ([10.145.162.135]) by orviesa007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Sep 2024 00:56:36 -0700 From: Santhosh Reddy Guddati To: igt-dev@lists.freedesktop.org Cc: swati2.sharma@intel.com, karthik.b.s@intel.com, vandita.kulkarni@intel.com, Santhosh Reddy Guddati Subject: [PATCH i-g-t v3 1/2] tests/kms_async_flips: Async flips suspend resume test Date: Fri, 20 Sep 2024 13:26:17 +0530 Message-Id: <20240920075618.633792-2-santhosh.reddy.guddati@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240920075618.633792-1-santhosh.reddy.guddati@intel.com> References: <20240920075618.633792-1-santhosh.reddy.guddati@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: igt-dev@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development mailing list for IGT GPU Tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: igt-dev-bounces@lists.freedesktop.org Sender: "igt-dev" Test functionality of async flips with suspend and resume v2: Re-use existing function and use s/r API (Swathi) Signed-off-by: Santhosh Reddy Guddati --- tests/kms_async_flips.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/tests/kms_async_flips.c b/tests/kms_async_flips.c index 5b70c4033..08510e70d 100644 --- a/tests/kms_async_flips.c +++ b/tests/kms_async_flips.c @@ -66,6 +66,9 @@ * * SUBTEST: invalid-async-flip * Description: Negative case to verify if changes in fb are rejected from kernel as expected + * + * SUBTEST: async-flip-suspend-resume + * Description: Verify the async flip functionality with suspend and resume cycle */ #define CURSOR_POS 128 @@ -99,6 +102,7 @@ typedef struct { bool flip_pending; enum pipe pipe; bool alternate_sync_async; + bool suspend_resume; bool allow_fail; struct buf_ops *bops; } data_t; @@ -260,6 +264,7 @@ static void test_async_flip(data_t *data) int ret, frame; long long int fps; struct timeval start, end, diff; + int suspend_time = 1; igt_display_commit2(&data->display, data->display.is_atomic ? COMMIT_ATOMIC : COMMIT_LEGACY); @@ -312,6 +317,10 @@ static void test_async_flip(data_t *data) data->flip_interval, data->refresh_rate, MIN_FLIPS_PER_FRAME); } + if (data->suspend_resume && diff.tv_sec == suspend_time) { + igt_system_suspend_autoresume(SUSPEND_STATE_MEM, SUSPEND_TEST_NONE); + suspend_time = 0; + } frame++; } while (diff.tv_sec < RUN_TIME); @@ -750,6 +759,12 @@ igt_main run_test(&data, test_crc); } + igt_describe("Verify the async flip functionality after suspend and resume cycle"); + igt_subtest_with_dynamic("async-flip-suspend-resume") { + data.suspend_resume = true; + run_test(&data, test_async_flip); + } + igt_fixture { for (i = 0; i < NUM_FBS; i++) igt_remove_fb(data.drm_fd, &data.bufs[i]); -- 2.34.1