Re: [PATCH v4 2/5] drm: adp: Add Apple Display Pipe driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Jan 17, 2025 at 03:17:32PM +0100, Sasha Finkelstein wrote:
> On Fri, 17 Jan 2025 at 11:24, Maxime Ripard <mripard@xxxxxxxxxx> wrote:
> > >
> > > I was thinking about using drmm_ here, as the DRM device is also created
> > > and destroyed each time. But I might be mistaken here.
> >
> > Ah, right, it makes sense then, thanks!
> > Maxime
> 
> Not sure i understand. The drm device is created in probe(), and is
> destroyed by devm.

Not really. The reference your driver has on the drm device is given up
by devm. It will be destroyed when the last app will close its fd to the
drm device file.

> I do not see a path where it can be created/destroyed without a trip
> via probe/remove, and so tying the lifetime of the bridge in question
> to devm seems correct?

And while someone has an opened fd, it can still call into the driver
through ioctls, so any KMS-facing resources need to be tied to the life
of the drm device, not its underlying device.

Maxime

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux