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

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

 



On Fri, 8 May 2020 at 07:27, Daniel Vetter <daniel@xxxxxxxx> wrote:
>
> On Thu, May 07, 2020 at 04:07:50PM +0100, Emil Velikov wrote:
> > From: Emil Velikov <emil.velikov@xxxxxxxxxxxxx>
> >
> > 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@xxxxxxxxxxxxx>
>
> 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
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel



[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux