From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753442AbdGJGGY (ORCPT ); Mon, 10 Jul 2017 02:06:24 -0400 Received: from [109.190.93.129] ([109.190.93.129]:51399 "EHLO gagarine.paulk.fr" rhost-flags-FAIL-FAIL-OK-OK) by vger.kernel.org with ESMTP id S1753367AbdGJGGW (ORCPT ); Mon, 10 Jul 2017 02:06:22 -0400 Message-ID: <1499666739.1313.1.camel@paulk.fr> Subject: Re: [PATCH] ARM: tegra: Register host1x node with iommu binding on tegra124 From: Paul Kocialkowski To: Thierry Reding Cc: linux-arm-kernel@lists.infradead.org, linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org, Jonathan Hunter , Stephen Warren , Mikko Perttunen Date: Mon, 10 Jul 2017 09:05:39 +0300 In-Reply-To: <20170710052140.GA18089@ulmo.fritz.box> References: <20170709163614.6746-1-contact@paulk.fr> <20170710052140.GA18089@ulmo.fritz.box> Content-Type: multipart/signed; micalg="pgp-sha256"; protocol="application/pgp-signature"; boundary="=-eAc9fSCsLW+aXj1wRO/0" X-Mailer: Evolution 3.24.3 Mime-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --=-eAc9fSCsLW+aXj1wRO/0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Le lundi 10 juillet 2017 =C3=A0 07:21 +0200, Thierry Reding a =C3=A9crit : > On Sun, Jul 09, 2017 at 07:36:14PM +0300, Paul Kocialkowski wrote: > > This registers the host1x node with the SMMU (as HC swgroup) to > > allow > > the host1x code to attach to it. It avoid failing the probe > > sequence, > > which resulted in the tegra drm driver not probing and thus nothing > > being displayed on-screen. > >=20 > > Signed-off-by: Paul Kocialkowski > > --- > > arch/arm/boot/dts/tegra124.dtsi | 1 + > > 1 file changed, 1 insertion(+) >=20 > Thanks for tracking this down. However, I don't think this is an > appropriate fix for v4.12 because it requires an update to the DTB in > order to preserve functionality, which means we've broken DT ABI. The > proper fix I think needs to be to make usage of the IOMMU completely > optional in the host1x driver. I see, that makes sense. > So I think what happens without this DT change is that the call to > iommu_attach_device() fails and we have no way to recover from that. That is exactly what is happening, indeed. > I think what we need to do is to free the domain in that case and make > sure we can continue without one. It's probably best to add an error > message, or maybe a warning to make sure people are aware. By freeing the domain, do you mean continuing without IOMMU support? If so, then we should make sure to only behave that way for -ENODEV and generally still fail for other errors. > Do you have the time to address this? If not, perhaps Mikko can take a > look? I can craft a patch this evening, but if someone else wants to work on it earlier, they are totally welcome to do it! --=20 Paul Kocialkowski, developer of free digital technology and hardware support. Website: https://www.paulk.fr/ Coding blog: https://code.paulk.fr/ Git repositories: https://git.paulk.fr/ https://git.code.paulk.fr/ --=-eAc9fSCsLW+aXj1wRO/0 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEAbcMXZQMtj1fphLChP3B6o/ulQwFAlljGTUACgkQhP3B6o/u lQyBFBAAklfXJFr1Bkh7ynLOmSykIeRAa9I+bFt9BiniZEPhlebT0X/trDqBNSjf ZJu1d5LF6KBIHA7+oRHzdVXhXdgn6QC1AzxNYmz2M0AFT1YdSOigUpJhf92383sW OBgasBdRxH4f8te8h1KkF6F4VA88jy1spJh1XJIoa29xPWHSHsbcCxBrIEaigO3v hTGE6oecO4i22fFoxW6HgN/RHQ0vEEIDOLQhOpFrnDY+WyJwSM8S4PWGuS/GUsLT acWOG1XYw6lNFA3g2dITpPYEP1Xiw42QR9snAmI4+e1HVbhngm4uwTbNfZ/+yEK6 9V7lTRMVh0pwLdpU2fSuuRC4mgfatgGOXm5vc0J5XPcZ7Gze8eiMqHJaImMuyK2F QztjwEx95WbQG2xbiGqhDk+lzdy0S6fZ/V821Gsn13nOv/jk1Dy4NhO8nDfbVAbo H4llXve8OD65YShzlRA8HsExCattresukm05z/SYOJaS6myXzdbYin5Sxy3KZsXf xYSYBZaLZut+y7ZYMtB1irdQmU7PzxDyBwfmQMPX5o5VasJD83I3KTZQhuJ9StfB 1xFqFs5avVruONP8V0WHhClhxwJSihNAmICU6oNXCKfCTAgYfnTlBoQXY+TbopZ1 zKd1RKjCWQmsKiaE2wc2tRVoR3jppkqbhevYj7xl6MegakV+QEs= =GKKs -----END PGP SIGNATURE----- --=-eAc9fSCsLW+aXj1wRO/0--