Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp4471809pxv; Tue, 27 Jul 2021 08:09:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzbJHMetNGgkWShNrlJZyeCdYxnoRjdSyh3Lc3MT46h0PjP8jyaN/LB4v+ZpGFDZXemOmQb X-Received: by 2002:a5d:8d83:: with SMTP id b3mr19537040ioj.179.1627398578530; Tue, 27 Jul 2021 08:09:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627398578; cv=none; d=google.com; s=arc-20160816; b=Ruz1J0RqN1xl/FY6a4ucjNJWTYIgwDJPbqgFQXAksPeRSt+Hy4fO0v19M+hSWWKPQF hRIMdkXp1uW4i+L1EdJ8PxBcrY/qexjN3eytgaGwlPXy5lbGcIIZvfKyM//tIJ211TWs VFrI8dmQWfFceIpY8SrCVJnPadQSPKTMiY58YkaoI5VCS+rt9yxMSqP7pvzDNY3WN2Ac eiBQFpkjAD2RfKWm8JylFpfbz0K4ajfmHyHcDtkmTZKhJ/NH0ktjlDV/XRo8+0/36lD2 KneogPUCKyXJSCKuSI7kLerAeSgFVr03DFM1CY5E5jXK3rnkJkno4sOhlMhWuqLxmVSB AlTQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=jcrbQyHbij430xaq02MbLiHj13M2J5t4Q3rA2r97S1M=; b=OtkwSQZwV7qMmqxmPtKW3A6ygyNpJn4pshLYCR0dNe6mgRw+RdfFhZtC4VFPmzhGg8 aMr/xoMJPMUZ8olLHDJozTwu8pKf3Rm4TJRCq2KbuDS8HIczwyBIBNvV/MdErDNXnWsn NzEh1IRW9ojmXJnGFelkNqAmLBktT/VeOBQlh3uj4rakvcA8J18YM6iNm0SusKS4x9gC ehj1Fq12vjVKjs//pU0jpj1RLHHqunLX0BANDxr/TJqgkYa56RZRyb+VDRGUt7UGvkG5 u4VDUl9yDoUkpqGCP5MfNSMSA/ZPTMt7NPq06iod4cEbF7ilmDS56j0fKlUUDXaeqm3u /VEA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=ePJAi2hb; 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 o15si3425102ilf.79.2021.07.27.08.09.27; Tue, 27 Jul 2021 08:09:38 -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=ePJAi2hb; 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 S236994AbhG0PIk (ORCPT + 99 others); Tue, 27 Jul 2021 11:08:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57494 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232634AbhG0PIj (ORCPT ); Tue, 27 Jul 2021 11:08:39 -0400 Received: from mail-wm1-x332.google.com (mail-wm1-x332.google.com [IPv6:2a00:1450:4864:20::332]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 63F9FC061760; Tue, 27 Jul 2021 08:08:38 -0700 (PDT) Received: by mail-wm1-x332.google.com with SMTP id a80-20020a1c98530000b0290245467f26a4so2598348wme.0; Tue, 27 Jul 2021 08:08:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=jcrbQyHbij430xaq02MbLiHj13M2J5t4Q3rA2r97S1M=; b=ePJAi2hbsieHla1MODd/uh8GFZVMnIlRscK3zkhUSDAUseRyYpSPaurjOwZmuhWBGO MVLE9fUHyMXt38vPDmeRkKhaXHcbOsKJPWXRAhyKmcE03F+3VylPtx87Fs6hlKFBwsGN ZQldGQHrQfR/QhlHKTR5J98f6um8tBLzTrOq26kC6v9/unY0IJjLyZRvx1fMOKwTo1c8 kGQ75QJ9sHCE6+Pj6M0aPcLcaGILjjJlrWOOSluledtAN51fWnsi/3b9Y/GjSwiJleRa HFM9TAo5gLzMOIlXlRNOcdfTUoK+7JCdlv/FgSV4wHP0m5WcUD205WybKF592XZppJh+ eIRQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=jcrbQyHbij430xaq02MbLiHj13M2J5t4Q3rA2r97S1M=; b=hzOZOGrYUL0QLVrBKy4i17fw+kuYMbVGb/5F5BhjcQa2A29xMRylZjrMjYoMjKQOJl f038yYZkJQxake8D7RA9el87/WmegqLGl69CNE/SQAIh0HEX5lumH8w7PSjaDwofhZR7 nL80ZJaLMFQRu1Xu4kNult14ieDcEdlLMrVk/NkxMu8Pqjkef+8J8Ku1HUvI9i3vGXod NgikdAfxuJE/KqXJbSdjMFXoB9R4C8ULX7qDV4tpmaahGFFKytErSnJ8ezUpOOWn5beb NHBYlT3y0b2WmJSNN5tMb92omGU21ZCbaIz8omG+5fSUWYKibfXf4B1ggEFXu845uwtR IRLw== X-Gm-Message-State: AOAM532Pe8uGORWJJgeWN/ibTeCy7Yja1359qLauFz+Z3rygpRbITfxg 1yzXthVUKzqEVmUndBMTK62ErKdyXev/iDGLfeE= X-Received: by 2002:a7b:cc8b:: with SMTP id p11mr4622066wma.164.1627398516915; Tue, 27 Jul 2021 08:08:36 -0700 (PDT) MIME-Version: 1.0 References: <20210726233854.2453899-1-robdclark@gmail.com> <28ca4167-4a65-0ccc-36be-5fb017f6f49d@daenzer.net> In-Reply-To: <28ca4167-4a65-0ccc-36be-5fb017f6f49d@daenzer.net> From: Rob Clark Date: Tue, 27 Jul 2021 08:12:45 -0700 Message-ID: Subject: Re: [RFC 0/4] dma-fence: Deadline awareness To: =?UTF-8?Q?Michel_D=C3=A4nzer?= Cc: Matthew Brost , Rob Clark , Jack Zhang , Roy Sun , =?UTF-8?Q?Christian_K=C3=B6nig?= , open list , "moderated list:DMA BUFFER SHARING FRAMEWORK" , Luben Tuikov , Gustavo Padovan , Alex Deucher , Tian Tao , Lee Jones , =?UTF-8?Q?Christian_K=C3=B6nig?= , "open list:DMA BUFFER SHARING FRAMEWORK" , dri-devel Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jul 27, 2021 at 7:50 AM Michel D=C3=A4nzer wro= te: > > 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" mechanis= m > > 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 effec= t once Wayland compositors start waiting for client buffers to become idle = before using them for an output frame (to prevent output frames from gettin= g delayed by client work). See https://gitlab.gnome.org/GNOME/mutter/-/merg= e_requests/1880 (shameless plug :) for a proof of concept of this for mutte= r. 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 composito= r can scan out the client buffers directly). > I guess you mean "no effect at all *except* for fullscreen..."? Games are usually running fullscreen, it is a case I care about a lot ;-) 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. BR, -R > > -- > Earthling Michel D=C3=A4nzer | https://redhat= .com > Libre software enthusiast | Mesa and X developer