Re: [PATCH 5/9] drm: rcar-du: Use DRM-managed allocation for encoders

2020-12-14 Thread Laurent Pinchart
Hi Jacopo, On Mon, Dec 14, 2020 at 11:37:50AM +0100, Jacopo Mondi wrote: > On Sat, Dec 05, 2020 at 12:01:35AM +0200, Laurent Pinchart wrote: > > devm_kzalloc() is the wrong API to allocate encoders, as the lifetime of > > the encoders is tied to the DRM device, not the device to driver > > binding

Re: [PATCH 5/9] drm: rcar-du: Use DRM-managed allocation for encoders

2020-12-14 Thread Jacopo Mondi
Hi Laurent, On Sat, Dec 05, 2020 at 12:01:35AM +0200, Laurent Pinchart wrote: > devm_kzalloc() is the wrong API to allocate encoders, as the lifetime of > the encoders is tied to the DRM device, not the device to driver > binding. drmm_kzalloc() isn't a good option either, as it would result > in

[PATCH 5/9] drm: rcar-du: Use DRM-managed allocation for encoders

2020-12-04 Thread Laurent Pinchart
devm_kzalloc() is the wrong API to allocate encoders, as the lifetime of the encoders is tied to the DRM device, not the device to driver binding. drmm_kzalloc() isn't a good option either, as it would result in the encoder being freed before being unregistered during the managed cleanup of the DRM