From: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
To: Daniel Vetter <daniel@ffwll.ch>
Cc: intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org
Subject: Re: [PATCH 2/3] drm/atomic: Refuse to steal encoders with index < conn_idx.
Date: Thu, 18 Feb 2016 12:22:13 +0100 [thread overview]
Message-ID: <56C5A965.40302@linux.intel.com> (raw)
In-Reply-To: <20160218110909.GV32705@phenom.ffwll.local>
Op 18-02-16 om 12:09 schreef Daniel Vetter:
> On Thu, Feb 18, 2016 at 09:54:42AM +0100, Maarten Lankhorst wrote:
>> There was a potential to crash in the following case:
>> [ 49.985270] [drm:update_connector_routing] Updating routing for [CONNECTOR:48:DP-3]
>> [ 49.985273] [drm:update_connector_routing] [CONNECTOR:48:DP-3] keeps [ENCODER:33:DP MST-33], now on [CRTC:21:crtc-0]
>> [ 49.985275] [drm:update_connector_routing] Updating routing for [CONNECTOR:51:DP-4]
>> [ 49.985278] [drm:steal_encoder] [ENCODER:33:DP MST-33] in use on [CRTC:21:crtc-0], stealing it
>> [ 49.985281] [drm:update_connector_routing] [CONNECTOR:51:DP-4] using [ENCODER:33:DP MST-33] on [CRTC:21:crtc-0]
>>
>> This case is not allowed, similar to the previous case of 2 connectors newly assigned to the same encoder.
>>
>> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> What index something has is pretty arbitrary, i.e. I don't understand at
> all what exactly you're trying to fix here, and what the problem is. Note
> that this patch here seems to break the stealing-prevention logic: We're
> supposed to steal the first time around, but not move an already stolen
> encoder further (to make sure that all connectors in the current set can
> be lit up).
Well update_connector_routing runs over the for_each_connector_in_state, and connector_index linearly increases.
This means that 0...conn_idx have already been assigned, so if you see encoder with those indexes
you can't steal them. With conn_idx+1...n you can still steal it and be assured that the state is sane,
and a new encoder will be assigned by the next call to update_connector_routing.
~Maarten
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2016-02-18 11:22 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-18 8:54 [PATCH 0/3] drm/atomic: Fix encoder stealing Maarten Lankhorst
2016-02-18 8:54 ` [PATCH 1/3] drm/atomic: Always call steal_encoder Maarten Lankhorst
2016-02-18 8:54 ` [PATCH 2/3] drm/atomic: Refuse to steal encoders with index < conn_idx Maarten Lankhorst
2016-02-18 11:09 ` Daniel Vetter
2016-02-18 11:22 ` Maarten Lankhorst [this message]
2016-02-18 8:54 ` [PATCH 3/3] drm/atomic: Refuse to steal encoders from connectors not part of the state Maarten Lankhorst
2016-02-18 11:07 ` Daniel Vetter
2016-02-18 11:18 ` Maarten Lankhorst
2016-02-18 12:43 ` Daniel Vetter
2016-02-18 12:59 ` Ville Syrjälä
2016-02-24 8:51 ` Maarten Lankhorst
2016-02-18 11:35 ` Maarten Lankhorst
2016-02-18 11:11 ` [Intel-gfx] [PATCH 0/3] drm/atomic: Fix encoder stealing Daniel Vetter
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=56C5A965.40302@linux.intel.com \
--to=maarten.lankhorst@linux.intel.com \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).