Thread (39 messages) 39 messages, 6 authors, 2012-06-28

Re: [PATCH] OMAPDSS: Check if RPM enabled before trying to change state

flat view

From: Jassi Brar <hidden>
Date: 2012-06-27 04:54:52
Also in: linux-omap

On 27 June 2012 00:14, Tomi Valkeinen [off-list ref] wrote:
On Tue, 2012-06-26 at 22:31 +0530, Jassi Brar wrote:
quoted
quoted
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.
You are mixing up generic concepts with what we have in omapdss.
Believe me, I do understand it's bad to proceed without caring for
returned _errors_.
The way omapdss is organized -EACCESS is _not_ an  error, it just
denotes PM is disabled on the device and that DISPC is in RPM_ACTIVE
is backed by the fact that HDMI always hold a reference between
resume-suspend and DISPC goes to suspend last and resume first.

quoted
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.
OK, will do today later.

Regards.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help