linux-omap.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tomi Valkeinen <tomi.valkeinen@ti.com>
To: Rajendra Nayak <rnayak@ti.com>
Cc: Grazvydas Ignotas <notasas@gmail.com>,
	jaswinder.singh@linaro.org, mythripk@ti.com,
	linux-omap@vger.kernel.org, linux-fbdev@vger.kernel.org,
	andy.green@linaro.org, n-dechesne@ti.com
Subject: Re: [PATCH] OMAPDSS: Check if RPM enabled before trying to change state
Date: Mon, 25 Jun 2012 15:50:48 +0300	[thread overview]
Message-ID: <1340628648.3395.69.camel@deskari> (raw)
In-Reply-To: <4FE85CCA.80903@ti.com>

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

On Mon, 2012-06-25 at 18:12 +0530, Rajendra Nayak wrote:
> On Monday 25 June 2012 06:00 PM, Tomi Valkeinen wrote:
> > On Mon, 2012-06-25 at 15:05 +0300, Grazvydas Ignotas wrote:
> >> On Mon, Jun 25, 2012 at 9:20 AM, Tomi Valkeinen<tomi.valkeinen@ti.com>  wrote:
> >>> On Sat, 2012-06-23 at 13:36 +0530, jaswinder.singh@linaro.org wrote:
> >>>>
> >>>>   Currenlty HDMI fails to come up in the suspend-resume path.
> >>>> This patch helps that real-world scenario.
> >>>
> >>> What is the problem there? It'd be good to explain the problem in the
> >>> patch description. Does the pm_runtime_get return -EACCES?
> >>
> >> On slightly different but related issue, currently OMAPDSS always
> >> spits lots of backtraces when it's compiled without CONFIG_PM_RUNTIME,
> >> because pm_runtime_put* always return -ENOSYS without
> >> CONFIG_PM_RUNTIME. So something like this patch proposes is needed, or
> >> maybe WARN_ON should check for -ENOSYS, I don't know..
> >
> > Hmm. I guess I'm missing some understanding about runtime PM. omapdss
> > uses runtime PM to enable the underlying DSS hardware. If there's no
> > runtime PM, how does the driver work? Or is it the job of
> > hwmod/omap_device to keep all the hardware always enabled if runtime PM
> > is not compiled in?
> 
> Yes, the below trick keeps all hwmods always enabled post the initial
> setup if runtime PM is disabled.
> 
> from arch/arm/mach-omap2/io.c
> 
> static void __init omap_hwmod_init_postsetup(void)
> {
>          u8 postsetup_state;
> 
>          /* Set the default postsetup state for all hwmods */
> #ifdef CONFIG_PM_RUNTIME
>          postsetup_state = _HWMOD_STATE_IDLE;
> #else
>          postsetup_state = _HWMOD_STATE_ENABLED;
> #endif
>          omap_hwmod_for_each(_set_hwmod_postsetup_state, &postsetup_state);
> 
>          omap_pm_if_early_init();
> }

Ah, ok, thanks.

Do you know how the drivers should handle CONFIG_PM_RUNTIME=n?
Are they supposed to handle the error values returned by runtime PM
functions somehow, or should they use #ifdef CONFIG_PM_RUNTIME?

Both options sound a bit difficult to me... With the first one it's
difficult to see if there was an actual error and we should somehow
react to it, or is everything fine and we just shouldn't care about
runtime PM. The second one requires ifdefs in many places.

 Tomi


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

  reply	other threads:[~2012-06-25 12:50 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-23  8:06 [PATCH] OMAPDSS: Check if RPM enabled before trying to change state jaswinder.singh
2012-06-25  6:20 ` Tomi Valkeinen
2012-06-25  8:49   ` Jassi Brar
2012-06-25  9:30     ` Tomi Valkeinen
2012-06-25 12:27       ` Jassi Brar
2012-06-25 12:41         ` Tomi Valkeinen
2012-06-25 13:31           ` Jassi Brar
2012-06-25 13:49             ` Tomi Valkeinen
2012-06-25 17:06               ` Jassi Brar
2012-06-26  7:19                 ` Tomi Valkeinen
2012-06-26  8:32                   ` Jassi Brar
2012-06-26  8:40                     ` Andy Green
2012-06-26  9:07                     ` Tomi Valkeinen
2012-06-26  9:57                       ` Jassi Brar
2012-06-26 12:03                         ` Tomi Valkeinen
2012-06-26 14:49                           ` Jassi Brar
2012-06-26 15:08                             ` Tomi Valkeinen
2012-06-26 15:09                               ` Jassi Brar
2012-06-26 15:11                                 ` Tomi Valkeinen
2012-06-26 17:01                                   ` Jassi Brar
2012-06-26 18:44                                     ` Tomi Valkeinen
2012-06-27  4:42                                       ` Jassi Brar
2012-06-27  5:58                                         ` Tomi Valkeinen
2012-06-27  7:41                                           ` Jassi Brar
2012-06-27  8:13                                             ` Tomi Valkeinen
2012-06-27 14:53                                               ` Jassi Brar
2012-06-28  6:41                                                 ` Tomi Valkeinen
2012-06-28  7:46                                                   ` Jassi Brar
2012-06-28  7:58                                                     ` Tomi Valkeinen
2012-06-25 12:05   ` Grazvydas Ignotas
2012-06-25 12:30     ` Tomi Valkeinen
2012-06-25 12:42       ` Rajendra Nayak
2012-06-25 12:50         ` Tomi Valkeinen [this message]
2012-06-26  4:51           ` Rajendra Nayak
2012-06-26 13:02             ` Grazvydas Ignotas
2012-06-26 14:34               ` Alan Stern
2012-06-26 15:01                 ` Tomi Valkeinen
2012-06-26 15:11                   ` Alan Stern
2012-06-25 12:33     ` Jassi Brar

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=1340628648.3395.69.camel@deskari \
    --to=tomi.valkeinen@ti.com \
    --cc=andy.green@linaro.org \
    --cc=jaswinder.singh@linaro.org \
    --cc=linux-fbdev@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=mythripk@ti.com \
    --cc=n-dechesne@ti.com \
    --cc=notasas@gmail.com \
    --cc=rnayak@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;
as well as URLs for NNTP newsgroup(s).