Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp5981998pxv; Thu, 29 Jul 2021 03:31:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwJ/nWonjgf7kCnJ6o3hJ5pH2AsesY6tCIE20cCZCfuetc7OufeOFs3Oh5gzlnxZkuv2Fvd X-Received: by 2002:aa7:db94:: with SMTP id u20mr5166088edt.381.1627554687304; Thu, 29 Jul 2021 03:31:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627554687; cv=none; d=google.com; s=arc-20160816; b=mZQxV1C+6PNQJ6p9kv+l6hG4LOirVS6Uwtr5YdBJufhV7cSrf8+AKvk9Pkhqz+AuXb PR5/H/aHJBCetPbzcItBRNPA9Qd2/IbuONWxOzfHFrl8hv6xFstMwlhPVIsl/bC5v3kX /Jn4PRuMJId89JLQT9R3qhYjCc7ljoY8Tikb08gq8nYa9266Y/SD8ItZ76pMpTVSn9Wh faNqnzVtmpdI+OOLeo5uPoxhT2stwEzljUnWfYKoqpFOYyk2O90t+f9o2xLNiOwvI3bn PsE4pGXjLCjzBdipUcKJJJmadcOhFTU7fc2aiftQuxVVPRgZdG/LgAhGLlM47JdvxEdF UwJg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:subject:from :references:cc:to; bh=ub8KHO78JXcKyVkS/7JZPLv4E8eMalimmIpYGAhAxS4=; b=fu7ARDynIM9PPYKwRfoqE6caHdsLQu3Lhx5//x3kX0ZkDq7Cz9zOVpzVuHi3BYZ5z4 fKwtPF2xiJ/biFbiUpHEZ0SeZ4Ce+Ulg5qUHfB4CEFbu8BdZlgxhqiAopCVCqp7oXZTF Yw31rlzwi7r+PiYksoxvJd6uv2TGqO4o9SX1gESQ8BDKDe/qAyNDovYX7FtxJ6H5iO/6 kcNwCZ6MzETneXkJE5quzGAazxx84zDWeasleHGmvZ4PsXEi88jnZlSN1eUA3Qs/2oq/ 7fTZMkn0Z95oq+eLb4z0rJYqvxWGp6OGSObyVNP0SslGJKLWg1eVqaddcns571FzOXHp AolQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w14si2315573edq.101.2021.07.29.03.31.04; Thu, 29 Jul 2021 03:31:27 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235644AbhG2K3q (ORCPT + 99 others); Thu, 29 Jul 2021 06:29:46 -0400 Received: from mail.netline.ch ([148.251.143.180]:37974 "EHLO netline-mail3.netline.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235309AbhG2K3p (ORCPT ); Thu, 29 Jul 2021 06:29:45 -0400 Received: from localhost (localhost [127.0.0.1]) by netline-mail3.netline.ch (Postfix) with ESMTP id E66A520201A; Thu, 29 Jul 2021 12:29:40 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at netline-mail3.netline.ch Received: from netline-mail3.netline.ch ([127.0.0.1]) by localhost (netline-mail3.netline.ch [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 1L6nuNw0PY7d; Thu, 29 Jul 2021 12:28:38 +0200 (CEST) Received: from thor (24.99.2.85.dynamic.wline.res.cust.swisscom.ch [85.2.99.24]) by netline-mail3.netline.ch (Postfix) with ESMTPA id B4F5F20201B; Thu, 29 Jul 2021 12:28:37 +0200 (CEST) Received: from [::1] by thor with esmtp (Exim 4.94.2) (envelope-from ) id 1m93HI-001Kjn-Oa; Thu, 29 Jul 2021 12:28:36 +0200 To: =?UTF-8?Q?Christian_K=c3=b6nig?= , Pekka Paalanen , =?UTF-8?Q?Christian_K=c3=b6nig?= Cc: 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" 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> <20210728165700.38c39cf8@eldfell> <74e310fa-e544-889f-2389-5abe06f80eb8@amd.com> <20210729112358.237651ff@eldfell> <3675d530-c9fc-7ec9-e157-b6abeeec7c2a@amd.com> <20210729121542.27d9b1cc@eldfell> <15cf73a8-eda4-3559-561a-a05a14f445d0@gmail.com> From: =?UTF-8?Q?Michel_D=c3=a4nzer?= Subject: Re: [RFC 0/4] dma-fence: Deadline awareness Message-ID: <4def9567-f88d-3b7c-5ed2-d1686a25fbb3@daenzer.net> Date: Thu, 29 Jul 2021 12:28:36 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.12.0 MIME-Version: 1.0 In-Reply-To: <15cf73a8-eda4-3559-561a-a05a14f445d0@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-CA Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2021-07-29 12:14 p.m., Christian König wrote: > Am 29.07.21 um 11:15 schrieb Pekka Paalanen: >> [SNIP] >>> But how does it then help to wait on the CPU instead? >> A compositor does not "wait" literally. It would only check which state >> set is ready to be used, and uses the most recent set that is ready. Any >> state sets that are not ready are ignored and reconsidered the next >> time the compositor updates the screen. > > Mhm, then I'm not understanding what Michel's changes are actually doing. In a nutshell, my mutter MR holds back all Wayland state changes which were committed together with a new buffer (and dependent later ones) until the dma-buf file descriptors for that buffer have become readable. This is achieved by adding the fds to the main event loop (if they aren't readable already when the buffer is committed), and when they become readable, all corresponding state changes are propagated such that they will be taken into account for drawing the next frame. >> Depending on which state sets are selected for a screen update, the >> global window manager state may be updated accordingly, before the >> drawing commands for the composition can be created. >> >>> See what I'm proposing is to either render the next state of the window >>> or compose from the old state (including all atomic properties). >> Yes, that's exactly how it would work. It's just that state for a >> window is not an independent thing, it can affect how unrelated windows >> are managed. >> >> A simplified example would be two windows side by side where the >> resizing of one causes the other to move. You can't resize the window >> or move the other until the buffer with the new size is ready. Until >> then the compositor uses the old state. >> >>> E.g. what do you do if you timeout and can't have the new window content >>> on time? What's the fallback here? >> As there is no wait, there is no timeout either. >> >> If the app happens to be frozen (e.g. some weird bug in fence handling >> to make it never ready, or maybe it's just bugged itself and never >> drawing again), then the app is frozen, and all the rest of the desktop >> continues running normally without a glitch. > > But that is in contradict to what you told me before. > > See when the window should move but fails to draw it's new content what happens? > > Are the other windows which would be affected by the move not drawn as well? Basically, the compositor draws its output as if the new buffer and all connected Wayland state changes had not been committed yet. -- Earthling Michel Dänzer | https://redhat.com Libre software enthusiast | Mesa and X developer