Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BD964606A31C for ; Sun, 29 Nov 2026 18:07:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=nzMFR2X+ Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 3DD8210E2AC; Sun, 29 Nov 2026 18:07:30 +0000 (UTC) Received: from mail-oi1-f169.google.com (mail-oi1-f169.google.com [209.85.167.169]) by gabe.freedesktop.org (Postfix) with ESMTPS id DE4CB10E38D for ; Sun, 29 Nov 2026 18:07:13 +0000 (UTC) Received: by mail-oi1-f169.google.com with SMTP id 5614622812f47-4ed6d69bdfaso5253681b6e.3 for ; Sun, 29 Nov 2026 10:07:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1795975633; x=1796580433; darn=lists.freedesktop.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=G1a7uvTH9ID2kReECdoVd6lBkd/Mk16giWQjkZYJzTE=; b=nzMFR2X+4RMSlczWkKphd1A0Amjl2ypQU7U/5ZxXXge79qkipwoybMop6x5suovfmG 3NcfIkJRnApFWTuWiRtbrSXcjKQPLbT9OPsPiC2p2fIUe8QCcV84zpNQ+eFiRDursAoW n3eXrh5qA8YwJB8+fuffkcd4L32EFYpLb+CqsAE/mChfWn8ivtrGfK+a10w8SBt2xsvC V2a0wsWoSaO8XRFrE4KfJ/spcRi8kbcsF0jQetx6QxpWp1HvBc8FKdejKbFQDhjb3agA Owv5GIBkVkiBT4yMLycy+62Dm0JCaYw33GNH13GXe6LyfBOhdVHU1+9zBW5u7RQ3pBAd UM2w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1795975633; x=1796580433; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=G1a7uvTH9ID2kReECdoVd6lBkd/Mk16giWQjkZYJzTE=; b=iUpycgLqVR/ofTzEGTRvBGKtB8hcuMSI1hV4eq2u2j1Ay49kSiZ9Ft4TGfqxmaDDa9 1WqM9K8g4P/JNbRVDq3UTXK5TCzHASD5DB78X0tp2wBkKSmJcOPXhOBXWbaDzLGs5aEI 9p9H/1fuA/+rqmxYBXPPgRMBYiPJfWzXHXipHdyQhbeoTdgAYxYbyNtqS0ys3E1T6TMO IKHwtAklzO4TAQk5LLIIVw4iVMhhP0vWbGH5Az1fNIN83OKi97BQwnZ090cq+Qv8OIzl hc7ShIsPjj/Ba6TbvdezD7xHqGn8eqXpTlpIOA8rOdHp/tyhyTwAcFDJiBcDI4lyyFl2 llAA== X-Gm-Message-State: APuU4Z+ZZUZHUYO8JQesDWvg217+BPhOAwgxq2N7cNcoF/SryRyIHXwI EaDM/oyZ6ffgDJYIhhKK4eNc2hmDfkxqGnujzv5B8VOvXtvseqFaF2pUWKFXlii4 X-Gm-Gg: AZFdTZejKiaIOi4gEX/AaO+5AVJkDMh6rW63vHVVXjsuTCyd5x3PETSf+n65FyXNIyj 8Jkn1iiQ8m7t8H8KoD4lrQ4q4rEwiQNTxWjpdqiGmiXaIZL4aLlTlv88CawyePUhlKRY3FyIsig JouF916CpH5FRQDii25XUQ+usFmuvp0qmr53WD465LEshwdd40uXn0VyUfuxj+QmXbMrCo8fWCH BgirEWwoYX2ku3ZOG7fOn0i8itmt7YK7uR12fTlZlDpo+9plIobV8D7m2gP9Dr6HgSSZfzW9LsJ CBVv9fFfQHdrNl6zlosL0AZwPrv0ml1edQDBgawY6LybS/1UksQuZJQsAckaTOhCgojNsysA1/y zgI+R5MkJ5mxK35veY4MgEeznHainXpc+GwKh/sMAa3wPKeq2FMiJlS28BkRO/H55t/DU9RrfG9 WWri0h5sWufcpEUcjLFNTE3FQn0nCL27kvQoJy3uD6WCUikLRYY97y6R3zzB2n5fvyxF7nDOxI7 iOgQXq2m1czTBCQdeQHVlT3CWRuKVrxmk+Kpt0ExfGTZe/y49QkrzoCUYvfCCytHNUjdzDrJfhU kMQXO27L13pXfxMsaJzI5yuRY6Ra4ZkvxdhhUvAhYQHqxfy0GLqQx272mH8491F6IU+6B1iTNG+ Ms9WD7fOCqQ== X-Received: by 2002:a05:6808:10cc:b0:4f8:4a95:9969 with SMTP id 5614622812f47-57a0a20ba84mr34305024b6e.15.1795975632748; Sun, 29 Nov 2026 10:07:12 -0800 (PST) Received: from localhost.localdomain ([72.12.197.23]) by smtp.gmail.com with ESMTPSA id 5614622812f47-57a34250ef2sm24226176b6e.3.2026.11.29.10.07.11 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Sun, 29 Nov 2026 10:07:12 -0800 (PST) From: Aditya Tipre To: igt-dev@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org, louis.chauvet@bootlin.com, sowmiya.s@intel.com, kamil.konieczny@linux.intel.com, karthik.b.s@intel.com, swati2.sharma@intel.com, tipreaditya@gmail.com Subject: [PATCH i-g-t v4 1/2] tests/kms_writeback: Wait for the valid FB ID writeback Date: Sun, 29 Nov 2026 13:06:59 -0500 Message-ID: <20261129180700.89278-2-tipreaditya@gmail.com> X-Mailer: git-send-email 2.50.1 In-Reply-To: <20261129180700.89278-1-tipreaditya@gmail.com> References: <20261129180700.89278-1-tipreaditya@gmail.com> X-Archived-By: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "dri-devel" X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 The positive WRITEBACK_FB_ID test submits a writeback to the common input framebuffer without requesting or waiting for its completion fence. A blocking atomic commit does not imply that writeback has finished. The following pixel-output test fills the same buffer with its reference color. The earlier writeback can still be modifying it, leaving a mixture of the old and new contents and causing intermittent checksum failures. On ARM64 VKMS, a diagnostic run observed the prior fence still unsignalled and a black row in both the input and the captured output after the input had been filled red. Request a fence for the successful FB ID writeback and wait for it before returning. Only require the returned fence descriptor to be -1 when the commit fails, so the shared commit helper also accepts this successful fenced operation. Keep all invalid-parameter checks intact. Signed-off-by: Aditya Tipre --- tests/kms_writeback.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/kms_writeback.c b/tests/kms_writeback.c index 7c30e8e..550d603 100644 --- a/tests/kms_writeback.c +++ b/tests/kms_writeback.c @@ -228,7 +228,7 @@ static int do_writeback_test(igt_output_t *output, uint32_t fb_id, ret = igt_display_try_commit_atomic(display, DRM_MODE_ATOMIC_ALLOW_MODESET, NULL); - if (ptr_valid) + if (ptr_valid && ret) igt_assert(*out_fence_ptr == -1); /* WRITEBACK_FB_ID must always read as zero */ @@ -288,8 +288,12 @@ static void writeback_fb_id(igt_output_t *output, igt_fb_t *valid_fb, igt_fb_t * igt_assert_eq(ret, 0); /* Valid output buffer */ - ret = do_writeback_test(output, valid_fb->fb_id, NULL, false); + ret = do_writeback_test(output, valid_fb->fb_id, + &output->writeback_out_fence_fd, true); igt_assert_eq(ret, 0); + + /* The next subtest may reuse this buffer as input. */ + igt_get_and_wait_out_fence(output); } static void fill_fb(igt_fb_t *fb, uint32_t pixel) -- 2.50.1 (Apple Git-155)