From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thierry Reding Subject: Re: [PATCH v4 06/11] drm/fb-helper: Make top-level lock more robust Date: Wed, 29 Mar 2017 16:51:17 +0200 Message-ID: <20170329145117.GA1933@ulmo.ba.sec> References: <20170329144401.1804-1-thierry.reding@gmail.com> <20170329144401.1804-7-thierry.reding@gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1393553785==" Return-path: In-Reply-To: <20170329144401.1804-7-thierry.reding@gmail.com> 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: intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org --===============1393553785== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="qDbXVdCdHGoSgWSk" Content-Disposition: inline --qDbXVdCdHGoSgWSk Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Mar 29, 2017 at 04:43:56PM +0200, Thierry Reding wrote: > From: Thierry Reding >=20 > The existing drm_fb_helper_hotplug_event() function needs to take the > top-level fb-helper lock. However, the function can also be called from > code that has already taken this lock. Introduce an unlocked variant of > this function that can be used in the latter case. >=20 > This function calls drm_fb_helper_restore_fbdev_mode_unlocked(), via > drm_fb_helper_set_par(), so we also need to introduce an unlocked copy > of that to avoid recursive locking issues. >=20 > Similarly, the drm_fb_helper_initial_config() function ends up calling > drm_fb_helper_set_par(), via register_framebuffer(), and needs an > unlocked variant to avoid recursive locking. >=20 > Signed-off-by: Thierry Reding > --- > drivers/gpu/drm/drm_fb_helper.c | 167 +++++++++++++++++++++++++---------= ------ > 1 file changed, 104 insertions(+), 63 deletions(-) Note that this could probably be squashed into 05/11, but I left it separate for easier review since it's the only new patch in the series. Also I had originally split this into three separate patches, but the recursive call stack for the drm_fb_helper_hotplug_event() function and drm_fb_helper_restore_fbdev_mode_unlocked() made it impossible to keep bisectibility across the series. Thierry --qDbXVdCdHGoSgWSk Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEiOrDCAFJzPfAjcif3SOs138+s6EFAljbyeIACgkQ3SOs138+ s6FqSBAAmOdFH0KIviPKkonz0uXDRnySIljBcpOX3SFqo+Z/x+sn614P382OdFKx WlqNROkiRkVheBRHmMHKhFN73WJO1aBT2WIdnvKoxBNwuiYg9pgkq0yBvoDizilM GKCToU5GxWEv0o8/GzKuZ5Jd9XA7sMvWsOaAlNO1UpFNN+5x0XwE9aKxNUVUfzVz 0CDu+n7ajT7LW/1xWmSlsRZohmx5qu213ozlwv8uC4gG8UTePI6BNXygkzTt9hae 6xWk4ViRR+qfpAWHQSBUKTGl0bAamL2eagVeDR+e+Hl6IZWrK7YmaQQhtwQAHeeO aM0RBMMZJVT4o3Y4FEC+CI4e2xGCumLObdswAcNiMvAht1l2wpg1gTO/xxhfp3BV V9SmqZfbbgCwX2deZmKAOwA7OnHCNNL7Jg9Oqvhcsvh1IXyv8KZSE7DggsqSyWm9 iac9w8yamzQ3msMUCnBG2J6SNMtad7Yf/aHJaOKtxf4BwnyicaMLzyZEOCVAeeuw 7eSLAP3BrOjylkarv0SWQX/hgRHK2MwTXpYzgOFJpFlR+8DFFFeC7V6W6imXeuyc yT3QAdePTSnDA1U5vCrMOSl4h3ryOVmwRnuMP7beW73wUSxV9Okq+2tvyl54RFiE S8ldFeTi1l2etGxN6bO3y8DAZRR5E0vbQvdZI9Aj6oAG45LZZDA= =6uDg -----END PGP SIGNATURE----- --qDbXVdCdHGoSgWSk-- --===============1393553785== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KZHJpLWRldmVs IG1haWxpbmcgbGlzdApkcmktZGV2ZWxAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHBzOi8vbGlz dHMuZnJlZWRlc2t0b3Aub3JnL21haWxtYW4vbGlzdGluZm8vZHJpLWRldmVsCg== --===============1393553785==--