From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.210.52 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796452456; b=LJaeEamOZM407pkgN9iZLOmXoCwcElHJ0CpuU9m/NzwH5OylIfcrsyWUgiVoG+hcXvOU sNHWXMUMrz5L+y55KB2R4JtRUXOp8m6gDb402PBYZVGA9pblfkJ6NsFu1umrG0/F70AGp 3vxobzJOLX52fRKzBkbB4mvBdeNeLzzEISJujTBZPQW5VIBchfzpSP/DPaPBcHsduLY7L Nzzd8iRXcotEt1pJ/oSuKwdhp1fXrtIYu3CD00NLeSpyC+lnMLilT0qD8SfdzcHk7CDCY cuxA3xFW5q/1pFsRXtenQ3lmeDg+cXkPAjAzoHZSKVp5E3K/VEolJxdNo+bFvZ7pSLg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796452456; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Gm-Message-State:X-Gm-Gg:X-Received:Received:From:To:Cc:Subject: Date:Message-ID:X-Mailer:MIME-Version:Content-Transfer-Encoding; bh=g386TQ6LcL6PCt1DxspgANwqPsn4JV3HqRj+nVM52Xo=; b=gmwNarI6QIYaaVgyjIGzQUnf0norm0lYY1oylrFLttDvczfk/U2uZZagnOM+ZagYnh/m erGRf5PX/HdhRO+2FzHjP+zvG4kY7omMupA5TLn++fjnBEJ5foatTIs9MjOK5MKHna8NT bp/0utlHs1iEXuF0Zs8H+xm+YauH9WlMSrJfOZdrWjrYrY+I/skuOrdXpT/srD+HcwhRd kOndtejHjT+qjCMtH2fLiURQr98BrtrLjlZgk7YpE9vFqEq/k+tWuXkd1qg0LdwuOz9eh 176MXu0lemUeLnZsK3OwraejPbgYn6YVhj8Y+YEXBl+REqTURZru2j/xbzuE94aOWMA== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=mUyTSrXL; arc=none smtp.remote-ip=209.85.210.52 Received: from mail-ot1-f52.google.com (mail-ot1-f52.google.com [209.85.210.52]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C7448606A322 for ; Sat, 5 Dec 2026 06:34:15 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org C7448606A322 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com 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=mUyTSrXL Received: by mail-ot1-f52.google.com with SMTP id 46e09a7af769-845788309b4so745807a34.1 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.linux.dev; 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=mUyTSrXL1SmM2ODbMTjg/OXj2JLsORDoeSsaVY7D43vunG6S+iFkLmjuyhdhuHIcw6 F3jhONlKfqXTdzYUj077PHi9KJeB/4ImS1IxB3HXAnflc2CUCNifZ/lJea4iRWke+yJJ 2ExjuuhknxXYDQat30tVPZcqUnyei5Gy8rxiknwYvSSu3QuGRf644rwI8sPaalv87itF Qq3CqtXzxH0FYxpv9yJU2zzVRvjSM8YVc2451NLXy4tbgeQ5ThUWF3cu6+EoX2ZP9aX6 CCTooAHSVLDRrV+8BdPA+vDhEYx8MRO4mcbrPpO1lpGq6GQvAvLyyyU36FYDNRLMDVjv c2eA== 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=m4nmZ5MkeBts4wYERT5OAbBWzOQttxwsuYhV9hWQkDHq6/nwXuL96jPlxS4SKVV67V Qg2HUfsUDeN59csCuCNSqJ6fEAbW4xRtl36KIlt3FoTEQZxCkt8vQIQVY5RuOyv16C+O qqGbxu/bnOeF32XFHrOBvHfC1qwyFMO1rbZ7dVnTf+WS1fABIWHXek5j3DqzHovan6nj WR901DfRYi+COvEKERREslnIbNOY71AuSfiY9IInixmrn3V6WOszbuQXuRWFQ91unvc3 2Cy5/+Fk5w3Zs1VpWkWKRk0hyRvxIuT6Iot4e7no9z2XC+VK/jxkl6cWBG2tzkSbVAvd /hFw== X-Gm-Message-State: APuU4Z8daZNzqJvv2rQJzU7jc07uNGXTJCIV1OF05ljO/mMMrovW+lFx nwmy2d02I60KgjK4DUhAOISy5C0LUqvQVWvsxOPMWo8vsDWatW/MC33u X-Gm-Gg: AZFdTZc8wChqHvKJEtM34ffW2/7epiYxg4WNXgyTDTKAclBFe/IunUPgMpQssIGXxsD TYg60lsEw+G5cUbM9FESpuI2wEqMBNQSGDLGXYUufoUhrCYghtOAagbxBBBfbPP2c6G+Z1cc2dN wmGGjZmBVX8CJsJ6A5o8zBAxb/tivV2p7ELtMG4Dmpb5KhjoWXO1ObLYlhAWHb1bbHJMZn12tiz D57lFkj6bkvj+bGgPlkLbXfVbN0YCaVx9OdlaXcDDiSlfdBoi8Z2Tb07wNjKmm5nyMoF/OzZ/ln mEFmHEd8uwbcKD3JeMFPgfN1I9Zo+PJQDWhEfCea/z2lQTR5DSShjWy9AnIvmNaqmyNva5JCott wdAPheTAnEsT2nTlAGu/nUfdT1XERgJZSPQY2kRsVHDZWo9ua6OkTr3THxwcok0PwBnOEmxdIR0 hsgC96nVDPSh/6/WQ6fCPXFeZSiLPVgfkV2zrR/xDLHB8BsexMReKevD5eGTUzxBBCvW0+cC9iw OSQwobrxW1ehhuiIxvpoK0DqA9EDdlU03HgHPimEhgARN/+KeydvHQ1ckXW4+njL/ElL9zGHgwG YtITazCrQgtt+/otGZJ5u/SWb4z3ICr8ozVW+ELSv0LIdQMXC+OkZxqcH5LnXgQt/YzOhKB4d7o CXAW3lRk6/Q== 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-Mailing-List: virtualization@lists.linux.dev List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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