[PATCH 3/3] drm: Add DRM_MODESET_LOCK_BEGIN/END helpers

Daniel Vetter daniel at ffwll.ch
Wed Nov 28 22:40:58 UTC 2018


On Wed, Nov 28, 2018 at 11:59:48AM -0500, Sean Paul wrote:
> On Wed, Nov 28, 2018 at 10:01:07AM +0100, Daniel Vetter wrote:
> > On Tue, Nov 27, 2018 at 05:46:40PM -0500, Sean Paul wrote:
 > >  }
> > > diff --git a/include/drm/drm_modeset_lock.h b/include/drm/drm_modeset_lock.h
> > > index a685d1bb21f26..6213a11445633 100644
> > > --- a/include/drm/drm_modeset_lock.h
> > > +++ b/include/drm/drm_modeset_lock.h
> > > @@ -130,4 +130,58 @@ void drm_warn_on_modeset_not_all_locked(struct drm_device *dev);
> > >  int drm_modeset_lock_all_ctx(struct drm_device *dev,
> > >  			     struct drm_modeset_acquire_ctx *ctx);
> > >  
> > > +/**
> > > + * DRM_MODESET_LOCK_ALL_BEGIN - Helper to acquire modeset locks
> > > + * @dev: drm device
> > > + * @ret: local ret/err/etc variable to track error status
> > > + * @ctx: local modeset acquire context, will be dereferenced
> > > + * @flags: DRM_MODESET_ACQUIRE_* flags to pass to acquire_init()
> > 
> > Full function name for the nice hyperlink. Needs a continuation line,
> > which just needs to be indentend.
> 
> This isn't a function, but a series of flags prefixed with DRM_MODESET_ACQUIRE_
> (currently only one there, but perhaps more could come).

I meant you should spell out drm_modeset_acquire_init() in full. For the
hyperlink.

Wrt DRM_MODESET_LOCAL_ALL_END() just being a #define: I think kerneldoc
treats that as a function too, and you can link to it like a normal
function. Good to double-check with

$ make htmldocs

Cheers, Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch


More information about the dri-devel mailing list