From mboxrd@z Thu Jan 1 00:00:00 1970 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 9E7F1606A322 for ; Sat, 5 Dec 2026 06:34:27 +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=a7YWkZTO Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 199C310E139; Sat, 5 Dec 2026 06:34:22 +0000 (UTC) Received: from mail-ot1-f44.google.com (mail-ot1-f44.google.com [209.85.210.44]) by gabe.freedesktop.org (Postfix) with ESMTPS id DB00610E139 for ; Sat, 5 Dec 2026 06:34:15 +0000 (UTC) Received: by mail-ot1-f44.google.com with SMTP id 46e09a7af769-862b3a39d0dso816371a34.3 for ; Fri, 04 Dec 2026 22:34:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1796452455; x=1797057255; darn=lists.freedesktop.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to:content-type; bh=g386TQ6LcL6PCt1DxspgANwqPsn4JV3HqRj+nVM52Xo=; b=a7YWkZTOqnoHEjHhYW9nBhdO3zDXSVt66pN+/PCCaH0VrX09DDxwMQ5cVG59vFRG2H EHZmtf6j0/n3uaWqpfW7ZEXP0XkrOBnS4kUYgAxW4M97Hyq6brIUrpnS5aAHuUepyVn3 hDES5YcFgDiIOb8zkPE2UTHJxT/fCgzek9CtmvIOkL8vLuWPgz6+BifEjf3x1p0PHQ7A iMjs+LpHeDTfbGvvrOiSGTJ71oBTqd0SR2deWDj1nPitbma2e/sQ7QZADH2oWwVGdH8U lvLkO3j3V9gQzcEaExoeLJ6pQWzICKkWiHKCdHy7z7uCD2yZOoec2E55vGVRtDl4O4zt 9HCQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796452455; x=1797057255; h=content-transfer-encoding:mime-version: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=g386TQ6LcL6PCt1DxspgANwqPsn4JV3HqRj+nVM52Xo=; b=J+qez3kVaBoYNtkZhWfUn4GLf+9uvWFW9xSfYzPmBN9GmNCoU31NZE/GA8QGg4n+Dv +2Y78/ub8fyWOOP+Ar6OQqy1nk3qG4InRfpS2MoeskIhflsEazCOa+rnTwcqsPsruDTO 4y/X2uaSD/f4AtnpXiVYvTEmOqKDNNzLNynLpuX4A33z7fo0dMU9CayKD7Kp6gl3O98e 20UrIpv3ZZs8jCyPQWnN88t/eGMNOjU9k7E5OcC2GV8yhYRGFk7TylcN/c8pbTgRx+pu QE+s/z39WmOCrxYDh5jkbiuD1LQLlYL1xDRqPP/ovm9PZjZxEwo8wY/ToVpTw0g5NnS2 Wwfw== X-Gm-Message-State: APuU4Z8yMwRyLupGQ+3Fa3RK5aV33Nm16dtZcnPBjntlAbabCdeGiz5l 2fOz7hEQ/88oyUIpMnEm66s/TIiFK6H1oTkyPrQtefzgWb3jLo261myCZAKu8m3J X-Gm-Gg: AZFdTZdgsbt5v/RQA2uFMpx025oCC240gJtPCyGv8LAdkaAKhtIG1q36gZKcM4dE41j x/9WzlZ79IKCD2RzhRKTTim8yRuG84cHk1Pd6GjyXyQbQxv9ada9nWHI3A7OUdaY6KInfU8t/ZA 8xg3Vup8vZ16V0e9OrRDlHN3FEIM2zV3zKmry4quFVhIJguR4lQmidPZITuFhrXDoZF2DIfBodS ktKXE3vbaB6gsCfHBbV+m5yhKDMYOyu07MooR0BKmKoxqyxjKDAwkGmzNgXE/x38q+b2gJjwlaZ XrJ8LJp37gBL8Qk4d2pP6/ubNkOeSyscjkLb0cibSSFTH35ZC/jzN9Zh94HuLDteARDSKTdtwtO 7AbzN/n/bH/BXJ5wPPRp5Na7T9JMY92YaonalcTIbBVVZ6H7xIF23FOgJNp/vodU20TJ09jWpMh Yk2aCefl91xP3AWG/eWxiKPhMqj/+pSBe/00ttzh41YG9yzEuHhV7wuHAC3U4iWuoFCJHTbMQms MEV3rpqaozRFfqG47FpQUaRKfexNHRRXFx7+XPWpMIPXEnxg4Gyx2kPHzRXW+lkoga+QRhwztgU Jc+oR6uAA+x2r/JrMKT4RBRW8D+BxHiD83v/5tJJ8KG7Zd3+JiEM9X0O4IzHWyALyjSDmZFU2CZ 4ybJzpI4ImQ== X-Received: by 2002:a05:6830:2649:b0:863:f069:4b86 with SMTP id 46e09a7af769-863f89b7e21mr4322543a34.16.1796452454781; Fri, 04 Dec 2026 22:34:14 -0800 (PST) Received: from localhost.localdomain ([72.12.197.23]) by smtp.gmail.com with ESMTPSA id 46e09a7af769-863f815e97asm4511615a34.1.2026.12.04.22.34.14 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 04 Dec 2026 22:34:14 -0800 (PST) From: Aditya Tipre To: dri-devel@lists.freedesktop.org Cc: virtualization@lists.linux.dev, airlied@redhat.com, kraxel@redhat.com, dmitry.osipenko@collabora.com, gurchetansingh@chromium.org, olvaffe@gmail.com, tipreaditya@gmail.com Subject: [RFC PATCH 0/2] drm/virtio: avoid full uploads for rotating dumb buffers Date: Sat, 5 Dec 2026 01:33:19 -0500 Message-ID: <20261205063321.56168-1-tipreaditya@gmail.com> X-Mailer: git-send-email 2.50.1 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=-6.0 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,USER_AGENT_GIT autolearn=no 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 virtio-gpu uploads dumb buffers per resource. When the framebuffer changes, the damage helper falls back to a full-plane upload because the host resource for the newly selected buffer may contain an older frame. This series keeps bounded frame damage history per output and tracks the confirmed contents of each host resource. A new upload updates the tracked contents only after a matching successful transfer response. When the driver cannot determine the damage needed to catch up, it uploads the full buffer. The prototype is off by default. Use virtio_gpu.buffer_age=1 on the kernel command line to enable it for native linear XRGB8888 shmem dumb buffers covering a single unscaled scanout with virgl disabled. This addresses one virtio-gpu case in the DRM damage accumulation TODO. Feedback is welcome on whether the eligibility rules are appropriate and whether the transfer ownership and teardown rules should be split into their own prerequisite series. The series is based on drm-misc-next and requires Nguyen Ngoc Thang's vbuf cleanup v2, posted by Fei Yu at the link below. https://lore.kernel.org/dri-devel/20261103085314.3102802-1-fei.yu@intel.com/ The KUnit tests cover the transfer ownership and damage history rules. The separate IGT draft exercises two and three rotating framebuffers and compares the QEMU host scanout against a reference scene. All 40 captures matched with the optimization enabled and disabled. Over ten 640x480 frames per subtest, enabling buffer age reduced total QEMU flush rectangle area by 79.47% with two buffers and 69.30% with three. KCSAN stress completed 2,000 atomic commits and 200 concurrent writes per run. The unpatched drm-misc-next base reproduced the DRM timestamp and vblank-timer reports. The latest run with buffer age enabled had no KCSAN reports. With buffer age disabled, KCSAN reported the DRM timestamp race and a workqueue read with an unknown competing access. OpenAI Codex assisted with driver design, implementation, and validation. base-commit: b5a1ab58fb6535064d79c26f3d53936e88769339 prerequisite-patch-id: dc35fdf21304890860494eca3f2710e345445342