From: Sylwester Nawrocki Date: Mon, 29 Feb 2016 15:03:26 +0000 (+0100) Subject: fimc-is: Workaround for ACLK_CAM1_552_USER configuration issues X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6d20ffe9f9a32f75382fea72b75e37724e7a8844;p=platform%2Fkernel%2Flinux-exynos.git 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. Change-Id: If121971afa4007efc778bde452ff95e75f20dced Signed-off-by: Sylwester Nawrocki --- 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 #include #include -#include "exynos-fimc-is.h" #include +#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");