From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thierry Reding Subject: Re: exynos-drm registration: infinite loop Date: Thu, 6 Nov 2014 10:29:16 +0100 Message-ID: <20141106092914.GG26297@ulmo> References: <20141105143813.GA24353@ulmo> <545B13DF.4040503@samsung.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1006437941==" Return-path: Received: from mail-wi0-f172.google.com (mail-wi0-f172.google.com [209.85.212.172]) by gabe.freedesktop.org (Postfix) with ESMTP id 98DAA6EDB7 for ; Thu, 6 Nov 2014 01:29:18 -0800 (PST) Received: by mail-wi0-f172.google.com with SMTP id bs8so849382wib.11 for ; Thu, 06 Nov 2014 01:29:17 -0800 (PST) In-Reply-To: <545B13DF.4040503@samsung.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: Inki Dae Cc: kyungmin.park@samsung.com, "Matwey V. Kornilov" , sw0312.kim@samsung.com, DRI mailing list List-Id: dri-devel@lists.freedesktop.org --===============1006437941== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="ahP6B03r4gLOj5uD" Content-Disposition: inline --ahP6B03r4gLOj5uD Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Nov 06, 2014 at 03:23:27PM +0900, Inki Dae wrote: > On 2014=EB=85=84 11=EC=9B=94 05=EC=9D=BC 23:38, Thierry Reding wrote: > > On Tue, Nov 04, 2014 at 09:18:46PM +0400, Matwey V. Kornilov wrote: > >> Hi, > >> > >> I run 3.18-rc3 kernel on BeagleBone Black. It doesn't have Exynos DRM > >> of course, but I run multi-platform kernel where CONFIG_DRM_EXYNOS is > >> set to 'y'. > >> The issue here is that the platform probe/init goes to infinite loop > >> as the following: > >> > >> [ 5.717343] platform exynos-drm: Driver exynos-drm requests probe d= eferral > >> [ 5.726848] exynos-drm-ipp exynos-drm-ipp: drm ipp registered succe= ssfully. > >> [ 5.734700] platform exynos-drm: Driver exynos-drm requests probe d= eferral > >> [ 5.744044] exynos-drm-ipp exynos-drm-ipp: drm ipp registered succe= ssfully. > >> [ 5.752010] platform exynos-drm: Driver exynos-drm requests probe d= eferral > >> [ 5.761377] exynos-drm-ipp exynos-drm-ipp: drm ipp registered succe= ssfully. > >> [ 5.769291] platform exynos-drm: Driver exynos-drm requests probe d= eferral > >> > >> It is quite unexpectable behavior. I would expect that the exynos-drm > >> failed to initialize with 'no device' error. > >> > >> See also for the reference: https://bugzilla.kernel.org/show_bug.cgi?i= d=3D87691 > >=20 > > The reason for this seems to be that Exynos DRM instantiates a dummy > > device that it can bind to (see exynos_drm_init()). Now this code is > > executed unconditonally, so the device will be created whether or not > > the kernel/module runs on an Exynos SoC. The driver should really bind > > to some real device rather than instantiating a dummy. Or if it must > > bind to a dummy then the code needs to at least check that it's running > > on an Exynos SoC before instantiating the dummy. > >=20 >=20 > Right, I also think the problem is because we use a dummay device for > Exynos drm. As you mentioned, this device can always be bound as long as > Exynos drm driver is enabled even without real device. So this issue > gives us that we need super device node again. Actually, I had already > tried the use of the super device node like below for Exynos drm but > other Samsung guys didn't want to use it. > http://lists.freedesktop.org/archives/dri-devel/2014-April/056618.html >=20 > I think now we have the reason that we should use super device node so I > will try to support the super device for Exynos drm like other ARM drm > drivers did. However, for this, I'd like to listen to other opinions > for a while before that. Irrespective of any long-term solution you need to fix this as soon as possible because this currently causes all sorts of weirdness when booting a multi-platform kernel on non-Exynos boards. Probably the easiest for now would be to add some soc_is_exynos*() check at the very beginning of exynos_drm_init(). Thierry --ahP6B03r4gLOj5uD Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBAgAGBQJUWz9qAAoJEN0jrNd/PrOhffAQALdnR3tJkv6n0ZxXLFGL3B8b SVwlxez494Ir1YpUZfgt3f23HXnUx12yhnM8XFGIjyvXJsiMPv2wRezzPXhnQQk7 BjFkti1k0yCQWT2cWLmrrcyx5stRcut6BB1KFPA2tnGtm4Ltc81CNdOgBu0dN9vg BRu0zMA6HHh/fbHW0dnY/AqgoZLbn1bZsfNJlYjb5YD3E1SmWALJwWbqUfvM+43H kiRp16IIq7Vg9O/sDCfJYISMA4iB+5rCch9P2PGlPZ7pyPvG0dB7bAiNEeNBNgRN arVrP4iFYpvgMhHqovyL5VJLL4bi45R9+pxobrvaqOQJwFYMWqgWy3+waDuYduRD 6BTzFUOxdI35M3lf93Mo1AL7DSoFbNKOBeMNvvaiOunQ5DnVZiG0BbEPADxCa2CO PxYDzgMaFX+ucTsbhtY2V8zBbQrgS7heIBxqZ7/qH/gm1RTV4lfN8C6B2/8/5byK bPa0LpA9ceqZCDkSW26hBkQtkQVWHVsjGimEHAVuT9AoR+FdW8mYdnajUhB/PCk2 5CCcmVma8HE0kL/v19NJanqhafDOgJnScB9P8uwIG8UnO+6MkL8lLM2oRB+0HbuA EAJu9jwX6IKJQ7AMwc3K02jUmhLydhPQHrg+BHv/IVFJ4sQSVQfMUXMkxYXomWjW tUjEg55+V7CbOFkZGt9V =wVuY -----END PGP SIGNATURE----- --ahP6B03r4gLOj5uD-- --===============1006437941== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KZHJpLWRldmVs IG1haWxpbmcgbGlzdApkcmktZGV2ZWxAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHA6Ly9saXN0 cy5mcmVlZGVza3RvcC5vcmcvbWFpbG1hbi9saXN0aW5mby9kcmktZGV2ZWwK --===============1006437941==--