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

Emil Velikov emil.l.velikov at gmail.com
Fri May 8 10:07:00 UTC 2020


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.
  */
  struct mutex struct_mutex;

-Emil


More information about the dri-devel mailing list