linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: javier.martinez@collabora.co.uk (Javier Martinez Canillas)
To: linux-arm-kernel@lists.infradead.org
Subject: [RFC PATCH v3 2/2] clk: exynos5420: Make sure MDMA0 clock is enabled during suspend
Date: Tue, 31 Mar 2015 22:00:14 +0200	[thread overview]
Message-ID: <551AFCCE.4050404@collabora.co.uk> (raw)
In-Reply-To: <CAM4voanL3A=dS8Z-ovi_-EDi9ctyaxZkvjajp+3ZjyNAnqR1aQ@mail.gmail.com>

Hello Abhilash,

On 03/31/2015 04:38 PM, Abhilash Kesavan wrote:
> javier.martinez at collabora.co.uk> wrote:
>> On 03/30/2015 06:07 PM, Tomasz Figa wrote:
>> >
>> > If look-up speed is important here, maybe all the relevant clocks
>> > could be looked up once at initialization time and just prepared and
>> > enabled here?
>> >
>>
>> Yes, I'll do that indeed.
>>
>> In fact, I was wondering if we should let this clock be disabled at
>> all. I noticed that the rockchip clk drivers do something similar
>> and prepare / enable a list of clocks at init time [0,1].
>>
>> Unfortunately I don't fully understand why this clock needs to be
>> enabled. It would be good if someone at Samsung can explain in
>> more detail what the real problem really is.
>>
> 
> I had a look at this some more today. The problem actually occurs when the
> mdma0 clock's parent - aclk266_g2d gets disabled. The run-time pm support
> in the dma driver disables mdma0 and in turn aclk266_g2d which causes the
> issue.
> From the User Manual, it appears that aclk266_g2d should be gated only when
> certain bits in the clock gating status register are 0. I cannot say for
> certain, but our gating the aclk266_g2d clock without the CG_STATUS bits
> being 0 could be a cause of the suspend failure.
> 

Thanks a lot for the explanation. I see the NOTE at the bottom of section
7.9.1.159 CLK_GATE_BUS_TOP that mentions that. I'll add this information
to the commit message when posting as a proper patch instead of a RFC.

I confirmed that changing the patch to prevent "aclk266_g2d" to be gated
instead of "mdm0" also makes the system to resume correctly from suspend
so I'll change that on the patch as well.

I see that many of the Exynos5420 clocks (including "aclk266_g2d") use the
CLK_IGNORE_UNUSED flag but AFAIU it only prevents the common clock framework
to disable the clocks on init but doesn't prevent the clocks to be disabled
if all the clock childs are gated so the parent is gated as well.

> As the CG_STATUS bits are not being checked anywhere in the kernel I think
> aclk266_g2d (and others in GATE_BUS_TOP) should not be gated. I am OK with

For now I'll just add "aclk266_g2d" but later if needed all the GATE_BUS_TOP
clocks (and others) that should only be gated when CG_STATUS is 0 can be
added. My patch iterates over a list of clocks to be kept during suspend even
when there is only one for now so adding more later if needed will be trivial.

Or do you think that I should add all the GATE_BUS_TOP clocks now?

> the suspend specific approach you have posted.
>

Great, I'll wait a couple of days to see if others have more comments about
the last RFC I shared [0] and I'll post it as a proper patch.

> Regards,
> Abhilash
> 

Thanks a lot for all your help and best regards,
Javier

[0]: https://lkml.org/lkml/2015/3/31/152

  parent reply	other threads:[~2015-03-31 20:00 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-30 15:53 [RFC PATCH v3 0/2] ARM: EXYNOS: Fix Suspend-to-RAM on Exynos5420 Javier Martinez Canillas
2015-03-30 15:53 ` [RFC PATCH v3 1/2] clk: samsung: Add a clock lookup function Javier Martinez Canillas
2015-03-30 16:02   ` Tomasz Figa
2015-03-30 16:08     ` Javier Martinez Canillas
2015-03-31  1:40       ` Michael Turquette
2015-03-31  8:59         ` Javier Martinez Canillas
2015-04-01  1:29           ` Michael Turquette
2015-04-01  8:26             ` Javier Martinez Canillas
2015-03-30 15:53 ` [RFC PATCH v3 2/2] clk: exynos5420: Make sure MDMA0 clock is enabled during suspend Javier Martinez Canillas
2015-03-30 16:07   ` Tomasz Figa
2015-03-30 16:16     ` Javier Martinez Canillas
     [not found]       ` <CAM4voanL3A=dS8Z-ovi_-EDi9ctyaxZkvjajp+3ZjyNAnqR1aQ@mail.gmail.com>
2015-03-31 20:00         ` Javier Martinez Canillas [this message]
2015-04-01 11:03           ` Sylwester Nawrocki
2015-04-01 11:44             ` Javier Martinez Canillas
2015-04-01 17:31               ` Sylwester Nawrocki
2015-04-01 22:31                 ` Javier Martinez Canillas
2015-04-02 12:22                   ` Abhilash Kesavan
2015-04-07 10:59                     ` Javier Martinez Canillas
2015-04-07 11:56                       ` Javier Martinez Canillas
2015-04-07 12:46                         ` Tomasz Figa
2015-04-07 14:11                           ` Javier Martinez Canillas
2015-04-07 14:38                             ` Abhilash Kesavan
2015-04-07 15:00                               ` Javier Martinez Canillas
2015-04-08  1:50                                 ` Abhilash Kesavan
2015-04-07 18:51                             ` Kevin Hilman
2015-04-07 21:28                             ` Tomasz Figa
2015-04-08  5:36                               ` Javier Martinez Canillas
2015-04-07 14:11                       ` Abhilash Kesavan
2015-04-07 14:26                         ` Javier Martinez Canillas
2015-03-31 21:02       ` Kevin Hilman
2015-04-01  3:19         ` Abhilash Kesavan
2015-04-01  4:03           ` Kevin Hilman
2015-04-01  9:16             ` Krzysztof Kozlowski
2015-04-01 19:02               ` Michael Turquette

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=551AFCCE.4050404@collabora.co.uk \
    --to=javier.martinez@collabora.co.uk \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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).