Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp4481319pxv; Tue, 27 Jul 2021 08:21:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJypwBjuTMS4U7giehyMo5K8kfZE4Mpwzgbwg+pyKKL7pf6sz5eNhoFDtLcLoPmIknSdUx7v X-Received: by 2002:a17:906:3c04:: with SMTP id h4mr4245899ejg.89.1627399292334; Tue, 27 Jul 2021 08:21:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627399292; cv=none; d=google.com; s=arc-20160816; b=Z9Gqv+erB4ROUbKRts2PuXPHHbKdys7XmrUP/KGG0LO9CY0KHheo/UQ1OsC40v+m7x VYdIugRgHev9AtkLl5IDItGt3YV/OtK3QY69CC0Nhly+otNn2qKGwWEosQAPwuLK0p84 SRi6G/GGBHJVOzVOTaAfy3LCskXD6WusfEzO+4lvrPsFaomxnzYW4GHeVD22Bo3CEwjU kHyh5FI1WQmGAeHM/sbxhzwQEkPMV8YtlOH9K/3yLWIapCk9L1tSyQu3fEi6HjhNbxlb rfSHPNWWMVuDqCV1r8f/FcFDc/05ON+Vo8rUEgLpGKWqKojnzTNnjNDtQfqrvOYLDE7P 8F7Q== 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=cpuUCkmCza8pQEIbWNy0950fHPcjY2zkGepbOM1LU1Y=; b=CXRgrILJklQ6njNPdMon0P9GoXTe5qSLRoiMiIkg1rzJEVpN586EB26zaXv3ErWx8e XI2ZYqNuvDL9mA9LsuftfG+FaAo0k+cyH0sxEi8PfRDfhhlaKlKhRcqhzioiJPbhugft 8Dt5e2LzTLy57znzUszALk9g//22tdSt8nhSoAG7NuAuMTTlqEBunkCHI+4C2yyN3Ygg 612NVaD0VvqPQeyMkvv+Wz4v6JDinFuyNGOO/HxVfdAkujzHwoF9BSMJONc8yTb9bXLv mMxrhgj7NcGLJwa5pAd7whV33X34+eStSOQr6gO6p+nVZw1ETgW35IPCRUljruKk/brW 6m/Q== 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 p7si561351edq.323.2021.07.27.08.21.08; Tue, 27 Jul 2021 08:21:32 -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 S232642AbhG0PTe (ORCPT + 99 others); Tue, 27 Jul 2021 11:19:34 -0400 Received: from mail.netline.ch ([148.251.143.180]:38575 "EHLO netline-mail3.netline.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232600AbhG0PTd (ORCPT ); Tue, 27 Jul 2021 11:19:33 -0400 Received: from localhost (localhost [127.0.0.1]) by netline-mail3.netline.ch (Postfix) with ESMTP id 6C5C220201D; Tue, 27 Jul 2021 17:19:31 +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 BF3nS1YJscyH; Tue, 27 Jul 2021 17:19:31 +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 4135A20201A; Tue, 27 Jul 2021 17:19:30 +0200 (CEST) Received: from localhost ([::1]) by thor with esmtp (Exim 4.94.2) (envelope-from ) id 1m8Orh-000qpp-E5; Tue, 27 Jul 2021 17:19:29 +0200 To: Rob Clark Cc: Matthew Brost , Rob Clark , Jack Zhang , =?UTF-8?Q?Christian_K=c3=b6nig?= , open list , dri-devel , "moderated list:DMA BUFFER SHARING FRAMEWORK" , Luben Tuikov , Roy Sun , Gustavo Padovan , Alex Deucher , Tian Tao , Lee Jones , =?UTF-8?Q?Christian_K=c3=b6nig?= , "open list:DMA BUFFER SHARING FRAMEWORK" References: <20210726233854.2453899-1-robdclark@gmail.com> <28ca4167-4a65-0ccc-36be-5fb017f6f49d@daenzer.net> From: =?UTF-8?Q?Michel_D=c3=a4nzer?= Subject: Re: [RFC 0/4] dma-fence: Deadline awareness Message-ID: <99984703-c3ca-6aae-5888-5997d7046112@daenzer.net> Date: Tue, 27 Jul 2021 17:19:29 +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: 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-27 5:12 p.m., Rob Clark wrote: > On Tue, Jul 27, 2021 at 7:50 AM Michel Dänzer wrote: >> >> On 2021-07-27 1:38 a.m., Rob Clark wrote: >>> From: Rob Clark >>> >>> Based on discussion from a previous series[1] to add a "boost" mechanism >>> when, for example, vblank deadlines are missed. Instead of a boost >>> callback, this approach adds a way to set a deadline on the fence, by >>> which the waiter would like to see the fence signalled. >>> >>> I've not yet had a chance to re-work the drm/msm part of this, but >>> wanted to send this out as an RFC in case I don't have a chance to >>> finish the drm/msm part this week. >>> >>> Original description: >>> >>> In some cases, like double-buffered rendering, missing vblanks can >>> trick the GPU into running at a lower frequence, when really we >>> want to be running at a higher frequency to not miss the vblanks >>> in the first place. >>> >>> This is partially inspired by a trick i915 does, but implemented >>> via dma-fence for a couple of reasons: >>> >>> 1) To continue to be able to use the atomic helpers >>> 2) To support cases where display and gpu are different drivers >>> >>> [1] https://patchwork.freedesktop.org/series/90331/ >> >> Unfortunately, none of these approaches will have the full intended effect once Wayland compositors start waiting for client buffers to become idle before using them for an output frame (to prevent output frames from getting delayed by client work). See https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1880 (shameless plug :) for a proof of concept of this for mutter. The boost will only affect the compositor's own GPU work, not the client work (which means no effect at all for fullscreen apps where the compositor can scan out the client buffers directly). >> > > I guess you mean "no effect at all *except* for fullscreen..."? I meant what I wrote: The compositor will wait for the next buffer to become idle, so there's no boost from this mechanism for the client drawing to that buffer. And since the compositor does no drawing of its own in this case, there's no boost from that either. > I'd perhaps recommend that wayland compositors, in cases where only a > single layer is changing, not try to be clever and just push the > update down to the kernel. Even just for the fullscreen direct scanout case, that would require some kind of atomic KMS API extension to allow queuing multiple page flips for the same CRTC. For other cases, this would also require a mechanism to cancel a pending atomic commit, for when another surface update comes in before the compositor's deadline, which affects the previously single updating surface as well. -- Earthling Michel Dänzer | https://redhat.com Libre software enthusiast | Mesa and X developer