From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751903AbdBFRey (ORCPT ); Mon, 6 Feb 2017 12:34:54 -0500 Received: from pandora.armlinux.org.uk ([78.32.30.218]:47314 "EHLO pandora.armlinux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751281AbdBFRev (ORCPT ); Mon, 6 Feb 2017 12:34:51 -0500 Date: Mon, 6 Feb 2017 17:34:07 +0000 From: Russell King - ARM Linux To: Liviu Dudau Cc: Rob Herring , David Airlie , Daniel Vetter , Sean Paul , dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Frank Rowand , Boris Brezillon , Archit Taneja , Jingoo Han , Inki Dae , Joonyoung Shim , Seung-Woo Kim , Kyungmin Park , Kukjin Kim , Krzysztof Kozlowski , Javier Martinez Canillas , Stefan Agner , Alison Wang , Xinliang Liu , Rongrong Zou , Xinwei Kong , Chen Feng , Philipp Zabel , CK Hu , Matthias Brugger , Marek Vasut , Mark Yao , Heiko Stuebner , Maxime Ripard , Chen-Yu Tsai , Mali DP Maintainers , Neil Armstrong , Carlo Caione , Kevin Hilman , Rob Clark , Jyri Sarha , Tomi Valkeinen , Eric Anholt Subject: Re: [PATCH 3/5] drm: convert drivers to use of_graph_get_remote_node Message-ID: <20170206173407.GK27312@n2100.armlinux.org.uk> References: <20170204033635.10250-1-robh@kernel.org> <20170204033635.10250-4-robh@kernel.org> <20170206102933.GV3140@e110455-lin.cambridge.arm.com> <20170206170949.tmm4m2lm2rybm5dh@rob-hp-laptop> <20170206172306.GY3140@e110455-lin.cambridge.arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170206172306.GY3140@e110455-lin.cambridge.arm.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Feb 06, 2017 at 05:23:06PM +0000, Liviu Dudau wrote: > On Mon, Feb 06, 2017 at 11:09:49AM -0600, Rob Herring wrote: > > On Mon, Feb 06, 2017 at 10:29:33AM +0000, Liviu Dudau wrote: > > > On Fri, Feb 03, 2017 at 09:36:33PM -0600, Rob Herring wrote: > > > > - /* add the remote encoder port as component */ > > > > - port = of_graph_get_remote_port_parent(ep); > > > > - of_node_put(ep); > > > > - if (!port || !of_device_is_available(port)) { > > > > - of_node_put(port); > > > > - return -EAGAIN; > > > > > > The HDLCD change looks reasonable except for this -EAGAIN business. I'll have to > > > test your changes on my setup to see how this affects having the encoder as a module. > > > > What are you expecting to happen with -EAGAIN? This one was a bit of an > > oddball. > > When both the HDLCD and the TDA998x drivers are compiled as modules, the > order in which they are inserted can be somewhat random (due to testing). Not really "due to testing" but if you run a real distro, they tend to have a multi-threaded behaviour when loading kernel modules at boot. > It is at that time when you want the probe of HDLCD to be retried on the > insmod-ing of the tda998x.ko rather than fail entirely. -EAGAIN doesn't get you that, and in any case, solving that problem is exactly why the component API exists - so that DRM only comes up once all the necessary components are available. -EAGAIN also doesn't get you that from inside a probe function - such an error will be reported in the kernel log, and no further action will be taken (the device driver probe will be failed, and not automatically retried. The only case that we automatically retry is if a driver returns -EPROBE_DEFER. Everything else causes a probe failure. -- RMK's Patch system: http://www.armlinux.org.uk/developer/patches/ FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up according to speedtest.net.