From: Tomi Valkeinen <tomi.valkeinen@ti.com>
To: "Janorkar, Mayuresh" <mayur@ti.com>
Cc: "linux-omap@vger.kernel.org" <linux-omap@vger.kernel.org>,
"K, Mythri P" <mythripk@ti.com>
Subject: RE: [PATCH 3/7] OMAP: DSS: Adding a picodlp panel driver
Date: Tue, 26 Apr 2011 13:42:03 +0300 [thread overview]
Message-ID: <1303814523.4989.39.camel@deskari> (raw)
In-Reply-To: <EAF47CD23C76F840A9E7FCE10091EFAB033D8839E3@dbde02.ent.ti.com>
On Thu, 2011-04-21 at 16:36 +0530, Janorkar, Mayuresh wrote:
>
> > -----Original Message-----
> > From: Valkeinen, Tomi
> > Sent: Tuesday, April 19, 2011 4:40 PM
> > To: Janorkar, Mayuresh
> > Cc: linux-omap@vger.kernel.org; K, Mythri P
> > Subject: Re: [PATCH 3/7] OMAP: DSS: Adding a picodlp panel driver
> >
> > On Mon, 2011-04-18 at 11:45 +0530, Mayuresh Janorkar wrote:
> > > +static int picodlp_panel_power_on(struct omap_dss_device *dssdev)
> > > +{
> > > + int r;
> > > +
> > > + if (dssdev->platform_enable) {
> > > + r = dssdev->platform_enable(dssdev);
> > > + if (r)
> > > + return r;
> > > + }
> > > +
> > > + r = omapdss_dpi_display_enable(dssdev);
> > > + if (r) {
> > > + dev_err(&dssdev->dev, "failed to enable DPI\n");
> > > + goto err;
> > > + }
> > > + /* after enabling, wait for some initialize sync interrupts */
> > > + msleep(675);
> > > + dssdev->state = OMAP_DSS_DISPLAY_ACTIVE;
> > > +
> > > + return 0;
> > > +
> > > +err:
> > > + if (dssdev->platform_disable)
> > > + dssdev->platform_disable(dssdev);
> > > +
> > > + return r;
> > > +}
> >
> > Why is the msleep needed there? It's a huge sleep, and can't find
> > information about it from the documents you gave links to. I think I've
> > asked this three times already.
> >
>
> It is practically observed that without this delay the pico panel does not get initialized.
>
> > Also, it's rather strange to sleep at the end of the function. Normally
> > you would sleep between two actions.
>
> Some of the panels in drivers/video/omap2/displays sleep after dpi_display_enable.
Yes, but the drivers sleep between dpi_display_enable and
platform_enable. They don't sleep at the end of a function, they sleep
between two actions because the second action requires the first action
to be stabilized. More exactly, the panel needs to get the pixel clock
for a few frames to initialize itself, so that the image is stable when
the panel is taken out of reset.
> I agree here the sleep is huge. But I could not minimize it below this value.
> I can handle it in some other ways:
> See if the i2c_pakcet is sent. If not sent wait for some time ~50ms and then resend.
You need to find the documentation describing the power-up times to
understand what is required and where.
Most likely the case here is that picodlp takes rather long to wake up
after it's taken out of reset (i.e. platform_enabl. dpi_display_enable
probably doesn't have anything to do with this), and you need to wait
that time before sending i2c messages.
And if that is the case, you don't need to sleep after platform_enable
or dpi_display_enable, but before sending the first i2c message. And as
the sleep here is such a long sleep, I think it warrants some
optimization. If the sending of the i2c message happens in some other
function, you can store the timestamp at the time when the reset is
removed, and before sending the i2c message use the timestamp to sleep
enough to be sure the picodlp is up and running.
Tomi
next prev parent reply other threads:[~2011-04-26 10:42 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-18 6:15 [PATCH 0/7] picodlp projector driver Mayuresh Janorkar
2011-04-18 6:15 ` [PATCH 1/7] OMAP: DSS: Adding a header file for picodlp panel data Mayuresh Janorkar
2011-04-18 6:15 ` [PATCH 2/7] OMAP: DSS: Adding a picodlp panel header file Mayuresh Janorkar
2011-04-18 6:15 ` [PATCH 3/7] OMAP: DSS: Adding a picodlp panel driver Mayuresh Janorkar
2011-04-19 11:09 ` Tomi Valkeinen
2011-04-21 11:06 ` Janorkar, Mayuresh
2011-04-26 10:42 ` Tomi Valkeinen [this message]
2011-04-18 6:15 ` [PATCH 4/7] OMAP: DSS: Add i2c client driver for picodlp Mayuresh Janorkar
2011-04-19 11:26 ` Tomi Valkeinen
2011-04-19 11:42 ` Tomi Valkeinen
2011-04-21 11:08 ` Janorkar, Mayuresh
2011-04-18 6:15 ` [PATCH 5/7] OMAP: DSS: Adding initialization routine to picodlp panel Mayuresh Janorkar
2011-04-19 11:52 ` Tomi Valkeinen
2011-04-21 11:17 ` Janorkar, Mayuresh
2011-04-26 10:47 ` Tomi Valkeinen
2011-04-18 6:15 ` [PATCH 6/7] OMAP4: DSS: Adding a picodlp in OMAP4430 SDP board file Mayuresh Janorkar
2011-04-19 11:54 ` Tomi Valkeinen
2011-04-21 11:18 ` Janorkar, Mayuresh
2011-04-18 6:15 ` [PATCH 7/7] OMAP4: DSS: Adding picodlp panel entry in Kconfig and Makefile Mayuresh Janorkar
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=1303814523.4989.39.camel@deskari \
--to=tomi.valkeinen@ti.com \
--cc=linux-omap@vger.kernel.org \
--cc=mayur@ti.com \
--cc=mythripk@ti.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