diff options
author | Sylwester Nawrocki <s.nawrocki@samsung.com> | 2016-02-29 16:03:26 +0100 |
---|---|---|
committer | Seung-Woo Kim <sw0312.kim@samsung.com> | 2016-12-14 13:49:22 +0900 |
commit | d4d623b26f8ddc2c09f1c9e80d359035b1974438 (patch) | |
tree | e5597d5153608dbf15071ea267665dba1babf6b1 /drivers/media | |
parent | dce263dcc91f8eb9b2d9c945d710543605123618 (diff) |
fimc-is: Workaround for ACLK_CAM1_552_USER configuration issues
For some reason "mout_aclk_cam1_552_user" clock reconfiguration from
"oscclk" to "aclk_cam1_552" breaks the front camera operation (often
only empty buffer are dequeued). But it is required for the rear
camera. Until the root cause is found reconfigure the mux conditionally
only for the rear sensor operation.
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/platform/exynos/fimc-is/setup-fimc-is.c | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/drivers/media/platform/exynos/fimc-is/setup-fimc-is.c b/drivers/media/platform/exynos/fimc-is/setup-fimc-is.c index 39e4b0be5f62..74a8821fe1ef 100644 --- a/drivers/media/platform/exynos/fimc-is/setup-fimc-is.c +++ b/drivers/media/platform/exynos/fimc-is/setup-fimc-is.c @@ -21,8 +21,9 @@ #include <linux/delay.h> #include <linux/clk-provider.h> #include <linux/clkdev.h> -#include "exynos-fimc-is.h" #include <linux/of_gpio.h> +#include "exynos-fimc-is.h" +#include "fimc-is-core.h" struct platform_device; /* don't need the contents */ @@ -243,9 +244,19 @@ int exynos5430_cfg_clk_cam0(struct platform_device *pdev) int exynos5430_cfg_clk_cam1(struct platform_device *pdev) { + struct fimc_is_core *core = platform_get_drvdata(pdev); + /* + * It's not clear to me why, but the front camera doesn't work properly + * (only empty buffers dequeued) when this ACLK_CAM1_552_USER mux is + * reconfigured here. So as an ugly workaround this mux is temporarily + * left untouched when the front sensor video node is opened. + * + * FIXME: remove the 'if' below if the root cause is found. + */ /* USER_MUX_SEL */ - /* FIXME: when this is uncommented only empty buffers are dequeued */ - /* fimc_is_set_parent_dt(pdev, "mout_aclk_cam1_552_user", "aclk_cam1_552"); */ + if (core->id == 0) + fimc_is_set_parent_dt(pdev, "mout_aclk_cam1_552_user", + "aclk_cam1_552"); fimc_is_set_parent_dt(pdev, "mout_aclk_cam1_400_user", "aclk_cam1_400"); fimc_is_set_parent_dt(pdev, "mout_aclk_cam1_333_user", "aclk_cam1_333"); |