All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tomi Valkeinen <tomi.valkeinen@nokia.com>
To: "ext Hiremath, Vaibhav" <hvaibhav@ti.com>
Cc: "linux-omap@vger.kernel.org" <linux-omap@vger.kernel.org>
Subject: RE: Suspend/Resume support with Omap2fb
Date: Fri, 13 Mar 2009 10:30:59 +0200	[thread overview]
Message-ID: <1236933059.7055.14.camel@tubuntu> (raw)
In-Reply-To: <19F8576C6E063C45BE387C64729E73940427C51EBA@dbde02.ent.ti.com>

Hi,

On Thu, 2009-03-12 at 19:26 +0100, ext Hiremath, Vaibhav wrote:
> Hi,
> 
> Finally I could able to find the root-cause, actually some of the previous observations miss-led me to dig into power management, suspend/resume path and clock structure. But after bit debugging and with the help of Sanjeev, we got the rid of it.
> 
> The issue is with DSS2 library, inside function "dpi_display_suspend". It calls dispc_enable_lcd_out(0), but doesn't wait till the frame-done interrupt. And due to this I was getting some abrupt behavior in suspend/resume path. 
> Actually in the beginning I overlooked legacy frame-buffer driver, which handles this scenario perfectly.

dispc_enable_lcd_out(0) waits for FRAMEDONE. Please use the latest DSS2
version from my git repository =).

 Tomi

>  
> For Display sub-system we have 2 interface clocks coming, L3_ICLK and L4_ICLK. Out of these, L4_ICLK goes to Display register access and L3_ICLK goes to DMA register. In our suspend call we are disabling clocks for L3_ICLK (we don't control L4_ICLK), and due to this L4_ICLK stays attached with GFX. You will only be able to find out this by looking to CM_CLKSTST_DSS.CLKACTIVITY_DSS, which is set 1 and indicates some interface clock is still active in DSS domain.
> 
> Below is the patch which will explain the change 
> 
> 
> +#include <linux/completion.h>
> +#include <linux/jiffies.h>
> 
> +static void dpi_display_isr(void *arg, unsigned int irqstatus)
> +{
> +       struct omap_display *display = (struct omap_display *)arg;
> +
> +       complete(&display->frame_done);
> +}
> 
> static int dpi_display_suspend(struct omap_display *display)
>  {
> +       void *handle = NULL;
> +
>         if (display->state != OMAP_DSS_DISPLAY_ACTIVE)
>                 return -EINVAL;
> 
>         if (display->panel->suspend)
>                 display->panel->suspend(display);
> 
> +       /*
> +        * Wait for frame done interrupt
> +        */
> +       handle = omap_dispc_register_isr(dpi_display_isr, display,
> +                       DISPC_IRQ_FRAMEDONE);
> +       if (!handle)
> +               return -EINVAL;
> +
> +       init_completion(&display->frame_done);
> +
>         dispc_enable_lcd_out(0);
> +       if (!wait_for_completion_timeout(&display->frame_done,
> +                               msecs_to_jiffies(500))) {
> +               printk("timeout waiting for FRAME DONE\n");
> +       }
> 
> Still I need to test this thoroughly, I may hit some another issue (Already I am seeing some crashes also when off state is enabled). I will create consolidated patch for this and will submit to list.
> 
> Thanks,
> Vaibhav Hiremath


  reply	other threads:[~2009-03-13  8:31 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-12 18:26 Suspend/Resume support with Omap2fb Hiremath, Vaibhav
2009-03-13  8:30 ` Tomi Valkeinen [this message]
2009-03-13  9:10   ` Hiremath, Vaibhav
2009-03-13  9:13     ` Tomi Valkeinen
2009-03-13  9:17       ` Hiremath, Vaibhav
2009-03-13  9:26         ` Tomi Valkeinen
  -- strict thread matches above, loose matches on Subject: below --
2009-03-11  6:55 Hiremath, Vaibhav
2009-03-11  7:53 ` Tomi Valkeinen
2009-03-11  8:46   ` Hiremath, Vaibhav
2009-03-11  9:31     ` Tomi Valkeinen
2009-03-11 10:47       ` Hiremath, Vaibhav
2009-03-11 12:49         ` Tomi Valkeinen
2009-03-11 18:08           ` Hiremath, Vaibhav

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