[PATCH v2] mode: Retrieve only the current information for a Connector

Daniel Vetter daniel at ffwll.ch
Wed Mar 4 04:31:46 PST 2015


On Wed, Mar 4, 2015 at 12:29 PM, Chris Wilson <chris at chris-wilson.co.uk> 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).
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch


More information about the dri-devel mailing list