lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230222120904.5c281652@eldfell>
Date:   Wed, 22 Feb 2023 12:09:04 +0200
From:   Pekka Paalanen <ppaalanen@...il.com>
To:     Rob Clark <robdclark@...il.com>
Cc:     dri-devel@...ts.freedesktop.org, freedreno@...ts.freedesktop.org,
        Daniel Vetter <daniel@...ll.ch>,
        Christian König <ckoenig.leichtzumerken@...il.com>,
        Michel Dänzer <michel@...nzer.net>,
        Tvrtko Ursulin <tvrtko.ursulin@...el.com>,
        Rodrigo Vivi <rodrigo.vivi@...el.com>,
        Alex Deucher <alexander.deucher@....com>,
        Simon Ser <contact@...rsion.fr>,
        Rob Clark <robdclark@...omium.org>,
        Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>,
        Maxime Ripard <mripard@...nel.org>,
        Thomas Zimmermann <tzimmermann@...e.de>,
        David Airlie <airlied@...il.com>,
        open list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v5 09/14] drm/syncobj: Add deadline support for syncobj
 waits

On Tue, 21 Feb 2023 09:25:18 -0800
Rob Clark <robdclark@...il.com> wrote:

> On Tue, Feb 21, 2023 at 12:53 AM Pekka Paalanen <ppaalanen@...il.com> wrote:
> >
> > On Mon, 20 Feb 2023 12:18:56 -0800
> > Rob Clark <robdclark@...il.com> wrote:
> >  
> > > From: Rob Clark <robdclark@...omium.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@...omium.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?  
> 
> It's with the rest of the drm_syncobj UAPI docs ;-)

Is that https://www.kernel.org/doc/html/latest/driver-api/dma-buf.html#dma-fence-uabi-sync-file ?

That whole page never mentions e.g. WAIT_AVAILABLE, so at least the
flags are not there. Does not mention syncobj_wait either.

I could ask where the real non-IGT userspace is or the plan for it,
too, since this is new DRM UAPI.


Thanks,
pq

> 
> BR,
> -R
> 
> > 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;
> > >  };
> > >
> > >  
> >  


Content of type "application/pgp-signature" skipped

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ