From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thierry Reding Subject: Re: [PATCH 22/28] drm/atomic-helper: Reject attempts at re-stealing encoders Date: Mon, 7 Dec 2015 14:26:04 +0100 Message-ID: <20151207132604.GC13177@ulmo> References: <1449218769-16577-1-git-send-email-daniel.vetter@ffwll.ch> <1449218769-16577-23-git-send-email-daniel.vetter@ffwll.ch> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1080638264==" Return-path: In-Reply-To: <1449218769-16577-23-git-send-email-daniel.vetter@ffwll.ch> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: Daniel Vetter Cc: Daniel Vetter , Intel Graphics Development , DRI Development List-Id: intel-gfx@lists.freedesktop.org --===============1080638264== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="tUxbtEzdJc4sX0sj" Content-Disposition: inline --tUxbtEzdJc4sX0sj Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Dec 04, 2015 at 09:46:03AM +0100, Daniel Vetter wrote: > This can happen when we run out of encoders for a multi-crtc modeset, > or also when userspace is silly and tries to clone multiple connectors > that need the same encoder on the same crtc. >=20 > Reported-and-Tested-and-Reviewed-by: Maarten Lankhorst > Cc: Maarten Lankhorst > Signed-off-by: Daniel Vetter > --- > drivers/gpu/drm/drm_atomic_helper.c | 28 ++++++++++++++++++++++++++++ > 1 file changed, 28 insertions(+) >=20 > diff --git a/drivers/gpu/drm/drm_atomic_helper.c b/drivers/gpu/drm/drm_at= omic_helper.c > index 2cf8ab7dbc8c..ab275499d2a3 100644 > --- a/drivers/gpu/drm/drm_atomic_helper.c > +++ b/drivers/gpu/drm/drm_atomic_helper.c > @@ -86,6 +86,27 @@ drm_atomic_helper_plane_changed(struct drm_atomic_stat= e *state, > } > } > =20 > +static bool > +check_pending_encoder_assignment(struct drm_atomic_state *state, > + struct drm_encoder *new_encoder, > + struct drm_connector *new_connector) new_connector seems to be unused. > +{ > + struct drm_connector *connector; > + struct drm_connector_state *conn_state; > + int i; > + > + for_each_connector_in_state(state, connector, conn_state, i) { > + if (conn_state->best_encoder !=3D new_encoder) > + continue; > + > + /* encoder already assigned and we're trying to re-steal it! */ > + if (connector->state->best_encoder !=3D conn_state->best_encoder) Was this supposed to be new_connector->state->best_encoder? Thierry --tUxbtEzdJc4sX0sj Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAABCAAGBQJWZYjqAAoJEN0jrNd/PrOh05EP/iwAAEn2QZJMw0fDpNT5Va4c KFPSkEmf6hahn0XxiNjspyw/IVglsqnNi0Ik8lOAiD63LhsW+v8jBJgPeiuPFse4 9D6/NKDJPZBQ4TJ2eOFBO12m9Ms9HBOAt23fW3KDzxLkp0fIUvHxj9AtYaIhhG+o Mfmi3jnkn5Pv9hmD9VI94NJa6vpcTaRhMOWZk1x4T+18fPhiHO8TYm+Dj7szcblX Nj9qqKbelfQ/bFhond4P0+NTfqRZB3JiS3u0jfVvQKCQpIo8DofHDWD1Ufm5rSbp Tg8cJ42XAVc0egZwMwc89bH5yxGlUtKGn78zbfS4h9jpzrCkl/FJ4RGCpsSpt16E AyJbw3BTS8ldDFZjadXKCk+S027RUFVEzOuuMeBarFSmhGkffTfsVPKJwVbHn1i4 /vgY+B4lbExKiitj13mbc4u/tM8OdI6M3SA6lAhzz8AuSFJOX+NF4/Jv/o1T6KNk xcF7n0OTAh7t2du7bRhH6JT1vziR7gvvS1N+5Pk7y7KrSZwunQ0FQ0uwBjcfCfhk 17uPuu9FSdn9UXBSkPzkzP1zTZ+vONlgqBKaW4Pzpv98+RpyNTPmYs2a5SKCLA3E GOVtl6Ju9vqkRT0FbPoZlE+7dF5x9EEwt3Qw5bnJwufbuc7WdOOuN5ryguIvEter R8XbTznh3pyR+vfg2e23 =d9dK -----END PGP SIGNATURE----- --tUxbtEzdJc4sX0sj-- --===============1080638264== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KZHJpLWRldmVs IG1haWxpbmcgbGlzdApkcmktZGV2ZWxAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHA6Ly9saXN0 cy5mcmVlZGVza3RvcC5vcmcvbWFpbG1hbi9saXN0aW5mby9kcmktZGV2ZWwK --===============1080638264==--