linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andy Green <andy.green@linaro.org>
To: Jassi Brar <jaswinder.singh@linaro.org>
Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>,
	mythripk@ti.com, linux-omap@vger.kernel.org,
	linux-fbdev@vger.kernel.org, n-dechesne@ti.com
Subject: Re: [PATCH] OMAPDSS: Check if RPM enabled before trying to change state
Date: Tue, 26 Jun 2012 08:40:32 +0000	[thread overview]
Message-ID: <4FE97580.4070805@linaro.org> (raw)
In-Reply-To: <CAJe_Zhev3V85K1jhj+W+d+0kv132MZ=-7rChhCLgtWO7WN4u1w@mail.gmail.com>

On 06/26/12 16:32, the mail apparently from Jassi Brar included:
> On 26 June 2012 12:49, Tomi Valkeinen <tomi.valkeinen@ti.com> wrote:
>> On Mon, 2012-06-25 at 22:36 +0530, Jassi Brar wrote:
>
>>>>
>>>> Normally if the driver does dispc_runtime_get() and dispc_read_reg(),
>>>> the first call will enable the HW so the reg read works.
>>>>
>>>> But if the pm_runtime is disabled, say, during system suspend, with your
>>>> patch dispc_runtime_get() will just return 0 without doing anything, and
>>>> the dispc_read_reg() will crash because the HW is disabled (because
>>>> nobody enabled it).
>>>>
>>> Hmm, I am not sure if new calls would/should be made to dispc.c after
>>> the system has suspended and before resumed. That is, anything other
>>> than from runtime_resume/suspend callbacks of DSS, DISPC, HDMI, VENC
>>> and RFBI, which rightly don't touch any dss reg but only
>>> enable/disable a clock.
>>
>> They do touch the registers. For example, dispc's callbacks save and
>> restore the registers. The HW should be fully functional during the
>> callbacks. The point of the callbacks is to suspend/resume the HW in
>> question, which of course requires accessing the HW.
>>
> DISPC being held by HDMI, VENC and RFBI would be the last to suspend
> and first to resume. And it won't have its registers touched between
> dispc_runtime_suspend() and dispc_runtime_resume(), which seems ok to
> me (?)
> HDMI, VENC and RFBI directly fooling around with DISPC regs would have
> been a problem, which isn't the case.
>
>>> As we know, a subsystem should make sure any active work is cleared
>>> out before suspending and set some flag so that nothing runs until it
>>> has resumed. I don't say we can't crash the system with this patch,
>>> but then we would be violating rules of suspend-resume.
>>
>> Let's go back a bit. I feel like I'm missing some pieces of information,
>> as I still don't quite grasp the problem.
>>
>> In the patch you said this fixes an issue with HDMI. Can you tell more
>> about the problem? What code path is being run? Any error messages?
>>
>> I tried system suspend with omap4-sdp and panda, with 3.5-rc2, but
>> neither board seems to wake up from the suspend. Does it work for you?
>>
> Something non-omapdss in vanilla breaks suspend/resume.
> Without this patch I see the upstream's display broken after the
> suspend attempt.
>      $ echo mem > /sys/power/state
>
> I work on TILT tree, which has suspend/resume working after some more
> local patches.
>      http://git.linaro.org/gitweb?p=people/andygreen/kernel-tilt.git;a=shortlog;h=refs/heads/tilt-3.4
>
> I don't have SDP so not sure, but it should simply be testable with
> Panda4460 and the omap4plus_defconfig there.  Please feel free to ask
> if you have any issue checking that out.

We don't have access to Blaze and don't test that tree against it, but 
it's worth trying on PandaBoard ES which we do have and test against 
(omap4plus_defconfig).

Here, mem suspend is working with HDMI raster coming back on resume, but 
we don't always get a desktop redraw (suspending again can "correct" 
that).  Jassi's patches are present in this tree.

A slightly side-issue, I have a TV here that only issues hpd 700ms after 
the Panda provides 5V at the HDMI link.  It has always been touch-and-go 
if dss will recognize it or not, compared to a monitor which issues hpd 
high within some us of the link being powered.

The patches from Jassi about permanently enabling the external HDMI PHY 
chip section that performs level-conversion for hpd, and the existing 
work to use irq management of hpd, seems to have really solved detecting 
that TV for the first time.

-Andy

-- 
Andy Green | TI Landing Team Leader
Linaro.org │ Open source software for ARM SoCs | Follow Linaro
http://facebook.com/pages/Linaro/155974581091106  - 
http://twitter.com/#!/linaroorg - http://linaro.org/linaro-blog



  reply	other threads:[~2012-06-26  8:40 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-23  8:18 [PATCH] OMAPDSS: Check if RPM enabled before trying to change state jaswinder.singh
2012-06-25  6:20 ` Tomi Valkeinen
2012-06-25  8:53   ` Jassi Brar
2012-06-25  9:30     ` Tomi Valkeinen
2012-06-25 12:39       ` Jassi Brar
2012-06-25 12:41         ` Tomi Valkeinen
2012-06-25 13:43           ` Jassi Brar
2012-06-25 13:49             ` Tomi Valkeinen
2012-06-25 17:18               ` Jassi Brar
2012-06-26  7:19                 ` Tomi Valkeinen
2012-06-26  8:44                   ` Jassi Brar
2012-06-26  8:40                     ` Andy Green [this message]
2012-06-26  9:07                     ` Tomi Valkeinen
2012-06-26 10:09                       ` Jassi Brar
2012-06-26 12:03                         ` Tomi Valkeinen
2012-06-26 14:52                           ` Jassi Brar
2012-06-26 15:08                             ` Tomi Valkeinen
2012-06-26 15:21                               ` Jassi Brar
2012-06-26 15:11                                 ` Tomi Valkeinen
2012-06-26 17:13                                   ` Jassi Brar
2012-06-26 18:44                                     ` Tomi Valkeinen
2012-06-27  4:54                                       ` Jassi Brar
2012-06-27  5:58                                         ` Tomi Valkeinen
2012-06-27  7:53                                           ` Jassi Brar
2012-06-27  8:13                                             ` Tomi Valkeinen
2012-06-27 14:56                                               ` Jassi Brar
2012-06-28  6:41                                                 ` Tomi Valkeinen
2012-06-28  7:58                                                   ` 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:54       ` Rajendra Nayak
2012-06-25 12:50         ` Tomi Valkeinen
2012-06-26  4:55           ` 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: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=4FE97580.4070805@linaro.org \
    --to=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=tomi.valkeinen@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).