All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tomi Valkeinen <tomi.valkeinen@ti.com>
To: Jassi Brar <jaswinder.singh@linaro.org>
Cc: 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: Tue, 26 Jun 2012 18:44:03 +0000	[thread overview]
Message-ID: <1340736243.24530.98.camel@deskari> (raw)
In-Reply-To: <CAJe_ZheXSquxOtOD9iPyQjZ-jxWKzVGZHYkjM=wC37qgMZeJug@mail.gmail.com>

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

On Tue, 2012-06-26 at 22:31 +0530, Jassi Brar wrote:

> While I think your patch is simpler and achieve the same, I also think
> your fears about this patch are unfounded.

Perhaps. But I do get a bad feeling from your patch, and I don't like
when that happens =). What I fear with changes like you made is that
they'll hide problems that should be fixed in other ways.

And I think that was the case here also. I think we should not call
dispc_runtime_get() during suspend. If pm_runtime_get returns -EACCES,
we do have a possible problem, and we should not silently ignore it.

> A quick snack for thought...
> >
> > But if pm_runtime_get_sync() returns an error, it means the HW has not
> > been resumed successfully, and is not operational,
> >
> Not always. The HW could be in RPM_ACTIVE state while PM on it could
> be disabled, if the returned error is -EACCESS.   And
> pm_runtime_enabled() only catches a potential -EACCESS.

True. But the HW could also be in disabled state. And that would lead to
a crash when accessing the registers.

It is not a fatal error if pm_runtime_get returns -EACCES, but we sure
shouldn't ignore it (or avoid it with pm_runtime_enabled()), but handle
it. In some rare cases it could be ok to get -EACCES, but that's a
special case, not standard.

> BTW, I just tested your patch and it worked for me as well. But as
> suspected, it doesn't help the stack spew of CONFIG_PM_RUNTIME:=n
> 
> So I understand, I only need to resend the other three patches ?

Yes, please.

 Tomi


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

WARNING: multiple messages have this Message-ID (diff)
From: Tomi Valkeinen <tomi.valkeinen@ti.com>
To: Jassi Brar <jaswinder.singh@linaro.org>
Cc: 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: Tue, 26 Jun 2012 21:44:03 +0300	[thread overview]
Message-ID: <1340736243.24530.98.camel@deskari> (raw)
In-Reply-To: <CAJe_ZheXSquxOtOD9iPyQjZ-jxWKzVGZHYkjM=wC37qgMZeJug@mail.gmail.com>

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

On Tue, 2012-06-26 at 22:31 +0530, Jassi Brar wrote:

> While I think your patch is simpler and achieve the same, I also think
> your fears about this patch are unfounded.

Perhaps. But I do get a bad feeling from your patch, and I don't like
when that happens =). What I fear with changes like you made is that
they'll hide problems that should be fixed in other ways.

And I think that was the case here also. I think we should not call
dispc_runtime_get() during suspend. If pm_runtime_get returns -EACCES,
we do have a possible problem, and we should not silently ignore it.

> A quick snack for thought...
> >
> > But if pm_runtime_get_sync() returns an error, it means the HW has not
> > been resumed successfully, and is not operational,
> >
> Not always. The HW could be in RPM_ACTIVE state while PM on it could
> be disabled, if the returned error is -EACCESS.   And
> pm_runtime_enabled() only catches a potential -EACCESS.

True. But the HW could also be in disabled state. And that would lead to
a crash when accessing the registers.

It is not a fatal error if pm_runtime_get returns -EACCES, but we sure
shouldn't ignore it (or avoid it with pm_runtime_enabled()), but handle
it. In some rare cases it could be ok to get -EACCES, but that's a
special case, not standard.

> BTW, I just tested your patch and it worked for me as well. But as
> suspected, it doesn't help the stack spew of CONFIG_PM_RUNTIME:=n
> 
> So I understand, I only need to resend the other three patches ?

Yes, please.

 Tomi


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

  reply	other threads:[~2012-06-26 18:44 UTC|newest]

Thread overview: 78+ 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-23  8:18 ` jaswinder.singh
2012-06-25  6:20 ` Tomi Valkeinen
2012-06-25  6:20   ` Tomi Valkeinen
2012-06-25  8:49   ` Jassi Brar
2012-06-25  8:53     ` Jassi Brar
2012-06-25  9:30     ` Tomi Valkeinen
2012-06-25  9:30       ` Tomi Valkeinen
2012-06-25 12:27       ` Jassi Brar
2012-06-25 12:39         ` Jassi Brar
2012-06-25 12:41         ` Tomi Valkeinen
2012-06-25 12:41           ` Tomi Valkeinen
2012-06-25 13:31           ` Jassi Brar
2012-06-25 13:43             ` Jassi Brar
2012-06-25 13:49             ` Tomi Valkeinen
2012-06-25 13:49               ` Tomi Valkeinen
2012-06-25 17:06               ` Jassi Brar
2012-06-25 17:18                 ` Jassi Brar
2012-06-26  7:19                 ` Tomi Valkeinen
2012-06-26  7:19                   ` Tomi Valkeinen
2012-06-26  8:32                   ` Jassi Brar
2012-06-26  8:44                     ` Jassi Brar
2012-06-26  8:40                     ` Andy Green
2012-06-26  8:40                       ` Andy Green
2012-06-26  9:07                     ` Tomi Valkeinen
2012-06-26  9:07                       ` Tomi Valkeinen
2012-06-26  9:57                       ` Jassi Brar
2012-06-26 10:09                         ` Jassi Brar
2012-06-26 12:03                         ` Tomi Valkeinen
2012-06-26 12:03                           ` Tomi Valkeinen
2012-06-26 14:49                           ` Jassi Brar
2012-06-26 14:52                             ` Jassi Brar
2012-06-26 15:08                             ` Tomi Valkeinen
2012-06-26 15:08                               ` Tomi Valkeinen
2012-06-26 15:09                               ` Jassi Brar
2012-06-26 15:21                                 ` Jassi Brar
2012-06-26 15:11                                 ` Tomi Valkeinen
2012-06-26 15:11                                   ` Tomi Valkeinen
2012-06-26 17:01                                   ` Jassi Brar
2012-06-26 17:13                                     ` Jassi Brar
2012-06-26 18:44                                     ` Tomi Valkeinen [this message]
2012-06-26 18:44                                       ` Tomi Valkeinen
2012-06-27  4:42                                       ` Jassi Brar
2012-06-27  4:54                                         ` Jassi Brar
2012-06-27  5:58                                         ` Tomi Valkeinen
2012-06-27  5:58                                           ` Tomi Valkeinen
2012-06-27  7:41                                           ` Jassi Brar
2012-06-27  7:53                                             ` Jassi Brar
2012-06-27  8:13                                             ` Tomi Valkeinen
2012-06-27  8:13                                               ` Tomi Valkeinen
2012-06-27 14:53                                               ` Jassi Brar
2012-06-27 14:56                                                 ` Jassi Brar
2012-06-28  6:41                                                 ` Tomi Valkeinen
2012-06-28  6:41                                                   ` Tomi Valkeinen
2012-06-28  7:46                                                   ` Jassi Brar
2012-06-28  7:58                                                     ` Jassi Brar
2012-06-28  7:58                                                     ` Tomi Valkeinen
2012-06-28  7:58                                                       ` Tomi Valkeinen
2012-06-25 12:05   ` Grazvydas Ignotas
2012-06-25 12:05     ` Grazvydas Ignotas
2012-06-25 12:30     ` Tomi Valkeinen
2012-06-25 12:30       ` Tomi Valkeinen
2012-06-25 12:42       ` Rajendra Nayak
2012-06-25 12:54         ` Rajendra Nayak
2012-06-25 12:50         ` Tomi Valkeinen
2012-06-25 12:50           ` Tomi Valkeinen
2012-06-26  4:51           ` Rajendra Nayak
2012-06-26  4:55             ` Rajendra Nayak
2012-06-26 13:02             ` Grazvydas Ignotas
2012-06-26 13:02               ` Grazvydas Ignotas
2012-06-26 14:34               ` Alan Stern
2012-06-26 14:34                 ` Alan Stern
2012-06-26 15:01                 ` Tomi Valkeinen
2012-06-26 15:01                   ` Tomi Valkeinen
2012-06-26 15:11                   ` Alan Stern
2012-06-26 15:11                     ` Alan Stern
2012-06-25 12:33     ` Jassi Brar
2012-06-25 12:45       ` 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=1340736243.24530.98.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 \
    /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.