From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755628AbcKVPhg (ORCPT ); Tue, 22 Nov 2016 10:37:36 -0500 Received: from mail.free-electrons.com ([62.4.15.54]:34521 "EHLO mail.free-electrons.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754121AbcKVPhf (ORCPT ); Tue, 22 Nov 2016 10:37:35 -0500 Date: Tue, 22 Nov 2016 16:37:30 +0100 From: Maxime Ripard To: Chen-Yu Tsai Cc: David Airlie , linux-sunxi , dri-devel , linux-arm-kernel , linux-kernel Subject: Re: [PATCH] drm/sun4i: Only count TCON endpoints as valid outputs Message-ID: <20161122153730.nj5fl34oleu2uylz@lukather> References: <20161116093732.12828-1-wens@csie.org> <20161117190254.d4doghspvz6ma6x2@lukather> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="ver22nxcdkrhhffy" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.6.2-neo (2016-08-21) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --ver22nxcdkrhhffy Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi, On Fri, Nov 18, 2016 at 10:22:40AM +0800, Chen-Yu Tsai wrote: > On Fri, Nov 18, 2016 at 3:02 AM, Maxime Ripard > wrote: > > On Wed, Nov 16, 2016 at 05:37:31PM +0800, Chen-Yu Tsai wrote: > >> The sun4i DRM driver counts the number of endpoints it found and > >> registers the whole DRM pipeline if any endpoints are found. > >> > >> However, if the TCON and its child endpoints (LCD panels, TV encoder, > >> HDMI encoder, MIPI DSI encoder, etc.) aren't found, that means we > >> don't have any usable CRTCs, and the display pipeline is incomplete > >> and useless. > > > > If some node set as available is not probed, then yes, it does, but > > I'm not really sure how it's a problem. Quite the opposite actually. >=20 > Actually the problem occurs when the TCON is _not_ available, but > the other endpoints preceding it are. By preceding, you mean the display engine or the HDMI or TV encoders? > >> The debug message "Queued %d outputs on pipeline %d\n" is also telling. > >> > >> This patch makes the driver only count enabled TCON endpoints. If > >> none are found, the DRM pipeline is not used. This avoids screwing > >> up the simple framebuffer provided by the bootloader in cases where > >> we aren't able to support the display with the DRM subsystem, due > >> to lack of panel or bridge drivers, or just lack of progress. > > > > The framebuffer is removed only at bind time, which means that all the > > drivers have probed already. Lack of progress isn't an issue here, > > since the node simply won't be there, and we wouldn't have it in the > > component lists. And lack of drivers shouldn't be an issue either, > > since in order for bind to be called, all the drivers would have > > gone through their probe. > > > > So I'm not really sure what it fixes. >=20 > To recap, on sun6i I had enabled the display engine node by default > in the dtsi, along with the backend and drc. The tcon is disabled > by default, so it doesn't get added to the list of components. > The available components get probed, binded, and simplefb gets > pushed out. >=20 > I suppose disabling the display engine by default would be better? > At least simplefb still works. Yep, that works for me. Maxime --=20 Maxime Ripard, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com --ver22nxcdkrhhffy Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIcBAEBCAAGBQJYNGY2AAoJEBx+YmzsjxAgPGoP/3rK5babf4kO9cSf7A86FjwZ t5OjOa9wufJw/nbOOi219LCTayYWT+33uF0/pCUf8GfTK6/l9x/ijvPBHoj8Nfdy KBW2GAhayaKaMHYnOTNqANwqD8SjPerlGTNszI2lROjTEisHiYFrFMQm+dBDN+9P ScTgkNieMsAOjoNWUCbo0k24Ij+oWbjSocVpADCoqAHvHrPkneH4AwadVzBG5l8c EqUIdSANKFrGXF/WvdS9G6X/UVdHW4glkg5cv3QNIss+r51ENymDleNEYPusRVHi zmCddlfbomNXWhICzaKeS2c2lX/az8hNzO5+5Mkq3KvPb2KMs8GZfHMNoWp6Qfgg XA4t/VVWWkDnY8I8d2ONg3yr2GiqUktK3LcfNbHtu3BhwlDkMiw0zY7V3PYPFzvr hnbL5tpzZdVw2WDvCln6f205HKjcKkGNyz5u1t4pRo/qdS/4lOpK02UINs3uqxlJ VrwTaGk+JBvVXGsVdE8pNsajMWD4fwiZs1y+SETdKBJrVCxnrSZ6aBueQjg7Fhhe OQbSUvANWrMpTde1+dylBIc29EX0RTnrpmhAUTm0ppx6nz+0XgmZGuR3XJ/+y0Mf ZzkQcrs4RAzns/6fo3gbDP7tjfQBA5ljC1PyQJbA0andhqnIsRx/VdcYjhZZUMAZ RQY2VRbhqYomaQeyLUn9 =Ys4t -----END PGP SIGNATURE----- --ver22nxcdkrhhffy--