public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
From: Tomi Valkeinen <tomi.valkeinen@nokia.com>
To: "ext Christensen, Mikkel" <mlc@ti.com>
Cc: "linux-omap@vger.kernel.org" <linux-omap@vger.kernel.org>
Subject: RE: [PATCH 1/1] OMAP: DSS2: RFBI driver update
Date: Mon, 12 Oct 2009 17:17:27 +0300	[thread overview]
Message-ID: <1255357047.27268.4.camel@tubuntu> (raw)
In-Reply-To: <E49DAF743FB3E9469ED423C0D3DB5F1CCEF3F692@dnce01.ent.ti.com>

On Mon, 2009-10-12 at 16:03 +0200, ext Christensen, Mikkel wrote:
> On Mon, Oct 12, 2009 at 03:25:27, Tomi Valkeinen wrote:
> > Subject: Re: [PATCH 1/1] OMAP: DSS2: RFBI driver update
> > 
> > On Fri, 2009-10-09 at 23:08 +0200, ext Mikkel Christensen wrote:
> > > This patch adds suspend / resume functionality to the RFBI
> > driver along with missing callback functions needed by OMAP Frame 
> > buffer.
> > > 
> > > Signed-off-by: Mikkel Christensen <mlc@ti.com>
> > > ---
> > >  drivers/video/omap2/dss/rfbi.c |   76 
> > ++++++++++++++++++++++++++++++++++++++++
> > >  1 files changed, 76 insertions(+), 0 deletions(-)
> > > 

snip

> > > +static int rfbi_display_suspend(struct omap_dss_device *dssdev) {
> > > +	unsigned long l;
> > > +
> > > +	if (dssdev->state != OMAP_DSS_DISPLAY_ACTIVE)
> > > +		return -EINVAL;
> > > +
> > > +	DSSDBG("rfbi_display_suspend\n");
> > > +
> > > +	if (dssdev->driver->suspend)
> > > +		dssdev->driver->suspend(dssdev);
> > > +
> > > +	dispc_enable_lcd_out(0);
> > 
> > I don't think this is needed. DSS hardware disables lcd_out when the 
> > transfer has finished. Although for correct operation suspend() should 
> > wait until the last transfer has been done before disabling clocks, 
> > which is something it currently doesn't.
> 
> This was done with reference to the DPI and SDI files that do the same thing. It can be removed if not necessary.  

DPI and SDI work quite differently than RFBI, you can't just copy their
functionality =).

It is more correct without disable/enable_lcd_out, but it's not correct
as there may be a transfer ongoing when suspend call comes. That's why
there should be some mechanism to wait until the transfer has been done.
DSI tries to do this (and hopefully correctly does =).

> 
> > > +
> > > +	/* Force idle */
> > > +	rfbi_enable_clocks(1);
> > > +	l = rfbi_read_reg(RFBI_SYSCONFIG);
> > > +	l &= ~(0x03 << 3);
> > > +	rfbi_write_reg(RFBI_SYSCONFIG, l);
> > > +	rfbi_enable_clocks(0);
> > 
> > Why force idle?
> 
> The RFBI module must be forced to idle on suspend to allow for the DSS module to idle.  The CM_CLKSTST_DSS[CLKACTIVITY_DSS] bit does not change if the RFBI module was configured to autoidle, preventing DSS from entering retention or off.

Why must it? Is there a hardware bug (what errata number?)?

 Tomi



  reply	other threads:[~2009-10-12 14:19 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-09 21:08 [PATCH 1/1] OMAP: DSS2: RFBI driver update Mikkel Christensen
2009-10-12  8:25 ` Tomi Valkeinen
2009-10-12 14:03   ` Christensen, Mikkel
2009-10-12 14:17     ` Tomi Valkeinen [this message]
2009-10-12 15:25       ` Christensen, Mikkel
2009-10-13  7:56         ` Tomi Valkeinen
2009-10-13 18:38 ` Kevin Hilman

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=1255357047.27268.4.camel@tubuntu \
    --to=tomi.valkeinen@nokia.com \
    --cc=linux-omap@vger.kernel.org \
    --cc=mlc@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