All of lore.kernel.org
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <k.kozlowski@samsung.com>
To: Kevin Hilman <khilman@kernel.org>
Cc: Abhilash Kesavan <kesavan.abhilash@gmail.com>,
	Krzysztof Kozlowski <k.kozlowski@samsung.com>,
	"linux-samsung-soc@vger.kernel.org" 
	<linux-samsung-soc@vger.kernel.org>,
	Mike Turquette <mturquette@linaro.org>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	Tyler Baker <tyler.baker@linaro.org>,
	Stephen Boyd <sboyd@codeaurora.org>,
	Tomasz Figa <tomasz.figa@gmail.com>,
	Doug Anderson <dianders@chromium.org>,
	Chanwoo Choi <cw00.choi@samsung.com>,
	Kukjin Kim <kgene@kernel.org>,
	Sylwester Nawrocki <s.nawrocki@samsung.com>,
	Olof Johansson <olof@lixom.net>,
	Javier Martinez Canillas <javier.martinez@collabora.co.uk>,
	linux-arm-kernel <linux-arm-kernel@lists.infradead.org>
Subject: Re: [RFC PATCH v3 2/2] clk: exynos5420: Make sure MDMA0 clock is enabled during suspend
Date: Wed, 1 Apr 2015 11:16:08 +0200	[thread overview]
Message-ID: <CAJKOXPftzX4KT=RNVnuD3UKOLXKkKr0b9i9_HDE47=8z9AyzUQ@mail.gmail.com> (raw)
In-Reply-To: <7h1tk47awc.fsf@deeprootsystems.com>

2015-04-01 6:03 GMT+02:00 Kevin Hilman <khilman@kernel.org>:
> Abhilash Kesavan <kesavan.abhilash@gmail.com> writes:
>
>> On Wed, Apr 1, 2015 at 2:32 AM, Kevin Hilman <khilman@kernel.org> wrote:
>>> Javier Martinez Canillas <javier.martinez@collabora.co.uk> writes:
>>>
>>> [...]
>>>
>>>> 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.
>>>
>>> +1
>>>
>>> Maybe Abhilash can shed some light here?
>>>
>>> We really should know *why* this is needed because having the fix in the
>>> clock driver just doesn't seem right.  It seems like the DMA driver
>>> should be managing this clock.
>>
>> I think my last mail might not have reached you (was accidentally sent
>> as html).
>
> Yeah, I saw it a bit later in Javier's reply.  Thanks for doing the
> research and reporting back.
>
>> We are gating the aclk266_g2d clock without checking the
>> CG_STATUS0 register bits as specified in the UM. It looks like we need
>> to keep several clocks alive or gate them only after checking the
>> CG_STATUSx register bits.
>
> I dont' know much about this clock hardware, but to me it sounds like a
> clock driver bug.  The suspend fix Javier is proposing would fix it, but
> to me it sounds like the clock driver needs to actually start checking
> these CG_STATUSx bits before gating clocks.
>
> Otherwise, we might fix this current bug but a similar one will come and
> bite us another day.

Actually it looks kind a similar to issue with adma/mau_epll clocks:
https://lkml.org/lkml/2014/12/5/291

In that case runtime PM for pl330 caused adma clock to be gated. This
lead to gating its parent clock - mau_epll. The clock hierarchy is
strange for maudio domain. Basically mau_epll is needed to access
maudio clocks however these clocks are not children of mau_epll.

I think we should not enable the mdma0 but instead we should find the
proper parent which needs to be enabled.

Anyway it is kind of annoying (or funny if one has sense of black
humour) that two issues are exposed by runtime PM for pl330 driver.

Best regards,
Krzysztof

WARNING: multiple messages have this Message-ID (diff)
From: k.kozlowski@samsung.com (Krzysztof Kozlowski)
To: linux-arm-kernel@lists.infradead.org
Subject: [RFC PATCH v3 2/2] clk: exynos5420: Make sure MDMA0 clock is enabled during suspend
Date: Wed, 1 Apr 2015 11:16:08 +0200	[thread overview]
Message-ID: <CAJKOXPftzX4KT=RNVnuD3UKOLXKkKr0b9i9_HDE47=8z9AyzUQ@mail.gmail.com> (raw)
In-Reply-To: <7h1tk47awc.fsf@deeprootsystems.com>

2015-04-01 6:03 GMT+02:00 Kevin Hilman <khilman@kernel.org>:
> Abhilash Kesavan <kesavan.abhilash@gmail.com> writes:
>
>> On Wed, Apr 1, 2015 at 2:32 AM, Kevin Hilman <khilman@kernel.org> wrote:
>>> Javier Martinez Canillas <javier.martinez@collabora.co.uk> writes:
>>>
>>> [...]
>>>
>>>> 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.
>>>
>>> +1
>>>
>>> Maybe Abhilash can shed some light here?
>>>
>>> We really should know *why* this is needed because having the fix in the
>>> clock driver just doesn't seem right.  It seems like the DMA driver
>>> should be managing this clock.
>>
>> I think my last mail might not have reached you (was accidentally sent
>> as html).
>
> Yeah, I saw it a bit later in Javier's reply.  Thanks for doing the
> research and reporting back.
>
>> We are gating the aclk266_g2d clock without checking the
>> CG_STATUS0 register bits as specified in the UM. It looks like we need
>> to keep several clocks alive or gate them only after checking the
>> CG_STATUSx register bits.
>
> I dont' know much about this clock hardware, but to me it sounds like a
> clock driver bug.  The suspend fix Javier is proposing would fix it, but
> to me it sounds like the clock driver needs to actually start checking
> these CG_STATUSx bits before gating clocks.
>
> Otherwise, we might fix this current bug but a similar one will come and
> bite us another day.

Actually it looks kind a similar to issue with adma/mau_epll clocks:
https://lkml.org/lkml/2014/12/5/291

In that case runtime PM for pl330 caused adma clock to be gated. This
lead to gating its parent clock - mau_epll. The clock hierarchy is
strange for maudio domain. Basically mau_epll is needed to access
maudio clocks however these clocks are not children of mau_epll.

I think we should not enable the mdma0 but instead we should find the
proper parent which needs to be enabled.

Anyway it is kind of annoying (or funny if one has sense of black
humour) that two issues are exposed by runtime PM for pl330 driver.

Best regards,
Krzysztof

  reply	other threads:[~2015-04-01  9:16 UTC|newest]

Thread overview: 99+ 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 ` 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 15:53   ` Javier Martinez Canillas
2015-03-30 16:02   ` Tomasz Figa
2015-03-30 16:02     ` Tomasz Figa
2015-03-30 16:02     ` Tomasz Figa
2015-03-30 16:08     ` Javier Martinez Canillas
2015-03-30 16:08       ` Javier Martinez Canillas
2015-03-30 16:08       ` Javier Martinez Canillas
2015-03-31  1:40       ` Michael Turquette
2015-03-31  1:40         ` Michael Turquette
2015-03-31  1:40         ` Michael Turquette
2015-03-31  8:59         ` Javier Martinez Canillas
2015-03-31  8:59           ` Javier Martinez Canillas
2015-03-31  8:59           ` Javier Martinez Canillas
2015-04-01  1:29           ` Michael Turquette
2015-04-01  1:29             ` Michael Turquette
2015-04-01  1:29             ` Michael Turquette
2015-04-01  8:26             ` Javier Martinez Canillas
2015-04-01  8:26               ` Javier Martinez Canillas
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 15:53   ` Javier Martinez Canillas
2015-03-30 16:07   ` Tomasz Figa
2015-03-30 16:07     ` Tomasz Figa
2015-03-30 16:07     ` Tomasz Figa
2015-03-30 16:16     ` Javier Martinez Canillas
2015-03-30 16:16       ` Javier Martinez Canillas
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
2015-03-31 20:00           ` Javier Martinez Canillas
2015-03-31 20:00           ` Javier Martinez Canillas
2015-04-01 11:03           ` Sylwester Nawrocki
2015-04-01 11:03             ` Sylwester Nawrocki
2015-04-01 11:03             ` Sylwester Nawrocki
2015-04-01 11:44             ` Javier Martinez Canillas
2015-04-01 11:44               ` Javier Martinez Canillas
2015-04-01 11:44               ` Javier Martinez Canillas
2015-04-01 17:31               ` Sylwester Nawrocki
2015-04-01 17:31                 ` Sylwester Nawrocki
2015-04-01 17:31                 ` Sylwester Nawrocki
2015-04-01 22:31                 ` Javier Martinez Canillas
2015-04-01 22:31                   ` Javier Martinez Canillas
2015-04-01 22:31                   ` Javier Martinez Canillas
2015-04-02 12:22                   ` Abhilash Kesavan
2015-04-02 12:22                     ` Abhilash Kesavan
2015-04-02 12:22                     ` Abhilash Kesavan
2015-04-07 10:59                     ` Javier Martinez Canillas
2015-04-07 10:59                       ` Javier Martinez Canillas
2015-04-07 10:59                       ` Javier Martinez Canillas
2015-04-07 11:56                       ` Javier Martinez Canillas
2015-04-07 11:56                         ` Javier Martinez Canillas
2015-04-07 11:56                         ` Javier Martinez Canillas
2015-04-07 12:46                         ` Tomasz Figa
2015-04-07 12:46                           ` Tomasz Figa
2015-04-07 12:46                           ` Tomasz Figa
2015-04-07 14:11                           ` Javier Martinez Canillas
2015-04-07 14:11                             ` Javier Martinez Canillas
2015-04-07 14:11                             ` Javier Martinez Canillas
2015-04-07 14:38                             ` Abhilash Kesavan
2015-04-07 14:38                               ` Abhilash Kesavan
2015-04-07 14:38                               ` Abhilash Kesavan
2015-04-07 15:00                               ` Javier Martinez Canillas
2015-04-07 15:00                                 ` Javier Martinez Canillas
2015-04-07 15:00                                 ` Javier Martinez Canillas
2015-04-08  1:50                                 ` Abhilash Kesavan
2015-04-08  1:50                                   ` Abhilash Kesavan
2015-04-08  1:50                                   ` Abhilash Kesavan
2015-04-07 18:51                             ` Kevin Hilman
2015-04-07 18:51                               ` Kevin Hilman
2015-04-07 18:51                               ` Kevin Hilman
2015-04-07 21:28                             ` Tomasz Figa
2015-04-07 21:28                               ` Tomasz Figa
2015-04-07 21:28                               ` Tomasz Figa
2015-04-08  5:36                               ` Javier Martinez Canillas
2015-04-08  5:36                                 ` Javier Martinez Canillas
2015-04-08  5:36                                 ` Javier Martinez Canillas
2015-04-07 14:11                       ` Abhilash Kesavan
2015-04-07 14:11                         ` Abhilash Kesavan
2015-04-07 14:11                         ` Abhilash Kesavan
2015-04-07 14:26                         ` Javier Martinez Canillas
2015-04-07 14:26                           ` Javier Martinez Canillas
2015-04-07 14:26                           ` Javier Martinez Canillas
2015-03-31 21:02       ` Kevin Hilman
2015-03-31 21:02         ` Kevin Hilman
2015-03-31 21:02         ` Kevin Hilman
2015-04-01  3:19         ` Abhilash Kesavan
2015-04-01  3:19           ` Abhilash Kesavan
2015-04-01  3:19           ` Abhilash Kesavan
2015-04-01  4:03           ` Kevin Hilman
2015-04-01  4:03             ` Kevin Hilman
2015-04-01  4:03             ` Kevin Hilman
2015-04-01  9:16             ` Krzysztof Kozlowski [this message]
2015-04-01  9:16               ` Krzysztof Kozlowski
2015-04-01  9:16               ` Krzysztof Kozlowski
2015-04-01 19:02               ` Michael Turquette
2015-04-01 19:02                 ` Michael Turquette
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='CAJKOXPftzX4KT=RNVnuD3UKOLXKkKr0b9i9_HDE47=8z9AyzUQ@mail.gmail.com' \
    --to=k.kozlowski@samsung.com \
    --cc=cw00.choi@samsung.com \
    --cc=dianders@chromium.org \
    --cc=javier.martinez@collabora.co.uk \
    --cc=kesavan.abhilash@gmail.com \
    --cc=kgene@kernel.org \
    --cc=khilman@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=mturquette@linaro.org \
    --cc=olof@lixom.net \
    --cc=s.nawrocki@samsung.com \
    --cc=sboyd@codeaurora.org \
    --cc=tomasz.figa@gmail.com \
    --cc=tyler.baker@linaro.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 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.