Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp5261426pxv; Wed, 28 Jul 2021 06:58:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwwYU/0I38VRqoyYubBXGwwbJCuJ/Uvx2ZjLWMoJIqXheyLbxWb2VH1Q3H1Q/J1u4jxet0f X-Received: by 2002:a05:6e02:b4b:: with SMTP id f11mr25346ilu.130.1627480687459; Wed, 28 Jul 2021 06:58:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627480687; cv=none; d=google.com; s=arc-20160816; b=roZwXy2vJtIGtDuD/qdEYwuKwaZU8Gvu1FZ0aBiaqPOEYLiheg8HLw5DlvDdoxwVSa Gzasj0vgDVMsCLBH28CnkvGh6NxJsmiq99aeJQ4j4YkayFzvlGY/1YfOQI0jO3r7hJ59 xFfUsxSDkescARPC9+gkBtNxEN9rBIGMm4EAQjRFV2r03pTfjwnSx9jKc9PjlFvw9fFm f+xomwzbBvaLXj7jetK3NkIa1+2yyUdDvuWY1NTR/wSLnxWLwGLye/WYEOsQsZV6EsHA KwIlM2JSyc/wc4bFTYhm+4Q0y5OPl8O9T9OBVWXX5aNfCcw3O3q5s8H1gcH4EtVDVbM2 DGdw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :subject:cc:to:from:date:dkim-signature; bh=CmKb72PChNszBOXTpOhlC2Z9gbluKznAxmwaxqGh1YY=; b=mxjWNhb6SYNdU1lsi5kE3i97EH5nXr0uqXbCpD9OZsETCSRC9ERJDzLPxIv3scljrY StvqvlOHcppnpXEAyeVg6O3A5HbRESkBsX3338NV0c7IGo1jR9rUshf2F3Zd4kweu7Qb nPUtTLcft10aY8+Sned4jgQ6qQinX9aQA4qhzaqo0XR/qjCX/rpxbM8MVSSlEZsV+N+1 SrVuQeoEjGi69uGXvRplCLYjgxhCh0gjvuVWS1MJjVLzhqmhZfuYD7a2Vw9GoCYMdlUb /mIqpNLHIWmlZx1e4hYXJaWkJNl/r+cKvJT7uSjTJDtRrk3C7yB516zH5Fd+vayxsGR5 8e6g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=G7G2DULT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l6si7378142ilk.99.2021.07.28.06.57.56; Wed, 28 Jul 2021 06:58:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=G7G2DULT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236613AbhG1N5K (ORCPT + 99 others); Wed, 28 Jul 2021 09:57:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59798 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236344AbhG1N5I (ORCPT ); Wed, 28 Jul 2021 09:57:08 -0400 Received: from mail-lj1-x22e.google.com (mail-lj1-x22e.google.com [IPv6:2a00:1450:4864:20::22e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7EEDCC061764; Wed, 28 Jul 2021 06:57:05 -0700 (PDT) Received: by mail-lj1-x22e.google.com with SMTP id q2so3195821ljq.5; Wed, 28 Jul 2021 06:57:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version; bh=CmKb72PChNszBOXTpOhlC2Z9gbluKznAxmwaxqGh1YY=; b=G7G2DULTNw+oWcBqMJgWRUSXrrQbl8/V0TEtdKmAyu/0UlX81IXL1X0G4X0JO5SAfW twSNh926fK4VJf5fADPu+wjcjeMqGiukz9eAAs5XO3TGEs+L895b1OMG/SDQhLwkSZdT vEZw2YsCv8eY/UeYS5MptQxXVltBsmaYYaH3GJ4FfGWI69S/nMg9bxAuIoCBbCor+/eI zDjxLYYzw5K2mCy9//cuiClHheiEQf6jTjcChbrJaM2CsR/TQBTgC8cHbyLYJ7qa5JDi CK+9v4VmH1AIyLoZ1HV4HvwGLT8OB9kT3aXPIjf7x+d3hVeVZS3fzJKaITUzGj36Rm/y QyBw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version; bh=CmKb72PChNszBOXTpOhlC2Z9gbluKznAxmwaxqGh1YY=; b=aqJdAbqR3fzjbnWYoQURTJpWuMz1TsTsXgM2xQoA+jJrsqjAXTVphYXgsaPtUNSiBu HH8IENq+PAo0wfj726eA9l2BsfKcoGPT/i979u9WK8nKZBqADYleyCElWqbSDvbgCCoS kKqFS/2S2upyy0xzkOI6j5YjYb6L/fvtgtzQ8b/oWT1UDh//rE3KiqvBxx3Kw8e63QLU SWUhLMbz+9eRdYyo8H7AXH95l4NNobBqXHrybLopu8sGAOFDMe3WAcIX9D2OvuoxVJVb gzFR8Jm6DPO/l/t0Lx4MVNBdxSxHUowZh6DFc23reQnvWsK+JC5MmvdlunishfwJd/31 HvLQ== X-Gm-Message-State: AOAM5332+/G1djobayZ8AEnh+Vat3r8EtbT1nnlSw9fpWdtIn5ee/YDz +KkHaoUVme+di0U9ONIqo2E= X-Received: by 2002:a2e:a78b:: with SMTP id c11mr19465601ljf.347.1627480623823; Wed, 28 Jul 2021 06:57:03 -0700 (PDT) Received: from eldfell ([194.136.85.206]) by smtp.gmail.com with ESMTPSA id g33sm10198lfv.150.2021.07.28.06.57.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Jul 2021 06:57:03 -0700 (PDT) Date: Wed, 28 Jul 2021 16:57:00 +0300 From: Pekka Paalanen To: Christian =?UTF-8?B?S8O2bmln?= Cc: Michel =?UTF-8?B?RMOkbnplcg==?= , Christian =?UTF-8?B?S8O2bmln?= , Rob Clark , Matthew Brost , Jack Zhang , Gustavo Padovan , open list , dri-devel , "moderated list:DMA BUFFER SHARING FRAMEWORK" , Luben Tuikov , Roy Sun , Alex Deucher , Tian Tao , Lee Jones , "open list:DMA BUFFER SHARING FRAMEWORK" Subject: Re: [RFC 0/4] dma-fence: Deadline awareness Message-ID: <20210728165700.38c39cf8@eldfell> In-Reply-To: References: <20210726233854.2453899-1-robdclark@gmail.com> <28ca4167-4a65-0ccc-36be-5fb017f6f49d@daenzer.net> <99984703-c3ca-6aae-5888-5997d7046112@daenzer.net> <04d44873-d8e6-6ae7-f0f9-17bcb484d697@amd.com> <9d5f4415-d470-3bc1-7d52-61ba739706ae@daenzer.net> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="Sig_/0KAbxBfXFJqzhLgHL9cOc+2"; protocol="application/pgp-signature"; micalg=pgp-sha256 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --Sig_/0KAbxBfXFJqzhLgHL9cOc+2 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Wed, 28 Jul 2021 15:31:41 +0200 Christian K=C3=B6nig wrote: > Am 28.07.21 um 15:24 schrieb Michel D=C3=A4nzer: > > On 2021-07-28 3:13 p.m., Christian K=C3=B6nig wrote: =20 > >> Am 28.07.21 um 15:08 schrieb Michel D=C3=A4nzer: =20 > >>> On 2021-07-28 1:36 p.m., Christian K=C3=B6nig wrote: =20 > >>>> At least AMD hardware is already capable of flipping frames on GPU e= vents like finishing rendering (or uploading etc). > >>>> > >>>> By waiting in userspace on the CPU before send the frame to the hard= ware you are completely killing of such features. > >>>> > >>>> For composing use cases that makes sense, but certainly not for full= screen applications as far as I can see. =20 > >>> Even for fullscreen, the current KMS API only allows queuing a single= page flip per CRTC, with no way to cancel or otherwise modify it. Therefor= e, a Wayland compositor has to set a deadline for the next refresh cycle, a= nd when the deadline passes, it has to select the best buffer available for= the fullscreen surface. To make sure the flip will not miss the next refre= sh cycle, the compositor has to pick an idle buffer. If it picks a non-idle= buffer, and the pending rendering does not finish in time for vertical bla= nk, the flip will be delayed by at least one refresh cycle, which results i= n visible stuttering. > >>> > >>> (Until the deadline passes, the Wayland compositor can't even know if= a previously fullscreen surface will still be fullscreen for the next refr= esh cycle) =20 > >> Well then let's extend the KMS API instead of hacking together workaro= unds in userspace. =20 > > That's indeed a possible solution for the fullscreen / direct scanout c= ase. > > > > Not for the general compositing case though, since a compositor does no= t want to composite multiple output frames per display refresh cycle, so it= has to make sure the one frame hits the target. =20 >=20 > Yeah, that's true as well. >=20 > At least as long as nobody invents a mechanism to do this decision on=20 > the GPU instead. That would mean putting the whole window manager into the GPU. Thanks, pq --Sig_/0KAbxBfXFJqzhLgHL9cOc+2 Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEJQjwWQChkWOYOIONI1/ltBGqqqcFAmEBYiwACgkQI1/ltBGq qqdTlw//XiANshLNmu+nt+NpwbKtkBMqYDdcTWfhPJe8Ip9HhRA6WWzaVugXYwKU QgT3BNJiE+0b0fnVvLjdjVlmm3351f6CzG5QcYHDDqckG8p1a2aehkPuUKOAsdyC JJuZHBLw7nFFIa8t0WV3PHIwAaD+dWRcALMuKFkwBp574dSoCti2hiLHzEUxhgj9 URxYBoHECn5+sFUZJngh2kUSrjhjSmM00NN5yFowA81zzaE7UAWjixC47AT+J7ey MAqWXNk8ltuM8F4tqavlKttKpdwmyqDBfUvrS10HyHee2VXOrWCQJTbcw2+oZZRt wAjcDX64bIHgcU72okVfA7A5ROMBQW/GTqFO/MfKp1g9CBbg/5vcSlI6KCSiOWyX 5AtEUPNXDN2BoTtMAGNFcSBBI3QOakJfEuPCCj+vwZdj31Bjeu6lOjTlxQ71cGLv PzCfm5Uei0mVRMwFcNwYVUgnJvDAx5s9Agodutcod7tsQPEkIfSyJaMuD9L/vTpa gmPlEnJ+nwcskDcniReF9OXwyAEcTG6M0lyM2qPP6zjHfSwZW1lHkoVGxNdrHd7m xZ6SuYFAsssJBIRyQl/6mHNnsuD+NjzzhCEGlaIcqe3eehPL0gb+SKEwYKBByp7W IqQM25v5Ni7oD3fgjkCHCfz6JTNUL2v+JY2ZBHeFWRxROxKMiTE= =fn1r -----END PGP SIGNATURE----- --Sig_/0KAbxBfXFJqzhLgHL9cOc+2--