On Wed, Mar 4, 2015 at 1:34 PM, Chris Wilson <chris@xxxxxxxxxxxxxxxxxx> wrote: > On Wed, Mar 04, 2015 at 01:31:46PM +0100, Daniel Vetter wrote: >> On Wed, Mar 4, 2015 at 12:29 PM, Chris Wilson <chris@xxxxxxxxxxxxxxxxxx> wrote: >> > On Wed, Mar 04, 2015 at 12:08:42PM +0100, Daniel Vetter wrote: >> >> On Wed, Mar 04, 2015 at 10:38:08AM +0000, Chris Wilson wrote: >> >> > + if (conn.encoder_id) { >> >> > + r->count_encoders = 1; >> >> >> >> This only works for i915 where we only ever have 1 encoder. Other drivers >> >> reassign encoders depending upon output type (e.g. dvi-i vs dvi-d). Imo >> >> it'd be cleaner to do something like the below: >> > >> > Not quite. This value is the currently active encoder_id for the >> > connector; there can only be one. As opposed to the array of associated >> > encoders that we normally supply on ouptut. Even i915 has multiple >> > encoders on connectors nowadays! >> >> DRM_MAX_ENCODER in the kernel is 3. And i915 has multipled connectors >> for the same encoder, but not the other way round. Having multiple >> encoders is the reason for the best_encoders callback in the crtc >> helpers, which we've ditched for i915 (we always pick the single >> intel_connector->encoder statically assigned at load time). > > We have multiple encoders on the same connector, since 3.17. Ok short summary of our irc discussion: I've totally missed the fake encoders from dp mst, i915 indeed has multiple possible encoders per output now too. Wrt the api discussion itself I didn't realize that Chris' code digs out the entire current configuration (including mode and all that) and intentionally filters out all the other information supplied by the kernel (like the mode list or list of possible encoders). Imo that's too high-level and artificially limits what drivers could do with this. -Daniel -- Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch _______________________________________________ dri-devel mailing list dri-devel@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/dri-devel