From: Marek Szyprowski <m.szyprowski@samsung.com>
To: Javier Martinez Canillas <javier@osg.samsung.com>,
linux-kernel@vger.kernel.org
Cc: Inki Dae <inki.dae@samsung.com>,
Andi Shyti <andi.shyti@samsung.com>,
Shuah Khan <shuahkh@osg.samsung.com>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
Kukjin Kim <kgene@kernel.org>,
linux-samsung-soc@vger.kernel.org,
Sylwester Nawrocki <s.nawrocki@samsung.com>,
linux-media@vger.kernel.org,
Krzysztof Kozlowski <krzk@kernel.org>,
linux-arm-kernel@lists.infradead.org,
Ulf Hansson <ulf.hansson@linaro.org>
Subject: Re: [PATCH 2/2] [media] exynos-gsc: Fix imprecise external abort due disabled power domain
Date: Fri, 20 Jan 2017 09:37:47 +0100 [thread overview]
Message-ID: <c1d00b28-0252-0fb1-eb7c-5fc69035f12f@samsung.com> (raw)
In-Reply-To: <d727576a-fbce-eb54-3b74-270c689b7fa3@osg.samsung.com>
Hi Javier,
On 2017-01-19 18:51, Javier Martinez Canillas wrote:
> On 01/19/2017 11:56 AM, Javier Martinez Canillas wrote:
>> On 01/19/2017 11:17 AM, Marek Szyprowski wrote:
> [snip]
>
>> Also when removing the exynos_gsc driver, I get the same error:
>>
>> # rmmod s5p_mfc
>> [ 106.405972] s5p-mfc 11000000.codec: Removing 11000000.codec
>> # rmmod exynos_gsc
>> [ 227.008559] Unhandled fault: imprecise external abort (0x1c06) at 0x00048e14
>> [ 227.015116] pgd = ed5dc000
>> [ 227.017213] [00048e14] *pgd=b17c6835
>> [ 227.020889] Internal error: : 1c06 [#1] PREEMPT SMP ARM
>> ...
>> [ 227.241585] [<bf2429bc>] (gsc_wait_reset [exynos_gsc]) from [<bf24009c>] (gsc_runtime_resume+0x9c/0xec [exynos_gsc])
>> [ 227.252331] [<bf24009c>] (gsc_runtime_resume [exynos_gsc]) from [<c042e488>] (genpd_runtime_resume+0x120/0x1d4)
>> [ 227.262294] [<c042e488>] (genpd_runtime_resume) from [<c04241c0>] (__rpm_callback+0xc8/0x218)
>>
>> # cat /sys/kernel/debug/pm_genpd/pm_genpd_summary
>> domain status slaves
>> /device runtime status
>> ----------------------------------------------------------------------
>> power-domain@100440C0 on
>> /devices/platform/soc/14450000.mixer active
>> /devices/platform/soc/14530000.hdmi active
>> power-domain@10044120 on
>> power-domain@10044060 off-0
>> power-domain@10044020 on
>> power-domain@10044000 on
>> /devices/platform/soc/13e00000.video-scaler suspended
>> /devices/platform/soc/13e10000.video-scaler resuming
>>
>> This seems to be caused by some needed clocks to access the power domains
>> to be gated, since I don't get these erros when passing clk_ignore_unused
>> as parameter in the kernel command line.
>>
> I found the issue. The problem was that Exynos5422 needs not only the
> CLK_ACLK_ 300_GSCL but also CLK_ACLK432_SCALER to be ungated in order
> to access the GSCL IP block.
>
> The Exynos5422 manual shows in Figure 7-14 that ACLK_432_SCLAER is needed
> for the internal buses.
>
> Exynos5420 only needs CLK_ACLK_ 300_GSCL to be ungated.
>
> With following hack, the issue goes away for the gsc_pd in the Odroid XU4:
>
> diff --git a/drivers/clk/samsung/clk-exynos5420.c b/drivers/clk/samsung/clk-exynos5420.c
> index 8c8b495cbf0d..9876ec28b94c 100644
> --- a/drivers/clk/samsung/clk-exynos5420.c
> +++ b/drivers/clk/samsung/clk-exynos5420.c
> @@ -586,7 +586,7 @@ static const struct samsung_gate_clock exynos5800_gate_clks[] __initconst = {
> GATE(CLK_ACLK550_CAM, "aclk550_cam", "mout_user_aclk550_cam",
> GATE_BUS_TOP, 24, 0, 0),
> GATE(CLK_ACLK432_SCALER, "aclk432_scaler", "mout_user_aclk432_scaler",
> - GATE_BUS_TOP, 27, 0, 0),
> + GATE_BUS_TOP, 27, CLK_IS_CRITICAL, 0),
> };
>
> # cat /sys/kernel/debug/pm_genpd/pm_genpd_summary
> domain status slaves
> /device runtime status
> ----------------------------------------------------------------------
> power-domain@100440C0 on
> /devices/platform/soc/14450000.mixer active
> /devices/platform/soc/14530000.hdmi active
> power-domain@10044120 on
> power-domain@10044060 off-0
> /devices/platform/soc/11000000.codec suspended
> power-domain@10044020 on
> power-domain@10044000 off-0
> /devices/platform/soc/13e00000.video-scaler suspended
> /devices/platform/soc/13e10000.video-scaler suspended
>
> # rmmod s5p_mfc
> [ 82.885227] s5p-mfc 11000000.codec: Removing 11000000.codec
> # rmmod exynos_gsc
>
> # cat /sys/kernel/debug/pm_genpd/pm_genpd_summary
> domain status slaves
> /device runtime status
> ----------------------------------------------------------------------
> power-domain@100440C0 on
> /devices/platform/soc/14450000.mixer active
> /devices/platform/soc/14530000.hdmi active
> power-domain@10044120 on
> power-domain@10044060 off-0
> power-domain@10044020 on
> power-domain@10044000 off-0
>
> I'll post a proper patch for the exynos5800.dtsi, to override the
> clocks in the gsc_pd device node.
>
> I also see that the two power domains that fail to be disabled msc_pd
> (power-domain@10044120) and isp_pd (power-domain@10044020) don't have
> clocks defined in the exynos54xx.dtsi. I'll add clocks for those too.
Please send this patch instead of adding more clocks to the power domains.
This way we will avoid adding more dependencies to userspace (DT ABI).
Likely those clocks are also needed to access any device in that power
domains.
Later, once the runtime PM for clocks get merged, a patch for exynos542x
clocks driver can be made to replace IS_CRITICAL with proper runtime
handling.
Best regards
--
Marek Szyprowski, PhD
Samsung R&D Institute Poland
WARNING: multiple messages have this Message-ID (diff)
From: m.szyprowski@samsung.com (Marek Szyprowski)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/2] [media] exynos-gsc: Fix imprecise external abort due disabled power domain
Date: Fri, 20 Jan 2017 09:37:47 +0100 [thread overview]
Message-ID: <c1d00b28-0252-0fb1-eb7c-5fc69035f12f@samsung.com> (raw)
In-Reply-To: <d727576a-fbce-eb54-3b74-270c689b7fa3@osg.samsung.com>
Hi Javier,
On 2017-01-19 18:51, Javier Martinez Canillas wrote:
> On 01/19/2017 11:56 AM, Javier Martinez Canillas wrote:
>> On 01/19/2017 11:17 AM, Marek Szyprowski wrote:
> [snip]
>
>> Also when removing the exynos_gsc driver, I get the same error:
>>
>> # rmmod s5p_mfc
>> [ 106.405972] s5p-mfc 11000000.codec: Removing 11000000.codec
>> # rmmod exynos_gsc
>> [ 227.008559] Unhandled fault: imprecise external abort (0x1c06) at 0x00048e14
>> [ 227.015116] pgd = ed5dc000
>> [ 227.017213] [00048e14] *pgd=b17c6835
>> [ 227.020889] Internal error: : 1c06 [#1] PREEMPT SMP ARM
>> ...
>> [ 227.241585] [<bf2429bc>] (gsc_wait_reset [exynos_gsc]) from [<bf24009c>] (gsc_runtime_resume+0x9c/0xec [exynos_gsc])
>> [ 227.252331] [<bf24009c>] (gsc_runtime_resume [exynos_gsc]) from [<c042e488>] (genpd_runtime_resume+0x120/0x1d4)
>> [ 227.262294] [<c042e488>] (genpd_runtime_resume) from [<c04241c0>] (__rpm_callback+0xc8/0x218)
>>
>> # cat /sys/kernel/debug/pm_genpd/pm_genpd_summary
>> domain status slaves
>> /device runtime status
>> ----------------------------------------------------------------------
>> power-domain at 100440C0 on
>> /devices/platform/soc/14450000.mixer active
>> /devices/platform/soc/14530000.hdmi active
>> power-domain at 10044120 on
>> power-domain at 10044060 off-0
>> power-domain at 10044020 on
>> power-domain at 10044000 on
>> /devices/platform/soc/13e00000.video-scaler suspended
>> /devices/platform/soc/13e10000.video-scaler resuming
>>
>> This seems to be caused by some needed clocks to access the power domains
>> to be gated, since I don't get these erros when passing clk_ignore_unused
>> as parameter in the kernel command line.
>>
> I found the issue. The problem was that Exynos5422 needs not only the
> CLK_ACLK_ 300_GSCL but also CLK_ACLK432_SCALER to be ungated in order
> to access the GSCL IP block.
>
> The Exynos5422 manual shows in Figure 7-14 that ACLK_432_SCLAER is needed
> for the internal buses.
>
> Exynos5420 only needs CLK_ACLK_ 300_GSCL to be ungated.
>
> With following hack, the issue goes away for the gsc_pd in the Odroid XU4:
>
> diff --git a/drivers/clk/samsung/clk-exynos5420.c b/drivers/clk/samsung/clk-exynos5420.c
> index 8c8b495cbf0d..9876ec28b94c 100644
> --- a/drivers/clk/samsung/clk-exynos5420.c
> +++ b/drivers/clk/samsung/clk-exynos5420.c
> @@ -586,7 +586,7 @@ static const struct samsung_gate_clock exynos5800_gate_clks[] __initconst = {
> GATE(CLK_ACLK550_CAM, "aclk550_cam", "mout_user_aclk550_cam",
> GATE_BUS_TOP, 24, 0, 0),
> GATE(CLK_ACLK432_SCALER, "aclk432_scaler", "mout_user_aclk432_scaler",
> - GATE_BUS_TOP, 27, 0, 0),
> + GATE_BUS_TOP, 27, CLK_IS_CRITICAL, 0),
> };
>
> # cat /sys/kernel/debug/pm_genpd/pm_genpd_summary
> domain status slaves
> /device runtime status
> ----------------------------------------------------------------------
> power-domain at 100440C0 on
> /devices/platform/soc/14450000.mixer active
> /devices/platform/soc/14530000.hdmi active
> power-domain at 10044120 on
> power-domain at 10044060 off-0
> /devices/platform/soc/11000000.codec suspended
> power-domain at 10044020 on
> power-domain at 10044000 off-0
> /devices/platform/soc/13e00000.video-scaler suspended
> /devices/platform/soc/13e10000.video-scaler suspended
>
> # rmmod s5p_mfc
> [ 82.885227] s5p-mfc 11000000.codec: Removing 11000000.codec
> # rmmod exynos_gsc
>
> # cat /sys/kernel/debug/pm_genpd/pm_genpd_summary
> domain status slaves
> /device runtime status
> ----------------------------------------------------------------------
> power-domain at 100440C0 on
> /devices/platform/soc/14450000.mixer active
> /devices/platform/soc/14530000.hdmi active
> power-domain at 10044120 on
> power-domain at 10044060 off-0
> power-domain at 10044020 on
> power-domain at 10044000 off-0
>
> I'll post a proper patch for the exynos5800.dtsi, to override the
> clocks in the gsc_pd device node.
>
> I also see that the two power domains that fail to be disabled msc_pd
> (power-domain at 10044120) and isp_pd (power-domain at 10044020) don't have
> clocks defined in the exynos54xx.dtsi. I'll add clocks for those too.
Please send this patch instead of adding more clocks to the power domains.
This way we will avoid adding more dependencies to userspace (DT ABI).
Likely those clocks are also needed to access any device in that power
domains.
Later, once the runtime PM for clocks get merged, a patch for exynos542x
clocks driver can be made to replace IS_CRITICAL with proper runtime
handling.
Best regards
--
Marek Szyprowski, PhD
Samsung R&D Institute Poland
next prev parent reply other threads:[~2017-01-20 8:37 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20170118003024epcas5p34baff888a902351d9168d74f5ecbf293@epcas5p3.samsung.com>
2017-01-18 0:30 ` [PATCH 1/2] [media] exynos-gsc: Fix unbalanced pm_runtime_enable() error Javier Martinez Canillas
2017-01-18 0:30 ` Javier Martinez Canillas
2017-01-18 0:30 ` Javier Martinez Canillas
2017-01-18 0:30 ` [PATCH 2/2] [media] exynos-gsc: Fix imprecise external abort due disabled power domain Javier Martinez Canillas
2017-01-18 0:30 ` Javier Martinez Canillas
2017-01-18 0:30 ` Javier Martinez Canillas
2017-01-19 14:17 ` Marek Szyprowski
2017-01-19 14:17 ` Marek Szyprowski
2017-01-19 14:17 ` Marek Szyprowski
2017-01-19 14:56 ` Javier Martinez Canillas
2017-01-19 14:56 ` Javier Martinez Canillas
2017-01-19 14:56 ` Javier Martinez Canillas
2017-01-19 17:51 ` Javier Martinez Canillas
2017-01-19 17:51 ` Javier Martinez Canillas
2017-01-20 8:37 ` Marek Szyprowski [this message]
2017-01-20 8:37 ` Marek Szyprowski
2017-01-20 10:06 ` Javier Martinez Canillas
2017-01-20 10:06 ` Javier Martinez Canillas
2017-01-20 10:06 ` Javier Martinez Canillas
2017-01-20 10:46 ` Javier Martinez Canillas
2017-01-20 10:46 ` Javier Martinez Canillas
2017-01-20 8:08 ` Marek Szyprowski
2017-01-20 8:08 ` Marek Szyprowski
2017-01-20 10:01 ` Javier Martinez Canillas
2017-01-20 10:01 ` Javier Martinez Canillas
2017-01-20 13:36 ` Javier Martinez Canillas
2017-01-20 13:36 ` Javier Martinez Canillas
2017-01-20 13:36 ` Javier Martinez Canillas
2017-01-19 14:12 ` [PATCH 1/2] [media] exynos-gsc: Fix unbalanced pm_runtime_enable() error Marek Szyprowski
2017-01-19 14:12 ` Marek Szyprowski
2017-01-19 14:12 ` Marek Szyprowski
2017-01-19 14:19 ` Javier Martinez Canillas
2017-01-19 14:19 ` Javier Martinez Canillas
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=c1d00b28-0252-0fb1-eb7c-5fc69035f12f@samsung.com \
--to=m.szyprowski@samsung.com \
--cc=andi.shyti@samsung.com \
--cc=inki.dae@samsung.com \
--cc=javier@osg.samsung.com \
--cc=kgene@kernel.org \
--cc=krzk@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=s.nawrocki@samsung.com \
--cc=shuahkh@osg.samsung.com \
--cc=ulf.hansson@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.