All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thierry Reding <thierry.reding-RM9K5IK7kjKj5M59NBduVrNAH6kLmebB@public.gmane.org>
To: Stephen Warren <swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
Cc: linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Olof Johansson <olof-nZhT3qVonbNeoWH0uzbU5w@public.gmane.org>,
	Colin Cross <ccross-z5hGa2qSFaRBDgjK7y7TUQ@public.gmane.org>,
	Jon Mayo <jmayo-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>,
	dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org,
	David Airlie <airlied-cv59FeDIM0c@public.gmane.org>,
	iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org,
	Joerg Roedel <joerg.roedel-5C7GfCeVMHo@public.gmane.org>,
	Hiroshi Doyu <hdoyu-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>,
	devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org
Subject: Re: [RFC 4/4] drm: Add NVIDIA Tegra support
Date: Sun, 15 Apr 2012 10:39:05 +0200	[thread overview]
Message-ID: <20120415083905.GA15207@avionic-0098.mockup.avionic-design.de> (raw)
In-Reply-To: <4F887C54.6030306-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>

[-- Attachment #1: Type: text/plain, Size: 4908 bytes --]

* Stephen Warren wrote:
> On 04/13/2012 03:14 AM, Thierry Reding wrote:
> > 		display-controllers = <&disp1 &disp2>;
> > 		outputs = <&lvds &hdmi &tvo &dsi>;
> 
> I don't think you need both the child nodes and those two properties.
> 
> In other words, I think you either want:
> 
> 	graphics@54000000 {
> 		... a bunch of child nodes
> 	};
> 
> or you want:
> 
> 	disp1 : dc@54200000 {
> 		...
> 	};
> 	disp2 : dc@54240000 {
> 		...
> 	};
> 	... all the other graphics nodes
> 
> 	graphics@54000000 {
> 		display-controllers = <&disp1 &disp2>;
> 		outputs = <&lvds &hdmi &tvo &dsi>;
> 	};
> 
> In the former case, presumably the drivers for the child nodes would
> make some API call into the parent node and just register themselves
> directly as a certain type of driver, so avoiding the
> display-controllers/outputs properties.

I think I like the former better. The way I understand it the children of the
graphics node will have to be registered explicitly by the DRM driver because
of_platform_populate() doesn't work recursively. That would ensure that the
DRM driver can setup the CRTC and output registries before the other devices
call back into the DRM to register themselves.

> > 		/* initial configuration */
> > 		configuration {
> > 			lvds {
> > 				display-controller = <&disp1>;
> > 				output = <&lvds>;
> > 			};
> > 
> > 			hdmi {
> > 				display-controller = <&disp2>;
> > 				output = <&hdmi>;
> > 			};
> > 		};
> > 	};
> > 
> > I added an additional node for the initial configuration so that the driver
> > knows which mapping to setup at boot.
> 
> Isn't that kind of thing usually set up by the video= KMS-related kernel
> command-line option? See Documentation/fb/modedb.txt. Again here, I
> think the actual display controllers would be allocated to whichever
> outputs get used on a first-come first-serve based, so no need for the
> display-controller property above either way.

Boards should still be able to boot and display a console on the "standard"
output even if the user doesn't provide a video= option. Shouldn't there be a
way for a board DTS to specify what the default (or even allowed) connections
are?

Evaluation hardware like the Harmony might have LVDS, HDMI and VGA connectors
to provide for a wide range of use cases. The Plutux for instance has only an
HDMI connector and the Medcom has only LVDS. For the Medcom it would be quite
confusing for people to suddenly see an HDMI-1 connector pop up f.e. in
xrandr. It would be equally useless for the Plutux to show up as supporting
an LVDS or VGA connector.

> > What I don't quite see yet is where to
> > attach EDID data or pass the phandle to the I2C controller for DDC/EDID
> > probing.
> 
> I think there's a third node type.
> 
> 1) Nodes for the display controllers in Tegra (Also known as CRTCs I
> believe)
> 
> 2) Nodes for the video outputs from the Tegra chips (what you have as
> outputs above)
> 
> 3) Connectors, which aren't represented in your DT above yet.
> 
> I think you need to add additional nodes for (3). These are where you'd
> represent all the EDID/I2C/... stuff. Then, the nodes for the outputs
> will point at the nodes for the connectors using phandles, or vice-versa.

I see. Maybe this could be used for board-specific configuration? For
example, the Plutux could have something like this:

	connectors {
		hdmi {
			output = <&hdmi>;
			ddc = <&i2c2>;
		};
	};

The Medcom could have:

	connectors {
		lvds {
			output = <&lvds>;
			edid = <&edid>;
		};
	};

While Harmony could be more generic and provide more outputs:

	connectors {
		lvds {
			output = <&lvds>;
			ddc = <&i2c1>;
		};

		vga {
			/* which output is used for VGA? */
			output = <...>;
			ddc = <&i2c2>;

		hdmi {
			output = <&hdmi>;
			ddc = <&i2c3>;
		};
	};

Has there been any discussion as to how EDID data would best be represented
in DT? Should it just be a binary blob or rather some textual representation?

> (IIRC, although I didn't look at them in detail, the sdrm patches
> recently mentioned something about splitting up the various object types
> in DRM and allowing them to be represented separately, and I vaguely
> recall something along the lines of the types I mention above. I might
> expect to have a 1:1 mapping between the DRM object types and DT nodes.)

I've looked at them in more detail and I'm not sure that they're very well
suited for the Tegra. I think they may be a bit too simple to support
advanced features that will be required for Tegra. For the current state it
may be enough, but people at NVIDIA and Nouveau seem to be eager to start
working on things like 2D acceleration and I wouldn't want to convert to SDRM
now just to convert it back when somebody needs a feature that can't be added
with SDRM.

Thierry

[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]

  parent reply	other threads:[~2012-04-15  8:39 UTC|newest]

Thread overview: 65+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-11 12:10 [RFC 0/4] Add NVIDIA Tegra DRM support Thierry Reding
     [not found] ` <1334146230-1795-1-git-send-email-thierry.reding-RM9K5IK7kjKj5M59NBduVrNAH6kLmebB@public.gmane.org>
2012-04-11 12:10   ` [RFC 1/4] iommu: tegra/gart: use correct gart_device Thierry Reding
2012-04-11 12:10   ` [RFC 2/4] iommu: tegra/gart: Add device tree support Thierry Reding
     [not found]     ` <1334146230-1795-3-git-send-email-thierry.reding-RM9K5IK7kjKj5M59NBduVrNAH6kLmebB@public.gmane.org>
2012-04-11 17:21       ` Stephen Warren
     [not found]         ` <4F85BD9D.7050409-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2012-04-12  6:51           ` Thierry Reding
2012-04-11 12:10   ` [RFC 3/4] drm: fixed: Add dfixed_frac() macro Thierry Reding
     [not found]     ` <1334146230-1795-4-git-send-email-thierry.reding-RM9K5IK7kjKj5M59NBduVrNAH6kLmebB@public.gmane.org>
2012-04-11 17:25       ` Stephen Warren
     [not found]         ` <4F85BE77.7090807-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2012-04-12  6:52           ` Thierry Reding
2012-04-11 12:10   ` [RFC 4/4] drm: Add NVIDIA Tegra support Thierry Reding
     [not found]     ` <1334146230-1795-5-git-send-email-thierry.reding-RM9K5IK7kjKj5M59NBduVrNAH6kLmebB@public.gmane.org>
2012-04-11 12:48       ` Daniel Vetter
     [not found]         ` <20120411124810.GK4296-dv86pmgwkMBes7Z6vYuT8azUEOm+Xw19@public.gmane.org>
2012-04-11 13:23           ` Thierry Reding
     [not found]             ` <20120411132326.GD27337-RM9K5IK7kjIyiCvfTdI0JKcOhU4Rzj621B7CTYaBSLdn68oJJulU0Q@public.gmane.org>
2012-04-11 13:35               ` Daniel Vetter
     [not found]                 ` <20120411133512.GL4296-dv86pmgwkMBes7Z6vYuT8azUEOm+Xw19@public.gmane.org>
2012-04-11 14:11                   ` Thierry Reding
     [not found]                     ` <20120411141108.GI27337-RM9K5IK7kjIyiCvfTdI0JKcOhU4Rzj621B7CTYaBSLdn68oJJulU0Q@public.gmane.org>
2012-04-11 14:34                       ` Daniel Vetter
     [not found]                         ` <20120411143456.GM4296-dv86pmgwkMBes7Z6vYuT8azUEOm+Xw19@public.gmane.org>
2012-04-11 14:43                           ` Alan Cox
     [not found]                             ` <20120411154309.1f04fb80-38n7/U1jhRXW96NNrWNlrekiAK3p4hvP@public.gmane.org>
2012-04-11 14:49                               ` Daniel Vetter
2012-04-11 15:00                           ` Thierry Reding
2012-04-11 14:52                       ` Alan Cox
     [not found]                         ` <20120411155237.24233afc-38n7/U1jhRXW96NNrWNlrekiAK3p4hvP@public.gmane.org>
2012-04-11 15:06                           ` Thierry Reding
     [not found]                             ` <20120411150603.GC20811-RM9K5IK7kjIyiCvfTdI0JKcOhU4Rzj621B7CTYaBSLdn68oJJulU0Q@public.gmane.org>
2012-04-11 15:11                               ` Alan Cox
2012-04-11 15:18                       ` Arnd Bergmann
     [not found]                         ` <201204111518.41968.arnd-r2nGTMty4D4@public.gmane.org>
2012-04-12  7:18                           ` Thierry Reding
     [not found]                             ` <20120412071816.GA18252-RM9K5IK7kjIQXX3q8xo1gnVAuStQJXxyR5q1nwbD4aMs9pC9oP6+/A@public.gmane.org>
2012-04-12  8:40                               ` Marek Szyprowski
     [not found]                                 ` <025f01cd1887$da56b6e0$8f0424a0$%szyprowski-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2012-04-12 11:18                                   ` Arnd Bergmann
     [not found]                                     ` <201204121118.19685.arnd-r2nGTMty4D4@public.gmane.org>
2012-04-12 13:30                                       ` Marek Szyprowski
     [not found]                                         ` <02aa01cd18b0$7b2586a0$717093e0$%szyprowski-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2012-04-12 13:34                                           ` Thierry Reding
2012-04-12 14:23                                       ` Daniel Vetter
2012-04-12 13:42                                   ` Thierry Reding
     [not found]                                     ` <20120412134216.GB15701-RM9K5IK7kjIyiCvfTdI0JKcOhU4Rzj621B7CTYaBSLdn68oJJulU0Q@public.gmane.org>
2012-04-12 14:20                                       ` Marek Szyprowski
2012-04-12 23:10                           ` Lucas Stach
     [not found]                             ` <CAPM=9tztW_xLkOQ1qGjJdaPat_c5ivKPhik5-K8nD58SmF1Qrg@mail.gmail.com>
     [not found]                               ` <1334347952.1625.12.camel@antimon>
2012-04-14 12:51                                 ` Lucas Stach
2012-04-12 18:56           ` Jon Mayo
2012-04-11 18:12       ` Stephen Warren
     [not found]         ` <4F85C97E.50203-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2012-04-12  6:50           ` Thierry Reding
     [not found]             ` <20120412065038.GB4162-RM9K5IK7kjIyiCvfTdI0JKcOhU4Rzj621B7CTYaBSLdn68oJJulU0Q@public.gmane.org>
2012-04-12 15:49               ` Stephen Warren
     [not found]                 ` <4F86F97C.8010508-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2012-04-12 17:44                   ` Thierry Reding
     [not found]                     ` <20120412174429.GB10042-RM9K5IK7kjIyiCvfTdI0JKcOhU4Rzj621B7CTYaBSLdn68oJJulU0Q@public.gmane.org>
2012-04-12 22:13                       ` Stephen Warren
     [not found]                         ` <4F8753A0.6040907-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2012-04-13  9:14                           ` Thierry Reding
     [not found]                             ` <20120413091457.GB617-RM9K5IK7kjIQXX3q8xo1gnVAuStQJXxyR5q1nwbD4aMs9pC9oP6+/A@public.gmane.org>
2012-04-13 19:19                               ` Stephen Warren
     [not found]                                 ` <4F887C54.6030306-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2012-04-15  8:39                                   ` Thierry Reding [this message]
     [not found]                                     ` <20120415083905.GA15207-RM9K5IK7kjIQXX3q8xo1gnVAuStQJXxyR5q1nwbD4aMs9pC9oP6+/A@public.gmane.org>
2012-04-16 16:00                                       ` Stephen Warren
     [not found]                                         ` <4F8C423B.8050609-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2012-04-16 18:48                                           ` Thierry Reding
     [not found]                                             ` <20120416184819.GA21043-RM9K5IK7kjIQXX3q8xo1gnVAuStQJXxyR5q1nwbD4aMs9pC9oP6+/A@public.gmane.org>
2012-04-16 18:57                                               ` Stephen Warren
     [not found]                                                 ` <4F8C6B80.4000001-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2012-04-16 19:03                                                   ` Thierry Reding
     [not found]                                                     ` <20120416190320.GA21233-RM9K5IK7kjIQXX3q8xo1gnVAuStQJXxyR5q1nwbD4aMs9pC9oP6+/A@public.gmane.org>
2012-04-16 20:37                                                       ` Stephen Warren
2012-04-12  9:21           ` Sascha Hauer
     [not found]             ` <20120412092106.GU3852-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2012-04-12  9:33               ` Thierry Reding
     [not found]                 ` <20120412093301.GB23336-RM9K5IK7kjIQXX3q8xo1gnVAuStQJXxyR5q1nwbD4aMs9pC9oP6+/A@public.gmane.org>
2012-04-12 13:16                   ` Alex Deucher
     [not found]                     ` <CADnq5_Oiez8zAHqFw-_qXk=3PnnEqgm3ir9M3KsWaQr-dLS5pw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-04-12 13:25                       ` Thierry Reding
     [not found]                         ` <20120412132531.GC5353-RM9K5IK7kjIyiCvfTdI0JKcOhU4Rzj621B7CTYaBSLdn68oJJulU0Q@public.gmane.org>
2012-04-12 14:09                           ` Alex Deucher
     [not found]                             ` <CADnq5_P-iGtCxtW+1Y2N34Q6WA5dUUC7ZxZNT29BXTAV0+VfpQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-04-12 14:12                               ` Alex Deucher
     [not found]                                 ` <CADnq5_OLaKPLktd8DkQvwrmZPpaQP4zA1a4+742mQCGvRXfD7g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-04-12 16:32                                   ` Thierry Reding
2012-04-11 12:25   ` [RFC 0/4] Add NVIDIA Tegra DRM support Alan Cox
     [not found]     ` <20120411132548.7d738b42-38n7/U1jhRXW96NNrWNlrekiAK3p4hvP@public.gmane.org>
2012-04-11 13:35       ` Thierry Reding
2012-04-11 12:46   ` Hiroshi Doyu
     [not found]     ` <20120411.154642.1389197434468515943.hdoyu-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2012-04-11 13:24       ` Thierry Reding
2012-04-19 17:35   ` Thierry Reding
     [not found]     ` <20120419173537.GA7692-RM9K5IK7kjIyiCvfTdI0JKcOhU4Rzj621B7CTYaBSLdn68oJJulU0Q@public.gmane.org>
2012-04-19 19:28       ` Dave Airlie
     [not found]         ` <CAPM=9tzK83yYS33eNruvFDwb62ycZxJMC31davVRN=yaZD53YA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-04-19 20:40           ` Thierry Reding
     [not found]             ` <20120419204016.GA8954-RM9K5IK7kjIQXX3q8xo1gnVAuStQJXxyR5q1nwbD4aMs9pC9oP6+/A@public.gmane.org>
2012-04-19 20:59               ` Jon Mayo
     [not found]                 ` <4F907CBB.4080705-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2012-04-20  5:02                   ` Thierry Reding
     [not found]                     ` <20120420050231.GA15313-RM9K5IK7kjIyiCvfTdI0JKcOhU4Rzj621B7CTYaBSLdn68oJJulU0Q@public.gmane.org>
2012-04-20  6:05                       ` Lucas Stach
2012-04-20 19:54                         ` Jon Mayo
2012-04-19 22:21               ` Jerome Glisse
     [not found]                 ` <CAH3drwZhTzuOVfybB_KBgk22csK47xXv5G4aMOuqPy+ibKd21A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-04-20  5:05                   ` Thierry Reding

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=20120415083905.GA15207@avionic-0098.mockup.avionic-design.de \
    --to=thierry.reding-rm9k5ik7kjkj5m59nbduvrnah6klmebb@public.gmane.org \
    --cc=airlied-cv59FeDIM0c@public.gmane.org \
    --cc=ccross-z5hGa2qSFaRBDgjK7y7TUQ@public.gmane.org \
    --cc=devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org \
    --cc=dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
    --cc=hdoyu-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org \
    --cc=iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org \
    --cc=jmayo-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org \
    --cc=joerg.roedel-5C7GfCeVMHo@public.gmane.org \
    --cc=linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=olof-nZhT3qVonbNeoWH0uzbU5w@public.gmane.org \
    --cc=swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.