From: Rob Clark <robdclark@gmail.com>
To: dri-devel@lists.freedesktop.org
Cc: freedreno@lists.freedesktop.org,
"Daniel Vetter" <daniel@ffwll.ch>,
"Christian König" <ckoenig.leichtzumerken@gmail.com>,
"Michel Dänzer" <michel@daenzer.net>,
"Tvrtko Ursulin" <tvrtko.ursulin@intel.com>,
"Rodrigo Vivi" <rodrigo.vivi@intel.com>,
"Alex Deucher" <alexander.deucher@amd.com>,
"Pekka Paalanen" <ppaalanen@gmail.com>,
"Simon Ser" <contact@emersion.fr>,
"Rob Clark" <robdclark@chromium.org>,
"Gustavo Padovan" <gustavo@padovan.org>,
intel-gfx@lists.freedesktop.org,
linaro-mm-sig@lists.linaro.org (moderated list:DMA BUFFER
SHARING FRAMEWORK),
linux-arm-msm@vger.kernel.org (open list:DRM DRIVER FOR MSM
ADRENO GPU), linux-kernel@vger.kernel.org (open list),
linux-media@vger.kernel.org (open list:DMA BUFFER SHARING
FRAMEWORK), "Sean Paul" <sean@poorly.run>
Subject: [PATCH v5 00/14] dma-fence: Deadline awareness
Date: Mon, 20 Feb 2023 12:18:47 -0800 [thread overview]
Message-ID: <20230220201916.1822214-1-robdclark@gmail.com> (raw)
From: Rob Clark <robdclark@chromium.org>
This series adds a deadline hint to fences, so realtime deadlines
such as vblank can be communicated to the fence signaller for power/
frequency management decisions.
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
This iteration adds a dma-fence ioctl to set a deadline (both to
support igt-tests, and compositors which delay decisions about which
client buffer to display), and a sw_sync ioctl to read back the
deadline. IGT tests utilizing these can be found at:
https://gitlab.freedesktop.org/robclark/igt-gpu-tools/-/commits/fence-deadline
v1: https://patchwork.freedesktop.org/series/93035/
v2: Move filtering out of later deadlines to fence implementation
to avoid increasing the size of dma_fence
v3: Add support in fence-array and fence-chain; Add some uabi to
support igt tests and userspace compositors.
v4: Rebase, address various comments, and add syncobj deadline
support, and sync_file EPOLLPRI based on experience with perf/
freq issues with clvk compute workloads on i915 (anv)
v5: Clarify that this is a hint as opposed to a more hard deadline
guarantee, switch to using u64 ns values in UABI (still absolute
CLOCK_MONOTONIC values), drop syncobj related cap and driver
feature flag in favor of allowing count_handles==0 for probing
kernel support.
Rob Clark (14):
dma-buf/dma-fence: Add deadline awareness
dma-buf/fence-array: Add fence deadline support
dma-buf/fence-chain: Add fence deadline support
dma-buf/dma-resv: Add a way to set fence deadline
dma-buf/sync_file: Add SET_DEADLINE ioctl
dma-buf/sync_file: Support (E)POLLPRI
dma-buf/sw_sync: Add fence deadline support
drm/scheduler: Add fence deadline support
drm/syncobj: Add deadline support for syncobj waits
drm/vblank: Add helper to get next vblank time
drm/atomic-helper: Set fence deadline for vblank
drm/msm: Add deadline based boost support
drm/msm: Add wait-boost support
drm/i915: Add deadline based boost support
drivers/dma-buf/dma-fence-array.c | 11 ++++
drivers/dma-buf/dma-fence-chain.c | 13 +++++
drivers/dma-buf/dma-fence.c | 21 +++++++
drivers/dma-buf/dma-resv.c | 22 ++++++++
drivers/dma-buf/sw_sync.c | 58 +++++++++++++++++++
drivers/dma-buf/sync_debug.h | 2 +
drivers/dma-buf/sync_file.c | 27 +++++++++
drivers/gpu/drm/drm_atomic_helper.c | 36 ++++++++++++
drivers/gpu/drm/drm_syncobj.c | 59 +++++++++++++++-----
drivers/gpu/drm/drm_vblank.c | 32 +++++++++++
drivers/gpu/drm/i915/i915_request.c | 20 +++++++
drivers/gpu/drm/msm/msm_drv.c | 12 ++--
drivers/gpu/drm/msm/msm_fence.c | 74 +++++++++++++++++++++++++
drivers/gpu/drm/msm/msm_fence.h | 20 +++++++
drivers/gpu/drm/msm/msm_gem.c | 5 ++
drivers/gpu/drm/scheduler/sched_fence.c | 46 +++++++++++++++
drivers/gpu/drm/scheduler/sched_main.c | 2 +-
include/drm/drm_vblank.h | 1 +
include/drm/gpu_scheduler.h | 8 +++
include/linux/dma-fence.h | 20 +++++++
include/linux/dma-resv.h | 2 +
include/uapi/drm/drm.h | 5 ++
include/uapi/drm/msm_drm.h | 14 ++++-
include/uapi/linux/sync_file.h | 23 ++++++++
24 files changed, 513 insertions(+), 20 deletions(-)
--
2.39.1
next reply other threads:[~2023-02-20 20:19 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-20 20:18 Rob Clark [this message]
2023-02-20 20:18 ` [PATCH v5 01/14] dma-buf/dma-fence: Add deadline awareness Rob Clark
2023-02-20 20:18 ` [PATCH v5 02/14] dma-buf/fence-array: Add fence deadline support Rob Clark
2023-02-20 20:18 ` [PATCH v5 03/14] dma-buf/fence-chain: " Rob Clark
2023-02-20 20:18 ` [PATCH v5 04/14] dma-buf/dma-resv: Add a way to set fence deadline Rob Clark
2023-02-20 20:18 ` [PATCH v5 05/14] dma-buf/sync_file: Add SET_DEADLINE ioctl Rob Clark
2023-02-20 20:18 ` [PATCH v5 06/14] dma-buf/sync_file: Support (E)POLLPRI Rob Clark
2023-02-20 20:18 ` [PATCH v5 07/14] dma-buf/sw_sync: Add fence deadline support Rob Clark
2023-02-20 20:18 ` [PATCH v5 08/14] drm/scheduler: " Rob Clark
2023-02-20 20:18 ` [PATCH v5 09/14] drm/syncobj: Add deadline support for syncobj waits Rob Clark
2023-02-21 8:53 ` Pekka Paalanen
2023-02-21 17:25 ` Rob Clark
2023-02-22 10:09 ` Pekka Paalanen
2023-02-22 14:05 ` Rodrigo Vivi
2023-02-22 15:33 ` Rob Clark
2023-02-20 20:18 ` [PATCH v5 10/14] drm/vblank: Add helper to get next vblank time Rob Clark
2023-02-20 20:18 ` [PATCH v5 11/14] drm/atomic-helper: Set fence deadline for vblank Rob Clark
2023-02-20 20:18 ` [PATCH v5 12/14] drm/msm: Add deadline based boost support Rob Clark
2023-02-20 20:19 ` [PATCH v5 13/14] drm/msm: Add wait-boost support Rob Clark
2023-02-20 20:19 ` [PATCH v5 14/14] drm/i915: Add deadline based boost support Rob Clark
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230220201916.1822214-1-robdclark@gmail.com \
--to=robdclark@gmail.com \
--cc=alexander.deucher@amd.com \
--cc=ckoenig.leichtzumerken@gmail.com \
--cc=contact@emersion.fr \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=freedreno@lists.freedesktop.org \
--cc=gustavo@padovan.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=linaro-mm-sig@lists.linaro.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=michel@daenzer.net \
--cc=ppaalanen@gmail.com \
--cc=robdclark@chromium.org \
--cc=rodrigo.vivi@intel.com \
--cc=sean@poorly.run \
--cc=tvrtko.ursulin@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox