Re: [Workshop-2011] Media summit/KS-2012 proposals
Is there any summary for this summit or presentation material? I am looking forward for some idea on CEC. It is really complex in functionality. Maybe other guys is expecting simiar fruite from summit too. B.R. Jun -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v3] media: mx2_camera: Don't modify non volatile parameters in try_fmt.
Hi Javier On Mon, 3 Sep 2012, javier Martin wrote: Hi, Guennadi,did you pick this one? Wanted to do so, but Regards. On 20 August 2012 11:49, Javier Martin javier.mar...@vista-silicon.com wrote: Signed-off-by: Javier Martin javier.mar...@vista-silicon.com --- Changes since v2: - Add Signed-off-by line. --- drivers/media/video/mx2_camera.c |5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/media/video/mx2_camera.c b/drivers/media/video/mx2_camera.c index 2a33bcb..88dcae6 100644 --- a/drivers/media/video/mx2_camera.c +++ b/drivers/media/video/mx2_camera.c @@ -1385,6 +1385,7 @@ static int mx2_camera_try_fmt(struct soc_camera_device *icd, __u32 pixfmt = pix-pixelformat; struct soc_camera_host *ici = to_soc_camera_host(icd-parent); struct mx2_camera_dev *pcdev = ici-priv; + struct mx2_fmt_cfg *emma_prp; unsigned int width_limit; int ret; @@ -1447,12 +1448,12 @@ static int mx2_camera_try_fmt(struct soc_camera_device *icd, __func__, pcdev-s_width, pcdev-s_height); /* If the sensor does not support image size try PrP resizing */ - pcdev-emma_prp = mx27_emma_prp_get_format(xlate-code, + emma_prp = mx27_emma_prp_get_format(xlate-code, xlate-host_fmt-fourcc); memset(pcdev-resizing, 0, sizeof(pcdev-resizing)); Doesn't the above line also have to be removed? Thanks Guennadi if ((mf.width != pix-width || mf.height != pix-height) - pcdev-emma_prp-cfg.in_fmt == PRP_CNTL_DATA_IN_YUV422) { + emma_prp-cfg.in_fmt == PRP_CNTL_DATA_IN_YUV422) { if (mx2_emmaprp_resize(pcdev, mf, pix, false) 0) dev_dbg(icd-parent, %s: can't resize\n, __func__); } -- 1.7.9.5 --- Guennadi Liakhovetski, Ph.D. Freelance Open-Source Software Developer http://www.open-technology.de/ -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [Workshop-2011] Media summit/KS-2012 proposals
On Wed 5 September 2012 10:04:41 Jun Nie wrote: Is there any summary for this summit or presentation material? I am looking forward for some idea on CEC. It is really complex in functionality. Maybe other guys is expecting simiar fruite from summit too. Yes, there will be a summit report. It's not quite finished yet, I think. With respect to CEC we had some useful discussions. It will have to be a new class of device (/dev/cecX), so the userspace API will be separate from drm or v4l. And the kernel will have to take care of the core CEC protocol w.r.t. control and discovery due to the HDMI 1.4a requirements. I plan on starting work on this within 1-2 weeks. My CEC presentation can be found here: http://hverkuil.home.xs4all.nl/presentations/v4l2-workshop-cec.odp Regards, Hans -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v3] media: mx2_camera: Don't modify non volatile parameters in try_fmt.
On Wed, 5 Sep 2012, Guennadi Liakhovetski wrote: Hi Javier On Mon, 3 Sep 2012, javier Martin wrote: Hi, Guennadi,did you pick this one? Wanted to do so, but I've applied this your patch with only that memset() line additionally removed. If this is ok with you, no need to re-send. Thanks Guennadi Regards. On 20 August 2012 11:49, Javier Martin javier.mar...@vista-silicon.com wrote: Signed-off-by: Javier Martin javier.mar...@vista-silicon.com --- Changes since v2: - Add Signed-off-by line. --- drivers/media/video/mx2_camera.c |5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/media/video/mx2_camera.c b/drivers/media/video/mx2_camera.c index 2a33bcb..88dcae6 100644 --- a/drivers/media/video/mx2_camera.c +++ b/drivers/media/video/mx2_camera.c @@ -1385,6 +1385,7 @@ static int mx2_camera_try_fmt(struct soc_camera_device *icd, __u32 pixfmt = pix-pixelformat; struct soc_camera_host *ici = to_soc_camera_host(icd-parent); struct mx2_camera_dev *pcdev = ici-priv; + struct mx2_fmt_cfg *emma_prp; unsigned int width_limit; int ret; @@ -1447,12 +1448,12 @@ static int mx2_camera_try_fmt(struct soc_camera_device *icd, __func__, pcdev-s_width, pcdev-s_height); /* If the sensor does not support image size try PrP resizing */ - pcdev-emma_prp = mx27_emma_prp_get_format(xlate-code, + emma_prp = mx27_emma_prp_get_format(xlate-code, xlate-host_fmt-fourcc); memset(pcdev-resizing, 0, sizeof(pcdev-resizing)); Doesn't the above line also have to be removed? Thanks Guennadi if ((mf.width != pix-width || mf.height != pix-height) - pcdev-emma_prp-cfg.in_fmt == PRP_CNTL_DATA_IN_YUV422) { + emma_prp-cfg.in_fmt == PRP_CNTL_DATA_IN_YUV422) { if (mx2_emmaprp_resize(pcdev, mf, pix, false) 0) dev_dbg(icd-parent, %s: can't resize\n, __func__); } -- 1.7.9.5 --- Guennadi Liakhovetski, Ph.D. Freelance Open-Source Software Developer http://www.open-technology.de/ --- Guennadi Liakhovetski, Ph.D. Freelance Open-Source Software Developer http://www.open-technology.de/ -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v3] media: mx2_camera: Don't modify non volatile parameters in try_fmt.
On 5 September 2012 10:29, Guennadi Liakhovetski g.liakhovet...@gmx.de wrote: On Wed, 5 Sep 2012, Guennadi Liakhovetski wrote: Hi Javier On Mon, 3 Sep 2012, javier Martin wrote: Hi, Guennadi,did you pick this one? Wanted to do so, but I've applied this your patch with only that memset() line additionally removed. If this is ok with you, no need to re-send. It's OK, thanks for fixing that for me. Regards. -- Javier Martin Vista Silicon S.L. CDTUC - FASE C - Oficina S-345 Avda de los Castros s/n 39005- Santander. Cantabria. Spain +34 942 25 32 60 www.vista-silicon.com -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 0/6] HID: picoLCD additional fixes + CIR support
On Sun, 19 Aug 2012, Bruno Prémont wrote: This series fixes some race conditions in picoLCD driver during remove() and adds support for IR functionality. I have now applied the series, thanks Bruno. -- Jiri Kosina SUSE Labs -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[RFC v5] V4L DT bindings
Hi all Version 5 of this RFC is a result of a discussion of its version 4, which took place during the recent Linux Plumbers conference in San Diego. Changes are: (1) remove bus-width properties from device (bridge and client) top level. This has actually already been decided upon during our discussions with Sylwester, I just forgot to actually remove them, sorry. (2) links are now grouped under ports. This should help better describe device connection topology by making clearer, which interfaces links are attached to. (help needed: in my notes I see port optional if only one port is present, but I seem to remember, that the final decision was - make ports compulsory for uniformity. Which one is true?) (3) videolink is renamed to just link. (4) client is renamed to remote and is now used on both sides of links. (5) clock-names in clock consumer nodes (e.g., camera sensors) should reflect clock input pin names from respective datasheets (6) also serial bus description should be placed under respective link nodes. (7) reference remote link DT nodes in remote properties, not to the parent. (8) use standard names for SoC-external (e.g., i2c) devices on their respective busses. Sensor has been proposed, maybe camera is a better match though. Thanks Guennadi --- Guennadi Liakhovetski, Ph.D. Freelance Open-Source Software Developer http://www.open-technology.de/ // Describe an imaginary configuration: a CEU serving either a parallel ov7725 // sensor, or a serial imx074 sensor, connected over a CSI-2 SoC interface ceu0: ceu@0xfe91 { compatible = renesas,sh-mobile-ceu; reg = 0xfe91 0xa0; interrupts = 0x880; mclk: master_clock { compatible = renesas,ceu-clock; #clock-cells = 1; clock-frequency = 5000; /* max clock frequency */ clock-output-names = mclk; }; ... port@0 { #address-cells = 1; #size-cells = 0; ov772x_1_1: link@1 { reg = 1; /* local pad # */ remote = ceu0_1; /* remote phandle and pad # */ bus-width = 8;/* used data lines */ data-shift = 0; /* lines 7:0 are used */ /* If [hv]sync-active are missing, embedded bt.605 sync is used */ hsync-active = 1; /* active high */ vsync-active = 1; /* active high */ pclk-sample = 1; /* rising */ }; csi2_0: link@0 { reg = 0; remote = ceu0_2; immutable; }; }; }; i2c0: i2c@0xfff2 { ... ov772x_1: camera@0x21 { compatible = omnivision,ov772x; reg = 0x21; vddio-supply = regulator1; vddcore-supply = regulator2; clock-frequency = 2000; clocks = mclk 0; clock-names = xclk; ... port { /* With 1 link per port no need in addresses */ ceu0_1: link@0 { bus-width = 8; remote = ov772x_1_1; hsync-active = 1; hsync-active = 0; /* who came up with an inverter here?... */ pclk-sample = 1; }; }; }; imx074: camera@0x1a { compatible = sony,imx074; reg = 0x1a; vddio-supply = regulator1; vddcore-supply = regulator2; clock-frequency = 3000; /* shared clock with ov772x_1 */ clocks = mclk 0; clock-names = sysclk; /* assuming this is the name in the datasheet */ ... port { csi2_1: link@0 { clock-lanes = 0; data-lanes = 1, 2; remote = imx074_1; }; }; }; ... }; csi2: csi2@0xffc9 {
[PATCH 1/2] [media] soc_camera: Use devm_kzalloc function
devm_kzalloc() has been used to simplify error handling. While at it, the soc_camera_device_register function has been moved to save a few lines of code and a variable. Signed-off-by: Sachin Kamat sachin.ka...@linaro.org --- drivers/media/platform/soc_camera/soc_camera.c | 15 ++- 1 files changed, 2 insertions(+), 13 deletions(-) diff --git a/drivers/media/platform/soc_camera/soc_camera.c b/drivers/media/platform/soc_camera/soc_camera.c index 10b57f8..acf5289 100644 --- a/drivers/media/platform/soc_camera/soc_camera.c +++ b/drivers/media/platform/soc_camera/soc_camera.c @@ -1529,12 +1529,11 @@ static int __devinit soc_camera_pdrv_probe(struct platform_device *pdev) { struct soc_camera_link *icl = pdev-dev.platform_data; struct soc_camera_device *icd; - int ret; if (!icl) return -EINVAL; - icd = kzalloc(sizeof(*icd), GFP_KERNEL); + icd = devm_kzalloc(pdev-dev, sizeof(*icd), GFP_KERNEL); if (!icd) return -ENOMEM; @@ -1543,19 +1542,11 @@ static int __devinit soc_camera_pdrv_probe(struct platform_device *pdev) icd-pdev = pdev-dev; platform_set_drvdata(pdev, icd); - ret = soc_camera_device_register(icd); - if (ret 0) - goto escdevreg; icd-user_width = DEFAULT_WIDTH; icd-user_height= DEFAULT_HEIGHT; - return 0; - -escdevreg: - kfree(icd); - - return ret; + return soc_camera_device_register(icd); } /* @@ -1572,8 +1563,6 @@ static int __devexit soc_camera_pdrv_remove(struct platform_device *pdev) list_del(icd-list); - kfree(icd); - return 0; } -- 1.7.4.1 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 2/2] [media] soc_camera: Use module_platform_driver macro
module_platform_driver simplifies the code by eliminating module_init and module_exit calls. Signed-off-by: Sachin Kamat sachin.ka...@linaro.org --- drivers/media/platform/soc_camera/soc_camera.c | 13 + 1 files changed, 1 insertions(+), 12 deletions(-) diff --git a/drivers/media/platform/soc_camera/soc_camera.c b/drivers/media/platform/soc_camera/soc_camera.c index acf5289..4c7d509 100644 --- a/drivers/media/platform/soc_camera/soc_camera.c +++ b/drivers/media/platform/soc_camera/soc_camera.c @@ -1575,18 +1575,7 @@ static struct platform_driver __refdata soc_camera_pdrv = { }, }; -static int __init soc_camera_init(void) -{ - return platform_driver_register(soc_camera_pdrv); -} - -static void __exit soc_camera_exit(void) -{ - platform_driver_unregister(soc_camera_pdrv); -} - -module_init(soc_camera_init); -module_exit(soc_camera_exit); +module_platform_driver(soc_camera_pdrv); MODULE_DESCRIPTION(Image capture bus driver); MODULE_AUTHOR(Guennadi Liakhovetski ker...@pengutronix.de); -- 1.7.4.1 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] soc-camera: Use new selection target definitions
On Wed, 22 Aug 2012, Sylwester Nawrocki wrote: Replace the deprecated V4L2_SEL_TGT_*_ACTIVE selection target names with their new unified counterparts. Compatibility definitions are already in linux/v4l2-common.h. Signed-off-by: Sylwester Nawrocki sylvester.nawro...@gmail.com Thanks, queued. Guennadi --- drivers/media/platform/soc_camera/soc_camera.c |8 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/media/platform/soc_camera/soc_camera.c b/drivers/media/platform/soc_camera/soc_camera.c index 10b57f8..ba62960 100644 --- a/drivers/media/platform/soc_camera/soc_camera.c +++ b/drivers/media/platform/soc_camera/soc_camera.c @@ -950,11 +950,11 @@ static int soc_camera_s_selection(struct file *file, void *fh, /* In all these cases cropping emulation will not help */ if (s-type != V4L2_BUF_TYPE_VIDEO_CAPTURE || - (s-target != V4L2_SEL_TGT_COMPOSE_ACTIVE - s-target != V4L2_SEL_TGT_CROP_ACTIVE)) + (s-target != V4L2_SEL_TGT_COMPOSE + s-target != V4L2_SEL_TGT_CROP)) return -EINVAL; - if (s-target == V4L2_SEL_TGT_COMPOSE_ACTIVE) { + if (s-target == V4L2_SEL_TGT_COMPOSE) { /* No output size change during a running capture! */ if (is_streaming(ici, icd) (icd-user_width != s-r.width || @@ -974,7 +974,7 @@ static int soc_camera_s_selection(struct file *file, void *fh, ret = ici-ops-set_selection(icd, s); if (!ret - s-target == V4L2_SEL_TGT_COMPOSE_ACTIVE) { + s-target == V4L2_SEL_TGT_COMPOSE) { icd-user_width = s-r.width; icd-user_height = s-r.height; if (!icd-streamer) -- 1.7.4.1 --- Guennadi Liakhovetski, Ph.D. Freelance Open-Source Software Developer http://www.open-technology.de/ -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 1/2] [media] soc_camera: Use devm_kzalloc function
On Wed, 5 Sep 2012, Sachin Kamat wrote: devm_kzalloc() has been used to simplify error handling. While at it, the soc_camera_device_register function has been moved to save a few lines of code and a variable. Signed-off-by: Sachin Kamat sachin.ka...@linaro.org Thanks, both queued. Guennadi --- drivers/media/platform/soc_camera/soc_camera.c | 15 ++- 1 files changed, 2 insertions(+), 13 deletions(-) diff --git a/drivers/media/platform/soc_camera/soc_camera.c b/drivers/media/platform/soc_camera/soc_camera.c index 10b57f8..acf5289 100644 --- a/drivers/media/platform/soc_camera/soc_camera.c +++ b/drivers/media/platform/soc_camera/soc_camera.c @@ -1529,12 +1529,11 @@ static int __devinit soc_camera_pdrv_probe(struct platform_device *pdev) { struct soc_camera_link *icl = pdev-dev.platform_data; struct soc_camera_device *icd; - int ret; if (!icl) return -EINVAL; - icd = kzalloc(sizeof(*icd), GFP_KERNEL); + icd = devm_kzalloc(pdev-dev, sizeof(*icd), GFP_KERNEL); if (!icd) return -ENOMEM; @@ -1543,19 +1542,11 @@ static int __devinit soc_camera_pdrv_probe(struct platform_device *pdev) icd-pdev = pdev-dev; platform_set_drvdata(pdev, icd); - ret = soc_camera_device_register(icd); - if (ret 0) - goto escdevreg; icd-user_width = DEFAULT_WIDTH; icd-user_height= DEFAULT_HEIGHT; - return 0; - -escdevreg: - kfree(icd); - - return ret; + return soc_camera_device_register(icd); } /* @@ -1572,8 +1563,6 @@ static int __devexit soc_camera_pdrv_remove(struct platform_device *pdev) list_del(icd-list); - kfree(icd); - return 0; } -- 1.7.4.1 --- Guennadi Liakhovetski, Ph.D. Freelance Open-Source Software Developer http://www.open-technology.de/ -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[RFC PATCH v5] media: add v4l2 subdev driver for S5K4ECGX sensor
This patch adds driver for S5K4ECGX sensor with embedded ISP SoC, S5K4ECGX, which is a 5M CMOS Image sensor from Samsung The driver implements preview mode of the S5K4ECGX sensor. capture (snapshot) operation, face detection are missing now. Following controls are supported: contrast/saturation/brightness/sharpness Signed-off-by: Sangwook Lee sangwook@linaro.org Cc: Sylwester Nawrocki s.nawro...@samsung.com Cc: Scott Bambrough scott.bambro...@linaro.org --- Changes since v4: - replaced register tables with the function from Sylwester - updated firmware parsing function with CRC32 check firmware generator from user space: git://git.linaro.org/people/sangwook/fimc-v4l2-app.git Changes since v3: - used request_firmware to configure initial settings - added parsing functions to read initial settings - updated regulator API - reduced preview setting tables by experiment Changes since v2: - added GPIO (reset/stby) and regulators - updated I2C read/write, based on s5k6aa datasheet - fixed set_fmt errors - reduced register tables a bit - removed vmalloc Changes since v1: - fixed s_stream(0) when it called twice - changed mutex_X position to be used when strictly necessary - add additional s_power(0) in case that error happens - update more accurate debugging statements - remove dummy else drivers/media/i2c/Kconfig|7 + drivers/media/i2c/Makefile |1 + drivers/media/i2c/s5k4ecgx.c | 1019 ++ include/media/s5k4ecgx.h | 37 ++ 4 files changed, 1064 insertions(+) create mode 100644 drivers/media/i2c/s5k4ecgx.c create mode 100644 include/media/s5k4ecgx.h diff --git a/drivers/media/i2c/Kconfig b/drivers/media/i2c/Kconfig index 9a5a059..55b3bbb 100644 --- a/drivers/media/i2c/Kconfig +++ b/drivers/media/i2c/Kconfig @@ -484,6 +484,13 @@ config VIDEO_S5K6AA This is a V4L2 sensor-level driver for Samsung S5K6AA(FX) 1.3M camera sensor with an embedded SoC image signal processor. +config VIDEO_S5K4ECGX +tristate Samsung S5K4ECGX sensor support +depends on I2C VIDEO_V4L2 VIDEO_V4L2_SUBDEV_API +---help--- + This is a V4L2 sensor-level driver for Samsung S5K4ECGX 5M + camera sensor with an embedded SoC image signal processor. + source drivers/media/i2c/smiapp/Kconfig comment Flash devices diff --git a/drivers/media/i2c/Makefile b/drivers/media/i2c/Makefile index 088a460..a720812 100644 --- a/drivers/media/i2c/Makefile +++ b/drivers/media/i2c/Makefile @@ -55,6 +55,7 @@ obj-$(CONFIG_VIDEO_MT9V032) += mt9v032.o obj-$(CONFIG_VIDEO_SR030PC30) += sr030pc30.o obj-$(CONFIG_VIDEO_NOON010PC30)+= noon010pc30.o obj-$(CONFIG_VIDEO_S5K6AA) += s5k6aa.o +obj-$(CONFIG_VIDEO_S5K4ECGX) += s5k4ecgx.o obj-$(CONFIG_VIDEO_ADP1653)+= adp1653.o obj-$(CONFIG_VIDEO_AS3645A)+= as3645a.o obj-$(CONFIG_VIDEO_SMIAPP_PLL) += smiapp-pll.o diff --git a/drivers/media/i2c/s5k4ecgx.c b/drivers/media/i2c/s5k4ecgx.c new file mode 100644 index 000..0f12d46 --- /dev/null +++ b/drivers/media/i2c/s5k4ecgx.c @@ -0,0 +1,1019 @@ +/* + * Driver for s5k4ecgx (5MP Camera) from Samsung + * a quarter-inch optical format 1.4 micron 5 megapixel (Mp) + * CMOS image sensor. + * + * Copyright (C) 2012, Linaro, Sangwook Lee sangwook@linaro.org + * Copyright (C) 2012, Insignal Co,. Ltd, Homin Lee suap...@insignal.co.kr + * + * Based on s5k6aa, noon010pc30 driver + * Copyright (C) 2011, Samsung Electronics Co., Ltd. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + */ + +#include linux/clk.h +#include linux/crc32.h +#include linux/ctype.h +#include linux/delay.h +#include linux/firmware.h +#include linux/gpio.h +#include linux/i2c.h +#include linux/module.h +#include linux/regulator/consumer.h +#include linux/slab.h +#include linux/vmalloc.h + +#include media/media-entity.h +#include media/s5k4ecgx.h +#include media/v4l2-ctrls.h +#include media/v4l2-device.h +#include media/v4l2-mediabus.h +#include media/v4l2-subdev.h + +static int debug; +module_param(debug, int, 0644); + +#define S5K4ECGX_DRIVER_NAME s5k4ecgx +#define S5K4ECGX_FIRMWARE s5k4ecgx.bin + +/* Firmware revision information */ +#define REG_FW_REVISION0x71a6 +#define REG_FW_VERSION 0x71a4 +#define S5K4ECGX_REVISION_1_1 0x11 +#define S5K4ECGX_FW_VERSION0x4ec0 + +/* General purpose parameters */ +#define REG_USER_BRIGHTNESS0x722c +#define REG_USER_CONTRAST 0x722e +#define REG_USER_SATURATION0x7230 + +#define REG_G_NEW_CFG_SYNC 0x724a +#define REG_G_PREV_IN_WIDTH0x7250 +#define REG_G_PREV_IN_HEIGHT 0x7252 +#define REG_G_PREV_IN_XOFFS0x7254
[PATCH 1/2] s5p-fimc: fimc-lite: Correct Bayer pixel format definitions
Replace erroneous V4L2_PIX_FMT_* entries with their V4L2_MBUS_FMT_* counterparts. This enables use of raw Bayer formats on FIMC-LITE.? subdevs. Signed-off-by: Sylwester Nawrocki s.nawro...@samsung.com Signed-off-by: Kyungmin Park kyungmin.p...@samsung.com --- drivers/media/video/s5p-fimc/fimc-lite-reg.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/media/video/s5p-fimc/fimc-lite-reg.c b/drivers/media/video/s5p-fimc/fimc-lite-reg.c index 09dc71e..a22d7eb 100644 --- a/drivers/media/video/s5p-fimc/fimc-lite-reg.c +++ b/drivers/media/video/s5p-fimc/fimc-lite-reg.c @@ -118,9 +118,9 @@ static const u32 src_pixfmt_map[8][3] = { FLITE_REG_CIGCTRL_YUV422_1P }, { V4L2_MBUS_FMT_VYUY8_2X8, FLITE_REG_CISRCSIZE_ORDER422_IN_CRYCBY, FLITE_REG_CIGCTRL_YUV422_1P }, - { V4L2_PIX_FMT_SGRBG8, 0, FLITE_REG_CIGCTRL_RAW8 }, - { V4L2_PIX_FMT_SGRBG10, 0, FLITE_REG_CIGCTRL_RAW10 }, - { V4L2_PIX_FMT_SGRBG12, 0, FLITE_REG_CIGCTRL_RAW12 }, + { V4L2_MBUS_FMT_SGRBG8_1X8, 0, FLITE_REG_CIGCTRL_RAW8 }, + { V4L2_MBUS_FMT_SGRBG10_1X10, 0, FLITE_REG_CIGCTRL_RAW10 }, + { V4L2_MBUS_FMT_SGRBG12_1X12, 0, FLITE_REG_CIGCTRL_RAW12 }, { V4L2_MBUS_FMT_JPEG_1X8, 0, FLITE_REG_CIGCTRL_USER(1) }, }; -- 1.7.11.3 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 2/2] s5p-fimc: fimc-lite: Propagate frame format on the subdev
When setting image format on subdev's sink pad there was no propagation to the source pad. This resulted in wrong reported format on the source pad and wrong device configuration when used from subdev interace level only. Correct this by propagating format from the sink to the source pad. Signed-off-by: Sylwester Nawrocki s.nawro...@samsung.com Signed-off-by: Kyungmin Park kyungmin.p...@samsung.com --- drivers/media/video/s5p-fimc/fimc-lite.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/media/video/s5p-fimc/fimc-lite.c b/drivers/media/video/s5p-fimc/fimc-lite.c index 9289008..cd4cf12 100644 --- a/drivers/media/video/s5p-fimc/fimc-lite.c +++ b/drivers/media/video/s5p-fimc/fimc-lite.c @@ -1064,6 +1064,7 @@ static int fimc_lite_subdev_set_fmt(struct v4l2_subdev *sd, struct fimc_lite *fimc = v4l2_get_subdevdata(sd); struct v4l2_mbus_framefmt *mf = fmt-format; struct flite_frame *sink = fimc-inp_frame; + struct flite_frame *source = fimc-out_frame; const struct fimc_fmt *ffmt; v4l2_dbg(1, debug, sd, pad%d: code: 0x%x, %dx%d, @@ -1097,8 +1098,10 @@ static int fimc_lite_subdev_set_fmt(struct v4l2_subdev *sd, sink-rect.height = mf-height; sink-rect.left = 0; sink-rect.top = 0; - /* Reset source crop rectangle */ - fimc-out_frame.rect = sink-rect; + /* Reset source format and crop rectangle */ + source-rect = sink-rect; + source-f_width = mf-width; + source-f_height = mf-height; } else { /* Allow changing format only on sink pad */ mf-code = fimc-fmt-mbus_code; -- 1.7.11.3 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Camera not detected on linux-next
Hi, I am running linux-next 20120905 on a mx31pdk board with a ov2640 CMOS and I am not able to get the ov2640 to be probed: soc-camera-pdrv soc-camera-pdrv.0: Probing soc-camera-pdrv.0 mx3-camera mx3-camera.0: MX3 Camera driver attached to camera 0 mx3-camera mx3-camera.0: MX3 Camera driver detached from camera 0 (no messages showing ov2640 being probed) I noticed that Kconfig changed the way to select the Sensors used on soc_camera driver and I selected ov2640 in the .config. camera worked fine on this board running 3.5.3. So before start bisecting, I would like to know if there is anything obvious I am missing. Also tested on a mx27pdk and ov2640 could not be probed there as well. Thanks, Fabio Estevam -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [GIT PATCHES FOR v3.6] Samsung media driver fixes
Hi Mauro, On 08/22/2012 10:32 AM, Sylwester Nawrocki wrote: The following changes since commit f9cd49033b349b8be3bb1f01b39eed837853d880: Merge tag 'v3.6-rc1' into staging/for_v3.6 (2012-08-03 22:41:33 -0300) are available in the git repository at: git://git.infradead.org/users/kmpark/linux-samsung v4l-fixes for you to fetch changes up to 0e59db054e30658c6955d6e27b0a252cef9bfafc: s5p-mfc: Fix second memory bank alignment (2012-08-16 19:12:19 +0200) Kamil Debski (1): s5p-mfc: Fix second memory bank alignment Sylwester Nawrocki (7): s5p-fimc: Enable FIMC-LITE driver only for SOC_EXYNOS4x12 s5p-fimc: Don't allocate fimc-lite video device structure dynamically s5p-fimc: Don't allocate fimc-capture video device dynamically s5p-fimc: Don't allocate fimc-m2m video device dynamically m5mols: Add missing free_irq() on error path m5mols: Fix cast warnings from m5mols_[set/get]_ctrl_mode s5p-fimc: Fix setup of initial links to FIMC entities I've added 2 more patches to this series: The following changes since commit f9cd49033b349b8be3bb1f01b39eed837853d880: Merge tag 'v3.6-rc1' into staging/for_v3.6 (2012-08-03 22:41:33 -0300) are available in the git repository at: git://git.infradead.org/users/kmpark/linux-samsung v4l-fixes for you to fetch changes up to 06ed4e72ce30ef7d15ef2de7e15ed47107d05ded: s5p-fimc: fimc-lite: Propagate frame format on the subdev (2012-09-05 15:21:33 +0200) Kamil Debski (1): s5p-mfc: Fix second memory bank alignment Sylwester Nawrocki (9): s5p-fimc: Enable FIMC-LITE driver only for SOC_EXYNOS4x12 s5p-fimc: Don't allocate fimc-lite video device structure dynamically s5p-fimc: Don't allocate fimc-capture video device dynamically s5p-fimc: Don't allocate fimc-m2m video device dynamically m5mols: Add missing free_irq() on error path m5mols: Fix cast warnings from m5mols_[set/get]_ctrl_mode s5p-fimc: Fix setup of initial links to FIMC entities s5p-fimc: fimc-lite: Correct Bayer pixel format definitions s5p-fimc: fimc-lite: Propagate frame format on the subdev drivers/media/video/m5mols/m5mols.h | 4 ++-- drivers/media/video/m5mols/m5mols_controls.c | 4 ++-- drivers/media/video/m5mols/m5mols_core.c | 4 +++- drivers/media/video/s5p-fimc/Kconfig | 2 +- drivers/media/video/s5p-fimc/fimc-capture.c | 31 --- drivers/media/video/s5p-fimc/fimc-core.h | 4 ++-- drivers/media/video/s5p-fimc/fimc-lite-reg.c | 8 drivers/media/video/s5p-fimc/fimc-lite.c | 49 ++--- drivers/media/video/s5p-fimc/fimc-lite.h | 2 +- drivers/media/video/s5p-fimc/fimc-m2m.c | 40 +--- drivers/media/video/s5p-fimc/fimc-mdevice.c | 9 ++--- drivers/media/video/s5p-fimc/fimc-mdevice.h | 6 ++ drivers/media/video/s5p-fimc/fimc-reg.c | 6 +++--- drivers/media/video/s5p-mfc/s5p_mfc_ctrl.c | 2 +- 14 files changed, 73 insertions(+), 98 deletions(-) drivers/media/video/m5mols/m5mols.h | 4 +-- drivers/media/video/m5mols/m5mols_controls.c | 4 +-- drivers/media/video/m5mols/m5mols_core.c | 4 ++- drivers/media/video/s5p-fimc/Kconfig | 2 +- drivers/media/video/s5p-fimc/fimc-capture.c | 31 +++--- drivers/media/video/s5p-fimc/fimc-core.h | 4 +-- drivers/media/video/s5p-fimc/fimc-lite-reg.c | 2 +- drivers/media/video/s5p-fimc/fimc-lite.c | 42 ++--- drivers/media/video/s5p-fimc/fimc-lite.h | 2 +- drivers/media/video/s5p-fimc/fimc-m2m.c | 40 --- drivers/media/video/s5p-fimc/fimc-mdevice.c | 9 -- drivers/media/video/s5p-fimc/fimc-mdevice.h | 6 ++-- drivers/media/video/s5p-fimc/fimc-reg.c | 6 ++-- drivers/media/video/s5p-mfc/s5p_mfc_ctrl.c | 2 +- 14 files changed, 65 insertions(+), 93 deletions(-) -- Thanks, Sylwester -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: Camera not detected on linux-next
Hi, On 09/05/2012 06:06 PM, Fabio Estevam wrote: I am running linux-next 20120905 on a mx31pdk board with a ov2640 CMOS and I am not able to get the ov2640 to be probed: soc-camera-pdrv soc-camera-pdrv.0: Probing soc-camera-pdrv.0 mx3-camera mx3-camera.0: MX3 Camera driver attached to camera 0 mx3-camera mx3-camera.0: MX3 Camera driver detached from camera 0 (no messages showing ov2640 being probed) I noticed that Kconfig changed the way to select the Sensors used on soc_camera driver and I selected ov2640 in the .config. camera worked fine on this board running 3.5.3. So before start bisecting, I would like to know if there is anything obvious I am missing. Also tested on a mx27pdk and ov2640 could not be probed there as well. Maybe this is about the sensor/host driver linking order. If so, then this patch should help http://git.linuxtv.org/snawrocki/media.git/commitdiff/458b9b5ab8cb970887c9d1f1fddf88399b2d9ef2 -- Regards, Sylwester -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: Camera not detected on linux-next
Hi Sylwester, On Wed, Sep 5, 2012 at 1:17 PM, Sylwester Nawrocki s.nawro...@samsung.com wrote: Maybe this is about the sensor/host driver linking order. If so, then this patch should help Excellent! This fixed the problem! Thanks, Fabio Estevam -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 1/5] drivers/media/platform/davinci/vpbe.c: fix error return code
Hi Peter, On Tue, Sep 4, 2012 at 1:14 PM, Peter Senna Tschudin peter.se...@gmail.com wrote: From: Peter Senna Tschudin peter.se...@gmail.com Convert a nonnegative error return code to a negative one, as returned elsewhere in the function. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // smpl ( if@p1 (\(ret 0\|ret != 0\)) { ... return ret; } | ret@p1 = 0 ) ... when != ret = e1 when != ret *if(...) { ... when != ret = e2 when forall return ret; } // /smpl Signed-off-by: Peter Senna Tschudin peter.se...@gmail.com --- drivers/media/platform/davinci/vpbe.c | 13 ++--- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/drivers/media/platform/davinci/vpbe.c b/drivers/media/platform/davinci/vpbe.c index c4a82a1..2e4a0da 100644 --- a/drivers/media/platform/davinci/vpbe.c +++ b/drivers/media/platform/davinci/vpbe.c @@ -603,7 +603,6 @@ static int vpbe_initialize(struct device *dev, struct vpbe_device *vpbe_dev) int output_index; int num_encoders; int ret = 0; - int err; int i; /* @@ -646,10 +645,10 @@ static int vpbe_initialize(struct device *dev, struct vpbe_device *vpbe_dev) } v4l2_info(vpbe_dev-v4l2_dev, vpbe v4l2 device registered\n); - err = bus_for_each_dev(platform_bus_type, NULL, vpbe_dev, + ret = bus_for_each_dev(platform_bus_type, NULL, vpbe_dev, platform_device_get); - if (err 0) - return err; + if (ret 0) + return ret; This should be goto somewhere (probably vbpe_fail_v4l2_device), instead of return. There are several tasks done (like locking a mutex) that need to be undone. Actually, this bug is not directly related to *this* patch, so you could send another patch fixing this. Regards, Ezequiel. -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 2/5] drivers/media/platform/s5p-tv/sdo_drv.c: fix error return code
Hi Peter, On Tue, Sep 4, 2012 at 1:14 PM, Peter Senna Tschudin peter.se...@gmail.com wrote: From: Peter Senna Tschudin peter.se...@gmail.com Convert a nonnegative error return code to a negative one, as returned elsewhere in the function. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // smpl ( if@p1 (\(ret 0\|ret != 0\)) { ... return ret; } | ret@p1 = 0 ) ... when != ret = e1 when != ret *if(...) { ... when != ret = e2 when forall return ret; } // /smpl Signed-off-by: Peter Senna Tschudin peter.se...@gmail.com --- drivers/media/platform/s5p-tv/sdo_drv.c |3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/media/platform/s5p-tv/sdo_drv.c b/drivers/media/platform/s5p-tv/sdo_drv.c index ad68bbe..58cf56d 100644 --- a/drivers/media/platform/s5p-tv/sdo_drv.c +++ b/drivers/media/platform/s5p-tv/sdo_drv.c @@ -369,6 +369,7 @@ static int __devinit sdo_probe(struct platform_device *pdev) sdev-fout_vpll = clk_get(dev, fout_vpll); if (IS_ERR_OR_NULL(sdev-fout_vpll)) { dev_err(dev, failed to get clock 'fout_vpll'\n); + ret = -ENODEV; goto fail_dacphy; } dev_info(dev, fout_vpll.rate = %lu\n, clk_get_rate(sclk_vpll)); @@ -377,11 +378,13 @@ static int __devinit sdo_probe(struct platform_device *pdev) sdev-vdac = devm_regulator_get(dev, vdd33a_dac); if (IS_ERR_OR_NULL(sdev-vdac)) { dev_err(dev, failed to get regulator 'vdac'\n); + ret = -ENODEV; goto fail_fout_vpll; } sdev-vdet = devm_regulator_get(dev, vdet); if (IS_ERR_OR_NULL(sdev-vdet)) { dev_err(dev, failed to get regulator 'vdet'\n); + ret = -ENODEV; goto fail_fout_vpll; } Just a nitpick: why using ENODEV when the rest of the function is using ENXIO? In which case, you could fix this with a less intrusive change, by initializating ret to -ENXIO. Hope this helps, Ezequiel. -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 3/5] drivers/media/platform/s5p-tv/mixer_video.c: fix error return code
Hi Peter, On Tue, Sep 4, 2012 at 1:14 PM, Peter Senna Tschudin peter.se...@gmail.com wrote: From: Peter Senna Tschudin peter.se...@gmail.com Convert a nonnegative error return code to a negative one, as returned elsewhere in the function. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // smpl ( if@p1 (\(ret 0\|ret != 0\)) { ... return ret; } | ret@p1 = 0 ) ... when != ret = e1 when != ret *if(...) { ... when != ret = e2 when forall return ret; } // /smpl Signed-off-by: Peter Senna Tschudin peter.se...@gmail.com --- drivers/media/platform/s5p-tv/mixer_video.c |5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/media/platform/s5p-tv/mixer_video.c b/drivers/media/platform/s5p-tv/mixer_video.c index a9c6be3..f139fed 100644 --- a/drivers/media/platform/s5p-tv/mixer_video.c +++ b/drivers/media/platform/s5p-tv/mixer_video.c @@ -83,6 +83,7 @@ int __devinit mxr_acquire_video(struct mxr_device *mdev, mdev-alloc_ctx = vb2_dma_contig_init_ctx(mdev-dev); if (IS_ERR_OR_NULL(mdev-alloc_ctx)) { mxr_err(mdev, could not acquire vb2 allocator\n); + ret = -ENODEV; goto fail_v4l2_dev; } @@ -764,8 +765,10 @@ static int mxr_video_open(struct file *file) } /* leaving if layer is already initialized */ - if (!v4l2_fh_is_singular_file(file)) + if (!v4l2_fh_is_singular_file(file)) { + ret = -EBUSY; /* Not sure if EBUSY is the best for here */ goto unlock; + } /* FIXME: should power be enabled on open? */ ret = mxr_power_get(mdev); Well, same to say here. I think if you look at this functions you'll realize it's so much easy to just initialize ret to something, instead of the obviously wrong ret = 0. IMO, initializing ret to zero it's a free ticket to bugs. :-) Hope it helps, Ezequiel. -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 4/5] drivers/media/platform/vino.c: fix error return code
Hi Peter, On Tue, Sep 4, 2012 at 1:14 PM, Peter Senna Tschudin peter.se...@gmail.com wrote: From: Peter Senna Tschudin peter.se...@gmail.com Convert a nonnegative error return code to a negative one, as returned elsewhere in the function. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // smpl ( if@p1 (\(ret 0\|ret != 0\)) { ... return ret; } | ret@p1 = 0 ) ... when != ret = e1 when != ret *if(...) { ... when != ret = e2 when forall return ret; } // /smpl Signed-off-by: Peter Senna Tschudin peter.se...@gmail.com --- drivers/media/platform/vino.c |1 + 1 file changed, 1 insertion(+) diff --git a/drivers/media/platform/vino.c b/drivers/media/platform/vino.c index cc9110c..6654a28 100644 --- a/drivers/media/platform/vino.c +++ b/drivers/media/platform/vino.c @@ -2061,6 +2061,7 @@ static int vino_capture_next(struct vino_channel_settings *vcs, int start) } if (incoming == 0) { dprintk(vino_capture_next(): no buffers available\n); + err = -ENOMEM; goto out; } Mmm, this one doesn't look good. I think the intention was to return zero, without error. They driver tt's just double-checking for incoming data, if there's no incoming data, then he simply exits. Thanks, Ezequiel. -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
cron job: media_tree daily build: WARNINGS
This message is generated daily by a cron job that builds media_tree for the kernels and architectures in the list below. Results of the daily build of media_tree: date:Wed Sep 5 19:00:20 CEST 2012 git hash:79e8c7bebb467bbc3f2514d75bba669a3f354324 gcc version: i686-linux-gcc (GCC) 4.7.1 host hardware:x86_64 host os: 3.4.07-marune linux-git-arm-eabi-davinci: WARNINGS linux-git-arm-eabi-exynos: OK linux-git-arm-eabi-omap: WARNINGS linux-git-i686: WARNINGS linux-git-m32r: WARNINGS linux-git-mips: WARNINGS linux-git-powerpc64: WARNINGS linux-git-x86_64: WARNINGS linux-2.6.31.12-x86_64: WARNINGS linux-2.6.32.6-x86_64: WARNINGS linux-2.6.33-x86_64: WARNINGS linux-2.6.34-x86_64: WARNINGS linux-2.6.35.3-x86_64: WARNINGS linux-2.6.36-x86_64: WARNINGS linux-2.6.37-x86_64: WARNINGS linux-2.6.38.2-x86_64: WARNINGS linux-2.6.39.1-x86_64: WARNINGS linux-3.0-x86_64: WARNINGS linux-3.1-x86_64: WARNINGS linux-3.2.1-x86_64: WARNINGS linux-3.3-x86_64: WARNINGS linux-3.4-x86_64: WARNINGS linux-3.5-x86_64: WARNINGS linux-3.6-rc2-x86_64: WARNINGS linux-2.6.31.12-i686: WARNINGS linux-2.6.32.6-i686: WARNINGS linux-2.6.33-i686: WARNINGS linux-2.6.34-i686: WARNINGS linux-2.6.35.3-i686: WARNINGS linux-2.6.36-i686: WARNINGS linux-2.6.37-i686: WARNINGS linux-2.6.38.2-i686: WARNINGS linux-2.6.39.1-i686: WARNINGS linux-3.0-i686: WARNINGS linux-3.1-i686: WARNINGS linux-3.2.1-i686: WARNINGS linux-3.3-i686: WARNINGS linux-3.4-i686: WARNINGS linux-3.5-i686: WARNINGS linux-3.6-rc2-i686: WARNINGS apps: WARNINGS spec-git: OK sparse: ERRORS Detailed results are available here: http://www.xs4all.nl/~hverkuil/logs/Wednesday.log Full logs are available here: http://www.xs4all.nl/~hverkuil/logs/Wednesday.tar.bz2 The V4L-DVB specification from this daily build is here: http://www.xs4all.nl/~hverkuil/spec/media.html -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [RFC PATCH v5] media: add v4l2 subdev driver for S5K4ECGX sensor
Hi Sangwook, On 09/05/2012 02:28 PM, Sangwook Lee wrote: This patch adds driver for S5K4ECGX sensor with embedded ISP SoC, S5K4ECGX, which is a 5M CMOS Image sensor from Samsung The driver implements preview mode of the S5K4ECGX sensor. capture (snapshot) operation, face detection are missing now. Following controls are supported: contrast/saturation/brightness/sharpness Signed-off-by: Sangwook Leesangwook@linaro.org Cc: Sylwester Nawrockis.nawro...@samsung.com Cc: Scott Bambroughscott.bambro...@linaro.org Overall it looks good, thank you for patiently addressing all my comments ;) There might be some rough edges here and there, but it's all easy to fix. Please see below. Reviewed-by: Sylwester Nawrocki s.nawro...@samsung.com --- Changes since v4: - replaced register tables with the function from Sylwester - updated firmware parsing function with CRC32 check firmware generator from user space: git://git.linaro.org/people/sangwook/fimc-v4l2-app.git Changes since v3: - used request_firmware to configure initial settings - added parsing functions to read initial settings - updated regulator API - reduced preview setting tables by experiment Changes since v2: - added GPIO (reset/stby) and regulators - updated I2C read/write, based on s5k6aa datasheet - fixed set_fmt errors - reduced register tables a bit - removed vmalloc Changes since v1: - fixed s_stream(0) when it called twice - changed mutex_X position to be used when strictly necessary - add additional s_power(0) in case that error happens - update more accurate debugging statements - remove dummy else drivers/media/i2c/Kconfig|7 + drivers/media/i2c/Makefile |1 + drivers/media/i2c/s5k4ecgx.c | 1019 ++ include/media/s5k4ecgx.h | 37 ++ 4 files changed, 1064 insertions(+) create mode 100644 drivers/media/i2c/s5k4ecgx.c create mode 100644 include/media/s5k4ecgx.h diff --git a/drivers/media/i2c/Kconfig b/drivers/media/i2c/Kconfig index 9a5a059..55b3bbb 100644 --- a/drivers/media/i2c/Kconfig +++ b/drivers/media/i2c/Kconfig @@ -484,6 +484,13 @@ config VIDEO_S5K6AA This is a V4L2 sensor-level driver for Samsung S5K6AA(FX) 1.3M camera sensor with an embedded SoC image signal processor. +config VIDEO_S5K4ECGX +tristate Samsung S5K4ECGX sensor support +depends on I2C VIDEO_V4L2 VIDEO_V4L2_SUBDEV_API +---help--- + This is a V4L2 sensor-level driver for Samsung S5K4ECGX 5M + camera sensor with an embedded SoC image signal processor. + source drivers/media/i2c/smiapp/Kconfig comment Flash devices diff --git a/drivers/media/i2c/Makefile b/drivers/media/i2c/Makefile index 088a460..a720812 100644 --- a/drivers/media/i2c/Makefile +++ b/drivers/media/i2c/Makefile @@ -55,6 +55,7 @@ obj-$(CONFIG_VIDEO_MT9V032) += mt9v032.o obj-$(CONFIG_VIDEO_SR030PC30) += sr030pc30.o obj-$(CONFIG_VIDEO_NOON010PC30) += noon010pc30.o obj-$(CONFIG_VIDEO_S5K6AA) += s5k6aa.o +obj-$(CONFIG_VIDEO_S5K4ECGX) += s5k4ecgx.o obj-$(CONFIG_VIDEO_ADP1653) += adp1653.o obj-$(CONFIG_VIDEO_AS3645A) += as3645a.o obj-$(CONFIG_VIDEO_SMIAPP_PLL) += smiapp-pll.o diff --git a/drivers/media/i2c/s5k4ecgx.c b/drivers/media/i2c/s5k4ecgx.c new file mode 100644 index 000..0f12d46 --- /dev/null +++ b/drivers/media/i2c/s5k4ecgx.c @@ -0,0 +1,1019 @@ +/* + * Driver for s5k4ecgx (5MP Camera) from Samsung + * a quarter-inch optical format 1.4 micron 5 megapixel (Mp) + * CMOS image sensor. + * + * Copyright (C) 2012, Linaro, Sangwook Leesangwook@linaro.org + * Copyright (C) 2012, Insignal Co,. Ltd, Homin Leesuap...@insignal.co.kr + * + * Based on s5k6aa, noon010pc30 driver + * Copyright (C) 2011, Samsung Electronics Co., Ltd. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + */ + +#includelinux/clk.h +#includelinux/crc32.h +#includelinux/ctype.h +#includelinux/delay.h +#includelinux/firmware.h +#includelinux/gpio.h +#includelinux/i2c.h +#includelinux/module.h +#includelinux/regulator/consumer.h +#includelinux/slab.h +#includelinux/vmalloc.h What do we need this header for ? + +#includemedia/media-entity.h +#includemedia/s5k4ecgx.h +#includemedia/v4l2-ctrls.h +#includemedia/v4l2-device.h +#includemedia/v4l2-mediabus.h +#includemedia/v4l2-subdev.h ... + +static int s5k4ecgx_set_ahb_address(struct v4l2_subdev *sd) +{ + int ret; + struct i2c_client *client = v4l2_get_subdevdata(sd); + + /* Set APB peripherals start address */ + ret = s5k4ecgx_i2c_write(client, AHB_MSB_ADDR_PTR, GEN_REG_OFFSH); + if (ret) + return ret; + /* + * FIXME: This is copied from
Re: [RFC v5] V4L DT bindings
On 09/05/2012 04:57 AM, Guennadi Liakhovetski wrote: Hi all Version 5 of this RFC is a result of a discussion of its version 4, which took place during the recent Linux Plumbers conference in San Diego. Changes are: (1) remove bus-width properties from device (bridge and client) top level. This has actually already been decided upon during our discussions with Sylwester, I just forgot to actually remove them, sorry. (2) links are now grouped under ports. This should help better describe device connection topology by making clearer, which interfaces links are attached to. (help needed: in my notes I see port optional if only one port is present, but I seem to remember, that the final decision was - make ports compulsory for uniformity. Which one is true?) I'd tend to make the port node compulsory. A related question: What code is going to parse all the port/link sub-nodes in a device? And, how does it know which sub-nodes are ports, and which are something else entirely? Perhaps the algorithm is that all port nodes must be named port? If there were (optionally) no port node, I think the answer to that question would be a lot more complex, hence why I advocate for it always being there. (3) videolink is renamed to just link. (4) client is renamed to remote and is now used on both sides of links. (5) clock-names in clock consumer nodes (e.g., camera sensors) should reflect clock input pin names from respective datasheets (6) also serial bus description should be placed under respective link nodes. (7) reference remote link DT nodes in remote properties, not to the parent. (8) use standard names for SoC-external (e.g., i2c) devices on their respective busses. Sensor has been proposed, maybe camera is a better match though. Thanks Guennadi --- Guennadi Liakhovetski, Ph.D. Freelance Open-Source Software Developer http://www.open-technology.de/ // Describe an imaginary configuration: a CEU serving either a parallel ov7725 // sensor, or a serial imx074 sensor, connected over a CSI-2 SoC interface ceu0: ceu@0xfe91 { compatible = renesas,sh-mobile-ceu; reg = 0xfe91 0xa0; interrupts = 0x880; mclk: master_clock { compatible = renesas,ceu-clock; #clock-cells = 1; clock-frequency = 5000; /* max clock frequency */ clock-output-names = mclk; }; ... port@0 { Since there's only 1 port node here, you can drop the @0 here. #address-cells = 1; #size-cells = 0; ov772x_1_1: link@1 { This isn't a comment on the binding definition, but on the example itself. The label names (ov772x_1_1 here and csi2_0 below) feel backwards to me; I'd personally use label names that describe the object being labelled, rather than the object that's linked to the node being labelled. In other words, ceu0_1 here, and ov772x_1 at the far end of this link. But, these are just arbitrary names, so you can name/label everything whatever you want and it'll still work. reg = 1; /* local pad # */ remote = ceu0_1; /* remote phandle and pad # */ bus-width = 8;/* used data lines */ data-shift = 0; /* lines 7:0 are used */ /* If [hv]sync-active are missing, embedded bt.605 sync is used */ hsync-active = 1; /* active high */ vsync-active = 1; /* active high */ pclk-sample = 1; /* rising */ }; csi2_0: link@0 { reg = 0; remote = ceu0_2; immutable; }; }; }; i2c0: i2c@0xfff2 { ... ov772x_1: camera@0x21 { compatible = omnivision,ov772x; reg = 0x21; vddio-supply = regulator1; vddcore-supply = regulator2; clock-frequency = 2000; clocks = mclk 0; clock-names = xclk; ... port { /* With 1 link per port no need in addresses */ ceu0_1: link@0 { You can drop @0 there too. bus-width = 8; remote = ov772x_1_1; hsync-active = 1; hsync-active = 0; /* who came up
Re: [Workshop-2011] Media summit/KS-2012 proposals
2012/9/5 Hans Verkuil hverk...@xs4all.nl: On Wed 5 September 2012 10:04:41 Jun Nie wrote: Is there any summary for this summit or presentation material? I am looking forward for some idea on CEC. It is really complex in functionality. Maybe other guys is expecting simiar fruite from summit too. Yes, there will be a summit report. It's not quite finished yet, I think. With respect to CEC we had some useful discussions. It will have to be a new class of device (/dev/cecX), so the userspace API will be separate from drm or v4l. And the kernel will have to take care of the core CEC protocol w.r.t. control and discovery due to the HDMI 1.4a requirements. I plan on starting work on this within 1-2 weeks. My CEC presentation can be found here: http://hverkuil.home.xs4all.nl/presentations/v4l2-workshop-cec.odp Regards, Hans Thanks for quick response! It's good to know that CEC is independent with DRM/V4L for my HDMI implementation is FB/lcd-device based. CEC is also deserved to have independent management in both hardware signal and functionality. Someone also expressed similar thoughts before. Will remote control protocal parsing are done in userspace reference library? Or not decided yet? B.R. Jun -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html