Re: [PATCH] drm/syncobj: Drop add/remove_callback from driver interface

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Aug 22, 2018 at 11:09:21AM -0500, Jason Ekstrand wrote:
> Fine with me.
> 
> Reviewed-by: Jason Ekstrand <jason@xxxxxxxxxxxxxx>

Thanks for the review, applied to drm-misc-next.
-Daniel

> 
> On Wed, Aug 22, 2018 at 4:29 AM Daniel Vetter <daniel.vetter@xxxxxxxx>
> wrote:
> 
> > This is used for handling future fences. Currently no driver use
> > these, and I think given the new timeline fence proposed by KHR it
> > would be better to have a more abstract interface for future fences.
> > Could be something simple like a struct dma_future_fence plus a
> > function to add a callback or wait for the fence to materialize.
> >
> > Then syncobj (and anything else really) could grow new functions to
> > expose these two drivers. Normal dma_fence would then keep the nice
> > guarantee that they will always signal (and through ordering, be
> > deadlock free). dma_future_fence would then be the tricky one.
> >
> > This also fixes sphinx complaining about the kerneldoc.
> >
> > Cc: Jason Ekstrand <jason@xxxxxxxxxxxxxx>
> > Cc: Dave Airlie <airlied@xxxxxxxxxx>
> > Cc: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>
> > Signed-off-by: Daniel Vetter <daniel.vetter@xxxxxxxxx>
> > ---
> >  drivers/gpu/drm/drm_syncobj.c | 15 ---------------
> >  include/drm/drm_syncobj.h     |  5 -----
> >  2 files changed, 20 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/drm_syncobj.c b/drivers/gpu/drm/drm_syncobj.c
> > index adb3cb27d31e..3a8837c49639 100644
> > --- a/drivers/gpu/drm/drm_syncobj.c
> > +++ b/drivers/gpu/drm/drm_syncobj.c
> > @@ -120,14 +120,6 @@ static int
> > drm_syncobj_fence_get_or_add_callback(struct drm_syncobj *syncobj,
> >         return ret;
> >  }
> >
> > -/**
> > - * drm_syncobj_add_callback - adds a callback to syncobj::cb_list
> > - * @syncobj: Sync object to which to add the callback
> > - * @cb: Callback to add
> > - * @func: Func to use when initializing the drm_syncobj_cb struct
> > - *
> > - * This adds a callback to be called next time the fence is replaced
> > - */
> >  void drm_syncobj_add_callback(struct drm_syncobj *syncobj,
> >                               struct drm_syncobj_cb *cb,
> >                               drm_syncobj_func_t func)
> > @@ -136,13 +128,7 @@ void drm_syncobj_add_callback(struct drm_syncobj
> > *syncobj,
> >         drm_syncobj_add_callback_locked(syncobj, cb, func);
> >         spin_unlock(&syncobj->lock);
> >  }
> > -EXPORT_SYMBOL(drm_syncobj_add_callback);
> >
> > -/**
> > - * drm_syncobj_add_callback - removes a callback to syncobj::cb_list
> > - * @syncobj: Sync object from which to remove the callback
> > - * @cb: Callback to remove
> > - */
> >  void drm_syncobj_remove_callback(struct drm_syncobj *syncobj,
> >                                  struct drm_syncobj_cb *cb)
> >  {
> > @@ -150,7 +136,6 @@ void drm_syncobj_remove_callback(struct drm_syncobj
> > *syncobj,
> >         list_del_init(&cb->node);
> >         spin_unlock(&syncobj->lock);
> >  }
> > -EXPORT_SYMBOL(drm_syncobj_remove_callback);
> >
> >  /**
> >   * drm_syncobj_replace_fence - replace fence in a sync object.
> > diff --git a/include/drm/drm_syncobj.h b/include/drm/drm_syncobj.h
> > index 3980602472c0..e419c79ba94d 100644
> > --- a/include/drm/drm_syncobj.h
> > +++ b/include/drm/drm_syncobj.h
> > @@ -131,11 +131,6 @@ drm_syncobj_fence_get(struct drm_syncobj *syncobj)
> >
> >  struct drm_syncobj *drm_syncobj_find(struct drm_file *file_private,
> >                                      u32 handle);
> > -void drm_syncobj_add_callback(struct drm_syncobj *syncobj,
> > -                             struct drm_syncobj_cb *cb,
> > -                             drm_syncobj_func_t func);
> > -void drm_syncobj_remove_callback(struct drm_syncobj *syncobj,
> > -                                struct drm_syncobj_cb *cb);
> >  void drm_syncobj_replace_fence(struct drm_syncobj *syncobj,
> >                                struct dma_fence *fence);
> >  int drm_syncobj_find_fence(struct drm_file *file_private,
> > --
> > 2.18.0
> >
> >

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux