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 77CA9C001B0 for ; Thu, 13 Jul 2023 08:23:34 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id A11BC10E189; Thu, 13 Jul 2023 08:23:33 +0000 (UTC) Received: from madras.collabora.co.uk (madras.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e5ab]) by gabe.freedesktop.org (Postfix) with ESMTPS id 922C210E189 for ; Thu, 13 Jul 2023 08:23:31 +0000 (UTC) Received: from eldfell (unknown [194.136.85.206]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: pq) by madras.collabora.co.uk (Postfix) with ESMTPSA id 404686607048; Thu, 13 Jul 2023 09:23:30 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1689236610; bh=B9MNjPKQd47lnj+EEacT5SWWIETPN7LjyQTENu4YU9s=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=JBU971pjpQQBW3ibU0A/ttwyduL3kox2UEB+sYRJUPObtjBqIvm7BO/fqIsvIKipG V5CXnMYb3JjvaynAMwmqg3PJNHCrTdoBPVs2XOr3QaSs/Iom/JFXx52bEuXXu0XPND UzpNRttuxx9fJJCJDaNoWaiuGHYRAhefE59kn40FywJgo3jmgnK1I9ha7RuUAFaUuD xbsQqSZ3sHJqK9tfEjescBVB4FGE/nhJrVKBVeNuFfPci7v8/ztClLgNTVP+WdvubG kHtofoSdlhOFqYtJ+5zwGFBBjbCTFFp2cAyiGQ468lNJIyNRMHiaFsCEfyimgjVVvr V4yBPxaVNKJUg== Date: Thu, 13 Jul 2023 11:23:27 +0300 From: Pekka Paalanen To: Simon Ser Subject: Re: [PATCH 4/4] drm/doc: document front-buffer rendering Message-ID: <20230713112327.560f89e4.pekka.paalanen@collabora.com> In-Reply-To: <20230712135723.173506-4-contact@emersion.fr> References: <20230712135723.173506-1-contact@emersion.fr> <20230712135723.173506-4-contact@emersion.fr> X-Mailer: Claws Mail 4.1.1 (GTK 3.24.37; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Daniel Vetter , dri-devel@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On Wed, 12 Jul 2023 13:57:34 +0000 Simon Ser wrote: > Explain how to perform front-buffer rendering. > > Signed-off-by: Simon Ser > Cc: Pekka Paalanen > Cc: Daniel Vetter > --- > drivers/gpu/drm/drm_blend.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/drivers/gpu/drm/drm_blend.c b/drivers/gpu/drm/drm_blend.c > index 6e74de833466..6c55f1da2480 100644 > --- a/drivers/gpu/drm/drm_blend.c > +++ b/drivers/gpu/drm/drm_blend.c > @@ -75,6 +75,9 @@ > * the currently visible vertical area of the &drm_crtc. > * FB_ID: > * Mode object ID of the &drm_framebuffer this plane should scan out. > + * > + * To perform front-buffer rendering, user-space should set FB_ID to the > + * previous framebuffer in atomic commits. > * CRTC_ID: > * Mode object ID of the &drm_crtc this plane should be connected to. > * It's unclear to me what "previous framebuffer" means, although I know what you want to say. How about: When a KMS client is front-buffer rendering, it should set FB_ID to the same front-buffer FB on each atomic commit. This implies to the driver that it needs to re-read the same FB again. Otherwise drivers who do not employ continuously repeated scanout cycles might not update the screen. Btw. is it enough to set only FB_DAMAGE_CLIPS and not touch FB_ID? Thanks, pq