On Tue, Dec 07, 2021 at 02:26:05PM +0200, Heikki Krogerus wrote: > +Hans and Imre > [...] > > Originally I wanted an API that we could use to pass all the details > that we have in the USB Type-C drivers (that would be the > configuration and status) to the GPU drivers, but Hans was against > that because, if I remember correctly, the OOB hotplug event may need > to be delivered to the GPU drivers in some cases even when the > connector is not USB Type-C connector, and he wanted a common API. > Hans, please correct me if I got it wrong. > > I think that the GPU drivers need to handle USB Type-C connectors > separately one way or the other, but maybe the notification from the > connector can continue to be generic - not USB Type-C specific. > > Imre proposed that the GPU drivers should be able to query the > DisplayPort configuration and status from the USB Type-C drivers > instead of the USB Type-C drivers just dumping the information > together with the notification about some event (so connection, > disconnection or attention) like I originally proposed. Imre, please > correct me if I misunderstood you :-).
I think the link config may be useful on Intel systems as well where the hotplug event is delivered by another mean, the Gfx driver getting an actual HW interrupt. Also on systems where the hotplug event does get delivered OOB, the Gfx driver may want to query the current state, for instance during booting or system resuming, independently of a hotplug event. Based on the above imo it would make sense to decouple the hotplug event notification and the link configuration querying interface, or at least make the querying possible in addition to the notification. > I'm fine with anything, but we do need improvement here as you guys > can see. > > thanks, > > -- > heikki