linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tomi Valkeinen <tomi.valkeinen@ti.com>
To: Alan Stern <stern@rowland.harvard.edu>, Jyri Sarha <jsarha@ti.com>
Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>,
	linux-pm@vger.kernel.org, pavel@ucw.cz, t-kristo@ti.com
Subject: Re: [PATCH RFC] PM / Runtime: Better support for nested irq_safe drivers
Date: Wed, 3 Dec 2014 17:53:52 +0200	[thread overview]
Message-ID: <547F3210.2010604@ti.com> (raw)
In-Reply-To: <Pine.LNX.4.44L0.1412031018300.1538-100000@iolanthe.rowland.org>

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

On 03/12/14 17:22, Alan Stern wrote:
> On Tue, 2 Dec 2014, Jyri Sarha wrote:
> 
>> Is there something seriously wrong with the code part too? Or is this 
>> just a matter of updating the comment (sorry that I missed that)?
>>
>> If the thing I am doing somehow fundamentally flawed, I 	apologize. 
>> However, this was an RFC patch after all and the problem I am trying to 
>> solve is real.
> 
> What exactly _is_ the problem you are trying to solve?
> 
> When I first wrote the irq_safe stuff, I considered doing something 
> like what you want.  But there was no demand for it at the time, and 
> leaving it out seemed simpler and safer.
> 
> However, if you have a genuine use case then I don't object to allowing
> parents of irq-safe devices to enter runtime suspend, provided the
> parents are also irq-safe.

OMAP Display subsystem hardware has one main module (dss) and multiple
submodules (dispc being the important one here). The submodules require
the main module to be enabled and configured to work. These are modeled
as a dss parent platform device, and a number of child platform devices.

The DRM driver for OMAP (omapdrm uses the dispc device, and uses runtime
PM to control dispc's power state. Unfortunately on some cases omapdrm
wants to access the hardware from atomic context, and needs to enable
the dispc first.

omapdrm could be changed not to touch the hardware from atomic context,
but that is a big change, requiring rewrite of its core logic. I hope we
get that done some day, as it would be a performance boost also. But as
for today, omapdrm will crash in some cases when it happens to call
runtime_get from atomic context.

So... If what's proposed in this patch is messy and risky, I think we
should skip it and try to change omapdrm as soon as we manage to. If so,
I'd still be interested to hear what problems this might cause, as we're
planning to apply it to our internal tree to fix the issue with omapdrm.

But as the functionality in this patch sounded sane and something which
could be usable for others also, we wanted to try this approach.

 Tomi



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

  reply	other threads:[~2014-12-03 15:54 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-02 20:19 [PATCH RFC] PM / Runtime: Better support for nested irq_safe drivers Jyri Sarha
2014-12-02 21:54 ` Rafael J. Wysocki
2014-12-02 21:46   ` Jyri Sarha
2014-12-02 23:11     ` Rafael J. Wysocki
2014-12-03  7:45       ` Tomi Valkeinen
2014-12-03 23:27         ` Rafael J. Wysocki
2014-12-03 15:22     ` Alan Stern
2014-12-03 15:53       ` Tomi Valkeinen [this message]
2014-12-03 18:12         ` Alan Stern
2014-12-03 23:11         ` Rafael J. Wysocki
2014-12-04 11:58           ` Jyri Sarha
2014-12-04 11:59 ` [PATCH RFC v2] " Jyri Sarha

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=547F3210.2010604@ti.com \
    --to=tomi.valkeinen@ti.com \
    --cc=jsarha@ti.com \
    --cc=linux-pm@vger.kernel.org \
    --cc=pavel@ucw.cz \
    --cc=rjw@rjwysocki.net \
    --cc=stern@rowland.harvard.edu \
    --cc=t-kristo@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).