linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
To: Tomi Valkeinen <tomi.valkeinen@ti.com>
Cc: "linux-omap@vger.kernel.org" <linux-omap@vger.kernel.org>,
	linux-fbdev@vger.kernel.org,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	Archit Taneja <archit@ti.com>,
	Darren Etheridge <detheridge@ti.com>,
	Tony Lindgren <tony@atomide.com>,
	Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
	Stefan Roese <stefan.roese@gmail.com>,
	Sebastian Reichel <sre@debian.org>,
	Robert Nelson <robertcnelson@gmail.com>,
	"Dr . H . Nikolaus Schaller" <hns@goldelico.com>,
	Marek Belisko <marek@goldelico.com>
Subject: Re: [PATCH 00/26] OMAPDSS: DT support (Christmas edition)
Date: Sat, 07 Dec 2013 03:48:18 +0000	[thread overview]
Message-ID: <52A29A82.106@collabora.co.uk> (raw)
In-Reply-To: <1386160133-24026-1-git-send-email-tomi.valkeinen@ti.com>

Hi Tomi,

On Wed, Dec 4, 2013 at 1:28 PM, Tomi Valkeinen <tomi.valkeinen@ti.com> wrote:
> Hi,
>
> Here's a new version for DT support to OMAP Display Subsystem. See
> http://article.gmane.org/gmane.linux.ports.arm.omap/102689 for the intro of the
> previous version, which contains thoughts about the related problems.
>
> The major change in this version is the use of V4L2 and CDF style port/endpoint
> style in the DT data. However, note that even if the DT data contains proper
> port & endpoint data, the drivers only use the first endpoint. This is to
> simplify the patches, as adding full support for the ports and endpoints to the
> drivers will be a big task. This approach still works with more or less all the
> boards, as the only cases where the simpler model is an issue are the boards
> with multiple display devices connected to a single output.
>
> Laurent, I'd appreciate if you could have a look at the .dts changes, to see if
> there's anything that's clearly not CDF compatible.
>
> The patches can also be found from:
> git://git.kernel.org/pub/scm/linux/kernel/git/tomba/linux.git work/dss-dt
>

I tested your branch on my DM3730 IGEPv2 board by cherry-picking the following
commits from latest Linus tree on top of your work/dss-dt branch:

d526daeb ("ARM: dts: omap3-igep0020: Add pinmux setup for i2c devices")
50592dc3 ("ARM: dts: omap3-igep0020: Add pinmuxing for DVI output")

And adding the display information using your DSS bindings to omap3-igep0020.dts
[0].

But it failed for me because of a probing order. The problem is that the probing
order is:

omap_i2c
pinctrl-single
OMAP DSS
connector-dvi
omapfb

Now DT good practices says that the pinmux setup needed for a device have to be
initialized in a pin control state for the device using these pins (i.e: i2c3)
instead of doing globally by being part of a pinctrl state of the pinmux device
(i.e: omap3_pmx_core).

But due this init order the omap_i2c probe is deferred due pinctrl-single not
being initialized yet:

[    0.565246] omap_i2c 48060000.i2c: could not find pctldev for node /ocp/pinmu


x@48002030/pinmux_i2c3_pins, deferring probe

This is ok since eventually the pinctrl-single driver will be initialized and
the next time the omap_i2c probe is called it will succeed. But before omap_i2c
has a chance to be probed again the connector-dvi driver is probed and fails due
the i2c bus not being initialized yet:

[    1.064300] OMAP DSS rev 2.0
[    1.073669] connector-dvi connector.12: failed to parse i2c-bus
[    1.073730] connector-dvi: probe of connector.12 failed with error -22
[    1.078216] omapfb omapfb: no displays
[    1.080871] omapfb omapfb: failed to setup omapfb
[    1.080932] platform omapfb: Driver omapfb requests probe deferral
..

Later the omap_i2c driver probe succees since the pinctrl-single driver was
initialized but by then it is already too late:

[    3.293914] omap_i2c 48070000.i2c: bus 0 rev4.4 at 2600 kHz
[    3.301940] omap_i2c 48072000.i2c: bus 1 rev4.4 at 400 kHz
[    3.310882] omap_i2c 48060000.i2c: bus 2 rev4.4 at 100 kHz
[    3.317565] omapfb omapfb: no displays
[    3.321716] omapfb omapfb: failed to setup omapfb
[    3.326751] platform omapfb: Driver omapfb requests probe deferral
..
[    3.694915] omapfb omapfb: no displays
[    3.699127] omapfb omapfb: failed to setup omapfb
[    3.704071] platform omapfb: Driver omapfb requests probe deferral
..

If I move the i2c3 pinmux definitions from the i2c3 device node to
omap3_pmx_core then the display works correctly.

So, I think that we should add deferred probing to drivers/video/omap2/*.c too
to avoid the scenario I described above.

Also, would you mind to include [0] on your patch-set so display continue
working for IGEPv2 after you remove the pdata-quirks and dss-common.c hacks?

Thanks a lot and best regards,
Javier

[0]:
From a9af54a3b63bccade241e056d153d8bf04a6a5d5 Mon Sep 17 00:00:00 2001
From: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
Date: Fri, 6 Dec 2013 02:53:38 +0100
Subject: [PATCH 1/1] ARM: dts: omap3-igep0020: add display information

The IGEPv2 has a TFP410 DPI-to-DVI encoder attached
to OMAP's Display SubSystem (DSS). Add DeviceTree
nodes for these devices.

Signed-off-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
---
 arch/arm/boot/dts/omap3-igep0020.dts | 51 ++++++++++++++++++++++++++++++++++++
 1 file changed, 51 insertions(+)

diff --git a/arch/arm/boot/dts/omap3-igep0020.dts
b/arch/arm/boot/dts/omap3-igep0020.dts
index 76509de..2569d60 100644
--- a/arch/arm/boot/dts/omap3-igep0020.dts
+++ b/arch/arm/boot/dts/omap3-igep0020.dts
@@ -215,3 +215,54 @@
 &usbhsehci {
 	phys = <&hsusb1_phy>;
 };
+
+&dpi {
+	vdds_dsi-supply = <&vpll2>;
+
+	dpi_out: endpoint {
+		remote-endpoint = <&tfp410_in>;
+		data-lines = <24>;
+	};
+};
+
+
+/ {
+	aliases {
+		display0 = &dvi0;
+	};
+
+	tfp410: encoder@0 {
+		compatible = "ti,tfp410";
+		gpios = <&gpio6 10 GPIO_ACTIVE_HIGH>; /* 170, power-down */
+
+		ports {
+			#address-cells = <1>;
+			#size-cells = <0>;
+
+			port@0 {
+				reg = <0>;
+
+				tfp410_in: endpoint@0 {
+					remote-endpoint = <&dpi_out>;
+				};
+			};
+
+			port@1 {
+				reg = <1>;
+
+				tfp410_out: endpoint@1 {
+					remote-endpoint = <&dvi_connector_in>;
+				};
+			};
+		};
+	};
+
+	dvi0: connector@0 {
+		compatible = "ti,dvi-connector";
+		i2c-bus = <&i2c3>;
+
+		dvi_connector_in: endpoint {
+			remote-endpoint = <&tfp410_out>;
+		};
+	};
+};
-- 
1.8.4.2

  parent reply	other threads:[~2013-12-07  3:48 UTC|newest]

Thread overview: 92+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-04 12:28 [PATCH 00/26] OMAPDSS: DT support (Christmas edition) Tomi Valkeinen
2013-12-04 12:28 ` [PATCH 01/26] OMAPDSS: rename display-sysfs 'name' entry Tomi Valkeinen
2013-12-04 12:28 ` [PATCH 02/26] OMAPDSS: DSI: fix fifosize Tomi Valkeinen
2013-12-04 12:28 ` [PATCH 03/26] ARM: OMAP: remove DSS DT hack Tomi Valkeinen
2013-12-04 12:28 ` [PATCH 04/26] OMAPDSS: remove DT hacks for regulators Tomi Valkeinen
2013-12-04 12:28 ` [PATCH 05/26] ARM: OMAP2+: add omapdss_init_of() Tomi Valkeinen
2013-12-11 23:10   ` Laurent Pinchart
2013-12-12  7:30     ` Tomi Valkeinen
2013-12-13  8:44       ` Archit Taneja
2013-12-13  8:40         ` Tomi Valkeinen
2013-12-13 17:07         ` Tony Lindgren
2013-12-04 12:28 ` [PATCH 06/26] OMAPDSS: if dssdev->name==NULL, use alias Tomi Valkeinen
2013-12-11 23:13   ` Laurent Pinchart
2013-12-11 23:56     ` Laurent Pinchart
2013-12-12  7:41       ` Tomi Valkeinen
     [not found]         ` <52A968BD.20304-l0cyMroinI0@public.gmane.org>
2013-12-12 10:05           ` Sebastian Reichel
2013-12-12 13:22             ` Laurent Pinchart
2013-12-12 14:13             ` Tomi Valkeinen
2013-12-12 14:15               ` Laurent Pinchart
2013-12-12 14:19                 ` Tomi Valkeinen
2013-12-12 17:31                   ` Sebastian Reichel
2013-12-13 12:01               ` Tomi Valkeinen
2013-12-04 12:28 ` [PATCH 07/26] OMAPDSS: get dssdev->alias from DT alias Tomi Valkeinen
2013-12-04 12:28 ` [PATCH 08/26] OMAPFB: clean up default display search Tomi Valkeinen
2013-12-04 12:28 ` [PATCH 09/26] OMAPFB: search for default display with DT alias Tomi Valkeinen
2013-12-04 12:28 ` [PATCH 10/26] OMAPDSS: add of helpers Tomi Valkeinen
2013-12-11 23:19   ` Laurent Pinchart
2013-12-12  7:48     ` Tomi Valkeinen
2013-12-13  2:37       ` Laurent Pinchart
2013-12-04 12:28 ` [PATCH 11/26] OMAPDSS: Add DT support to DSS, DISPC, DPI, HDMI, VENC Tomi Valkeinen
2013-12-04 12:28 ` [PATCH 12/26] OMAPDSS: Add DT support to DSI Tomi Valkeinen
2013-12-04 12:28 ` [PATCH 13/26] ARM: omap3.dtsi: add omapdss information Tomi Valkeinen
2013-12-05 17:05   ` Tony Lindgren
2013-12-09 12:45     ` Tomi Valkeinen
2013-12-09 18:04       ` Tony Lindgren
2013-12-11 23:44       ` Laurent Pinchart
2013-12-12  8:38         ` Tomi Valkeinen
2013-12-12 21:59           ` Tony Lindgren
2013-12-13  3:27             ` Laurent Pinchart
2013-12-13 10:18               ` Tomi Valkeinen
     [not found]                 ` <52AADEF3.9040808-l0cyMroinI0@public.gmane.org>
2013-12-13 17:10                   ` Tony Lindgren
2013-12-13  3:24           ` Laurent Pinchart
2013-12-13  9:29             ` Tomi Valkeinen
2013-12-16 10:49             ` Tomi Valkeinen
     [not found]               ` <52AEDA9F.2020609-l0cyMroinI0@public.gmane.org>
2013-12-16 13:55                 ` Laurent Pinchart
2013-12-04 12:28 ` [PATCH 14/26] ARM: omap4.dtsi: " Tomi Valkeinen
2013-12-04 12:28 ` [PATCH 15/26] ARM: omap4-panda.dts: add display information Tomi Valkeinen
2013-12-06  8:57   ` Javier Martinez Canillas
2013-12-09 12:56     ` Tomi Valkeinen
2013-12-09 15:09       ` Javier Martinez Canillas
2013-12-09 15:30         ` Tomi Valkeinen
2013-12-09 16:53           ` Javier Martinez Canillas
2013-12-10 10:56             ` Enric Balletbo Serra
2013-12-10 12:10               ` Tomi Valkeinen
2013-12-04 12:28 ` [PATCH 16/26] ARM: omap4-sdp.dts: " Tomi Valkeinen
2013-12-13  9:39   ` Archit Taneja
2013-12-13  9:39     ` Tomi Valkeinen
2013-12-13  9:58       ` Archit Taneja
2013-12-13 10:15         ` Tomi Valkeinen
2013-12-04 12:28 ` [PATCH 17/26] ARM: omap3-tobi.dts: add lcd (TEST) Tomi Valkeinen
2013-12-06 10:18   ` Florian Vaussard
2013-12-10 12:18     ` Tomi Valkeinen
2013-12-04 12:28 ` [PATCH 18/26] ARM: omap3-beagle.dts: add display information Tomi Valkeinen
2013-12-06  8:41   ` Javier Martinez Canillas
2013-12-09 12:06     ` Tomi Valkeinen
2013-12-09 12:16       ` Javier Martinez Canillas
2013-12-04 12:28 ` [PATCH 19/26] ARM: omap3-beagle-xm.dts: " Tomi Valkeinen
2013-12-04 12:28 ` [PATCH 20/26] OMAPDSS: panel-dsi-cm: Add DT support Tomi Valkeinen
2013-12-04 12:28 ` [PATCH 21/26] OMAPDSS: encoder-tfp410: " Tomi Valkeinen
2013-12-04 12:28 ` [PATCH 22/26] OMAPDSS: connector-dvi: " Tomi Valkeinen
2013-12-04 12:28 ` [PATCH 23/26] OMAPDSS: encoder-tpd12s015: " Tomi Valkeinen
2013-12-04 12:28 ` [PATCH 24/26] OMAPDSS: hdmi-connector: " Tomi Valkeinen
2013-12-04 12:28 ` [PATCH 25/26] OMAPDSS: panel-dpi: " Tomi Valkeinen
2013-12-04 12:28 ` [PATCH 26/26] OMAPDSS: connector-analog-tv: " Tomi Valkeinen
     [not found] ` <1386160133-24026-1-git-send-email-tomi.valkeinen-l0cyMroinI0@public.gmane.org>
2013-12-04 16:01   ` [PATCH 00/26] OMAPDSS: DT support (Christmas edition) Sebastian Reichel
2013-12-05  9:41     ` Tomi Valkeinen
2013-12-07  3:48 ` Javier Martinez Canillas [this message]
2013-12-07  4:28   ` Javier Martinez Canillas
2013-12-09 12:01     ` Tomi Valkeinen
2013-12-09 12:23       ` Javier Martinez Canillas
2013-12-12  0:39 ` Laurent Pinchart
2013-12-12  8:54   ` Tomi Valkeinen
2013-12-13  3:45     ` Laurent Pinchart
2013-12-13  8:16       ` Geert Uytterhoeven
2013-12-13 10:05       ` Tomi Valkeinen
2013-12-13 14:37         ` Laurent Pinchart
2013-12-13 15:47           ` Tomi Valkeinen
2013-12-13 17:22             ` Tony Lindgren
2013-12-14  7:34               ` Tomi Valkeinen
2013-12-14 14:09                 ` Tony Lindgren
2013-12-16  7:24                   ` Tomi Valkeinen
2013-12-18  0:30                     ` Tony Lindgren

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=52A29A82.106@collabora.co.uk \
    --to=javier.martinez@collabora.co.uk \
    --cc=archit@ti.com \
    --cc=detheridge@ti.com \
    --cc=devicetree@vger.kernel.org \
    --cc=hns@goldelico.com \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-fbdev@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=marek@goldelico.com \
    --cc=robertcnelson@gmail.com \
    --cc=sre@debian.org \
    --cc=stefan.roese@gmail.com \
    --cc=tomi.valkeinen@ti.com \
    --cc=tony@atomide.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).