From: Thierry Reding <thierry.reding@avionic-design.de>
To: Mark Zhang <markz@nvidia.com>
Cc: Dave Airlie <airlied@redhat.com>, Rob Clark <robdclark@gmail.com>,
"dri-devel@lists.freedesktop.org"
<dri-devel@lists.freedesktop.org>,
"linux-tegra@vger.kernel.org" <linux-tegra@vger.kernel.org>,
"devicetree-discuss@lists.ozlabs.org"
<devicetree-discuss@lists.ozlabs.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.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@avionic-0098.mockup.avionic-design.de>
[-- 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 --]
next prev 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
2012-11-12 21:55 ` [PATCH v2 1/2] drm: Add NVIDIA Tegra20 support Thierry Reding
2012-11-13 7:15 ` Mark Zhang
2012-11-13 7:48 ` Thierry Reding
2012-11-13 8:49 ` Mark Zhang
2012-11-13 9:37 ` Thierry Reding
2012-11-13 9:49 ` Mark Zhang
2012-11-13 9:54 ` Thierry Reding
2012-11-13 9:58 ` Mark Zhang
2012-11-13 17:40 ` Stephen Warren
2012-11-13 10:05 ` Thierry Reding [this message]
2012-11-13 17:37 ` Stephen Warren
2012-11-14 2:24 ` Mark Zhang
2012-11-13 9:45 ` Terje Bergström
2012-11-13 9:48 ` Thierry Reding
2012-11-12 21:55 ` [PATCH v2 2/2] drm: tegra: Add HDMI support Thierry Reding
2012-11-13 7:27 ` Mark Zhang
2012-11-13 0:17 ` [PATCH v2 0/2] NVIDIA Tegra DRM driver Stephen Warren
2012-11-13 6:47 ` Thierry Reding
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@avionic-design.de \
--cc=airlied@redhat.com \
--cc=devicetree-discuss@lists.ozlabs.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=markz@nvidia.com \
--cc=robdclark@gmail.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).