On Mon, Apr 22, 2024 at 12:27:53PM +0530, Aravind Iddamsetty wrote: > In scenarios where drm_dev_put is directly called by driver we want to > release devm_drm_dev_init_release action associated with struct > drm_device. > > v2: Directly expose the original function, instead of introducing a > helper (Rodrigo) > > v3: add kernel-doc (Maxime Ripard) > > Cc: Maxime Ripard <mrip...@kernel.org> > Cc: Thomas Hellstr_m <thomas.hellst...@linux.intel.com> > Cc: Rodrigo Vivi <rodrigo.v...@intel.com> > > Reviewed-by: Rodrigo Vivi <rodrigo.v...@intel.com> > Signed-off-by: Aravind Iddamsetty <aravind.iddamse...@linux.intel.com> > --- > drivers/gpu/drm/drm_drv.c | 13 +++++++++++++ > include/drm/drm_drv.h | 2 ++ > 2 files changed, 15 insertions(+) > > diff --git a/drivers/gpu/drm/drm_drv.c b/drivers/gpu/drm/drm_drv.c > index 243cacb3575c..9d0409165f1e 100644 > --- a/drivers/gpu/drm/drm_drv.c > +++ b/drivers/gpu/drm/drm_drv.c > @@ -714,6 +714,19 @@ static int devm_drm_dev_init(struct device *parent, > devm_drm_dev_init_release, dev); > } > > +/** > + * devm_drm_dev_release_action - Call the final release action of the device > + * @dev: DRM device > + * > + * In scenarios where drm_dev_put is directly called by driver we want to > release > + * devm_drm_dev_init_release action associated with struct drm_device. > + */
I'm not entirely sure what you mean by that documentation. "In scenarios where drm_dev_put is directly called by the driver", we wouldn't need to consider that function at all, right? Also, we should reference it in drm_dev_put and devm_drm_dev_alloc too. Maxime
signature.asc
Description: PGP signature