All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tomi Valkeinen <tomi.valkeinen@ti.com>
To: Kevin Hilman <khilman@ti.com>
Cc: Joe Woodward <jw@terrafix.co.uk>,
	linux-omap@vger.kernel.org, Archit Taneja <archit@ti.com>
Subject: Re: DSS2/PM on 3.2 broken?
Date: Mon, 16 Jan 2012 13:11:48 +0200	[thread overview]
Message-ID: <1326712308.1875.18.camel@deskari> (raw)
In-Reply-To: <87zkdrpfha.fsf@ti.com>

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

On Fri, 2012-01-13 at 11:30 -0800, Kevin Hilman wrote:
> Tomi Valkeinen <tomi.valkeinen@ti.com> writes:

> > pm_runtime_put() is called inside omapdss driver's .suspend callback. So
> > I guess that means the system suspend has started. However, the logs
> > show that the runtime_suspend callback _is_ being called before the
> > system suspend is finished, so the workqueue can't be frozen...
> 
> ...or there are other ways that the runtime_suspend callback is called.
> 
> In order to ensure that devices are properly idled for system-wide
> suspend, The OMAP PM domain layer will call the drivers
> ->runtime_suspend callback during "late" suspend (using the PM domain's
> _noirq callbacks.)
> 
> This is there so that even when runtime PM has been disabled (via
> userspace, or pm_runtime_forbid() calls) the driver can still be
> properly idled before suspend.
> 
> In your case, I suspect you're seeing the driver's ->runtime_suspend
> callback called during late suspend, not by the PM workqueue.

Ok, that explains the invocation of the callbacks.

> I don't understand DSS enough to make sense of the logs you sent, so not
> sure how to be of more help.

Well, I think I can summarize the situation:

Normally, when the user wants to turn a display off, the panel drivers
call DSS functions to disable the corresponding output, leading to
pm_runtime_put() calls.

In system suspend case, the suspend callback initiates the turning off
of the displays, which again leads to pm_runtime_put() calls.

Now, you already said using pm_runtime_put_sync version is the correct
way when suspending. But to use that I need to either always use
pm_runtime_put_sync, or add an extra boolean which marks that we're
suspending, and pass that around, or make it a DSS global variable.

Both of those options sound a bit ugly to me. So my two questions are,

1) Is there something funny with the DSS architecture to have a problem
like this? I tried to grep around, but I didn't see any other driver
doing something like that (but I could've missed it).

2) why can't the PM framework handle this, by directing the
pm_runtime_put calls to the _sync version when suspending. Somehow it
feels strange to me that the driver needs to care about that.

 Tomi


[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

  reply	other threads:[~2012-01-16 11:11 UTC|newest]

Thread overview: 64+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-09 12:46 DSS2/PM on 3.2 broken? Joe Woodward
2012-01-09 21:08 ` NeilBrown
2012-01-10  9:58   ` Joe Woodward
2012-01-11 13:43   ` Paul Walmsley
2012-01-11 14:22     ` Archit
2012-01-11 15:15       ` Joe Woodward
2012-01-11 15:52         ` Archit
2012-01-11 16:13           ` Joe Woodward
2012-01-11 16:54             ` Archit
2012-01-12  9:28         ` Tomi Valkeinen
2012-01-12  9:30           ` Tomi Valkeinen
2012-01-12  9:51           ` Tomi Valkeinen
2012-01-11 22:59     ` NeilBrown
2012-01-13 10:05       ` Paul Walmsley
2012-01-13 11:20         ` NeilBrown
2012-01-13 11:31           ` Paul Walmsley
2012-01-13 23:09             ` NeilBrown
2012-01-13 23:35               ` Paul Walmsley
2012-01-17 21:24               ` NeilBrown
2012-01-22  0:07                 ` Paul Walmsley
2012-01-22 11:30                   ` NeilBrown
2012-01-24 10:37                   ` OMAP HDQ: was " NeilBrown
2012-01-26 14:19                     ` Paul Walmsley
2012-01-27 22:35                       ` NeilBrown
2012-01-27 22:58                         ` Paul Walmsley
2012-01-28  0:40                           ` NeilBrown
2012-01-28  6:02                             ` Paul Walmsley
2012-02-01  7:51                               ` NeilBrown
2012-02-01 18:36                                 ` Paul Walmsley
2012-01-18  7:13           ` Tomi Valkeinen
2012-01-18 11:15             ` NeilBrown
2012-01-18 11:42               ` Tomi Valkeinen
2012-01-18 20:30                 ` NeilBrown
2012-01-19 10:17                   ` Joe Woodward
2012-01-19 10:40                     ` Tomi Valkeinen
2012-01-19 11:29                       ` Joe Woodward
2012-01-19 11:36                         ` Tomi Valkeinen
2012-01-19 12:21                           ` Joe Woodward
2012-01-19 14:52                             ` Tomi Valkeinen
2012-01-19 19:37                             ` Kevin Hilman
2012-01-19 21:05                               ` NeilBrown
2012-01-20  0:22                                 ` Kevin Hilman
2012-01-21 12:12                                   ` NeilBrown
2012-01-23 22:11                                     ` Kevin Hilman
2012-01-25  0:32                                       ` NeilBrown
2012-01-13 11:34         ` Govindraj
2012-01-13 13:23           ` Paul Walmsley
2012-01-13 19:21         ` Kevin Hilman
2012-01-13 22:37           ` Kevin Hilman
2012-01-13 23:06             ` Paul Walmsley
2012-01-13 23:34               ` Paul Walmsley
2012-01-14  1:17                 ` NeilBrown
2012-01-14  1:28                   ` Paul Walmsley
2012-01-13 23:39               ` Paul Walmsley
2012-01-13 11:19       ` Paul Walmsley
2012-01-11 13:32 ` Paul Walmsley
2012-01-12 16:42 ` Tomi Valkeinen
2012-01-12 22:40   ` Kevin Hilman
2012-01-13  5:29     ` Tomi Valkeinen
2012-01-13 19:30       ` Kevin Hilman
2012-01-16 11:11         ` Tomi Valkeinen [this message]
2012-01-19 19:24           ` Kevin Hilman
2012-01-20  7:16             ` Tomi Valkeinen
2012-01-20 18:06               ` 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=1326712308.1875.18.camel@deskari \
    --to=tomi.valkeinen@ti.com \
    --cc=archit@ti.com \
    --cc=jw@terrafix.co.uk \
    --cc=khilman@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.