[PATCH] drm/exynos: enable fimd clocks in probe before accessing fimd registers
From: Rahul Sharma rahul.sha...@samsung.com Fimd probe is accessing fimd Registers without enabling the fimd gate clocks. This hangs the system at boot time. This issue got surfaced when verifying with sysmmu enabled. Probe of fimd Sysmmu enables the master clock before accessing sysmmu regs and then disables. Later fimd probe tries to read the reegister without enabling the clock which is wrong and hangs the system. Signed-off-by: Rahul Sharma rahul.sha...@samsung.com --- drivers/gpu/drm/exynos/exynos_drm_fimd.c |6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/gpu/drm/exynos/exynos_drm_fimd.c b/drivers/gpu/drm/exynos/exynos_drm_fimd.c index 40fd6cc..8706fde 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_fimd.c +++ b/drivers/gpu/drm/exynos/exynos_drm_fimd.c @@ -916,9 +916,15 @@ static int fimd_probe(struct platform_device *pdev) pm_runtime_enable(dev); + clk_prepare_enable(ctx-bus_clk); + clk_prepare_enable(ctx-lcd_clk); + for (win = 0; win WINDOWS_NR; win++) fimd_clear_win(ctx, win); + clk_disable_unprepare(ctx-lcd_clk); + clk_disable_unprepare(ctx-bus_clk); + return 0; } -- 1.7.9.5 -- To unsubscribe from this list: send the line unsubscribe linux-samsung-soc in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] drm/exynos: enable FIMD clocks
While migrating to common clock framework (CCF), found that the FIMD clocks were pulled down by the CCF. If CCF finds any clock(s) which has NOT been claimed by any of the drivers, then such clock(s) are PULLed low by CCF. By calling clk_prepare_enable() for FIMD clocks fixes the issue. Signed-off-by: Vikas Sajjan vikas.saj...@linaro.org --- drivers/gpu/drm/exynos/exynos_drm_fimd.c |3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/exynos/exynos_drm_fimd.c b/drivers/gpu/drm/exynos/exynos_drm_fimd.c index 9537761..d93dd8a 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_fimd.c +++ b/drivers/gpu/drm/exynos/exynos_drm_fimd.c @@ -934,6 +934,9 @@ static int fimd_probe(struct platform_device *pdev) return ret; } + clk_prepare_enable(ctx-lcd_clk); + clk_prepare_enable(ctx-bus_clk); + ctx-vidcon0 = pdata-vidcon0; ctx-vidcon1 = pdata-vidcon1; ctx-default_win = pdata-default_win; -- 1.7.9.5 -- To unsubscribe from this list: send the line unsubscribe linux-samsung-soc in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] drm/exynos: enable FIMD clocks
On 19 March 2013 15:29, Vikas Sajjan vikas.saj...@linaro.org wrote: While migrating to common clock framework (CCF), found that the FIMD clocks were pulled down by the CCF. If CCF finds any clock(s) which has NOT been claimed by any of the drivers, then such clock(s) are PULLed low by CCF. By calling clk_prepare_enable() for FIMD clocks fixes the issue. Signed-off-by: Vikas Sajjan vikas.saj...@linaro.org --- drivers/gpu/drm/exynos/exynos_drm_fimd.c |3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/exynos/exynos_drm_fimd.c b/drivers/gpu/drm/exynos/exynos_drm_fimd.c index 9537761..d93dd8a 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_fimd.c +++ b/drivers/gpu/drm/exynos/exynos_drm_fimd.c @@ -934,6 +934,9 @@ static int fimd_probe(struct platform_device *pdev) return ret; } + clk_prepare_enable(ctx-lcd_clk); + clk_prepare_enable(ctx-bus_clk); + Ideally you should check return values here. -- To unsubscribe from this list: send the line unsubscribe linux-samsung-soc in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] drm/exynos: enable FIMD clocks
On 19 March 2013 15:29, Vikas Sajjan vikas.saj...@linaro.org wrote: While migrating to common clock framework (CCF), found that the FIMD clocks were pulled down by the CCF. If CCF finds any clock(s) which has NOT been claimed by any of the drivers, then such clock(s) are PULLed low by CCF. By calling clk_prepare_enable() for FIMD clocks fixes the issue. Signed-off-by: Vikas Sajjan vikas.saj...@linaro.org --- drivers/gpu/drm/exynos/exynos_drm_fimd.c |3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/exynos/exynos_drm_fimd.c b/drivers/gpu/drm/exynos/exynos_drm_fimd.c index 9537761..d93dd8a 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_fimd.c +++ b/drivers/gpu/drm/exynos/exynos_drm_fimd.c @@ -934,6 +934,9 @@ static int fimd_probe(struct platform_device *pdev) return ret; } + clk_prepare_enable(ctx-lcd_clk); + clk_prepare_enable(ctx-bus_clk); + You also need to do clk_disable_unprepare during exit. -- To unsubscribe from this list: send the line unsubscribe linux-samsung-soc in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html