public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Pekka Paalanen <ppaalanen@gmail.com>
To: Rob Clark <robdclark@gmail.com>
Cc: dri-devel@lists.freedesktop.org, 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>,
	"Simon Ser" <contact@emersion.fr>,
	"Rob Clark" <robdclark@chromium.org>,
	"Maarten Lankhorst" <maarten.lankhorst@linux.intel.com>,
	"Maxime Ripard" <mripard@kernel.org>,
	"Thomas Zimmermann" <tzimmermann@suse.de>,
	"David Airlie" <airlied@gmail.com>,
	linux-kernel@vger.kernel.org (open list)
Subject: Re: [PATCH v5 09/14] drm/syncobj: Add deadline support for syncobj waits
Date: Tue, 21 Feb 2023 10:53:07 +0200	[thread overview]
Message-ID: <20230221105307.7430c301@eldfell> (raw)
In-Reply-To: <20230220201916.1822214-10-robdclark@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 2291 bytes --]

On Mon, 20 Feb 2023 12:18:56 -0800
Rob Clark <robdclark@gmail.com> wrote:

> From: Rob Clark <robdclark@chromium.org>
> 
> Add a new flag to let userspace provide a deadline as a hint for syncobj
> and timeline waits.  This gives a hint to the driver signaling the
> backing fences about how soon userspace needs it to compete work, so it
> can addjust GPU frequency accordingly.  An immediate deadline can be
> given to provide something equivalent to i915 "wait boost".
> 
> v2: Use absolute u64 ns value for deadline hint, drop cap and driver
>     feature flag in favor of allowing count_handles==0 as a way for
>     userspace to probe kernel for support of new flag
> 
> Signed-off-by: Rob Clark <robdclark@chromium.org>
> ---
>  drivers/gpu/drm/drm_syncobj.c | 59 +++++++++++++++++++++++++++--------
>  include/uapi/drm/drm.h        |  5 +++
>  2 files changed, 51 insertions(+), 13 deletions(-)

...

> diff --git a/include/uapi/drm/drm.h b/include/uapi/drm/drm.h
> index 642808520d92..aefc8cc743e0 100644
> --- a/include/uapi/drm/drm.h
> +++ b/include/uapi/drm/drm.h
> @@ -887,6 +887,7 @@ struct drm_syncobj_transfer {
>  #define DRM_SYNCOBJ_WAIT_FLAGS_WAIT_ALL (1 << 0)
>  #define DRM_SYNCOBJ_WAIT_FLAGS_WAIT_FOR_SUBMIT (1 << 1)
>  #define DRM_SYNCOBJ_WAIT_FLAGS_WAIT_AVAILABLE (1 << 2) /* wait for time point to become available */
> +#define DRM_SYNCOBJ_WAIT_FLAGS_WAIT_DEADLINE (1 << 3) /* set fence deadline based to deadline_nsec/sec */

Hi,

where is the UAPI documentation explaining what is a "fence deadline"
and what setting it does here?

btw. no nsec/sec anymore.


Thanks,
pq


>  struct drm_syncobj_wait {
>  	__u64 handles;
>  	/* absolute timeout */
> @@ -895,6 +896,8 @@ struct drm_syncobj_wait {
>  	__u32 flags;
>  	__u32 first_signaled; /* only valid when not waiting all */
>  	__u32 pad;
> +	/* Deadline hint to set on backing fence(s) in CLOCK_MONOTONIC: */
> +	__u64 deadline_ns;
>  };
>  
>  struct drm_syncobj_timeline_wait {
> @@ -907,6 +910,8 @@ struct drm_syncobj_timeline_wait {
>  	__u32 flags;
>  	__u32 first_signaled; /* only valid when not waiting all */
>  	__u32 pad;
> +	/* Deadline hint to set on backing fence(s) in CLOCK_MONOTONIC: */
> +	__u64 deadline_ns;
>  };
>  
>  


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2023-02-21  8:53 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-20 20:18 [PATCH v5 00/14] dma-fence: Deadline awareness Rob Clark
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 [this message]
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=20230221105307.7430c301@eldfell \
    --to=ppaalanen@gmail.com \
    --cc=airlied@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=linux-kernel@vger.kernel.org \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=michel@daenzer.net \
    --cc=mripard@kernel.org \
    --cc=robdclark@chromium.org \
    --cc=robdclark@gmail.com \
    --cc=rodrigo.vivi@intel.com \
    --cc=tvrtko.ursulin@intel.com \
    --cc=tzimmermann@suse.de \
    /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