On Tue, Apr 25, 2023 at 08:02:40AM +0000, Brandon Pollack wrote: > added documentation to drm_dev_unregister clarifying that devres managed > devices allocated with devm_drm_dev_alloc do not require calls to > drm_dev_put. > > Signed-off-by: Brandon Pollack <brpol@xxxxxxxxxxxx> > > --- > > This is my first patch to any tree. I've tried my best to read as many > kernel docs etc as possible (wip). This took me a moment to realize so I > figured it was as good a candidate as any for a first patch (at the very > least to make sure I have the whole patching process figured out). I > hope to make more janitorial changes as I continue to learn leading up > to the work I hope to do. > > We're hoping to add multiple display hotplug output support to VKMS for > testing purposes. Some work has been done already, but we'll be taking > over moving forward. Our intent is to remain involved and assist in > maintaining these changes. > > Looking forward to your comments/advice (now and henceforth!) Looking good! Reviewed-by: Daniel Vetter <daniel.vetter@xxxxxxxx> Since you're @chromium.org I'm assuming that one of the cros committers will push this to drm-misc-next. If not please holler. -Daniel > --- > drivers/gpu/drm/drm_drv.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/drm_drv.c b/drivers/gpu/drm/drm_drv.c > index cee0cc522ed9..12687dd9e1ac 100644 > --- a/drivers/gpu/drm/drm_drv.c > +++ b/drivers/gpu/drm/drm_drv.c > @@ -969,7 +969,9 @@ EXPORT_SYMBOL(drm_dev_register); > * > * Unregister the DRM device from the system. This does the reverse of > * drm_dev_register() but does not deallocate the device. The caller must call > - * drm_dev_put() to drop their final reference. > + * drm_dev_put() to drop their final reference, unless it is managed with devres > + * (as devices allocated with devm_drm_dev_alloc() are), in which case there is > + * already an unwind action registered. > * > * A special form of unregistering for hotpluggable devices is drm_dev_unplug(), > * which can be called while there are still open users of @dev. > -- > 2.40.0.634.g4ca3ef3211-goog > -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch