[Intel-gfx] [PATCH] drm/i915: use for_each_intel_connector_iter in intel_display.c

Maarten Lankhorst maarten.lankhorst at linux.intel.com
Wed Dec 21 10:01:49 UTC 2016


Op 20-12-16 om 19:29 schreef Daniel Vetter:
> On Mon, Dec 19, 2016 at 10:47:25AM +0100, Maarten Lankhorst wrote:
>> Op 19-12-16 om 10:22 schreef Daniel Vetter:
>>> On Mon, Dec 19, 2016 at 09:58:28AM +0100, Daniel Vetter wrote:
>>>> This gets rid of the last users of for_each_intel_connector(), remove
>>>> that too.
>>>>
>>>> The one exception is the loop in verify_encoder_state - that needs to
>>>> switch over to for_each_connector_in_state.
>>>>
>>>> v2: Maarten corrected me that in the state verifier we indeed must
>>>> only walk connectors in the atomic commit, not all of them!
>>> Ok, CI just told me this was a stupid idea. Since we don't walk all
>>> connectors, but still walk all encoders there's not plenty of state
>>> mismatches (e.g. if you have 2 crtc with different connectors enabled and
>>> you're doing a modeset on just one).
>>>
>>> Not exactly sure how to best fix this, since replacing the encoder
>>> walking with a connnector walking and then dereferencing
>>> connector->state->best_encoder to get at only the encoders relevant for us
>>> defeats the point of the cross check.
>> Assuming we trust the atomic state, we could fix this by iterating either state and ORing (old,new)_crtc_state->encoder_mask.
>> This way we'll have all encoders that we care about.
> Yeah, I think we have to rely on the correctness of the atomic states. For
> merging I think it's better to get v1 in to correct the connector_list
> enumeration, then fix up the encoder checking in a separate patch on top.
> Does that sound good?
Yes sounds good.

~Maarten




More information about the Intel-gfx mailing list