On Tue, Jun 26, 2018 at 05:23:25PM +0200, Daniel Vetter wrote: > On Fri, Jun 15, 2018 at 10:52:21PM +0300, Ville Syrjala wrote: > > From: Ville Syrjälä <ville.syrjala at linux.intel.com> > > > > To pick the correct MST encoder i915 wants to know which crtc is going > > to be feeding us. To that end let's pass the crtc to the .best_encoder() > > hook. The atomic variant already knows the crtc via the connector state, > > but the non-atomic hooks is still being used by the fb_helper even on > > atomic drivers. > > Can't we instead fix the fb helpers to use atomic_best_encoder? We'd need a connector state for that. Not sure we want to construct a fake one on demand or something. > Or just > drop that code, userspace doesn't really know any better either and just > needs to figure this out without the help of ->best_encoder, so it should > be possible. I have to admit I don't even remmber how userspace does this. OK, yeah so each connector has a list of encoders and each encoder has the possible_crtcs bitmask. So we should be able to just iterate through all the encoders for the connector. Not sure there couldn't be some some false positives if best_encoder() doesn't quite agree with the answer for some reason. But yeah, this does seem like a nicer option because we can then nuke the extra .best_encoder() hook for i915 mst. Now the question becomes whether I get to review the connecor->encoder_ids[] assignments in every driver. I suppose they should be mostly OK if userspace manages to work. -- Ville Syrjälä Intel