[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAF6AEGtm4NdQfqo6wGFBM-EBzW9E8twpDuS7GTXf2iHiHZYL1g@mail.gmail.com>
Date: Mon, 26 Jul 2021 16:51:43 -0700
From: Rob Clark <robdclark@...il.com>
To: dri-devel <dri-devel@...ts.freedesktop.org>
Cc: Daniel Vetter <daniel@...ll.ch>,
Matthew Brost <matthew.brost@...el.com>,
Christian König <ckoenig.leichtzumerken@...il.com>,
Rob Clark <robdclark@...omium.org>,
Alex Deucher <alexander.deucher@....com>,
Andrey Grodzovsky <andrey.grodzovsky@....com>,
Christian König <christian.koenig@....com>,
Gustavo Padovan <gustavo@...ovan.org>,
Jack Zhang <Jack.Zhang1@....com>,
Lee Jones <lee.jones@...aro.org>,
"moderated list:DMA BUFFER SHARING FRAMEWORK"
<linaro-mm-sig@...ts.linaro.org>,
open list <linux-kernel@...r.kernel.org>,
"open list:DMA BUFFER SHARING FRAMEWORK"
<linux-media@...r.kernel.org>, Luben Tuikov <luben.tuikov@....com>,
Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>,
Roy Sun <Roy.Sun@....com>, Tian Tao <tiantao6@...ilicon.com>
Subject: Re: [RFC 0/4] dma-fence: Deadline awareness
On Mon, Jul 26, 2021 at 4:34 PM Rob Clark <robdclark@...il.com> wrote:
>
> From: Rob Clark <robdclark@...omium.org>
>
> 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.
Fwiw, what I'm thinking for the drm/msm part is a timer set to expire
a bit (couple ms?) before the deadline, which boosts if the timer
expires before the fence is signaled.
Assuming this is roughly in line with what other drivers would do,
possibly there is some room to build this timer into dma-fence itself?
BR,
-R
>
> 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/
>
> Rob Clark (4):
> dma-fence: Add deadline awareness
> drm/vblank: Add helper to get next vblank time
> drm/atomic-helper: Set fence deadline for vblank
> drm/scheduler: Add fence deadline support
>
> drivers/dma-buf/dma-fence.c | 39 +++++++++++++++++++++++++
> drivers/gpu/drm/drm_atomic_helper.c | 36 +++++++++++++++++++++++
> drivers/gpu/drm/drm_vblank.c | 31 ++++++++++++++++++++
> drivers/gpu/drm/scheduler/sched_fence.c | 10 +++++++
> drivers/gpu/drm/scheduler/sched_main.c | 3 ++
> include/drm/drm_vblank.h | 1 +
> include/linux/dma-fence.h | 17 +++++++++++
> 7 files changed, 137 insertions(+)
>
> --
> 2.31.1
>
Powered by blists - more mailing lists