[PATCH 26/51] drm: Manage drm_mode_config_init with drmm_

Sam Ravnborg sam at ravnborg.org
Sat Feb 29 10:59:32 UTC 2020


Hi Daniel.

> > > Also with drmm_ explicit drm_driver->release hooks are kinda not the
> > > best option, so deprecate that hook to discourage future users.
> > The ->release hooks has others uses until everything is moved over to
> > drmm_, or so I think. So deprecation seems a lttle too soon.
> 
> You can just add a drmm action which calls your release function. The
> upshot is that you can be more fine-grained (useful for unwinding when
> driver load fails halfway through). That's why I think new drivers
> after this patch shouldn't use ->release anymore, it's strictly less
> useful than drmm actions. The less unwind code I have to review
> carefully to make sure the right stuff gets released (and not more!)
> the better.
>From that perspective I agree - gently pushing people to use drmm_
is only good.

	Sam


More information about the dri-devel mailing list