summaryrefslogtreecommitdiff
path: root/drivers/media/platform/s5p-fimc/fimc-core.c
diff options
context:
space:
mode:
authorSylwester Nawrocki <s.nawrocki@samsung.com>2013-03-20 10:44:39 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2013-03-31 11:00:23 -0300
commit88fa8311ee36602362a1d6b61117dc3ac76ff8ad (patch)
treea14551731470a070ff7140497407c9d5f9af0f18 /drivers/media/platform/s5p-fimc/fimc-core.c
parent056f4f3036394892ed591932326c11613b6584c1 (diff)
[media] s5p-fimc: Add support for ISP Writeback data input bus type
A second sink pad is added to each FIMC.N subdev that will be used to link it to the FIMC-IS-ISP subdev. Only V4L2_MBUS_FMT_YUV10_1X30 format is supported at this pad (FIMC_SD_PAD_SINK_FIFO). The routine checking for mismatch in the image formats at sides of the links is updated to account for the fact FIMC.X subdevs now have sink pads at the pad indexes 0, 1 and source pad at pad index 2. If link to FIMC.X pad 1 is activated we switch FIMC input data bus type to the ISP Writeback. Only a single active link to FIMC.X pad 0 or 1 will be allowed at any time. Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/platform/s5p-fimc/fimc-core.c')
-rw-r--r--drivers/media/platform/s5p-fimc/fimc-core.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/media/platform/s5p-fimc/fimc-core.c b/drivers/media/platform/s5p-fimc/fimc-core.c
index 6a8098c42cc8..1edd3aa8f3f3 100644
--- a/drivers/media/platform/s5p-fimc/fimc-core.c
+++ b/drivers/media/platform/s5p-fimc/fimc-core.c
@@ -20,6 +20,7 @@
#include <linux/platform_device.h>
#include <linux/pm_runtime.h>
#include <linux/list.h>
+#include <linux/mfd/syscon.h>
#include <linux/io.h>
#include <linux/of.h>
#include <linux/of_device.h>
@@ -79,6 +80,10 @@ static struct fimc_fmt fimc_formats[] = {
.colplanes = 1,
.flags = FMT_FLAGS_M2M_OUT | FMT_HAS_ALPHA,
}, {
+ .name = "YUV 4:4:4",
+ .mbus_code = V4L2_MBUS_FMT_YUV10_1X30,
+ .flags = FMT_FLAGS_WRITEBACK,
+ }, {
.name = "YUV 4:2:2 packed, YCbYCr",
.fourcc = V4L2_PIX_FMT_YUYV,
.depth = { 16 },
@@ -959,6 +964,11 @@ static int fimc_probe(struct platform_device *pdev)
spin_lock_init(&fimc->slock);
mutex_init(&fimc->lock);
+ fimc->sysreg = syscon_regmap_lookup_by_phandle(dev->of_node,
+ "samsung,sysreg");
+ if (IS_ERR(fimc->sysreg))
+ return PTR_ERR(fimc->sysreg);
+
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
fimc->regs = devm_ioremap_resource(dev, res);
if (IS_ERR(fimc->regs))