Re: [PATCH 13/64] drm/vc4: hvs: Protect device resources after removal

2022-06-20 Thread Maxime Ripard
Hi, On Tue, Jun 14, 2022 at 05:59:15PM +0100, Dave Stevenson wrote: > > > @@ -132,14 +139,18 @@ static int vc4_hvs_upload_linear_kernel(struct > > > vc4_hvs *hvs, > > > struct drm_mm_node *space, > > > const u32

Re: [PATCH 13/64] drm/vc4: hvs: Protect device resources after removal

2022-06-20 Thread Maxime Ripard
Hi Dave, On Tue, Jun 14, 2022 at 04:11:20PM +0100, Dave Stevenson wrote: > On Fri, 10 Jun 2022 at 10:30, Maxime Ripard wrote: > > > > Whenever the device and driver are unbound, the main device and all the > > subdevices will be removed by calling their unbind() method. > > > > However, the DRM

Re: [PATCH 13/64] drm/vc4: hvs: Protect device resources after removal

2022-06-20 Thread Thomas Zimmermann
Am 10.06.22 um 11:28 schrieb Maxime Ripard: Whenever the device and driver are unbound, the main device and all the subdevices will be removed by calling their unbind() method. However, the DRM device itself will only be freed when the last user will have closed it. It means that there is a

Re: [PATCH 13/64] drm/vc4: hvs: Protect device resources after removal

2022-06-14 Thread Dave Stevenson
On Tue, 14 Jun 2022 at 16:11, Dave Stevenson wrote: > > Hi Maxime > > On Fri, 10 Jun 2022 at 10:30, Maxime Ripard wrote: > > > > Whenever the device and driver are unbound, the main device and all the > > subdevices will be removed by calling their unbind() method. > > > > However, the DRM

Re: [PATCH 13/64] drm/vc4: hvs: Protect device resources after removal

2022-06-14 Thread Dave Stevenson
Hi Maxime On Fri, 10 Jun 2022 at 10:30, Maxime Ripard wrote: > > Whenever the device and driver are unbound, the main device and all the > subdevices will be removed by calling their unbind() method. > > However, the DRM device itself will only be freed when the last user will > have closed it.

[PATCH 13/64] drm/vc4: hvs: Protect device resources after removal

2022-06-10 Thread Maxime Ripard
Whenever the device and driver are unbound, the main device and all the subdevices will be removed by calling their unbind() method. However, the DRM device itself will only be freed when the last user will have closed it. It means that there is a time window where the device and its resources