[PATCH 04/36] drm/doc: drop struct_mutex references

Daniel Vetter daniel at ffwll.ch
Fri May 8 10:45:35 UTC 2020


On Fri, May 08, 2020 at 11:07:00AM +0100, Emil Velikov wrote:
> On Fri, 8 May 2020 at 07:27, Daniel Vetter <daniel at ffwll.ch> wrote:
> >
> > On Thu, May 07, 2020 at 04:07:50PM +0100, Emil Velikov wrote:
> > > From: Emil Velikov <emil.velikov at collabora.com>
> > >
> > > There's little point in providing partial and ancient information about
> > > the struct_mutex. Some drivers are using it, new ones should not.
> > >
> > > As-it this only provides for confusion.
> > >
> > > Signed-off-by: Emil Velikov <emil.velikov at collabora.com>
> >
> > I think a doc patch to add a big warning for drm_device.struct_mutex would
> > also be good. The current text is kinda unhelpful.
> 
> Would something like this be enough?
> 
> diff --git a/include/drm/drm_device.h b/include/drm/drm_device.h
> index a55874db9dd4..0988351d743c 100644
> --- a/include/drm/drm_device.h
> +++ b/include/drm/drm_device.h
> @@ -146,6 +146,9 @@ struct drm_device {
>   * @struct_mutex:
>   *
>   * Lock for others (not &drm_minor.master and &drm_file.is_master)
> + *
> + * WARNING:
> + * Only drivers annotated with DRIVER_LEGACY should be using this.

Reviewed-by: Daniel Vetter <daniel.vetter at ffwll.ch>

Assuming you wrap it in some suitable commit and all that.
-Daniel

>   */
>   struct mutex struct_mutex;
> 
> -Emil

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


More information about the dri-devel mailing list