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 9092CC369A1 for ; Tue, 8 Apr 2025 00:02:44 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E2C4110E590; Tue, 8 Apr 2025 00:02:43 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=igalia.com header.i=@igalia.com header.b="Rc7xXjwD"; dkim-atps=neutral Received: from fanzine2.igalia.com (fanzine.igalia.com [178.60.130.6]) by gabe.freedesktop.org (Postfix) with ESMTPS id 0A9EC10E58C for ; Tue, 8 Apr 2025 00:02:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=igalia.com; s=20170329; h=Content-Transfer-Encoding:Content-Type:MIME-Version:References: In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=14OiKpIhBivBKs2vXldLVSfE64khL4DrFaFIVf9UJB4=; b=Rc7xXjwDUhZFZMUpYmCkJq4Jjw 7t0kq6V/p5k0Df+SdXvijbupNKWp2CBM++kBBNjRHva3EFJXueQn6a1hjoUm5mLQOzFAAegnxDGN8 Wd8CLu9pnUz9pnlvmusZPMEmEpjIPkMnTpsJ1ABBr5e5joz5+lHSkLEWt7UJS8UuJJlraK87WEpYY FJbFunGSJvLbMxpRFRDXFG2GYztY4JRESCjF35h2ej+P8AVYbPaUKGcsApBfruSJXt4OmVjj+wI2j M7j6lpYjhLMo2XUEnxUEbILu8vvp6yg8+IS6UZG0ShX8GRSwFeZUKUlCIZ2F4yIJrgBOjd6ISdwIx 5+aDuCRQ==; Received: from [187.57.129.172] (helo=localhost.localdomain) by fanzine2.igalia.com with esmtpsa (Cipher TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim) id 1u1wQG-00D5aL-SM; Tue, 08 Apr 2025 02:02:37 +0200 From: =?UTF-8?q?Andr=C3=A9=20Almeida?= To: igt-dev@lists.freedesktop.org, Jeevan B , Kamil Konieczny Cc: kernel-dev@igalia.com, Vitaly Prosyak , Alex Hung , Melissa Wen , Rodrigo Siqueira , =?UTF-8?q?Andr=C3=A9=20Almeida?= Subject: [PATCH v6 2/4] tests/kms_async_flips: Check for atomic async flip cap Date: Mon, 7 Apr 2025 21:02:19 -0300 Message-ID: <20250408000221.140459-3-andrealmeid@igalia.com> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250408000221.140459-1-andrealmeid@igalia.com> References: <20250408000221.140459-1-andrealmeid@igalia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 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" If a driver doesn't support doing an async flip through the atomic uAPI, the atomic tests fails. Instead of failing, create a function that checks for this capability and skip the test if is unsupported. Signed-off-by: André Almeida Reviewed-by: Melissa Wen --- tests/kms_async_flips.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/tests/kms_async_flips.c b/tests/kms_async_flips.c index 126b96d6b..fc9cbd3f1 100644 --- a/tests/kms_async_flips.c +++ b/tests/kms_async_flips.c @@ -209,6 +209,14 @@ static void require_monotonic_timestamp(int fd) igt_require_f(ret, "Monotonic timestamps not supported\n"); } +static void require_atomic_async_cap(data_t *data) +{ + int ret = igt_has_drm_cap(data->drm_fd, DRM_CAP_ATOMIC_ASYNC_PAGE_FLIP); + + igt_assert(ret >= 0); + igt_require_f(ret, "Atomic async flip not supported\n"); +} + static void test_init(data_t *data) { drmModeModeInfo *mode; @@ -689,6 +697,9 @@ static void run_test(data_t *data, void (*test)(data_t *)) { igt_display_t *display = &data->display; + if (data->atomic_path) + require_atomic_async_cap(data); + for_each_pipe_with_valid_output(display, data->pipe, data->output) { igt_display_reset(display); @@ -714,6 +725,9 @@ static void run_test(data_t *data, void (*test)(data_t *)) static void run_test_with_modifiers(data_t *data, void (*test)(data_t *)) { + if (data->atomic_path) + require_atomic_async_cap(data); + for_each_pipe_with_valid_output(&data->display, data->pipe, data->output) { test_init(data); -- 2.49.0