From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754119AbdASRvR (ORCPT ); Thu, 19 Jan 2017 12:51:17 -0500 Received: from ec2-52-27-115-49.us-west-2.compute.amazonaws.com ([52.27.115.49]:47002 "EHLO osg.samsung.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752816AbdASRvP (ORCPT ); Thu, 19 Jan 2017 12:51:15 -0500 Subject: Re: [PATCH 2/2] [media] exynos-gsc: Fix imprecise external abort due disabled power domain To: Marek Szyprowski , linux-kernel@vger.kernel.org References: <1484699402-28738-1-git-send-email-javier@osg.samsung.com> <1484699402-28738-2-git-send-email-javier@osg.samsung.com> <842737f2-3faf-7b22-c480-93e183bbb670@osg.samsung.com> From: Javier Martinez Canillas Cc: Inki Dae , Andi Shyti , Shuah Khan , Mauro Carvalho Chehab , Kukjin Kim , linux-samsung-soc@vger.kernel.org, Sylwester Nawrocki , linux-media@vger.kernel.org, Krzysztof Kozlowski , linux-arm-kernel@lists.infradead.org, Ulf Hansson Message-ID: Date: Thu, 19 Jan 2017 14:51:02 -0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 MIME-Version: 1.0 In-Reply-To: <842737f2-3faf-7b22-c480-93e183bbb670@osg.samsung.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello Marek, 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] [] (gsc_wait_reset [exynos_gsc]) from [] (gsc_runtime_resume+0x9c/0xec [exynos_gsc]) > [ 227.252331] [] (gsc_runtime_resume [exynos_gsc]) from [] (genpd_runtime_resume+0x120/0x1d4) > [ 227.262294] [] (genpd_runtime_resume) from [] (__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. Best regards, -- Javier Martinez Canillas Open Source Group Samsung Research America From mboxrd@z Thu Jan 1 00:00:00 1970 From: javier@osg.samsung.com (Javier Martinez Canillas) Date: Thu, 19 Jan 2017 14:51:02 -0300 Subject: [PATCH 2/2] [media] exynos-gsc: Fix imprecise external abort due disabled power domain In-Reply-To: <842737f2-3faf-7b22-c480-93e183bbb670@osg.samsung.com> References: <1484699402-28738-1-git-send-email-javier@osg.samsung.com> <1484699402-28738-2-git-send-email-javier@osg.samsung.com> <842737f2-3faf-7b22-c480-93e183bbb670@osg.samsung.com> Message-ID: To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org Hello Marek, 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] [] (gsc_wait_reset [exynos_gsc]) from [] (gsc_runtime_resume+0x9c/0xec [exynos_gsc]) > [ 227.252331] [] (gsc_runtime_resume [exynos_gsc]) from [] (genpd_runtime_resume+0x120/0x1d4) > [ 227.262294] [] (genpd_runtime_resume) from [] (__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. Best regards, -- Javier Martinez Canillas Open Source Group Samsung Research America