linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] clk: samsung: exynos5420: Mark CLK_ACLK432_SCALER as CLK_IS_CRITICAL
@ 2017-01-20 10:41 ` Javier Martinez Canillas
  2017-01-20 12:32   ` Sylwester Nawrocki
  0 siblings, 1 reply; 5+ messages in thread
From: Javier Martinez Canillas @ 2017-01-20 10:41 UTC (permalink / raw)
  To: linux-kernel
  Cc: Inki Dae, Andi Shyti, Shuah Khan, Mauro Carvalho Chehab,
	Marek Szyprowski, Javier Martinez Canillas, Kukjin Kim,
	Michael Turquette, Stephen Boyd, Chanwoo Choi, linux-clk,
	linux-samsung-soc, Sylwester Nawrocki, Tomasz Figa,
	Krzysztof Kozlowski, linux-arm-kernel

On Exynos5800 SoC the SCALER block uses 2 input clocks: CLK_ACLK_300_GSCL
and CLK_ACLK432_SCALER, so both needs to be ungated in order to access it.

But Exynos5420 only has the CLK_ACLK_300_GSCL as gsc_pd clk. So just using
this definition from exynos5420.dtsi in Exynos5800 leads to the following:

    [  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)

    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

So until a proper solution based on runtime PM gets merged, mark the clock
as critical to prevent it to be gated.

Suggested-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>

---

 drivers/clk/samsung/clk-exynos5420.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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),
 };
 
 static const struct samsung_mux_clock exynos5420_mux_clks[] __initconst = {
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] clk: samsung: exynos5420: Mark CLK_ACLK432_SCALER as CLK_IS_CRITICAL
  2017-01-20 10:41 ` [PATCH] clk: samsung: exynos5420: Mark CLK_ACLK432_SCALER as CLK_IS_CRITICAL Javier Martinez Canillas
@ 2017-01-20 12:32   ` Sylwester Nawrocki
  2017-01-20 13:55     ` Sylwester Nawrocki
  0 siblings, 1 reply; 5+ messages in thread
From: Sylwester Nawrocki @ 2017-01-20 12:32 UTC (permalink / raw)
  To: Javier Martinez Canillas, Michael Turquette, Stephen Boyd
  Cc: linux-kernel, Inki Dae, Andi Shyti, Shuah Khan,
	Mauro Carvalho Chehab, Marek Szyprowski, Kukjin Kim,
	Chanwoo Choi, linux-clk, linux-samsung-soc, Tomasz Figa,
	Krzysztof Kozlowski, linux-arm-kernel

On 01/20/2017 11:41 AM, Javier Martinez Canillas wrote:
> On Exynos5800 SoC the SCALER block uses 2 input clocks: CLK_ACLK_300_GSCL
> and CLK_ACLK432_SCALER, so both needs to be ungated in order to access it.
> 
> But Exynos5420 only has the CLK_ACLK_300_GSCL as gsc_pd clk. So just using
> this definition from exynos5420.dtsi in Exynos5800 leads to the following:
[...]
> So until a proper solution based on runtime PM gets merged, mark the clock
> as critical to prevent it to be gated.
> 
> Suggested-by: Marek Szyprowski <m.szyprowski@samsung.com>
> Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>

Acked-by: Sylwester Nawrocki <s.nawrocki@samsung.com>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] clk: samsung: exynos5420: Mark CLK_ACLK432_SCALER as CLK_IS_CRITICAL
  2017-01-20 12:32   ` Sylwester Nawrocki
@ 2017-01-20 13:55     ` Sylwester Nawrocki
  2017-01-20 14:00       ` Javier Martinez Canillas
  0 siblings, 1 reply; 5+ messages in thread
From: Sylwester Nawrocki @ 2017-01-20 13:55 UTC (permalink / raw)
  To: Javier Martinez Canillas, Michael Turquette, Stephen Boyd
  Cc: linux-kernel, Inki Dae, Andi Shyti, Shuah Khan,
	Mauro Carvalho Chehab, Marek Szyprowski, Kukjin Kim,
	Chanwoo Choi, linux-clk, linux-samsung-soc, Tomasz Figa,
	Krzysztof Kozlowski, linux-arm-kernel

On 01/20/2017 01:32 PM, Sylwester Nawrocki wrote:
> On 01/20/2017 11:41 AM, Javier Martinez Canillas wrote:
>> On Exynos5800 SoC the SCALER block uses 2 input clocks: CLK_ACLK_300_GSCL
>> and CLK_ACLK432_SCALER, so both needs to be ungated in order to access it.
>>
>> But Exynos5420 only has the CLK_ACLK_300_GSCL as gsc_pd clk. So just using
>> this definition from exynos5420.dtsi in Exynos5800 leads to the following:
> [...]
>> So until a proper solution based on runtime PM gets merged, mark the clock
>> as critical to prevent it to be gated.
>>
>> Suggested-by: Marek Szyprowski <m.szyprowski@samsung.com>
>> Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
>
> Acked-by: Sylwester Nawrocki <s.nawrocki@samsung.com>

Oops, the $subject patch can be dropped since as Marek just pointed out
to me the changes introduced by that patch are already included in a patch
which is already in the v4.10 fixes queue:

https://git.kernel.org/cgit/linux/kernel/git/clk/linux.git/commit/?h=clk-next&id=318fa46cc60d37fec1e87dbf03a82aca0f5ce695

-- 
Thanks,
Sylwester

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] clk: samsung: exynos5420: Mark CLK_ACLK432_SCALER as CLK_IS_CRITICAL
  2017-01-20 13:55     ` Sylwester Nawrocki
@ 2017-01-20 14:00       ` Javier Martinez Canillas
  2017-01-20 14:07         ` Javier Martinez Canillas
  0 siblings, 1 reply; 5+ messages in thread
From: Javier Martinez Canillas @ 2017-01-20 14:00 UTC (permalink / raw)
  To: Sylwester Nawrocki, Michael Turquette, Stephen Boyd
  Cc: linux-kernel, Inki Dae, Andi Shyti, Shuah Khan,
	Mauro Carvalho Chehab, Marek Szyprowski, Kukjin Kim,
	Chanwoo Choi, linux-clk, linux-samsung-soc, Tomasz Figa,
	Krzysztof Kozlowski, linux-arm-kernel

Hello Sylwester,

On 01/20/2017 10:55 AM, Sylwester Nawrocki wrote:
> On 01/20/2017 01:32 PM, Sylwester Nawrocki wrote:
>> On 01/20/2017 11:41 AM, Javier Martinez Canillas wrote:
>>> On Exynos5800 SoC the SCALER block uses 2 input clocks: CLK_ACLK_300_GSCL
>>> and CLK_ACLK432_SCALER, so both needs to be ungated in order to access it.
>>>
>>> But Exynos5420 only has the CLK_ACLK_300_GSCL as gsc_pd clk. So just using
>>> this definition from exynos5420.dtsi in Exynos5800 leads to the following:
>> [...]
>>> So until a proper solution based on runtime PM gets merged, mark the clock
>>> as critical to prevent it to be gated.
>>>
>>> Suggested-by: Marek Szyprowski <m.szyprowski@samsung.com>
>>> Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
>>
>> Acked-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
> 
> Oops, the $subject patch can be dropped since as Marek just pointed out
> to me the changes introduced by that patch are already included in a patch
> which is already in the v4.10 fixes queue:
> 
> https://git.kernel.org/cgit/linux/kernel/git/clk/linux.git/commit/?h=clk-next&id=318fa46cc60d37fec1e87dbf03a82aca0f5ce695
> 

Yes, I just answered to Marek in the other thread saying the same.
He did mention the patch could fix the issue but for some reason I
didn't see the CLK_ACLK_300_GSCL in the clocks marked as critical...

Anyways, sorry for the noise.

Best regards,
-- 
Javier Martinez Canillas
Open Source Group
Samsung Research America

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] clk: samsung: exynos5420: Mark CLK_ACLK432_SCALER as CLK_IS_CRITICAL
  2017-01-20 14:00       ` Javier Martinez Canillas
@ 2017-01-20 14:07         ` Javier Martinez Canillas
  0 siblings, 0 replies; 5+ messages in thread
From: Javier Martinez Canillas @ 2017-01-20 14:07 UTC (permalink / raw)
  To: Sylwester Nawrocki, Michael Turquette, Stephen Boyd
  Cc: linux-kernel, Inki Dae, Andi Shyti, Shuah Khan,
	Mauro Carvalho Chehab, Marek Szyprowski, Kukjin Kim,
	Chanwoo Choi, linux-clk, linux-samsung-soc, Tomasz Figa,
	Krzysztof Kozlowski, linux-arm-kernel

On 01/20/2017 11:00 AM, Javier Martinez Canillas wrote:
> On 01/20/2017 10:55 AM, Sylwester Nawrocki wrote:

[snip]

>>
>> Oops, the $subject patch can be dropped since as Marek just pointed out
>> to me the changes introduced by that patch are already included in a patch
>> which is already in the v4.10 fixes queue:
>>
>> https://git.kernel.org/cgit/linux/kernel/git/clk/linux.git/commit/?h=clk-next&id=318fa46cc60d37fec1e87dbf03a82aca0f5ce695
>>
> 
> Yes, I just answered to Marek in the other thread saying the same.
> He did mention the patch could fix the issue but for some reason I
> didn't see the CLK_ACLK_300_GSCL in the clocks marked as critical...
>

err, I meant s/CLK_ACLK_300_GSCL/CLK_ACLK432_SCALER

I should just stop writing emails today since clearly didn't get enough coffee.
 
Best regards,
-- 
Javier Martinez Canillas
Open Source Group
Samsung Research America

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-01-20 14:08 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <CGME20170120104148epcas5p11af0e630f0881092a9b3b43e8b5b1aac@epcas5p1.samsung.com>
2017-01-20 10:41 ` [PATCH] clk: samsung: exynos5420: Mark CLK_ACLK432_SCALER as CLK_IS_CRITICAL Javier Martinez Canillas
2017-01-20 12:32   ` Sylwester Nawrocki
2017-01-20 13:55     ` Sylwester Nawrocki
2017-01-20 14:00       ` Javier Martinez Canillas
2017-01-20 14:07         ` Javier Martinez Canillas

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).