linux-tegra.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Thierry Reding <thierry.reding-RM9K5IK7kjKj5M59NBduVrNAH6kLmebB@public.gmane.org>
To: Mark Zhang <markz-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
Cc: Dave Airlie <airlied-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
	Rob Clark <robdclark-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	"dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org"
	<dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org>,
	"linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	"devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org"
	<devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org>,
	"linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: [PATCH v2 1/2] drm: Add NVIDIA Tegra20 support
Date: Tue, 13 Nov 2012 11:05:27 +0100	[thread overview]
Message-ID: <20121113100527.GB982@avionic-0098.mockup.avionic-design.de> (raw)
In-Reply-To: <20121113074822.GA8409-RM9K5IK7kjIQXX3q8xo1gnVAuStQJXxyR5q1nwbD4aMs9pC9oP6+/A@public.gmane.org>

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

On Tue, Nov 13, 2012 at 08:48:22AM +0100, Thierry Reding wrote:
> On Tue, Nov 13, 2012 at 03:15:47PM +0800, Mark Zhang wrote:
> > On 11/13/2012 05:55 AM, Thierry Reding wrote:
[...]
> > > +int tegra_output_init(struct drm_device *drm, struct tegra_output *output)
> > > +{
> > > +       int connector, encoder, err;
> > > +       enum of_gpio_flags flags;
> > > +       struct device_node *ddc;
> > > +       size_t size;
> > > +
> > > +       if (!output->of_node)
> > > +               output->of_node = output->dev->of_node;
> > > +
> > > +       output->edid = of_get_property(output->of_node, "nvidia,edid", &size);
> > > +
> > > +       ddc = of_parse_phandle(output->of_node, "nvidia,ddc-i2c-bus", 0);
> > > +       if (ddc) {
> > > +               output->ddc = of_find_i2c_adapter_by_node(ddc);
> > 
> > The i2c adapter may not be ready at this time. For Tegra 2, the I2C bus
> > for HDMI is not dedicated and we need the i2cmux driver loaded before
> > this i2c can be used. It proved that sometimes i2cmux driver loads after
> > drm driver.
> > 
> > So we need to add some logics to support driver probe deferral here.
> > Anyway, I'm just want you know about this and we can improve this later.
> 
> Good point. Unfortunately tegra_output_init() isn't always used from
> within .probe(), so it isn't quite easy to handle deferred probe here.
> I'll have to take a look at how to solve this properly.

After a closer look at this I think what should be done here is split up
tegra_output_init() into a tegra_output_parse() that does the DT parsing
and tegra_output_init() that actually initializes the output.

I'll try to implement something like that for the next version.

Thierry

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

  parent reply	other threads:[~2012-11-13 10:05 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-12 21:55 [PATCH v2 0/2] NVIDIA Tegra DRM driver Thierry Reding
     [not found] ` <1352757358-14001-1-git-send-email-thierry.reding-RM9K5IK7kjKj5M59NBduVrNAH6kLmebB@public.gmane.org>
2012-11-12 21:55   ` [PATCH v2 1/2] drm: Add NVIDIA Tegra20 support Thierry Reding
     [not found]     ` <1352757358-14001-2-git-send-email-thierry.reding-RM9K5IK7kjKj5M59NBduVrNAH6kLmebB@public.gmane.org>
2012-11-13  7:15       ` Mark Zhang
2012-11-13  7:48         ` Thierry Reding
2012-11-13  8:49           ` Mark Zhang
     [not found]             ` <50A20994.9000305-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2012-11-13  9:37               ` Thierry Reding
     [not found]                 ` <20121113093725.GB8122-RM9K5IK7kjIQXX3q8xo1gnVAuStQJXxyR5q1nwbD4aMs9pC9oP6+/A@public.gmane.org>
2012-11-13  9:49                   ` Mark Zhang
     [not found]                     ` <50A217A8.2000600-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2012-11-13  9:54                       ` Thierry Reding
     [not found]                         ` <20121113095424.GA982-RM9K5IK7kjIQXX3q8xo1gnVAuStQJXxyR5q1nwbD4aMs9pC9oP6+/A@public.gmane.org>
2012-11-13  9:58                           ` Mark Zhang
2012-11-13 17:40                   ` Stephen Warren
     [not found]           ` <20121113074822.GA8409-RM9K5IK7kjIQXX3q8xo1gnVAuStQJXxyR5q1nwbD4aMs9pC9oP6+/A@public.gmane.org>
2012-11-13 10:05             ` Thierry Reding [this message]
     [not found]         ` <50A1F3A3.40905-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2012-11-13 17:37           ` Stephen Warren
     [not found]             ` <50A28542.8020406-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2012-11-14  2:24               ` Mark Zhang
2012-11-13  9:45       ` Terje Bergström
     [not found]         ` <50A216D3.1070604-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2012-11-13  9:48           ` Thierry Reding
2012-11-12 21:55   ` [PATCH v2 2/2] drm: tegra: Add HDMI support Thierry Reding
     [not found]     ` <1352757358-14001-3-git-send-email-thierry.reding-RM9K5IK7kjKj5M59NBduVrNAH6kLmebB@public.gmane.org>
2012-11-13  7:27       ` Mark Zhang
2012-11-13  0:17   ` [PATCH v2 0/2] NVIDIA Tegra DRM driver Stephen Warren
     [not found]     ` <50A1918E.1000809-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2012-11-13  6:47       ` Thierry Reding
     [not found]         ` <20121113064748.GB31443-RM9K5IK7kjIQXX3q8xo1gnVAuStQJXxyR5q1nwbD4aMs9pC9oP6+/A@public.gmane.org>
2012-11-13 17:43           ` Stephen Warren

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=20121113100527.GB982@avionic-0098.mockup.avionic-design.de \
    --to=thierry.reding-rm9k5ik7kjkj5m59nbduvrnah6klmebb@public.gmane.org \
    --cc=airlied-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org \
    --cc=dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=markz-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org \
    --cc=robdclark-Re5JQEeQqe8AvxtiuMwx3w@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 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).