On Tue, Dec 10, 2024 at 06:41:52PM -0500, Lyude Paul wrote: > On Tue, 2024-11-26 at 18:25 -0300, Daniel Almeida wrote: > > Hi Lyude, > > > > > On 30 Sep 2024, at 20:09, Lyude Paul <lyude@xxxxxxxxxx> wrote: > > > > > > + > > > +impl<T: DriverConnector> Connector<T> { > > > + /// Construct a new [`Connector`]. > > > + /// > > > + /// A driver may use this to create new [`Connector`] objects. > > > + /// > > > + /// TODO: Add a way to handle creating connectors after device registration. Also, that's why we > > > + /// don't ask for a UnregisteredKms device here. > > > > Can you elaborate? We can try to help if you describe this a bit better :) > > oh - totally forgot to respond to this! > > So: out of all of the mode objects, Connectors are a bit special. They can > actually be created and destroyed after registration (hence why they have a > refcount). This is not terribly difficult to handle before registration, the > complication comes after registration - where we'll likely need to split > Connector into two different types: > > UnregisteredConnector > > Connector > > Where you have to sacrifice the UnregisteredConnector to get to the Connector > object. I don't think this will actually be too difficult to implement, I just > didn't get around to it yet because there were so many other open questions I > had about the design here in general. For connnnector lifetime fun please also see Imre's patches for fixing some races around mst hotplug. At least on the C side I think we will split connectors into dynamic and static ones, to be able to handle things correctly. It's a bit a mess unfortuantely. -Sima -- Simona Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch