Re: Connecting ADV76xx to CSI via SFMC
Hi Jean-Michel, Am Montag, den 24.11.2014, 16:19 +0100 schrieb Jean-Michel Hautbois: Hi, I am working on using the CSI bus of i.MX6 with a adv7611 chip. I started to work with Steve Longerbeam's tree, and here is the current tree I am using : https://github.com/Vodalys/linux-2.6-imx/tree/mx6-camera-staging-v2-vbx This is a WiP tree, and not intended to be complete right now. But at least, it should be possible to get a picture. I will try to be as complete and synthetic as possible... Right now, I am configuring the ADV7611 in 16-Bit SDR ITU-R BT.656 4:2:2 Mode 0 (Table 73 in Appendix C of the Reference Manual). ITU-R BT.656 only specifies 8-bit (or 10-bit) streams, the 16-bit BT.656 SDR/DDR modes with two values on the bus at the same time are somewhat nonstandard. As far as I can tell, this mode should correspond to the CSI's BT.1120 SDR mode (Figure 37-20 in MX6DQ Reference Manual v1), so I'd expect CSI_SENS_CONF to be configured as DATA_WIDTH=1 (8-bit components), SENS_DATA_FORMAT=1 (YUV422), SENS_PRCTL=5 (progressive BT.1120 SDR). regards Philipp -- 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/9] clk: sunxi: Add prcm mod0 clock driver
Hi, On 11/24/2014 11:03 PM, Maxime Ripard wrote: On Fri, Nov 21, 2014 at 10:13:10AM +0100, Hans de Goede wrote: Hi, On 11/21/2014 09:49 AM, Maxime Ripard wrote: Hi, On Thu, Nov 20, 2014 at 04:55:22PM +0100, Hans de Goede wrote: Add a driver for mod0 clocks found in the prcm. Currently there is only one mod0 clocks in the prcm, the ir clock. Signed-off-by: Hans de Goede hdego...@redhat.com --- Documentation/devicetree/bindings/clock/sunxi.txt | 1 + drivers/clk/sunxi/Makefile| 2 +- drivers/clk/sunxi/clk-sun6i-prcm-mod0.c | 63 +++ drivers/mfd/sun6i-prcm.c | 14 + 4 files changed, 79 insertions(+), 1 deletion(-) create mode 100644 drivers/clk/sunxi/clk-sun6i-prcm-mod0.c diff --git a/Documentation/devicetree/bindings/clock/sunxi.txt b/Documentation/devicetree/bindings/clock/sunxi.txt index ed116df..342c75a 100644 --- a/Documentation/devicetree/bindings/clock/sunxi.txt +++ b/Documentation/devicetree/bindings/clock/sunxi.txt @@ -56,6 +56,7 @@ Required properties: allwinner,sun4i-a10-usb-clk - for usb gates + resets on A10 / A20 allwinner,sun5i-a13-usb-clk - for usb gates + resets on A13 allwinner,sun6i-a31-usb-clk - for usb gates + resets on A31 + allwinner,sun6i-a31-ir-clk - for the ir clock on A31 Required properties for all clocks: - reg : shall be the control register address for the clock. diff --git a/drivers/clk/sunxi/Makefile b/drivers/clk/sunxi/Makefile index 7ddc2b5..daf8b1c 100644 --- a/drivers/clk/sunxi/Makefile +++ b/drivers/clk/sunxi/Makefile @@ -10,4 +10,4 @@ obj-y += clk-sun8i-mbus.o obj-$(CONFIG_MFD_SUN6I_PRCM) += \ clk-sun6i-ar100.o clk-sun6i-apb0.o clk-sun6i-apb0-gates.o \ - clk-sun8i-apb0.o + clk-sun8i-apb0.o clk-sun6i-prcm-mod0.o diff --git a/drivers/clk/sunxi/clk-sun6i-prcm-mod0.c b/drivers/clk/sunxi/clk-sun6i-prcm-mod0.c new file mode 100644 index 000..e80f18e --- /dev/null +++ b/drivers/clk/sunxi/clk-sun6i-prcm-mod0.c @@ -0,0 +1,63 @@ +/* + * Allwinner A31 PRCM mod0 clock driver + * + * Copyright (C) 2014 Hans de Goede hdego...@redhat.com + * + * 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. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +#include linux/clk-provider.h +#include linux/clkdev.h +#include linux/module.h +#include linux/of_address.h +#include linux/platform_device.h + +#include clk-factors.h +#include clk-mod0.h + +static const struct of_device_id sun6i_a31_prcm_mod0_clk_dt_ids[] = { + { .compatible = allwinner,sun6i-a31-ir-clk }, + { /* sentinel */ } +}; + +static DEFINE_SPINLOCK(sun6i_prcm_mod0_lock); + +static int sun6i_a31_prcm_mod0_clk_probe(struct platform_device *pdev) +{ + struct device_node *np = pdev-dev.of_node; + struct resource *r; + void __iomem *reg; + + if (!np) + return -ENODEV; + + r = platform_get_resource(pdev, IORESOURCE_MEM, 0); + reg = devm_ioremap_resource(pdev-dev, r); + if (IS_ERR(reg)) + return PTR_ERR(reg); + + sunxi_factors_register(np, sun4i_a10_mod0_data, + sun6i_prcm_mod0_lock, reg); + return 0; +} + +static struct platform_driver sun6i_a31_prcm_mod0_clk_driver = { + .driver = { + .name = sun6i-a31-prcm-mod0-clk, + .of_match_table = sun6i_a31_prcm_mod0_clk_dt_ids, + }, + .probe = sun6i_a31_prcm_mod0_clk_probe, +}; +module_platform_driver(sun6i_a31_prcm_mod0_clk_driver); + +MODULE_DESCRIPTION(Allwinner A31 PRCM mod0 clock driver); +MODULE_AUTHOR(Hans de Goede hdego...@redhat.com); +MODULE_LICENSE(GPL); I don't think this is the right approach, mainly for two reasons: the compatible shouldn't change, and you're basically duplicating code there. I understand that you need the new compatible in order to avoid a double probing: one by CLK_OF_DECLARE, and one by the usual mechanism, and that also implies the second reason. Not only for that, we need a new compatible also because the mfd framework needs a separate compatible per sub-node as that is how it finds nodes to attach to the platform devices, so we need a new compatible anyways, with your make the mod0 clock driver a platform driver solution we could use: We have a single mod0 clock in there, so no, not really. We have a single mod0 clock there today, but who knows what tomorrow brings, arguably the 1wire clock is a mod0 clock too, so we already have 2 today. Plus, that seems like a bogus limitation from MFD, and it really shouldn't work
Re: [PATCH 3/9] clk: sunxi: Add prcm mod0 clock driver
Hi, On 11/25/2014 09:29 AM, Hans de Goede wrote: snip Well one reasons why clocks are instantiated the way they are is to have them available as early as possible, which is really convenient and works really well. You are asking for a whole lot of stuff to be changed, arguably in a way which makes it worse, just to save 47 lines of code... Thinking more about this one alternative which should work is to just put the clocks in the prcm in the clocks node, then they get their own reg property, rather then being part of the prcm reg range, and the standard of_clk mod0 driver we have will just work. 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
[PATCH 1/2] media: v4l2-image-sizes.h: add SVGA, XGA and UXGA size definitions
Add SVGA, UXGA and XGA size definitions to v4l2-image-sizes.h. The definitions are sorted by alphabet order. Signed-off-by: Josh Wu josh...@atmel.com --- include/media/v4l2-image-sizes.h | 9 + 1 file changed, 9 insertions(+) diff --git a/include/media/v4l2-image-sizes.h b/include/media/v4l2-image-sizes.h index 10daf92..c70c917 100644 --- a/include/media/v4l2-image-sizes.h +++ b/include/media/v4l2-image-sizes.h @@ -25,10 +25,19 @@ #define QVGA_WIDTH 320 #define QVGA_HEIGHT240 +#define SVGA_WIDTH 800 +#define SVGA_HEIGHT680 + #define SXGA_WIDTH 1280 #define SXGA_HEIGHT1024 #define VGA_WIDTH 640 #define VGA_HEIGHT 480 +#define UXGA_WIDTH 1600 +#define UXGA_HEIGHT1200 + +#define XGA_WIDTH 1024 +#define XGA_HEIGHT 768 + #endif /* _IMAGE_SIZES_H */ -- 1.9.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: ov2640: use the v4l2 size definitions
Reuse the v4l2 size definitions from v4l2-image-sizes.h. So we can remove the rudundent definitions from ov2640.c. Signed-off-by: Josh Wu josh...@atmel.com --- drivers/media/i2c/soc_camera/ov2640.c | 82 +-- 1 file changed, 30 insertions(+), 52 deletions(-) diff --git a/drivers/media/i2c/soc_camera/ov2640.c b/drivers/media/i2c/soc_camera/ov2640.c index 6f2dd90..1fdce2f 100644 --- a/drivers/media/i2c/soc_camera/ov2640.c +++ b/drivers/media/i2c/soc_camera/ov2640.c @@ -25,6 +25,7 @@ #include media/v4l2-clk.h #include media/v4l2-subdev.h #include media/v4l2-ctrls.h +#include media/v4l2-image-sizes.h #define VAL_SET(x, mask, rshift, lshift) \ x) rshift) mask) lshift) @@ -268,33 +269,10 @@ struct regval_list { u8 value; }; -/* Supported resolutions */ -enum ov2640_width { - W_QCIF = 176, - W_QVGA = 320, - W_CIF = 352, - W_VGA = 640, - W_SVGA = 800, - W_XGA = 1024, - W_SXGA = 1280, - W_UXGA = 1600, -}; - -enum ov2640_height { - H_QCIF = 144, - H_QVGA = 240, - H_CIF = 288, - H_VGA = 480, - H_SVGA = 600, - H_XGA = 768, - H_SXGA = 1024, - H_UXGA = 1200, -}; - struct ov2640_win_size { char*name; - enum ov2640_width width; - enum ov2640_height height; + u32 width; + u32 height; const struct regval_list*regs; }; @@ -495,17 +473,17 @@ static const struct regval_list ov2640_init_regs[] = { static const struct regval_list ov2640_size_change_preamble_regs[] = { { BANK_SEL, BANK_SEL_DSP }, { RESET, RESET_DVP }, - { HSIZE8, HSIZE8_SET(W_UXGA) }, - { VSIZE8, VSIZE8_SET(H_UXGA) }, + { HSIZE8, HSIZE8_SET(UXGA_WIDTH) }, + { VSIZE8, VSIZE8_SET(UXGA_HEIGHT) }, { CTRL2, CTRL2_DCW_EN | CTRL2_SDE_EN | CTRL2_UV_AVG_EN | CTRL2_CMX_EN | CTRL2_UV_ADJ_EN }, - { HSIZE, HSIZE_SET(W_UXGA) }, - { VSIZE, VSIZE_SET(H_UXGA) }, + { HSIZE, HSIZE_SET(UXGA_WIDTH) }, + { VSIZE, VSIZE_SET(UXGA_HEIGHT) }, { XOFFL, XOFFL_SET(0) }, { YOFFL, YOFFL_SET(0) }, - { VHYX, VHYX_HSIZE_SET(W_UXGA) | VHYX_VSIZE_SET(H_UXGA) | + { VHYX, VHYX_HSIZE_SET(UXGA_WIDTH) | VHYX_VSIZE_SET(UXGA_HEIGHT) | VHYX_XOFF_SET(0) | VHYX_YOFF_SET(0)}, - { TEST, TEST_HSIZE_SET(W_UXGA) }, + { TEST, TEST_HSIZE_SET(UXGA_WIDTH) }, ENDMARKER, }; @@ -519,45 +497,45 @@ static const struct regval_list ov2640_size_change_preamble_regs[] = { { RESET, 0x00} static const struct regval_list ov2640_qcif_regs[] = { - PER_SIZE_REG_SEQ(W_QCIF, H_QCIF, 3, 3, 4), + PER_SIZE_REG_SEQ(QCIF_WIDTH, QCIF_HEIGHT, 3, 3, 4), ENDMARKER, }; static const struct regval_list ov2640_qvga_regs[] = { - PER_SIZE_REG_SEQ(W_QVGA, H_QVGA, 2, 2, 4), + PER_SIZE_REG_SEQ(QVGA_WIDTH, QVGA_HEIGHT, 2, 2, 4), ENDMARKER, }; static const struct regval_list ov2640_cif_regs[] = { - PER_SIZE_REG_SEQ(W_CIF, H_CIF, 2, 2, 8), + PER_SIZE_REG_SEQ(CIF_WIDTH, CIF_HEIGHT, 2, 2, 8), ENDMARKER, }; static const struct regval_list ov2640_vga_regs[] = { - PER_SIZE_REG_SEQ(W_VGA, H_VGA, 0, 0, 2), + PER_SIZE_REG_SEQ(VGA_WIDTH, VGA_HEIGHT, 0, 0, 2), ENDMARKER, }; static const struct regval_list ov2640_svga_regs[] = { - PER_SIZE_REG_SEQ(W_SVGA, H_SVGA, 1, 1, 2), + PER_SIZE_REG_SEQ(SVGA_WIDTH, SVGA_HEIGHT, 1, 1, 2), ENDMARKER, }; static const struct regval_list ov2640_xga_regs[] = { - PER_SIZE_REG_SEQ(W_XGA, H_XGA, 0, 0, 2), + PER_SIZE_REG_SEQ(XGA_WIDTH, XGA_HEIGHT, 0, 0, 2), { CTRLI,0x00}, ENDMARKER, }; static const struct regval_list ov2640_sxga_regs[] = { - PER_SIZE_REG_SEQ(W_SXGA, H_SXGA, 0, 0, 2), + PER_SIZE_REG_SEQ(SXGA_WIDTH, SXGA_HEIGHT, 0, 0, 2), { CTRLI,0x00}, { R_DVP_SP, 2 | R_DVP_SP_AUTO_MODE }, ENDMARKER, }; static const struct regval_list ov2640_uxga_regs[] = { - PER_SIZE_REG_SEQ(W_UXGA, H_UXGA, 0, 0, 0), + PER_SIZE_REG_SEQ(UXGA_WIDTH, UXGA_HEIGHT, 0, 0, 0), { CTRLI,0x00}, { R_DVP_SP, 0 | R_DVP_SP_AUTO_MODE }, ENDMARKER, @@ -567,14 +545,14 @@ static const struct regval_list ov2640_uxga_regs[] = { {.name = n, .width = w , .height = h, .regs = r } static const struct ov2640_win_size ov2640_supported_win_sizes[] = { - OV2640_SIZE(QCIF, W_QCIF, H_QCIF, ov2640_qcif_regs), - OV2640_SIZE(QVGA, W_QVGA, H_QVGA, ov2640_qvga_regs), - OV2640_SIZE(CIF, W_CIF, H_CIF, ov2640_cif_regs), - OV2640_SIZE(VGA, W_VGA, H_VGA, ov2640_vga_regs), - OV2640_SIZE(SVGA, W_SVGA, H_SVGA, ov2640_svga_regs), - OV2640_SIZE(XGA, W_XGA, H_XGA, ov2640_xga_regs), -
Re: Connecting ADV76xx to CSI via SFMC
Hi Philipp, Thanks for answering. 2014-11-25 9:16 GMT+01:00 Philipp Zabel p.za...@pengutronix.de: Hi Jean-Michel, Am Montag, den 24.11.2014, 16:19 +0100 schrieb Jean-Michel Hautbois: Hi, I am working on using the CSI bus of i.MX6 with a adv7611 chip. I started to work with Steve Longerbeam's tree, and here is the current tree I am using : https://github.com/Vodalys/linux-2.6-imx/tree/mx6-camera-staging-v2-vbx This is a WiP tree, and not intended to be complete right now. But at least, it should be possible to get a picture. I will try to be as complete and synthetic as possible... Right now, I am configuring the ADV7611 in 16-Bit SDR ITU-R BT.656 4:2:2 Mode 0 (Table 73 in Appendix C of the Reference Manual). ITU-R BT.656 only specifies 8-bit (or 10-bit) streams, the 16-bit BT.656 SDR/DDR modes with two values on the bus at the same time are somewhat nonstandard. As far as I can tell, this mode should correspond to the CSI's BT.1120 SDR mode (Figure 37-20 in MX6DQ Reference Manual v1), so I'd expect CSI_SENS_CONF to be configured as DATA_WIDTH=1 (8-bit components), SENS_DATA_FORMAT=1 (YUV422), SENS_PRCTL=5 (progressive BT.1120 SDR). OK, so I tested in a brutal way : diff --git a/drivers/gpu/ipu-v3/ipu-csi.c b/drivers/gpu/ipu-v3/ipu-csi.c index 293262d..ff48819 100644 --- a/drivers/gpu/ipu-v3/ipu-csi.c +++ b/drivers/gpu/ipu-v3/ipu-csi.c @@ -342,10 +342,16 @@ static void fill_csi_bus_cfg(struct ipu_csi_bus_config *csicfg, break; case V4L2_MBUS_BT656: csicfg-ext_vsync = 0; - if (V4L2_FIELD_HAS_BOTH(mbus_fmt-field)) - csicfg-clk_mode = IPU_CSI_CLK_MODE_CCIR656_INTERLACED; + if (mbus_fmt-code == V4L2_MBUS_FMT_YUYV8_2X8) + if (V4L2_FIELD_HAS_BOTH(mbus_fmt-field)) + csicfg-clk_mode = IPU_CSI_CLK_MODE_CCIR1120_PROGRESSIVE_SDR; + else + csicfg-clk_mode = IPU_CSI_CLK_MODE_CCIR1120_INTERLACED_SDR; else - csicfg-clk_mode = IPU_CSI_CLK_MODE_CCIR656_PROGRESSIVE; + if (V4L2_FIELD_HAS_BOTH(mbus_fmt-field)) + csicfg-clk_mode = IPU_CSI_CLK_MODE_CCIR656_INTERLACED; + else + csicfg-clk_mode = IPU_CSI_CLK_MODE_CCIR656_PROGRESSIVE; break; case V4L2_MBUS_CSI2: And before launching capture, I configure manually register 0x3 of ADV7611 in order to have the SDR 4:2:2 mode I want. It works better, but still have a little issue : I am expecting : 0x23 0x72 0x23 0xd4 ... I am getting : 0x23 0xc8 0x23 0x50 If I take binary values : 0x72 = 01110010b 0xc8 = 11001000b = 0x72 2 0xd4 = 11010100 0x50 = 0101 = 0xd4 2 In my DT, I have specified : csi0: endpoint@0 { reg = 0; bus-width = 16; data-shift = 4; /* Lines 19:4 used */ }; pinctrl_ipu1_csi0: ipu1_csi0grp { fsl,pins = MX6QDL_PAD_EIM_D27__IPU1_CSI0_DATA00 0x8000 MX6QDL_PAD_EIM_D26__IPU1_CSI0_DATA01 0x8000 MX6QDL_PAD_EIM_D30__IPU1_CSI0_DATA03 0x8000 MX6QDL_PAD_EIM_D31__IPU1_CSI0_DATA02 0x8000 MX6QDL_PAD_CSI0_DAT4__IPU1_CSI0_DATA04 0x8000 MX6QDL_PAD_CSI0_DAT5__IPU1_CSI0_DATA05 0x8000 MX6QDL_PAD_CSI0_DAT6__IPU1_CSI0_DATA06 0x8000 MX6QDL_PAD_CSI0_DAT7__IPU1_CSI0_DATA07 0x8000 MX6QDL_PAD_CSI0_DAT8__IPU1_CSI0_DATA08 0x8000 MX6QDL_PAD_CSI0_DAT9__IPU1_CSI0_DATA09 0x8000 MX6QDL_PAD_CSI0_DAT10__IPU1_CSI0_DATA10 0x8000 MX6QDL_PAD_CSI0_DAT11__IPU1_CSI0_DATA11 0x8000 MX6QDL_PAD_CSI0_DAT12__IPU1_CSI0_DATA12 0x8000 MX6QDL_PAD_CSI0_DAT13__IPU1_CSI0_DATA13 0x8000 MX6QDL_PAD_CSI0_DAT14__IPU1_CSI0_DATA14 0x8000 MX6QDL_PAD_CSI0_DAT15__IPU1_CSI0_DATA15 0x8000 MX6QDL_PAD_CSI0_DAT16__IPU1_CSI0_DATA16 0x8000 MX6QDL_PAD_CSI0_DAT17__IPU1_CSI0_DATA17 0x8000 MX6QDL_PAD_CSI0_DAT18__IPU1_CSI0_DATA18 0x8000 MX6QDL_PAD_CSI0_DAT19__IPU1_CSI0_DATA19 0x8000 /* Clock and Data only : BT.656 mode */ MX6QDL_PAD_CSI0_PIXCLK__IPU1_CSI0_PIXCLK 0x8000 /*MX6QDL_PAD_CSI0_MCLK__IPU1_CSI0_HSYNC 0x8000 MX6QDL_PAD_CSI0_VSYNC__IPU1_CSI0_VSYNC 0x8000 MX6QDL_PAD_CSI0_DATA_EN__IPU1_CSI0_DATA_EN 0x8000*/ ; }; Can it be linked to the data-shift ? Thanks again. Regards, JM -- 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] media: atmel-isi: increase the burst length to improve the performance
The burst length could be BEATS_4/8/16. Before this patch, isi use default value BEATS_4. To imporve the performance we could set it to BEATS_16. Otherwise sometime it would cause the ISI overflow error. Reported-by: Bo Shen voice.s...@atmel.com Signed-off-by: Josh Wu josh...@atmel.com --- drivers/media/platform/soc_camera/atmel-isi.c | 2 ++ include/media/atmel-isi.h | 4 2 files changed, 6 insertions(+) diff --git a/drivers/media/platform/soc_camera/atmel-isi.c b/drivers/media/platform/soc_camera/atmel-isi.c index ee5650f..fda587b 100644 --- a/drivers/media/platform/soc_camera/atmel-isi.c +++ b/drivers/media/platform/soc_camera/atmel-isi.c @@ -839,6 +839,8 @@ static int isi_camera_set_bus_param(struct soc_camera_device *icd) if (isi-pdata.full_mode) cfg1 |= ISI_CFG1_FULL_MODE; + cfg1 |= ISI_CFG1_THMASK_BEATS_16; + isi_writel(isi, ISI_CTRL, ISI_CTRL_DIS); isi_writel(isi, ISI_CFG1, cfg1); diff --git a/include/media/atmel-isi.h b/include/media/atmel-isi.h index c2e5703..6008b09 100644 --- a/include/media/atmel-isi.h +++ b/include/media/atmel-isi.h @@ -59,6 +59,10 @@ #defineISI_CFG1_FRATE_DIV_MASK (7 8) #define ISI_CFG1_DISCR (1 11) #define ISI_CFG1_FULL_MODE (1 12) +/* Definition for THMASK(ISI_V2) */ +#defineISI_CFG1_THMASK_BEATS_4 (0 13) +#defineISI_CFG1_THMASK_BEATS_8 (1 13) +#defineISI_CFG1_THMASK_BEATS_16(2 13) /* Bitfields in CFG2 */ #define ISI_CFG2_GRAYSCALE (1 13) -- 1.9.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 1/2] media: v4l2-image-sizes.h: add SVGA, XGA and UXGA size definitions
Hi Josh, On 25/11/14 09:54, Josh Wu wrote: Add SVGA, UXGA and XGA size definitions to v4l2-image-sizes.h. The definitions are sorted by alphabet order. Signed-off-by: Josh Wu josh...@atmel.com --- include/media/v4l2-image-sizes.h | 9 + 1 file changed, 9 insertions(+) diff --git a/include/media/v4l2-image-sizes.h b/include/media/v4l2-image-sizes.h index 10daf92..c70c917 100644 --- a/include/media/v4l2-image-sizes.h +++ b/include/media/v4l2-image-sizes.h @@ -25,10 +25,19 @@ #define QVGA_WIDTH 320 #define QVGA_HEIGHT 240 +#define SVGA_WIDTH 800 +#define SVGA_HEIGHT 680 I think this should be 600. With that fixed, for both patches: Acked-by: Sylwester Nawrocki s.nawro...@samsung.com #define SXGA_WIDTH 1280 #define SXGA_HEIGHT 1024 #define VGA_WIDTH640 #define VGA_HEIGHT 480 +#define UXGA_WIDTH 1600 +#define UXGA_HEIGHT 1200 + +#define XGA_WIDTH1024 +#define XGA_HEIGHT 768 + #endif /* _IMAGE_SIZES_H */ -- 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: [PATCH 6/6] media/platform: fix querycap
Hi Hans, Thanks for this patch. Looks good. Best regards, Kamil From: Hans Verkuil [mailto:hverk...@xs4all.nl] Sent: Monday, November 24, 2014 10:37 AM To: linux-media@vger.kernel.org Cc: Hans Verkuil; Lad, Prabhakar; Kamil Debski; Jacek Anaszewski Subject: [PATCH 6/6] media/platform: fix querycap From: Hans Verkuil hans.verk...@cisco.com Querycap shouldn't set the version field (the core does that for you), but it should set the device_caps field. In addition, remove the CAPTURE and OUTPUT caps for M2M devices. These were already slated for removal, so it's time to do so. Signed-off-by: Hans Verkuil hans.verk...@cisco.com Cc: Lad, Prabhakar prabhakar.cse...@gmail.com Cc: Kamil Debski k.deb...@samsung.com Cc: Jacek Anaszewski j.anaszew...@samsung.com Acked-by: Kamil Debski k.deb...@samsung.com --- drivers/media/platform/davinci/vpbe_display.c | 1 - drivers/media/platform/davinci/vpfe_capture.c | 4 ++-- drivers/media/platform/s5p-g2d/g2d.c | 10 ++ drivers/media/platform/s5p-jpeg/jpeg-core.c | 9 ++--- drivers/media/platform/s5p-mfc/s5p_mfc_dec.c | 6 ++ drivers/media/platform/s5p-mfc/s5p_mfc_enc.c | 6 ++ 6 files changed, 10 insertions(+), 26 deletions(-) diff --git a/drivers/media/platform/davinci/vpbe_display.c b/drivers/media/platform/davinci/vpbe_display.c index 78b9ffe..21a5a56 100644 --- a/drivers/media/platform/davinci/vpbe_display.c +++ b/drivers/media/platform/davinci/vpbe_display.c @@ -639,7 +639,6 @@ static int vpbe_display_querycap(struct file *file, void *priv, struct vpbe_layer *layer = video_drvdata(file); struct vpbe_device *vpbe_dev = layer-disp_dev-vpbe_dev; - cap-version = VPBE_DISPLAY_VERSION_CODE; cap-device_caps = V4L2_CAP_VIDEO_OUTPUT | V4L2_CAP_STREAMING; cap-capabilities = cap-device_caps | V4L2_CAP_DEVICE_CAPS; snprintf(cap-driver, sizeof(cap-driver), %s, diff --git a/drivers/media/platform/davinci/vpfe_capture.c b/drivers/media/platform/davinci/vpfe_capture.c index 3d0e3ae..271c460 100644 --- a/drivers/media/platform/davinci/vpfe_capture.c +++ b/drivers/media/platform/davinci/vpfe_capture.c @@ -930,8 +930,8 @@ static int vpfe_querycap(struct file *file, void *priv, v4l2_dbg(1, debug, vpfe_dev-v4l2_dev, vpfe_querycap\n); - cap-version = VPFE_CAPTURE_VERSION_CODE; - cap-capabilities = V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_STREAMING; + cap-device_caps = V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_STREAMING; + cap-capabilities = cap-device_caps | V4L2_CAP_DEVICE_CAPS; strlcpy(cap-driver, CAPTURE_DRV_NAME, sizeof(cap-driver)); strlcpy(cap-bus_info, VPFE, sizeof(cap-bus_info)); strlcpy(cap-card, vpfe_dev-cfg-card_name, sizeof(cap-card)); diff --git a/drivers/media/platform/s5p-g2d/g2d.c b/drivers/media/platform/s5p-g2d/g2d.c index d79e214..51e4edc 100644 --- a/drivers/media/platform/s5p-g2d/g2d.c +++ b/drivers/media/platform/s5p-g2d/g2d.c @@ -297,14 +297,8 @@ static int vidioc_querycap(struct file *file, void *priv, strncpy(cap-driver, G2D_NAME, sizeof(cap-driver) - 1); strncpy(cap-card, G2D_NAME, sizeof(cap-card) - 1); cap-bus_info[0] = 0; - cap-version = KERNEL_VERSION(1, 0, 0); - /* - * This is only a mem-to-mem video device. The capture and output - * device capability flags are left only for backward compatibility - * and are scheduled for removal. - */ - cap-capabilities = V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_VIDEO_OUTPUT | - V4L2_CAP_VIDEO_M2M | V4L2_CAP_STREAMING; + cap-device_caps = V4L2_CAP_VIDEO_M2M | V4L2_CAP_STREAMING; + cap-capabilities = cap-device_caps | V4L2_CAP_DEVICE_CAPS; return 0; } diff --git a/drivers/media/platform/s5p-jpeg/jpeg-core.c b/drivers/media/platform/s5p-jpeg/jpeg-core.c index 6fcc7f0..d6f75b1 100644 --- a/drivers/media/platform/s5p-jpeg/jpeg-core.c +++ b/drivers/media/platform/s5p-jpeg/jpeg-core.c @@ -1001,13 +1001,8 @@ static int s5p_jpeg_querycap(struct file *file, void *priv, sizeof(cap-card)); } cap-bus_info[0] = 0; - /* - * This is only a mem-to-mem video device. The capture and output - * device capability flags are left only for backward compatibility - * and are scheduled for removal. - */ - cap-capabilities = V4L2_CAP_STREAMING | V4L2_CAP_VIDEO_M2M | - V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_VIDEO_OUTPUT; + cap-device_caps = V4L2_CAP_STREAMING | V4L2_CAP_VIDEO_M2M; + cap-capabilities = cap-device_caps | V4L2_CAP_DEVICE_CAPS; return 0; } diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c b/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c index 74bcec8..c6c3452 100644 --- a/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c +++ b/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c @@ -269,15 +269,13 @@ static int vidioc_querycap(struct file *file, void
Re: [PATCH 6/6] media/platform: fix querycap
Hi Hans, Thanks for the patch. On Mon, Nov 24, 2014 at 9:37 AM, Hans Verkuil hverk...@xs4all.nl wrote: From: Hans Verkuil hans.verk...@cisco.com Querycap shouldn't set the version field (the core does that for you), but it should set the device_caps field. In addition, remove the CAPTURE and OUTPUT caps for M2M devices. These were already slated for removal, so it's time to do so. Signed-off-by: Hans Verkuil hans.verk...@cisco.com Cc: Lad, Prabhakar prabhakar.cse...@gmail.com Cc: Kamil Debski k.deb...@samsung.com Cc: Jacek Anaszewski j.anaszew...@samsung.com --- Acked-by: Lad, Prabhakar prabhakar.cse...@gmail.com Regards, --Prabhakar Lad drivers/media/platform/davinci/vpbe_display.c | 1 - drivers/media/platform/davinci/vpfe_capture.c | 4 ++-- drivers/media/platform/s5p-g2d/g2d.c | 10 ++ drivers/media/platform/s5p-jpeg/jpeg-core.c | 9 ++--- drivers/media/platform/s5p-mfc/s5p_mfc_dec.c | 6 ++ drivers/media/platform/s5p-mfc/s5p_mfc_enc.c | 6 ++ 6 files changed, 10 insertions(+), 26 deletions(-) diff --git a/drivers/media/platform/davinci/vpbe_display.c b/drivers/media/platform/davinci/vpbe_display.c index 78b9ffe..21a5a56 100644 --- a/drivers/media/platform/davinci/vpbe_display.c +++ b/drivers/media/platform/davinci/vpbe_display.c @@ -639,7 +639,6 @@ static int vpbe_display_querycap(struct file *file, void *priv, struct vpbe_layer *layer = video_drvdata(file); struct vpbe_device *vpbe_dev = layer-disp_dev-vpbe_dev; - cap-version = VPBE_DISPLAY_VERSION_CODE; cap-device_caps = V4L2_CAP_VIDEO_OUTPUT | V4L2_CAP_STREAMING; cap-capabilities = cap-device_caps | V4L2_CAP_DEVICE_CAPS; snprintf(cap-driver, sizeof(cap-driver), %s, diff --git a/drivers/media/platform/davinci/vpfe_capture.c b/drivers/media/platform/davinci/vpfe_capture.c index 3d0e3ae..271c460 100644 --- a/drivers/media/platform/davinci/vpfe_capture.c +++ b/drivers/media/platform/davinci/vpfe_capture.c @@ -930,8 +930,8 @@ static int vpfe_querycap(struct file *file, void *priv, v4l2_dbg(1, debug, vpfe_dev-v4l2_dev, vpfe_querycap\n); - cap-version = VPFE_CAPTURE_VERSION_CODE; - cap-capabilities = V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_STREAMING; + cap-device_caps = V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_STREAMING; + cap-capabilities = cap-device_caps | V4L2_CAP_DEVICE_CAPS; strlcpy(cap-driver, CAPTURE_DRV_NAME, sizeof(cap-driver)); strlcpy(cap-bus_info, VPFE, sizeof(cap-bus_info)); strlcpy(cap-card, vpfe_dev-cfg-card_name, sizeof(cap-card)); diff --git a/drivers/media/platform/s5p-g2d/g2d.c b/drivers/media/platform/s5p-g2d/g2d.c index d79e214..51e4edc 100644 --- a/drivers/media/platform/s5p-g2d/g2d.c +++ b/drivers/media/platform/s5p-g2d/g2d.c @@ -297,14 +297,8 @@ static int vidioc_querycap(struct file *file, void *priv, strncpy(cap-driver, G2D_NAME, sizeof(cap-driver) - 1); strncpy(cap-card, G2D_NAME, sizeof(cap-card) - 1); cap-bus_info[0] = 0; - cap-version = KERNEL_VERSION(1, 0, 0); - /* -* This is only a mem-to-mem video device. The capture and output -* device capability flags are left only for backward compatibility -* and are scheduled for removal. -*/ - cap-capabilities = V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_VIDEO_OUTPUT | - V4L2_CAP_VIDEO_M2M | V4L2_CAP_STREAMING; + cap-device_caps = V4L2_CAP_VIDEO_M2M | V4L2_CAP_STREAMING; + cap-capabilities = cap-device_caps | V4L2_CAP_DEVICE_CAPS; return 0; } diff --git a/drivers/media/platform/s5p-jpeg/jpeg-core.c b/drivers/media/platform/s5p-jpeg/jpeg-core.c index 6fcc7f0..d6f75b1 100644 --- a/drivers/media/platform/s5p-jpeg/jpeg-core.c +++ b/drivers/media/platform/s5p-jpeg/jpeg-core.c @@ -1001,13 +1001,8 @@ static int s5p_jpeg_querycap(struct file *file, void *priv, sizeof(cap-card)); } cap-bus_info[0] = 0; - /* -* This is only a mem-to-mem video device. The capture and output -* device capability flags are left only for backward compatibility -* and are scheduled for removal. -*/ - cap-capabilities = V4L2_CAP_STREAMING | V4L2_CAP_VIDEO_M2M | - V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_VIDEO_OUTPUT; + cap-device_caps = V4L2_CAP_STREAMING | V4L2_CAP_VIDEO_M2M; + cap-capabilities = cap-device_caps | V4L2_CAP_DEVICE_CAPS; return 0; } diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c b/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c index 74bcec8..c6c3452 100644 --- a/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c +++ b/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c @@ -269,15 +269,13 @@ static int vidioc_querycap(struct file *file, void *priv, strncpy(cap-driver, dev-plat_dev-name, sizeof(cap-driver) - 1);
Re: [PATCH 2/6] staging/media: fix querycap
Hi Hans, Thanks for the patch. On Mon, Nov 24, 2014 at 9:37 AM, Hans Verkuil hverk...@xs4all.nl wrote: From: Hans Verkuil hans.verk...@cisco.com Querycap shouldn't set the version field (the core does that for you), but it should set the device_caps field. Signed-off-by: Hans Verkuil hans.verk...@cisco.com Cc: Lad, Prabhakar prabhakar.cse...@gmail.com Acked-by: Lad, Prabhakar prabhakar.cse...@gmail.com Regards, --Prabhakar Lad --- drivers/staging/media/bcm2048/radio-bcm2048.c | 5 +++-- drivers/staging/media/davinci_vpfe/vpfe_video.c | 8 drivers/staging/media/dt3155v4l/dt3155v4l.c | 5 ++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/staging/media/bcm2048/radio-bcm2048.c b/drivers/staging/media/bcm2048/radio-bcm2048.c index bdc6854..60a57b2 100644 --- a/drivers/staging/media/bcm2048/radio-bcm2048.c +++ b/drivers/staging/media/bcm2048/radio-bcm2048.c @@ -2327,9 +2327,10 @@ static int bcm2048_vidioc_querycap(struct file *file, void *priv, strlcpy(capability-card, BCM2048_DRIVER_CARD, sizeof(capability-card)); snprintf(capability-bus_info, 32, I2C: 0x%X, bdev-client-addr); - capability-version = BCM2048_DRIVER_VERSION; - capability-capabilities = V4L2_CAP_TUNER | V4L2_CAP_RADIO | + capability-device_caps = V4L2_CAP_TUNER | V4L2_CAP_RADIO | V4L2_CAP_HW_FREQ_SEEK; + capability-capabilities = capability-device_caps | + V4L2_CAP_DEVICE_CAPS; return 0; } diff --git a/drivers/staging/media/davinci_vpfe/vpfe_video.c b/drivers/staging/media/davinci_vpfe/vpfe_video.c index 6f9171c..06d48d5 100644 --- a/drivers/staging/media/davinci_vpfe/vpfe_video.c +++ b/drivers/staging/media/davinci_vpfe/vpfe_video.c @@ -600,11 +600,11 @@ static int vpfe_querycap(struct file *file, void *priv, v4l2_dbg(1, debug, vpfe_dev-v4l2_dev, vpfe_querycap\n); if (video-type == V4L2_BUF_TYPE_VIDEO_CAPTURE) - cap-capabilities = V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_STREAMING; + cap-device_caps = V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_STREAMING; else - cap-capabilities = V4L2_CAP_VIDEO_OUTPUT | V4L2_CAP_STREAMING; - cap-device_caps = cap-capabilities; - cap-version = VPFE_CAPTURE_VERSION_CODE; + cap-device_caps = V4L2_CAP_VIDEO_OUTPUT | V4L2_CAP_STREAMING; + cap-capabilities = V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_VIDEO_OUTPUT | + V4L2_CAP_STREAMING | V4L2_CAP_DEVICE_CAPS; strlcpy(cap-driver, CAPTURE_DRV_NAME, sizeof(cap-driver)); strlcpy(cap-bus_info, VPFE, sizeof(cap-bus_info)); strlcpy(cap-card, vpfe_dev-cfg-card_name, sizeof(cap-card)); diff --git a/drivers/staging/media/dt3155v4l/dt3155v4l.c b/drivers/staging/media/dt3155v4l/dt3155v4l.c index 4058022..293ffda 100644 --- a/drivers/staging/media/dt3155v4l/dt3155v4l.c +++ b/drivers/staging/media/dt3155v4l/dt3155v4l.c @@ -512,10 +512,9 @@ dt3155_ioc_querycap(struct file *filp, void *p, struct v4l2_capability *cap) strcpy(cap-driver, DT3155_NAME); strcpy(cap-card, DT3155_NAME frame grabber); sprintf(cap-bus_info, PCI:%s, pci_name(pd-pdev)); - cap-version = - KERNEL_VERSION(DT3155_VER_MAJ, DT3155_VER_MIN, DT3155_VER_EXT); - cap-capabilities = V4L2_CAP_VIDEO_CAPTURE | + cap-device_caps = V4L2_CAP_VIDEO_CAPTURE | DT3155_CAPTURE_METHOD; + cap-capabilities = cap-device_caps | V4L2_CAP_DEVICE_CAPS; return 0; } -- 2.1.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] [media] lmed04: add missing breaks
drivers/media/usb/dvb-usb-v2/lmedm04.c:828 lme_firmware_switch() warn: missing break? reassigning 'st-dvb_usb_lme2510_firmware' drivers/media/usb/dvb-usb-v2/lmedm04.c:849 lme_firmware_switch() warn: missing break? reassigning 'st-dvb_usb_lme2510_firmware' Signed-off-by: Mauro Carvalho Chehab mche...@osg.samsung.com diff --git a/drivers/media/usb/dvb-usb-v2/lmedm04.c b/drivers/media/usb/dvb-usb-v2/lmedm04.c index 9f2c5459b73a..99587418f4f0 100644 --- a/drivers/media/usb/dvb-usb-v2/lmedm04.c +++ b/drivers/media/usb/dvb-usb-v2/lmedm04.c @@ -826,6 +826,7 @@ static const char *lme_firmware_switch(struct dvb_usb_device *d, int cold) break; } st-dvb_usb_lme2510_firmware = TUNER_LG; + break; case TUNER_LG: fw_lme = fw_lg; ret = request_firmware(fw, fw_lme, udev-dev); @@ -847,6 +848,7 @@ static const char *lme_firmware_switch(struct dvb_usb_device *d, int cold) break; } st-dvb_usb_lme2510_firmware = TUNER_LG; + break; case TUNER_LG: fw_lme = fw_c_lg; ret = request_firmware(fw, fw_lme, udev-dev); -- 1.9.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
RE: [PATCH 09/12] media: s5p-mfc: use vb2_ops_wait_prepare/finish helper
Hi, Please provide a commit description. No matter how obvious the commit seems. Best wishes, -- Kamil Debski Samsung RD Institute Poland -Original Message- From: Lad, Prabhakar [mailto:prabhakar.cse...@gmail.com] Sent: Tuesday, November 18, 2014 12:24 PM To: Hans Verkuil; Mauro Carvalho Chehab; LMML Cc: LKML; Lad, Prabhakar; Kyungmin Park; Kamil Debski; Jeongtae Park Subject: [PATCH 09/12] media: s5p-mfc: use vb2_ops_wait_prepare/finish helper Signed-off-by: Lad, Prabhakar prabhakar.cse...@gmail.com Cc: Kyungmin Park kyungmin.p...@samsung.com Cc: Kamil Debski k.deb...@samsung.com Cc: Jeongtae Park jtp.p...@samsung.com --- drivers/media/platform/s5p-mfc/s5p_mfc.c | 1 + drivers/media/platform/s5p-mfc/s5p_mfc_dec.c | 20 ++-- drivers/media/platform/s5p-mfc/s5p_mfc_enc.c | 20 ++-- 3 files changed, 5 insertions(+), 36 deletions(-) diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc.c b/drivers/media/platform/s5p-mfc/s5p_mfc.c index 03204fd..52f65e9 100644 --- a/drivers/media/platform/s5p-mfc/s5p_mfc.c +++ b/drivers/media/platform/s5p-mfc/s5p_mfc.c @@ -810,6 +810,7 @@ static int s5p_mfc_open(struct file *file) q = ctx-vq_dst; q-type = V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE; q-drv_priv = ctx-fh; + q-lock = dev-mfc_mutex; if (vdev == dev-vfd_dec) { q-io_modes = VB2_MMAP; q-ops = get_dec_queue_ops(); diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c b/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c index 74bcec8..78b3e0e 100644 --- a/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c +++ b/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c @@ -946,22 +946,6 @@ static int s5p_mfc_queue_setup(struct vb2_queue *vq, return 0; } -static void s5p_mfc_unlock(struct vb2_queue *q) -{ - struct s5p_mfc_ctx *ctx = fh_to_ctx(q-drv_priv); - struct s5p_mfc_dev *dev = ctx-dev; - - mutex_unlock(dev-mfc_mutex); -} - -static void s5p_mfc_lock(struct vb2_queue *q) -{ - struct s5p_mfc_ctx *ctx = fh_to_ctx(q-drv_priv); - struct s5p_mfc_dev *dev = ctx-dev; - - mutex_lock(dev-mfc_mutex); -} - static int s5p_mfc_buf_init(struct vb2_buffer *vb) { struct vb2_queue *vq = vb-vb2_queue; @@ -1109,8 +1093,8 @@ static void s5p_mfc_buf_queue(struct vb2_buffer *vb) static struct vb2_ops s5p_mfc_dec_qops = { .queue_setup= s5p_mfc_queue_setup, - .wait_prepare = s5p_mfc_unlock, - .wait_finish= s5p_mfc_lock, + .wait_prepare = vb2_ops_wait_prepare, + .wait_finish= vb2_ops_wait_finish, .buf_init = s5p_mfc_buf_init, .start_streaming= s5p_mfc_start_streaming, .stop_streaming = s5p_mfc_stop_streaming, diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc_enc.c b/drivers/media/platform/s5p-mfc/s5p_mfc_enc.c index e7240cb..ffa9c1d 100644 --- a/drivers/media/platform/s5p-mfc/s5p_mfc_enc.c +++ b/drivers/media/platform/s5p-mfc/s5p_mfc_enc.c @@ -1869,22 +1869,6 @@ static int s5p_mfc_queue_setup(struct vb2_queue *vq, return 0; } -static void s5p_mfc_unlock(struct vb2_queue *q) -{ - struct s5p_mfc_ctx *ctx = fh_to_ctx(q-drv_priv); - struct s5p_mfc_dev *dev = ctx-dev; - - mutex_unlock(dev-mfc_mutex); -} - -static void s5p_mfc_lock(struct vb2_queue *q) -{ - struct s5p_mfc_ctx *ctx = fh_to_ctx(q-drv_priv); - struct s5p_mfc_dev *dev = ctx-dev; - - mutex_lock(dev-mfc_mutex); -} - static int s5p_mfc_buf_init(struct vb2_buffer *vb) { struct vb2_queue *vq = vb-vb2_queue; @@ -2054,8 +2038,8 @@ static void s5p_mfc_buf_queue(struct vb2_buffer *vb) static struct vb2_ops s5p_mfc_enc_qops = { .queue_setup= s5p_mfc_queue_setup, - .wait_prepare = s5p_mfc_unlock, - .wait_finish= s5p_mfc_lock, + .wait_prepare = vb2_ops_wait_prepare, + .wait_finish= vb2_ops_wait_finish, .buf_init = s5p_mfc_buf_init, .buf_prepare= s5p_mfc_buf_prepare, .start_streaming= s5p_mfc_start_streaming, -- 1.9.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/RFC v4 01/11] mediactl: Introduce v4l2_subdev structure
Hi Jacek, Thank you for the updated patchset. On Fri, Nov 21, 2014 at 05:14:30PM +0100, Jacek Anaszewski wrote: Add struct v4l2_subdev as a representation of the v4l2 sub-device related to a media entity. Add sd property, the pointer to the newly introduced structure, to the struct media_entity and move fd property to it. Signed-off-by: Jacek Anaszewski j.anaszew...@samsung.com Acked-by: Kyungmin Park kyungmin.p...@samsung.com --- utils/media-ctl/libmediactl.c | 30 +- utils/media-ctl/libv4l2subdev.c | 34 +- utils/media-ctl/mediactl-priv.h |5 + utils/media-ctl/mediactl.h | 22 ++ 4 files changed, 69 insertions(+), 22 deletions(-) diff --git a/utils/media-ctl/libmediactl.c b/utils/media-ctl/libmediactl.c index ec360bd..53921f5 100644 --- a/utils/media-ctl/libmediactl.c +++ b/utils/media-ctl/libmediactl.c @@ -511,7 +511,6 @@ static int media_enum_entities(struct media_device *media) entity = media-entities[media-entities_count]; memset(entity, 0, sizeof(*entity)); - entity-fd = -1; I think I'd definitely leave the fd to the media_entity itself. Not all the entities are sub-devices, even right now. entity-info.id = id | MEDIA_ENT_ID_FLAG_NEXT; entity-media = media; @@ -529,11 +528,13 @@ static int media_enum_entities(struct media_device *media) entity-pads = malloc(entity-info.pads * sizeof(*entity-pads)); entity-links = malloc(entity-max_links * sizeof(*entity-links)); - if (entity-pads == NULL || entity-links == NULL) { + entity-sd = calloc(1, sizeof(*entity-sd)); + if (entity-pads == NULL || entity-links == NULL || entity-sd == NULL) { ret = -ENOMEM; break; } + entity-sd-fd = -1; media-entities_count++; if (entity-info.flags MEDIA_ENT_FL_DEFAULT) { @@ -704,8 +705,9 @@ void media_device_unref(struct media_device *media) free(entity-pads); free(entity-links); - if (entity-fd != -1) - close(entity-fd); + if (entity-sd-fd != -1) + close(entity-sd-fd); + free(entity-sd); } free(media-entities); @@ -726,13 +728,17 @@ int media_device_add_entity(struct media_device *media, if (entity == NULL) return -ENOMEM; + entity-sd = calloc(1, sizeof(*entity-sd)); + if (entity-sd == NULL) + return -ENOMEM; + media-entities = entity; media-entities_count++; entity = media-entities[media-entities_count - 1]; memset(entity, 0, sizeof *entity); - entity-fd = -1; + entity-sd-fd = -1; entity-media = media; strncpy(entity-devname, devnode, sizeof entity-devname); entity-devname[sizeof entity-devname - 1] = '\0'; @@ -955,3 +961,17 @@ int media_parse_setup_links(struct media_device *media, const char *p) return *end ? -EINVAL : 0; } + +/* - + * Media entity access + */ + +int media_entity_get_fd(struct media_entity *entity) +{ + return entity-sd-fd; +} + +void media_entity_set_fd(struct media_entity *entity, int fd) +{ + entity-sd-fd = fd; +} You access the fd directly now inside the library. I don't think there should be a need to set it. diff --git a/utils/media-ctl/libv4l2subdev.c b/utils/media-ctl/libv4l2subdev.c index 8015330..09e0081 100644 --- a/utils/media-ctl/libv4l2subdev.c +++ b/utils/media-ctl/libv4l2subdev.c @@ -41,11 +41,11 @@ int v4l2_subdev_open(struct media_entity *entity) { - if (entity-fd != -1) + if (entity-sd-fd != -1) return 0; - entity-fd = open(entity-devname, O_RDWR); - if (entity-fd == -1) { + entity-sd-fd = open(entity-devname, O_RDWR); + if (entity-sd-fd == -1) { int ret = -errno; media_dbg(entity-media, %s: Failed to open subdev device node %s\n, __func__, @@ -58,8 +58,8 @@ int v4l2_subdev_open(struct media_entity *entity) void v4l2_subdev_close(struct media_entity *entity) { - close(entity-fd); - entity-fd = -1; + close(entity-sd-fd); + entity-sd-fd = -1; } int v4l2_subdev_get_format(struct media_entity *entity, @@ -77,7 +77,7 @@ int v4l2_subdev_get_format(struct media_entity *entity, fmt.pad = pad; fmt.which = which; - ret = ioctl(entity-fd, VIDIOC_SUBDEV_G_FMT, fmt); + ret = ioctl(entity-sd-fd, VIDIOC_SUBDEV_G_FMT, fmt); if (ret 0) return -errno; @@ -101,7 +101,7 @@ int v4l2_subdev_set_format(struct media_entity *entity, fmt.which = which;
Re: [PATCH] Staging: media: lirc: lirc_serial: replaced printk with pr_debug
Em Fri, 21 Nov 2014 14:21:40 +0100 Abel Moyo abelmoyo...@gmail.com escreveu: Replaced printk with pr_debug in dprintk Signed-off-by: Abel Moyo abelmoyo...@gmail.com --- drivers/staging/media/lirc/lirc_serial.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/media/lirc/lirc_serial.c b/drivers/staging/media/lirc/lirc_serial.c index 181b92b..86c5274 100644 --- a/drivers/staging/media/lirc/lirc_serial.c +++ b/drivers/staging/media/lirc/lirc_serial.c @@ -116,7 +116,7 @@ static bool txsense; /* 0 = active high, 1 = active low */ #define dprintk(fmt, args...)\ do {\ if (debug) \ - printk(KERN_DEBUG LIRC_DRIVER_NAME : \ + pr_debug(LIRC_DRIVER_NAME : \ fmt, ## args); \ } while (0) No, this is a bad idea. If dynamic_printk is enabled, in order to activate the debug messages, it would be required to enable debug modprobe parameter _and_ to enable each debug msg individually. We should either use one or the other approach. Regards, Mauro -- 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 6/6] media/platform: fix querycap
Hi Hans, Thanks for the patch. On 11/24/2014 10:37 AM, Hans Verkuil wrote: From: Hans Verkuil hans.verk...@cisco.com Querycap shouldn't set the version field (the core does that for you), but it should set the device_caps field. In addition, remove the CAPTURE and OUTPUT caps for M2M devices. These were already slated for removal, so it's time to do so. Signed-off-by: Hans Verkuil hans.verk...@cisco.com Cc: Lad, Prabhakar prabhakar.cse...@gmail.com Cc: Kamil Debski k.deb...@samsung.com Cc: Jacek Anaszewski j.anaszew...@samsung.com Acked-by: Jacek Anaszewski j.anaszew...@samsung.com Best Regards, Jacek Anaszewski --- drivers/media/platform/davinci/vpbe_display.c | 1 - drivers/media/platform/davinci/vpfe_capture.c | 4 ++-- drivers/media/platform/s5p-g2d/g2d.c | 10 ++ drivers/media/platform/s5p-jpeg/jpeg-core.c | 9 ++--- drivers/media/platform/s5p-mfc/s5p_mfc_dec.c | 6 ++ drivers/media/platform/s5p-mfc/s5p_mfc_enc.c | 6 ++ 6 files changed, 10 insertions(+), 26 deletions(-) diff --git a/drivers/media/platform/davinci/vpbe_display.c b/drivers/media/platform/davinci/vpbe_display.c index 78b9ffe..21a5a56 100644 --- a/drivers/media/platform/davinci/vpbe_display.c +++ b/drivers/media/platform/davinci/vpbe_display.c @@ -639,7 +639,6 @@ static int vpbe_display_querycap(struct file *file, void *priv, struct vpbe_layer *layer = video_drvdata(file); struct vpbe_device *vpbe_dev = layer-disp_dev-vpbe_dev; - cap-version = VPBE_DISPLAY_VERSION_CODE; cap-device_caps = V4L2_CAP_VIDEO_OUTPUT | V4L2_CAP_STREAMING; cap-capabilities = cap-device_caps | V4L2_CAP_DEVICE_CAPS; snprintf(cap-driver, sizeof(cap-driver), %s, diff --git a/drivers/media/platform/davinci/vpfe_capture.c b/drivers/media/platform/davinci/vpfe_capture.c index 3d0e3ae..271c460 100644 --- a/drivers/media/platform/davinci/vpfe_capture.c +++ b/drivers/media/platform/davinci/vpfe_capture.c @@ -930,8 +930,8 @@ static int vpfe_querycap(struct file *file, void *priv, v4l2_dbg(1, debug, vpfe_dev-v4l2_dev, vpfe_querycap\n); - cap-version = VPFE_CAPTURE_VERSION_CODE; - cap-capabilities = V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_STREAMING; + cap-device_caps = V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_STREAMING; + cap-capabilities = cap-device_caps | V4L2_CAP_DEVICE_CAPS; strlcpy(cap-driver, CAPTURE_DRV_NAME, sizeof(cap-driver)); strlcpy(cap-bus_info, VPFE, sizeof(cap-bus_info)); strlcpy(cap-card, vpfe_dev-cfg-card_name, sizeof(cap-card)); diff --git a/drivers/media/platform/s5p-g2d/g2d.c b/drivers/media/platform/s5p-g2d/g2d.c index d79e214..51e4edc 100644 --- a/drivers/media/platform/s5p-g2d/g2d.c +++ b/drivers/media/platform/s5p-g2d/g2d.c @@ -297,14 +297,8 @@ static int vidioc_querycap(struct file *file, void *priv, strncpy(cap-driver, G2D_NAME, sizeof(cap-driver) - 1); strncpy(cap-card, G2D_NAME, sizeof(cap-card) - 1); cap-bus_info[0] = 0; - cap-version = KERNEL_VERSION(1, 0, 0); - /* -* This is only a mem-to-mem video device. The capture and output -* device capability flags are left only for backward compatibility -* and are scheduled for removal. -*/ - cap-capabilities = V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_VIDEO_OUTPUT | - V4L2_CAP_VIDEO_M2M | V4L2_CAP_STREAMING; + cap-device_caps = V4L2_CAP_VIDEO_M2M | V4L2_CAP_STREAMING; + cap-capabilities = cap-device_caps | V4L2_CAP_DEVICE_CAPS; return 0; } diff --git a/drivers/media/platform/s5p-jpeg/jpeg-core.c b/drivers/media/platform/s5p-jpeg/jpeg-core.c index 6fcc7f0..d6f75b1 100644 --- a/drivers/media/platform/s5p-jpeg/jpeg-core.c +++ b/drivers/media/platform/s5p-jpeg/jpeg-core.c @@ -1001,13 +1001,8 @@ static int s5p_jpeg_querycap(struct file *file, void *priv, sizeof(cap-card)); } cap-bus_info[0] = 0; - /* -* This is only a mem-to-mem video device. The capture and output -* device capability flags are left only for backward compatibility -* and are scheduled for removal. -*/ - cap-capabilities = V4L2_CAP_STREAMING | V4L2_CAP_VIDEO_M2M | - V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_VIDEO_OUTPUT; + cap-device_caps = V4L2_CAP_STREAMING | V4L2_CAP_VIDEO_M2M; + cap-capabilities = cap-device_caps | V4L2_CAP_DEVICE_CAPS; return 0; } diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c b/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c index 74bcec8..c6c3452 100644 --- a/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c +++ b/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c @@ -269,15 +269,13 @@ static int vidioc_querycap(struct file *file, void *priv, strncpy(cap-driver, dev-plat_dev-name, sizeof(cap-driver) - 1); strncpy(cap-card, dev-plat_dev-name, sizeof(cap-card) - 1); cap-bus_info[0] = 0; -
Re: [PATCH v4 1/3] media: soc_camera: rcar_vin: Add scaling support
Hello Guennadi, I'm so sorry for the long delay in my reply. Please give me some more time to test the patches. Regards, Kaneko 2014-11-23 20:45 GMT+09:00 Guennadi Liakhovetski g.liakhovet...@gmx.de: From: Koji Matsuoka koji.matsuoka...@renesas.com Signed-off-by: Koji Matsuoka koji.matsuoka...@renesas.com Signed-off-by: Yoshihiro Kaneko ykaneko0...@gmail.com [g.liakhovet...@gmx.de: minor stylistic and formatting corrections] Signed-off-by: Guennadi Liakhovetski g.liakhovet...@gmx.de --- Kaneko-san, Matsuoka-san, could you please have a look at this version of this your patch? Are my changes to it ok? Also, please test this my branch: http://git.linuxtv.org/cgit.cgi/gliakhovetski/v4l-dvb.git/log/?h=for-3.19-1 before I push it to Mauro. Patches applied more or less cleanly, and there don't seem to be any functional dependencies, that I might have broken, the driver compiles with no warnings, still, would be good if you could test it! Otherwise waiting for updates for other your patches! Patch rcar_vin: Add BT.709 24-bit RGB888 input support is also marked Ok by me, but I couldn't push it yet, because it depends on other patches, that have to be updated. Thanks Guennadi drivers/media/platform/soc_camera/rcar_vin.c | 451 ++- 1 file changed, 442 insertions(+), 9 deletions(-) diff --git a/drivers/media/platform/soc_camera/rcar_vin.c b/drivers/media/platform/soc_camera/rcar_vin.c index c60560a..c71ef2b 100644 --- a/drivers/media/platform/soc_camera/rcar_vin.c +++ b/drivers/media/platform/soc_camera/rcar_vin.c @@ -64,6 +64,30 @@ #define VNDMR_REG 0x58/* Video n Data Mode Register */ #define VNDMR2_REG 0x5C/* Video n Data Mode Register 2 */ #define VNUVAOF_REG0x60/* Video n UV Address Offset Register */ +#define VNC1A_REG 0x80/* Video n Coefficient Set C1A Register */ +#define VNC1B_REG 0x84/* Video n Coefficient Set C1B Register */ +#define VNC1C_REG 0x88/* Video n Coefficient Set C1C Register */ +#define VNC2A_REG 0x90/* Video n Coefficient Set C2A Register */ +#define VNC2B_REG 0x94/* Video n Coefficient Set C2B Register */ +#define VNC2C_REG 0x98/* Video n Coefficient Set C2C Register */ +#define VNC3A_REG 0xA0/* Video n Coefficient Set C3A Register */ +#define VNC3B_REG 0xA4/* Video n Coefficient Set C3B Register */ +#define VNC3C_REG 0xA8/* Video n Coefficient Set C3C Register */ +#define VNC4A_REG 0xB0/* Video n Coefficient Set C4A Register */ +#define VNC4B_REG 0xB4/* Video n Coefficient Set C4B Register */ +#define VNC4C_REG 0xB8/* Video n Coefficient Set C4C Register */ +#define VNC5A_REG 0xC0/* Video n Coefficient Set C5A Register */ +#define VNC5B_REG 0xC4/* Video n Coefficient Set C5B Register */ +#define VNC5C_REG 0xC8/* Video n Coefficient Set C5C Register */ +#define VNC6A_REG 0xD0/* Video n Coefficient Set C6A Register */ +#define VNC6B_REG 0xD4/* Video n Coefficient Set C6B Register */ +#define VNC6C_REG 0xD8/* Video n Coefficient Set C6C Register */ +#define VNC7A_REG 0xE0/* Video n Coefficient Set C7A Register */ +#define VNC7B_REG 0xE4/* Video n Coefficient Set C7B Register */ +#define VNC7C_REG 0xE8/* Video n Coefficient Set C7C Register */ +#define VNC8A_REG 0xF0/* Video n Coefficient Set C8A Register */ +#define VNC8B_REG 0xF4/* Video n Coefficient Set C8B Register */ +#define VNC8C_REG 0xF8/* Video n Coefficient Set C8C Register */ /* Register bit fields for R-Car VIN */ /* Video n Main Control Register bits */ @@ -117,6 +141,324 @@ enum chip_id { RCAR_E1, }; +struct vin_coeff { + unsigned short xs_value; + u32 coeff_set[24]; +}; + +static const struct vin_coeff vin_coeff_set[] = { + { 0x, { + 0x, 0x, 0x, + 0x, 0x, 0x, + 0x, 0x, 0x, + 0x, 0x, 0x, + 0x, 0x, 0x, + 0x, 0x, 0x, + 0x, 0x, 0x, + 0x, 0x, 0x }, + }, + { 0x1000, { + 0x000fa400, 0x000fa400, 0x09625902, + 0x03f8, 0x0403, 0x3de0d9f0, + 0x001fffed, 0x0804, 0x3cc1f9c3, + 0x001003de, 0x0c01, 0x3cb34d7f, + 0x002003d2, 0x0c00, 0x3d24a92d, +
Re: [PATCH/RFC v4 01/11] mediactl: Introduce v4l2_subdev structure
Hi Sakari, On 11/25/2014 12:36 PM, Sakari Ailus wrote: Hi Jacek, Thank you for the updated patchset. On Fri, Nov 21, 2014 at 05:14:30PM +0100, Jacek Anaszewski wrote: Add struct v4l2_subdev as a representation of the v4l2 sub-device related to a media entity. Add sd property, the pointer to the newly introduced structure, to the struct media_entity and move fd property to it. Signed-off-by: Jacek Anaszewski j.anaszew...@samsung.com Acked-by: Kyungmin Park kyungmin.p...@samsung.com --- utils/media-ctl/libmediactl.c | 30 +- utils/media-ctl/libv4l2subdev.c | 34 +- utils/media-ctl/mediactl-priv.h |5 + utils/media-ctl/mediactl.h | 22 ++ 4 files changed, 69 insertions(+), 22 deletions(-) diff --git a/utils/media-ctl/libmediactl.c b/utils/media-ctl/libmediactl.c index ec360bd..53921f5 100644 --- a/utils/media-ctl/libmediactl.c +++ b/utils/media-ctl/libmediactl.c @@ -511,7 +511,6 @@ static int media_enum_entities(struct media_device *media) entity = media-entities[media-entities_count]; memset(entity, 0, sizeof(*entity)); - entity-fd = -1; I think I'd definitely leave the fd to the media_entity itself. Not all the entities are sub-devices, even right now. I am aware of it, I even came across this issue while implementing the function v4l2_subdev_apply_pipeline_fmt. I added suitable comment explaining why the entity not being a sub-device has its representation. I moved the fd out of media_entity by following Laurent's message [1], where he mentioned this, however I think that it would be indeed best if it remained intact. entity-info.id = id | MEDIA_ENT_ID_FLAG_NEXT; entity-media = media; @@ -529,11 +528,13 @@ static int media_enum_entities(struct media_device *media) entity-pads = malloc(entity-info.pads * sizeof(*entity-pads)); entity-links = malloc(entity-max_links * sizeof(*entity-links)); - if (entity-pads == NULL || entity-links == NULL) { + entity-sd = calloc(1, sizeof(*entity-sd)); + if (entity-pads == NULL || entity-links == NULL || entity-sd == NULL) { ret = -ENOMEM; break; } + entity-sd-fd = -1; media-entities_count++; if (entity-info.flags MEDIA_ENT_FL_DEFAULT) { @@ -704,8 +705,9 @@ void media_device_unref(struct media_device *media) free(entity-pads); free(entity-links); - if (entity-fd != -1) - close(entity-fd); + if (entity-sd-fd != -1) + close(entity-sd-fd); + free(entity-sd); } free(media-entities); @@ -726,13 +728,17 @@ int media_device_add_entity(struct media_device *media, if (entity == NULL) return -ENOMEM; + entity-sd = calloc(1, sizeof(*entity-sd)); + if (entity-sd == NULL) + return -ENOMEM; + media-entities = entity; media-entities_count++; entity = media-entities[media-entities_count - 1]; memset(entity, 0, sizeof *entity); - entity-fd = -1; + entity-sd-fd = -1; entity-media = media; strncpy(entity-devname, devnode, sizeof entity-devname); entity-devname[sizeof entity-devname - 1] = '\0'; @@ -955,3 +961,17 @@ int media_parse_setup_links(struct media_device *media, const char *p) return *end ? -EINVAL : 0; } + +/* - + * Media entity access + */ + +int media_entity_get_fd(struct media_entity *entity) +{ + return entity-sd-fd; +} + +void media_entity_set_fd(struct media_entity *entity, int fd) +{ + entity-sd-fd = fd; +} You access the fd directly now inside the library. I don't think there should be a need to set it. struct media_entity is defined in mediactl-priv.h, whose name implies that it shouldn't be made public. Thats way I implemented the setter. I use it in the libv4l-exynos4-camera.c. diff --git a/utils/media-ctl/libv4l2subdev.c b/utils/media-ctl/libv4l2subdev.c index 8015330..09e0081 100644 --- a/utils/media-ctl/libv4l2subdev.c +++ b/utils/media-ctl/libv4l2subdev.c @@ -41,11 +41,11 @@ int v4l2_subdev_open(struct media_entity *entity) { - if (entity-fd != -1) + if (entity-sd-fd != -1) return 0; - entity-fd = open(entity-devname, O_RDWR); - if (entity-fd == -1) { + entity-sd-fd = open(entity-devname, O_RDWR); + if (entity-sd-fd == -1) { int ret = -errno; media_dbg(entity-media, %s: Failed to open subdev device node %s\n, __func__, @@ -58,8 +58,8 @@ int v4l2_subdev_open(struct media_entity *entity) void
Re: [PATCH v2 2/2] smipcie: add DVBSky T9580 V3 support
Em Mon, 10 Nov 2014 10:09:13 +0800 Nibble Max nibble@gmail.com escreveu: Hello Antti, On 2014-11-10 06:13:07, Antti Palosaari wrote: On 11/08/2014 01:35 PM, Nibble Max wrote: v2: - Update Kconfig file. DVBSky T9580 V3 card is the dual tuner card, which supports S/S2 and T2/T/C. 1DVB-S/S2 frontend: M88DS3103/M88TS2022 2DVB-T2/T/C frontend: SI2168B40/SI2157A30 2PCIe bridge: SMI PCIe Signed-off-by: Nibble Max nibble@gmail.com Reviewed-by: Antti Palosaari cr...@iki.fi I reviewed the patch v1 also :] Antti Thanks for your review! This patch doesn't compile: drivers/media/pci/smipcie/smipcie.c: In function 'smi_dvbsky_sit2_fe_attach': drivers/media/pci/smipcie/smipcie.c:637:2: error: implicit declaration of function 'smi_add_i2c_client' [-Werror=implicit-function-declaration] client_demod = smi_add_i2c_client(i2c, client_info); ^ drivers/media/pci/smipcie/smipcie.c:637:15: warning: assignment makes pointer from integer without a cast [enabled by default] client_demod = smi_add_i2c_client(i2c, client_info); ^ drivers/media/pci/smipcie/smipcie.c:653:15: warning: assignment makes pointer from integer without a cast [enabled by default] client_tuner = smi_add_i2c_client(tuner_i2c_adapter, client_info); ^ drivers/media/pci/smipcie/smipcie.c:655:3: error: implicit declaration of function 'smi_del_i2c_client' [-Werror=implicit-function-declaration] smi_del_i2c_client(port-i2c_client_demod); ^ Best Regards, Max --- drivers/media/pci/smipcie/Kconfig | 3 ++ drivers/media/pci/smipcie/smipcie.c | 67 + 2 files changed, 70 insertions(+) diff --git a/drivers/media/pci/smipcie/Kconfig b/drivers/media/pci/smipcie/Kconfig index 75a2992..35ace80 100644 --- a/drivers/media/pci/smipcie/Kconfig +++ b/drivers/media/pci/smipcie/Kconfig @@ -2,12 +2,15 @@ config DVB_SMIPCIE tristate SMI PCIe DVBSky cards depends on DVB_CORE PCI I2C select DVB_M88DS3103 if MEDIA_SUBDRV_AUTOSELECT + select DVB_SI2168 if MEDIA_SUBDRV_AUTOSELECT select MEDIA_TUNER_M88TS2022 if MEDIA_SUBDRV_AUTOSELECT select MEDIA_TUNER_M88RS6000T if MEDIA_SUBDRV_AUTOSELECT + select MEDIA_TUNER_SI2157 if MEDIA_SUBDRV_AUTOSELECT help Support for cards with SMI PCIe bridge: - DVBSky S950 V3 - DVBSky S952 V3 +- DVBSky T9580 V3 Say Y or M if you own such a device and want to use it. If unsure say N. diff --git a/drivers/media/pci/smipcie/smipcie.c b/drivers/media/pci/smipcie/smipcie.c index c27e45b..5d1932b 100644 --- a/drivers/media/pci/smipcie/smipcie.c +++ b/drivers/media/pci/smipcie/smipcie.c @@ -18,6 +18,8 @@ #include m88ds3103.h #include m88ts2022.h #include m88rs6000t.h +#include si2168.h +#include si2157.h DVB_DEFINE_MOD_OPT_ADAPTER_NR(adapter_nr); @@ -618,6 +620,58 @@ err_tuner_i2c_device: return ret; } +static int smi_dvbsky_sit2_fe_attach(struct smi_port *port) +{ + int ret = 0; + struct smi_dev *dev = port-dev; + struct i2c_adapter *i2c; + struct i2c_adapter *tuner_i2c_adapter; + struct i2c_client *client_tuner, *client_demod; + struct i2c_board_info client_info; + struct si2168_config si2168_config; + struct si2157_config si2157_config; + + /* select i2c bus */ + i2c = (port-idx == 0) ? dev-i2c_bus[0] : dev-i2c_bus[1]; + + /* attach demod */ + memset(si2168_config, 0, sizeof(si2168_config)); + si2168_config.i2c_adapter = tuner_i2c_adapter; + si2168_config.fe = port-fe; + si2168_config.ts_mode = SI2168_TS_PARALLEL; + + memset(client_info, 0, sizeof(struct i2c_board_info)); + strlcpy(client_info.type, si2168, I2C_NAME_SIZE); + client_info.addr = 0x64; + client_info.platform_data = si2168_config; + + client_demod = smi_add_i2c_client(i2c, client_info); + if (!client_demod) { + ret = -ENODEV; + return ret; + } + port-i2c_client_demod = client_demod; + + /* attach tuner */ + memset(si2157_config, 0, sizeof(si2157_config)); + si2157_config.fe = port-fe; + + memset(client_info, 0, sizeof(struct i2c_board_info)); + strlcpy(client_info.type, si2157, I2C_NAME_SIZE); + client_info.addr = 0x60; + client_info.platform_data = si2157_config; + + client_tuner = smi_add_i2c_client(tuner_i2c_adapter, client_info); + if (!client_tuner) { + smi_del_i2c_client(port-i2c_client_demod); + port-i2c_client_demod = NULL; + ret = -ENODEV; + return ret; + } + port-i2c_client_tuner = client_tuner; + return ret; +} + static int smi_fe_init(struct smi_port *port) { int ret = 0; @@ -635,6 +689,9 @@ static int smi_fe_init(struct smi_port *port) case DVBSKY_FE_M88RS6000: ret = smi_dvbsky_m88rs6000_fe_attach(port); break; + case DVBSKY_FE_SIT2: + ret
Re: [PATCH v2 2/2] smipcie: add DVBSky T9580 V3 support
Em Tue, 25 Nov 2014 12:25:38 -0200 Mauro Carvalho Chehab mche...@osg.samsung.com escreveu: Em Mon, 10 Nov 2014 10:09:13 +0800 Nibble Max nibble@gmail.com escreveu: Hello Antti, On 2014-11-10 06:13:07, Antti Palosaari wrote: On 11/08/2014 01:35 PM, Nibble Max wrote: v2: - Update Kconfig file. DVBSky T9580 V3 card is the dual tuner card, which supports S/S2 and T2/T/C. 1DVB-S/S2 frontend: M88DS3103/M88TS2022 2DVB-T2/T/C frontend: SI2168B40/SI2157A30 2PCIe bridge: SMI PCIe Signed-off-by: Nibble Max nibble@gmail.com Reviewed-by: Antti Palosaari cr...@iki.fi I reviewed the patch v1 also :] Antti Thanks for your review! This patch doesn't compile: drivers/media/pci/smipcie/smipcie.c: In function 'smi_dvbsky_sit2_fe_attach': drivers/media/pci/smipcie/smipcie.c:637:2: error: implicit declaration of function 'smi_add_i2c_client' [-Werror=implicit-function-declaration] client_demod = smi_add_i2c_client(i2c, client_info); ^ drivers/media/pci/smipcie/smipcie.c:637:15: warning: assignment makes pointer from integer without a cast [enabled by default] client_demod = smi_add_i2c_client(i2c, client_info); ^ drivers/media/pci/smipcie/smipcie.c:653:15: warning: assignment makes pointer from integer without a cast [enabled by default] client_tuner = smi_add_i2c_client(tuner_i2c_adapter, client_info); ^ drivers/media/pci/smipcie/smipcie.c:655:3: error: implicit declaration of function 'smi_del_i2c_client' [-Werror=implicit-function-declaration] smi_del_i2c_client(port-i2c_client_demod); ^ Hmm... actually patch 1/2 was marked as superseded, not sure why... Let me review/apply patch 1/2 first and see if it will fixes the issue. Regards, Mauro Best Regards, Max --- drivers/media/pci/smipcie/Kconfig | 3 ++ drivers/media/pci/smipcie/smipcie.c | 67 + 2 files changed, 70 insertions(+) diff --git a/drivers/media/pci/smipcie/Kconfig b/drivers/media/pci/smipcie/Kconfig index 75a2992..35ace80 100644 --- a/drivers/media/pci/smipcie/Kconfig +++ b/drivers/media/pci/smipcie/Kconfig @@ -2,12 +2,15 @@ config DVB_SMIPCIE tristate SMI PCIe DVBSky cards depends on DVB_CORE PCI I2C select DVB_M88DS3103 if MEDIA_SUBDRV_AUTOSELECT +select DVB_SI2168 if MEDIA_SUBDRV_AUTOSELECT select MEDIA_TUNER_M88TS2022 if MEDIA_SUBDRV_AUTOSELECT select MEDIA_TUNER_M88RS6000T if MEDIA_SUBDRV_AUTOSELECT +select MEDIA_TUNER_SI2157 if MEDIA_SUBDRV_AUTOSELECT help Support for cards with SMI PCIe bridge: - DVBSky S950 V3 - DVBSky S952 V3 + - DVBSky T9580 V3 Say Y or M if you own such a device and want to use it. If unsure say N. diff --git a/drivers/media/pci/smipcie/smipcie.c b/drivers/media/pci/smipcie/smipcie.c index c27e45b..5d1932b 100644 --- a/drivers/media/pci/smipcie/smipcie.c +++ b/drivers/media/pci/smipcie/smipcie.c @@ -18,6 +18,8 @@ #include m88ds3103.h #include m88ts2022.h #include m88rs6000t.h +#include si2168.h +#include si2157.h DVB_DEFINE_MOD_OPT_ADAPTER_NR(adapter_nr); @@ -618,6 +620,58 @@ err_tuner_i2c_device: return ret; } +static int smi_dvbsky_sit2_fe_attach(struct smi_port *port) +{ +int ret = 0; +struct smi_dev *dev = port-dev; +struct i2c_adapter *i2c; +struct i2c_adapter *tuner_i2c_adapter; +struct i2c_client *client_tuner, *client_demod; +struct i2c_board_info client_info; +struct si2168_config si2168_config; +struct si2157_config si2157_config; + +/* select i2c bus */ +i2c = (port-idx == 0) ? dev-i2c_bus[0] : dev-i2c_bus[1]; + +/* attach demod */ +memset(si2168_config, 0, sizeof(si2168_config)); +si2168_config.i2c_adapter = tuner_i2c_adapter; +si2168_config.fe = port-fe; +si2168_config.ts_mode = SI2168_TS_PARALLEL; + +memset(client_info, 0, sizeof(struct i2c_board_info)); +strlcpy(client_info.type, si2168, I2C_NAME_SIZE); +client_info.addr = 0x64; +client_info.platform_data = si2168_config; + +client_demod = smi_add_i2c_client(i2c, client_info); +if (!client_demod) { +ret = -ENODEV; +return ret; +} +port-i2c_client_demod = client_demod; + +/* attach tuner */ +memset(si2157_config, 0, sizeof(si2157_config)); +si2157_config.fe = port-fe; + +memset(client_info, 0, sizeof(struct i2c_board_info)); +strlcpy(client_info.type, si2157, I2C_NAME_SIZE); +client_info.addr = 0x60; +
Re: [PATCH] media: exynos-gsc: fix build warning
Em Tue, 18 Nov 2014 10:57:48 + Lad, Prabhakar prabhakar.cse...@gmail.com escreveu: this patch fixes following build warning: gsc-core.c:350:17: warning: 'low_plane' may be used uninitialized gsc-core.c:371:31: warning: 'high_plane' may be used uninitialized Signed-off-by: Lad, Prabhakar prabhakar.cse...@gmail.com --- drivers/media/platform/exynos-gsc/gsc-core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/media/platform/exynos-gsc/gsc-core.c b/drivers/media/platform/exynos-gsc/gsc-core.c index 91d226b..6c71b17 100644 --- a/drivers/media/platform/exynos-gsc/gsc-core.c +++ b/drivers/media/platform/exynos-gsc/gsc-core.c @@ -347,8 +347,8 @@ void gsc_set_prefbuf(struct gsc_dev *gsc, struct gsc_frame *frm) s_chk_addr = frm-addr.cb; s_chk_len = frm-payload[1]; } else if (frm-fmt-num_planes == 3) { - u32 low_addr, low_plane, mid_addr, mid_plane; - u32 high_addr, high_plane; + u32 low_addr, low_plane = 0, mid_addr, mid_plane; + u32 high_addr, high_plane = 0; u32 t_min, t_max; t_min = min3(frm-addr.y, frm-addr.cb, frm-addr.cr); Actually, this just hides the error, without fixing. If the address is not found, a real error occurs, and the address is also invalid. So, I think that the enclosed patch will be doing a better job fixing it. Still, the entire code seems mostly useless on my eyes, as this function seems to be used only for debugging purposes, and errors there aren't actually handled properly. [PATCH] [media] exynos-gsc: fix build warning Fixes following build warnings: gsc-core.c:350:17: warning: 'low_plane' may be used uninitialized gsc-core.c:371:31: warning: 'high_plane' may be used uninitialized Reported-by: Prabhakar Lad prabhakar.cse...@gmail.com Signed-off-by: Mauro Carvalho Chehab mche...@osg.samsung.com diff --git a/drivers/media/platform/exynos-gsc/gsc-core.c b/drivers/media/platform/exynos-gsc/gsc-core.c index 91d226b8fe5c..3062e9fac6da 100644 --- a/drivers/media/platform/exynos-gsc/gsc-core.c +++ b/drivers/media/platform/exynos-gsc/gsc-core.c @@ -319,21 +319,22 @@ int gsc_enum_fmt_mplane(struct v4l2_fmtdesc *f) return 0; } -static u32 get_plane_info(struct gsc_frame *frm, u32 addr, u32 *index) +static int get_plane_info(struct gsc_frame *frm, u32 addr, u32 *index, u32 *ret_addr) { if (frm-addr.y == addr) { *index = 0; - return frm-addr.y; + *ret_addr = frm-addr.y; } else if (frm-addr.cb == addr) { *index = 1; - return frm-addr.cb; + *ret_addr = frm-addr.cb; } else if (frm-addr.cr == addr) { *index = 2; - return frm-addr.cr; + *ret_addr = frm-addr.cr; } else { pr_err(Plane address is wrong); return -EINVAL; } + return 0; } void gsc_set_prefbuf(struct gsc_dev *gsc, struct gsc_frame *frm) @@ -352,9 +353,11 @@ void gsc_set_prefbuf(struct gsc_dev *gsc, struct gsc_frame *frm) u32 t_min, t_max; t_min = min3(frm-addr.y, frm-addr.cb, frm-addr.cr); - low_addr = get_plane_info(frm, t_min, low_plane); + if (get_plane_info(frm, t_min, low_plane, low_addr)) + return; t_max = max3(frm-addr.y, frm-addr.cb, frm-addr.cr); - high_addr = get_plane_info(frm, t_max, high_plane); + if (get_plane_info(frm, t_max, high_plane, high_addr)) + return; mid_plane = 3 - (low_plane + high_plane); if (mid_plane == 0) -- 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] media: exynos-gsc: fix build warning
Hi Mauro, On Tue, Nov 25, 2014 at 3:04 PM, Mauro Carvalho Chehab mche...@osg.samsung.com wrote: Em Tue, 18 Nov 2014 10:57:48 + [Snip] -static u32 get_plane_info(struct gsc_frame *frm, u32 addr, u32 *index) +static int get_plane_info(struct gsc_frame *frm, u32 addr, u32 *index, u32 *ret_addr) { if (frm-addr.y == addr) { *index = 0; - return frm-addr.y; + *ret_addr = frm-addr.y; } else if (frm-addr.cb == addr) { *index = 1; - return frm-addr.cb; + *ret_addr = frm-addr.cb; } else if (frm-addr.cr == addr) { *index = 2; - return frm-addr.cr; + *ret_addr = frm-addr.cr; } else { pr_err(Plane address is wrong); return -EINVAL; } + return 0; the control wont reach here! may be you can remove the complete else part outside ? with that change, Reported-by: Lad, Prabhakar prabhakar.cse...@gmail.com Acked-by: Lad, Prabhakar prabhakar.cse...@gmail.com Thanks, --Prabhakar Lad } void gsc_set_prefbuf(struct gsc_dev *gsc, struct gsc_frame *frm) @@ -352,9 +353,11 @@ void gsc_set_prefbuf(struct gsc_dev *gsc, struct gsc_frame *frm) u32 t_min, t_max; t_min = min3(frm-addr.y, frm-addr.cb, frm-addr.cr); - low_addr = get_plane_info(frm, t_min, low_plane); + if (get_plane_info(frm, t_min, low_plane, low_addr)) + return; t_max = max3(frm-addr.y, frm-addr.cb, frm-addr.cr); - high_addr = get_plane_info(frm, t_max, high_plane); + if (get_plane_info(frm, t_max, high_plane, high_addr)) + return; mid_plane = 3 - (low_plane + high_plane); if (mid_plane == 0) -- 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] media: exynos-gsc: fix build warning
Hi, On Tue, Nov 25, 2014 at 3:18 PM, Prabhakar Lad prabhakar.cse...@gmail.com wrote: Hi Mauro, On Tue, Nov 25, 2014 at 3:04 PM, Mauro Carvalho Chehab mche...@osg.samsung.com wrote: Em Tue, 18 Nov 2014 10:57:48 + [Snip] -static u32 get_plane_info(struct gsc_frame *frm, u32 addr, u32 *index) +static int get_plane_info(struct gsc_frame *frm, u32 addr, u32 *index, u32 *ret_addr) { if (frm-addr.y == addr) { *index = 0; - return frm-addr.y; + *ret_addr = frm-addr.y; } else if (frm-addr.cb == addr) { *index = 1; - return frm-addr.cb; + *ret_addr = frm-addr.cb; } else if (frm-addr.cr == addr) { *index = 2; - return frm-addr.cr; + *ret_addr = frm-addr.cr; } else { pr_err(Plane address is wrong); return -EINVAL; } + return 0; the control wont reach here! may be you can remove the complete else part outside ? Ah my bad :(, I missread 'ret_addr' to return. Thanks, --Prabhakar Lad with that change, Reported-by: Lad, Prabhakar prabhakar.cse...@gmail.com Acked-by: Lad, Prabhakar prabhakar.cse...@gmail.com Thanks, --Prabhakar Lad } void gsc_set_prefbuf(struct gsc_dev *gsc, struct gsc_frame *frm) @@ -352,9 +353,11 @@ void gsc_set_prefbuf(struct gsc_dev *gsc, struct gsc_frame *frm) u32 t_min, t_max; t_min = min3(frm-addr.y, frm-addr.cb, frm-addr.cr); - low_addr = get_plane_info(frm, t_min, low_plane); + if (get_plane_info(frm, t_min, low_plane, low_addr)) + return; t_max = max3(frm-addr.y, frm-addr.cb, frm-addr.cr); - high_addr = get_plane_info(frm, t_max, high_plane); + if (get_plane_info(frm, t_max, high_plane, high_addr)) + return; mid_plane = 3 - (low_plane + high_plane); if (mid_plane == 0) -- 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: it913x: probe of 8-001c failed with error -22
On 11/25/2014 05:32 PM, kap...@mizera.cz wrote: Hello. U12.04 with newly installed 3.8 kernel: 3.8.0-44-generic #66~precise1-Ubuntu SMP Tue Jul 15 04:01:04 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux USB dvb-t tuner: Bus 001 Device 005: ID 048d:9135 Integrated Technology Express, Inc. Zolid Mini DVB-T Stick Newest V4L drivers installed. But there is an error in log by inserting of the USB tuner: --- Nov 25 16:24:38 zly-hugo kernel: [ 315.927923] usb 1-1.3: new high-speed USB device number 5 using ehci-pci Nov 25 16:24:38 zly-hugo kernel: [ 316.021755] usb 1-1.3: New USB device found, idVendor=048d, idProduct=9135 Nov 25 16:24:38 zly-hugo kernel: [ 316.021760] usb 1-1.3: New USB device strings: Mfr=0, Product=0, SerialNumber=0 Nov 25 16:24:38 zly-hugo kernel: [ 316.023071] usb 1-1.3: dvb_usb_af9035: prechip_version=83 chip_version=02 chip_type=9135 Nov 25 16:24:38 zly-hugo kernel: [ 316.023443] usb 1-1.3: dvb_usb_v2: found a 'ITE 9135 Generic' in cold state Nov 25 16:24:38 zly-hugo kernel: [ 316.023519] usb 1-1.3: dvb_usb_v2: downloading firmware from file 'dvb-usb-it9135-02.fw' Nov 25 16:24:38 zly-hugo mtp-probe: checking bus 1, device 5: /sys/devices/pci:00/:00:1a.0/usb1/1-1/1-1.3 Nov 25 16:24:38 zly-hugo kernel: [ 316.119961] usb 1-1.3: dvb_usb_af9035: firmware version=3.40.1.0 Nov 25 16:24:38 zly-hugo kernel: [ 316.119974] usb 1-1.3: dvb_usb_v2: found a 'ITE 9135 Generic' in warm state Nov 25 16:24:38 zly-hugo kernel: [ 316.120972] usb 1-1.3: dvb_usb_v2: will pass the complete MPEG2 transport stream to the software demuxer Nov 25 16:24:38 zly-hugo kernel: [ 316.120996] DVB: registering new adapter (ITE 9135 Generic) Nov 25 16:24:38 zly-hugo mtp-probe: bus: 1, device: 5 was not an MTP device Nov 25 16:24:38 zly-hugo kernel: [ 316.123808] af9033 8-0038: firmware version: LINK 3.40.1.0 - OFDM 3.40.1.0 Nov 25 16:24:38 zly-hugo kernel: [ 316.123812] af9033 8-0038: Afatech AF9033 successfully attached Nov 25 16:24:38 zly-hugo kernel: [ 316.123822] usb 1-1.3: DVB: registering adapter 0 frontend 0 (Afatech AF9033 (DVB-T))... Nov 25 16:24:38 zly-hugo kernel: [ 316.125115] it913x: probe of 8-001c failed with error -22 - What is wrong ? it913x_probe() fails with error -EINVAL. There is only 2 ways it could fail, kzalloc() and regmap_init_i2c(). It must be later one. Do you have regmap module installed? What says: modinfo regmap-i2c command? Antti -- http://palosaari.fi/ -- 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:media_tree/master] [media] em28xx: Add support for Terratec Cinergy T2 Stick HD
On 11/25/2014 01:13 PM, Mauro Carvalho Chehab wrote: This is an automatic generated email to let you know that the following patch were queued at the http://git.linuxtv.org/media_tree.git tree: Subject: [media] em28xx: Add support for Terratec Cinergy T2 Stick HD Author: Olli Salonen olli.salo...@iki.fi Date:Mon Nov 24 03:57:34 2014 -0300 Terratec Cinergy T2 Stick HD [eb1a:8179] is a USB DVB-T/T2/C tuner that contains following components: * Empia EM28178 USB bridge * Silicon Labs Si2168-A30 demodulator * Silicon Labs Si2146-A10 tuner I don't have the remote, so the RC_MAP is a best guess based on the pictures of the remote controllers and other supported Terratec devices with a similar remote. [Antti: Resolved conflict caused by Leadtek VC100 patch] Signed-off-by: Olli Salonen olli.salo...@iki.fi Signed-off-by: Antti Palosaari cr...@iki.fi Signed-off-by: Mauro Carvalho Chehab mche...@osg.samsung.com Mauro, May I ask why you remove all the time my Reviewed-by tags? I have added it explicitly when I do careful review for the patch. I think it could be there even there is my Signed-off-by tag, which is there mainly because patch was submitted via my tree (patch's delivery path). I cannot see any rule which says I cannot add both tags (especially because meaning of both tags is bit different): Documentation/SubmittingPatches regards Antti -- http://palosaari.fi/ -- 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 v2 3/9] clk: sunxi: Add prcm mod0 clock driver
On Sun, 23 Nov 2014, Hans de Goede wrote: Add a driver for mod0 clocks found in the prcm. Currently there is only one mod0 clocks in the prcm, the ir clock. Signed-off-by: Hans de Goede hdego...@redhat.com --- Documentation/devicetree/bindings/clock/sunxi.txt | 1 + drivers/clk/sunxi/Makefile| 2 +- drivers/clk/sunxi/clk-sun6i-prcm-mod0.c | 63 +++ drivers/mfd/sun6i-prcm.c | 14 + 4 files changed, 79 insertions(+), 1 deletion(-) create mode 100644 drivers/clk/sunxi/clk-sun6i-prcm-mod0.c [...] diff --git a/drivers/mfd/sun6i-prcm.c b/drivers/mfd/sun6i-prcm.c index 283ab8d..ff1254f 100644 --- a/drivers/mfd/sun6i-prcm.c +++ b/drivers/mfd/sun6i-prcm.c @@ -41,6 +41,14 @@ static const struct resource sun6i_a31_apb0_gates_clk_res[] = { }, }; +static const struct resource sun6i_a31_ir_clk_res[] = { + { + .start = 0x54, + .end = 0x57, + .flags = IORESOURCE_MEM, + }, +}; I'm not overly keen on these magic numbers (and yes, I'm well aware that I SoB'ed the patch which started them off). It's not a show stopper, although I'd prefer if they were fixed with a subsequent patch. Acked-by: Lee Jones lee.jo...@linaro.org -- Lee Jones Linaro STMicroelectronics Landing Team Lead Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog -- 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] [media] lmed04: add missing breaks
On 25/11/14 11:19, Mauro Carvalho Chehab wrote: drivers/media/usb/dvb-usb-v2/lmedm04.c:828 lme_firmware_switch() warn: missing break? reassigning 'st-dvb_usb_lme2510_firmware' drivers/media/usb/dvb-usb-v2/lmedm04.c:849 lme_firmware_switch() warn: missing break? reassigning 'st-dvb_usb_lme2510_firmware' Signed-off-by: Mauro Carvalho Chehab mche...@osg.samsung.com diff --git a/drivers/media/usb/dvb-usb-v2/lmedm04.c b/drivers/media/usb/dvb-usb-v2/lmedm04.c index 9f2c5459b73a..99587418f4f0 100644 --- a/drivers/media/usb/dvb-usb-v2/lmedm04.c +++ b/drivers/media/usb/dvb-usb-v2/lmedm04.c @@ -826,6 +826,7 @@ static const char *lme_firmware_switch(struct dvb_usb_device *d, int cold) break; } st-dvb_usb_lme2510_firmware = TUNER_LG; + break; case TUNER_LG: fw_lme = fw_lg; ret = request_firmware(fw, fw_lme, udev-dev); @@ -847,6 +848,7 @@ static const char *lme_firmware_switch(struct dvb_usb_device *d, int cold) break; } st-dvb_usb_lme2510_firmware = TUNER_LG; + break; case TUNER_LG: fw_lme = fw_c_lg; ret = request_firmware(fw, fw_lme, udev-dev); The break is not missing it's three lines above. All these switches are fall through until it finds firmware the user has. The switch comes into play when the firmware needs to changed. Malcolm -- 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:media_tree/master] [media] em28xx: Add support for Terratec Cinergy T2 Stick HD
Em Tue, 25 Nov 2014 18:50:11 +0200 Antti Palosaari cr...@iki.fi escreveu: On 11/25/2014 01:13 PM, Mauro Carvalho Chehab wrote: This is an automatic generated email to let you know that the following patch were queued at the http://git.linuxtv.org/media_tree.git tree: Subject: [media] em28xx: Add support for Terratec Cinergy T2 Stick HD Author: Olli Salonen olli.salo...@iki.fi Date:Mon Nov 24 03:57:34 2014 -0300 Terratec Cinergy T2 Stick HD [eb1a:8179] is a USB DVB-T/T2/C tuner that contains following components: * Empia EM28178 USB bridge * Silicon Labs Si2168-A30 demodulator * Silicon Labs Si2146-A10 tuner I don't have the remote, so the RC_MAP is a best guess based on the pictures of the remote controllers and other supported Terratec devices with a similar remote. [Antti: Resolved conflict caused by Leadtek VC100 patch] Signed-off-by: Olli Salonen olli.salo...@iki.fi Signed-off-by: Antti Palosaari cr...@iki.fi Signed-off-by: Mauro Carvalho Chehab mche...@osg.samsung.com Mauro, May I ask why you remove all the time my Reviewed-by tags? I have added it explicitly when I do careful review for the patch. I think it could be there even there is my Signed-off-by tag, which is there mainly because patch was submitted via my tree (patch's delivery path). A SOB by a non-author implies that the patch got reviewed, as otherwise such patch won't be merged, as it doesn't make sense to forward a patch that are known to be broken. I cannot see any rule which says I cannot add both tags (especially because meaning of both tags is bit different): Documentation/SubmittingPatches That documentation is for submitting patches. It doesn't describe the process used by the drivers and subsystems maintainers. From time to time, people discuss about the usefulness of those non-SOB tags, but the general consensus seems that a patch should have just one tag from the same person. The last one was during the last KS. See what's there at the end of this article: http://lwn.net/Articles/608968/ The session ended with Linus jumping in and saying that, in the end, the Reviewed-by, Acked-by, and Cc tags all mean the same thing: the person named in the tag will be copied on the report if the patch turns out to be buggy. Some developers use one tag, while others use a different one, but there is no real difference between them. The session closed with some general disagreement over the meanings of the different tags — and no new ideas on how to get more review of kernel code. Regards, Mauro -- 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] [media] lmed04: add missing breaks
Em Tue, 25 Nov 2014 17:10:00 + Malcolm Priestley malcolmpriest...@gmail.com escreveu: On 25/11/14 11:19, Mauro Carvalho Chehab wrote: drivers/media/usb/dvb-usb-v2/lmedm04.c:828 lme_firmware_switch() warn: missing break? reassigning 'st-dvb_usb_lme2510_firmware' drivers/media/usb/dvb-usb-v2/lmedm04.c:849 lme_firmware_switch() warn: missing break? reassigning 'st-dvb_usb_lme2510_firmware' Signed-off-by: Mauro Carvalho Chehab mche...@osg.samsung.com diff --git a/drivers/media/usb/dvb-usb-v2/lmedm04.c b/drivers/media/usb/dvb-usb-v2/lmedm04.c index 9f2c5459b73a..99587418f4f0 100644 --- a/drivers/media/usb/dvb-usb-v2/lmedm04.c +++ b/drivers/media/usb/dvb-usb-v2/lmedm04.c @@ -826,6 +826,7 @@ static const char *lme_firmware_switch(struct dvb_usb_device *d, int cold) break; } st-dvb_usb_lme2510_firmware = TUNER_LG; + break; case TUNER_LG: fw_lme = fw_lg; ret = request_firmware(fw, fw_lme, udev-dev); @@ -847,6 +848,7 @@ static const char *lme_firmware_switch(struct dvb_usb_device *d, int cold) break; } st-dvb_usb_lme2510_firmware = TUNER_LG; + break; case TUNER_LG: fw_lme = fw_c_lg; ret = request_firmware(fw, fw_lme, udev-dev); The break is not missing it's three lines above. All these switches are fall through until it finds firmware the user has. The switch comes into play when the firmware needs to changed. Oh! Well, I was so sure that the patch was right that I merged it already. My bad. Anyway, smatch complains if dvb_usb_lme2510_firmware is rewritten, and that bothers people that use static analyzers. So, IMO, the best is to rework the code in order to: - document that the breaks should not be used there; - remove smatch warning. What do you think about the following patch? Revert [media] lmed04: add missing breaks According with Malcolm, the missing breaks are intentional. So, let's revert commit d442b15fb4deb2b5d516e2dae1f569b1d5472399, add some comments to document it and fix the two smatch warnings: drivers/media/usb/dvb-usb-v2/lmedm04.c:828 lme_firmware_switch() warn: missing break? reassigning 'st-dvb_usb_lme2510_firmware' drivers/media/usb/dvb-usb-v2/lmedm04.c:850 lme_firmware_switch() warn: missing break? reassigning 'st-dvb_usb_lme2510_firmware' using a different strategy to avoid reassign values to st-dvb_usb_lme2510_firmware. Requested-by: Malcolm Priestley malcolmpriest...@gmail.com Signed-off-by: Mauro Carvalho Chehab mche...@osg.samsung.com diff --git a/drivers/media/usb/dvb-usb-v2/lmedm04.c b/drivers/media/usb/dvb-usb-v2/lmedm04.c index 99587418f4f0..994de53a574b 100644 --- a/drivers/media/usb/dvb-usb-v2/lmedm04.c +++ b/drivers/media/usb/dvb-usb-v2/lmedm04.c @@ -817,21 +817,22 @@ static const char *lme_firmware_switch(struct dvb_usb_device *d, int cold) case 0x1122: switch (st-dvb_usb_lme2510_firmware) { default: - st-dvb_usb_lme2510_firmware = TUNER_S0194; case TUNER_S0194: fw_lme = fw_s0194; ret = request_firmware(fw, fw_lme, udev-dev); if (ret == 0) { + st-dvb_usb_lme2510_firmware = TUNER_S0194; cold = 0; break; } - st-dvb_usb_lme2510_firmware = TUNER_LG; - break; + /* fall through */ case TUNER_LG: fw_lme = fw_lg; ret = request_firmware(fw, fw_lme, udev-dev); - if (ret == 0) + if (ret == 0) { + st-dvb_usb_lme2510_firmware = TUNER_LG; break; + } st-dvb_usb_lme2510_firmware = TUNER_DEFAULT; break; } @@ -839,27 +840,30 @@ static const char *lme_firmware_switch(struct dvb_usb_device *d, int cold) case 0x1120: switch (st-dvb_usb_lme2510_firmware) { default: - st-dvb_usb_lme2510_firmware = TUNER_S7395; case TUNER_S7395: fw_lme = fw_c_s7395; ret = request_firmware(fw, fw_lme, udev-dev); if (ret == 0) { + st-dvb_usb_lme2510_firmware = TUNER_S7395; cold = 0; break; } - st-dvb_usb_lme2510_firmware = TUNER_LG; - break; + /*
Re: it913x: probe of 8-001c failed with error -22
Hello, # modinfo regmap-i2c ERROR: modinfo: could not find module regmap-i2c I'm using standard Ubuntu kernel. - don't know, how to get regmap-i2c module. It is a part of V4L ? THX --kapetr Dne 25.11.2014 v 17:18 Antti Palosaari napsal(a): On 11/25/2014 05:32 PM, kap...@mizera.cz wrote: Hello. U12.04 with newly installed 3.8 kernel: 3.8.0-44-generic #66~precise1-Ubuntu SMP Tue Jul 15 04:01:04 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux USB dvb-t tuner: Bus 001 Device 005: ID 048d:9135 Integrated Technology Express, Inc. Zolid Mini DVB-T Stick Newest V4L drivers installed. But there is an error in log by inserting of the USB tuner: --- Nov 25 16:24:38 zly-hugo kernel: [ 315.927923] usb 1-1.3: new high-speed USB device number 5 using ehci-pci Nov 25 16:24:38 zly-hugo kernel: [ 316.021755] usb 1-1.3: New USB device found, idVendor=048d, idProduct=9135 Nov 25 16:24:38 zly-hugo kernel: [ 316.021760] usb 1-1.3: New USB device strings: Mfr=0, Product=0, SerialNumber=0 Nov 25 16:24:38 zly-hugo kernel: [ 316.023071] usb 1-1.3: dvb_usb_af9035: prechip_version=83 chip_version=02 chip_type=9135 Nov 25 16:24:38 zly-hugo kernel: [ 316.023443] usb 1-1.3: dvb_usb_v2: found a 'ITE 9135 Generic' in cold state Nov 25 16:24:38 zly-hugo kernel: [ 316.023519] usb 1-1.3: dvb_usb_v2: downloading firmware from file 'dvb-usb-it9135-02.fw' Nov 25 16:24:38 zly-hugo mtp-probe: checking bus 1, device 5: /sys/devices/pci:00/:00:1a.0/usb1/1-1/1-1.3 Nov 25 16:24:38 zly-hugo kernel: [ 316.119961] usb 1-1.3: dvb_usb_af9035: firmware version=3.40.1.0 Nov 25 16:24:38 zly-hugo kernel: [ 316.119974] usb 1-1.3: dvb_usb_v2: found a 'ITE 9135 Generic' in warm state Nov 25 16:24:38 zly-hugo kernel: [ 316.120972] usb 1-1.3: dvb_usb_v2: will pass the complete MPEG2 transport stream to the software demuxer Nov 25 16:24:38 zly-hugo kernel: [ 316.120996] DVB: registering new adapter (ITE 9135 Generic) Nov 25 16:24:38 zly-hugo mtp-probe: bus: 1, device: 5 was not an MTP device Nov 25 16:24:38 zly-hugo kernel: [ 316.123808] af9033 8-0038: firmware version: LINK 3.40.1.0 - OFDM 3.40.1.0 Nov 25 16:24:38 zly-hugo kernel: [ 316.123812] af9033 8-0038: Afatech AF9033 successfully attached Nov 25 16:24:38 zly-hugo kernel: [ 316.123822] usb 1-1.3: DVB: registering adapter 0 frontend 0 (Afatech AF9033 (DVB-T))... Nov 25 16:24:38 zly-hugo kernel: [ 316.125115] it913x: probe of 8-001c failed with error -22 - What is wrong ? it913x_probe() fails with error -EINVAL. There is only 2 ways it could fail, kzalloc() and regmap_init_i2c(). It must be later one. Do you have regmap module installed? What says: modinfo regmap-i2c command? Antti -- 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: it913x: probe of 8-001c failed with error -22
Moikka! RegMap does not belong to media (v4l) but driver core. Maybe kernel 3.8 is too old and does not have that functionality. Update your kernel. Why you don't use it9135 driver shipped with 3.8 kernel? regards Antti On 11/25/2014 08:45 PM, kap...@mizera.cz wrote: Hello, # modinfo regmap-i2c ERROR: modinfo: could not find module regmap-i2c I'm using standard Ubuntu kernel. - don't know, how to get regmap-i2c module. It is a part of V4L ? THX --kapetr Dne 25.11.2014 v 17:18 Antti Palosaari napsal(a): On 11/25/2014 05:32 PM, kap...@mizera.cz wrote: Hello. U12.04 with newly installed 3.8 kernel: 3.8.0-44-generic #66~precise1-Ubuntu SMP Tue Jul 15 04:01:04 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux USB dvb-t tuner: Bus 001 Device 005: ID 048d:9135 Integrated Technology Express, Inc. Zolid Mini DVB-T Stick Newest V4L drivers installed. But there is an error in log by inserting of the USB tuner: --- Nov 25 16:24:38 zly-hugo kernel: [ 315.927923] usb 1-1.3: new high-speed USB device number 5 using ehci-pci Nov 25 16:24:38 zly-hugo kernel: [ 316.021755] usb 1-1.3: New USB device found, idVendor=048d, idProduct=9135 Nov 25 16:24:38 zly-hugo kernel: [ 316.021760] usb 1-1.3: New USB device strings: Mfr=0, Product=0, SerialNumber=0 Nov 25 16:24:38 zly-hugo kernel: [ 316.023071] usb 1-1.3: dvb_usb_af9035: prechip_version=83 chip_version=02 chip_type=9135 Nov 25 16:24:38 zly-hugo kernel: [ 316.023443] usb 1-1.3: dvb_usb_v2: found a 'ITE 9135 Generic' in cold state Nov 25 16:24:38 zly-hugo kernel: [ 316.023519] usb 1-1.3: dvb_usb_v2: downloading firmware from file 'dvb-usb-it9135-02.fw' Nov 25 16:24:38 zly-hugo mtp-probe: checking bus 1, device 5: /sys/devices/pci:00/:00:1a.0/usb1/1-1/1-1.3 Nov 25 16:24:38 zly-hugo kernel: [ 316.119961] usb 1-1.3: dvb_usb_af9035: firmware version=3.40.1.0 Nov 25 16:24:38 zly-hugo kernel: [ 316.119974] usb 1-1.3: dvb_usb_v2: found a 'ITE 9135 Generic' in warm state Nov 25 16:24:38 zly-hugo kernel: [ 316.120972] usb 1-1.3: dvb_usb_v2: will pass the complete MPEG2 transport stream to the software demuxer Nov 25 16:24:38 zly-hugo kernel: [ 316.120996] DVB: registering new adapter (ITE 9135 Generic) Nov 25 16:24:38 zly-hugo mtp-probe: bus: 1, device: 5 was not an MTP device Nov 25 16:24:38 zly-hugo kernel: [ 316.123808] af9033 8-0038: firmware version: LINK 3.40.1.0 - OFDM 3.40.1.0 Nov 25 16:24:38 zly-hugo kernel: [ 316.123812] af9033 8-0038: Afatech AF9033 successfully attached Nov 25 16:24:38 zly-hugo kernel: [ 316.123822] usb 1-1.3: DVB: registering adapter 0 frontend 0 (Afatech AF9033 (DVB-T))... Nov 25 16:24:38 zly-hugo kernel: [ 316.125115] it913x: probe of 8-001c failed with error -22 - What is wrong ? it913x_probe() fails with error -EINVAL. There is only 2 ways it could fail, kzalloc() and regmap_init_i2c(). It must be later one. Do you have regmap module installed? What says: modinfo regmap-i2c command? Antti -- http://palosaari.fi/ -- 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: it913x: probe of 8-001c failed with error -22
Hello again: in /boot/config-3.8.0-44-generic is: CONFIG_REGMAP=y CONFIG_REGMAP_I2C=y CONFIG_REGMAP_SPI=y CONFIG_REGMAP_MMIO=m CONFIG_REGMAP_IRQ=y CONFIG_DMA_SHARED_BUFFER=y - regmap-i2c should be part of kernel core, I thing. THX --kapetr Dne 25.11.2014 v 17:18 Antti Palosaari napsal(a): On 11/25/2014 05:32 PM, kap...@mizera.cz wrote: Hello. U12.04 with newly installed 3.8 kernel: 3.8.0-44-generic #66~precise1-Ubuntu SMP Tue Jul 15 04:01:04 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux USB dvb-t tuner: Bus 001 Device 005: ID 048d:9135 Integrated Technology Express, Inc. Zolid Mini DVB-T Stick Newest V4L drivers installed. But there is an error in log by inserting of the USB tuner: --- Nov 25 16:24:38 zly-hugo kernel: [ 315.927923] usb 1-1.3: new high-speed USB device number 5 using ehci-pci Nov 25 16:24:38 zly-hugo kernel: [ 316.021755] usb 1-1.3: New USB device found, idVendor=048d, idProduct=9135 Nov 25 16:24:38 zly-hugo kernel: [ 316.021760] usb 1-1.3: New USB device strings: Mfr=0, Product=0, SerialNumber=0 Nov 25 16:24:38 zly-hugo kernel: [ 316.023071] usb 1-1.3: dvb_usb_af9035: prechip_version=83 chip_version=02 chip_type=9135 Nov 25 16:24:38 zly-hugo kernel: [ 316.023443] usb 1-1.3: dvb_usb_v2: found a 'ITE 9135 Generic' in cold state Nov 25 16:24:38 zly-hugo kernel: [ 316.023519] usb 1-1.3: dvb_usb_v2: downloading firmware from file 'dvb-usb-it9135-02.fw' Nov 25 16:24:38 zly-hugo mtp-probe: checking bus 1, device 5: /sys/devices/pci:00/:00:1a.0/usb1/1-1/1-1.3 Nov 25 16:24:38 zly-hugo kernel: [ 316.119961] usb 1-1.3: dvb_usb_af9035: firmware version=3.40.1.0 Nov 25 16:24:38 zly-hugo kernel: [ 316.119974] usb 1-1.3: dvb_usb_v2: found a 'ITE 9135 Generic' in warm state Nov 25 16:24:38 zly-hugo kernel: [ 316.120972] usb 1-1.3: dvb_usb_v2: will pass the complete MPEG2 transport stream to the software demuxer Nov 25 16:24:38 zly-hugo kernel: [ 316.120996] DVB: registering new adapter (ITE 9135 Generic) Nov 25 16:24:38 zly-hugo mtp-probe: bus: 1, device: 5 was not an MTP device Nov 25 16:24:38 zly-hugo kernel: [ 316.123808] af9033 8-0038: firmware version: LINK 3.40.1.0 - OFDM 3.40.1.0 Nov 25 16:24:38 zly-hugo kernel: [ 316.123812] af9033 8-0038: Afatech AF9033 successfully attached Nov 25 16:24:38 zly-hugo kernel: [ 316.123822] usb 1-1.3: DVB: registering adapter 0 frontend 0 (Afatech AF9033 (DVB-T))... Nov 25 16:24:38 zly-hugo kernel: [ 316.125115] it913x: probe of 8-001c failed with error -22 - What is wrong ? it913x_probe() fails with error -EINVAL. There is only 2 ways it could fail, kzalloc() and regmap_init_i2c(). It must be later one. Do you have regmap module installed? What says: modinfo regmap-i2c command? Antti -- 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: it913x: probe of 8-001c failed with error -22
Dne 25.11.2014 v 19:51 Antti Palosaari napsal(a): Moikka! RegMap does not belong to media (v4l) but driver core. Maybe kernel 3.8 is too old and does not have that functionality. no, it is in kernel core itself (not as module). Update your kernel. Why you don't use it9135 driver shipped with 3.8 kernel? while did not tune (tzap do not lock and shows snr=0 and lines on output comes out very slow and irregularly). It is not normal. There is no reason on my side, why it should not work: I had use yet 3 months ago with 3.2.0 kernel with compiled V4L new AF9035 module, but unfortunately now (in 9/2014 ?) this driver has changed and requires now kernel =3.4. And I did not find out, how to get older git tree from +- 8/2014 to use it with my 3.2 kernel. That's why I have install newer 3.8 kernel. --kapetr regards Antti On 11/25/2014 08:45 PM, kap...@mizera.cz wrote: Hello, # modinfo regmap-i2c ERROR: modinfo: could not find module regmap-i2c I'm using standard Ubuntu kernel. - don't know, how to get regmap-i2c module. It is a part of V4L ? THX --kapetr Dne 25.11.2014 v 17:18 Antti Palosaari napsal(a): On 11/25/2014 05:32 PM, kap...@mizera.cz wrote: Hello. U12.04 with newly installed 3.8 kernel: 3.8.0-44-generic #66~precise1-Ubuntu SMP Tue Jul 15 04:01:04 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux USB dvb-t tuner: Bus 001 Device 005: ID 048d:9135 Integrated Technology Express, Inc. Zolid Mini DVB-T Stick Newest V4L drivers installed. But there is an error in log by inserting of the USB tuner: --- Nov 25 16:24:38 zly-hugo kernel: [ 315.927923] usb 1-1.3: new high-speed USB device number 5 using ehci-pci Nov 25 16:24:38 zly-hugo kernel: [ 316.021755] usb 1-1.3: New USB device found, idVendor=048d, idProduct=9135 Nov 25 16:24:38 zly-hugo kernel: [ 316.021760] usb 1-1.3: New USB device strings: Mfr=0, Product=0, SerialNumber=0 Nov 25 16:24:38 zly-hugo kernel: [ 316.023071] usb 1-1.3: dvb_usb_af9035: prechip_version=83 chip_version=02 chip_type=9135 Nov 25 16:24:38 zly-hugo kernel: [ 316.023443] usb 1-1.3: dvb_usb_v2: found a 'ITE 9135 Generic' in cold state Nov 25 16:24:38 zly-hugo kernel: [ 316.023519] usb 1-1.3: dvb_usb_v2: downloading firmware from file 'dvb-usb-it9135-02.fw' Nov 25 16:24:38 zly-hugo mtp-probe: checking bus 1, device 5: /sys/devices/pci:00/:00:1a.0/usb1/1-1/1-1.3 Nov 25 16:24:38 zly-hugo kernel: [ 316.119961] usb 1-1.3: dvb_usb_af9035: firmware version=3.40.1.0 Nov 25 16:24:38 zly-hugo kernel: [ 316.119974] usb 1-1.3: dvb_usb_v2: found a 'ITE 9135 Generic' in warm state Nov 25 16:24:38 zly-hugo kernel: [ 316.120972] usb 1-1.3: dvb_usb_v2: will pass the complete MPEG2 transport stream to the software demuxer Nov 25 16:24:38 zly-hugo kernel: [ 316.120996] DVB: registering new adapter (ITE 9135 Generic) Nov 25 16:24:38 zly-hugo mtp-probe: bus: 1, device: 5 was not an MTP device Nov 25 16:24:38 zly-hugo kernel: [ 316.123808] af9033 8-0038: firmware version: LINK 3.40.1.0 - OFDM 3.40.1.0 Nov 25 16:24:38 zly-hugo kernel: [ 316.123812] af9033 8-0038: Afatech AF9033 successfully attached Nov 25 16:24:38 zly-hugo kernel: [ 316.123822] usb 1-1.3: DVB: registering adapter 0 frontend 0 (Afatech AF9033 (DVB-T))... Nov 25 16:24:38 zly-hugo kernel: [ 316.125115] it913x: probe of 8-001c failed with error -22 - What is wrong ? it913x_probe() fails with error -EINVAL. There is only 2 ways it could fail, kzalloc() and regmap_init_i2c(). It must be later one. Do you have regmap module installed? What says: modinfo regmap-i2c command? Antti -- 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] staging: media: lirc: lirc_zilog.c: fix quoted strings split across lines
checkpatch makes an exception to the 80-colum rule for quotes strings, and Documentation/CodingStyle recommends not splitting quotes strings across lines because it breaks the ability to grep for the string. Fixing these. WARNING: quoted string split across lines Signed-off-by: Luis de Bethencourt l...@debethencourt.com --- drivers/staging/media/lirc/lirc_zilog.c | 39 ++--- 1 file changed, 17 insertions(+), 22 deletions(-) diff --git a/drivers/staging/media/lirc/lirc_zilog.c b/drivers/staging/media/lirc/lirc_zilog.c index dca806a..07675f1 100644 --- a/drivers/staging/media/lirc/lirc_zilog.c +++ b/drivers/staging/media/lirc/lirc_zilog.c @@ -372,14 +372,12 @@ static int add_to_buf(struct IR *ir) ret); if (failures = 3) { mutex_unlock(ir-ir_lock); - dev_err(ir-l.dev, unable to read from the IR chip - after 3 resets, giving up\n); + dev_err(ir-l.dev, unable to read from the IR chip after 3 resets, giving up\n); break; } /* Looks like the chip crashed, reset it */ - dev_err(ir-l.dev, polling the IR receiver chip failed, - trying reset\n); + dev_err(ir-l.dev, polling the IR receiver chip failed, trying reset\n); set_current_state(TASK_UNINTERRUPTIBLE); if (kthread_should_stop()) { @@ -405,8 +403,8 @@ static int add_to_buf(struct IR *ir) ret = i2c_master_recv(rx-c, keybuf, sizeof(keybuf)); mutex_unlock(ir-ir_lock); if (ret != sizeof(keybuf)) { - dev_err(ir-l.dev, i2c_master_recv failed with %d -- - keeping last read buffer\n, ret); + dev_err(ir-l.dev, i2c_master_recv failed with %d -- keeping last read buffer\n, + ret); } else { rx-b[0] = keybuf[3]; rx-b[1] = keybuf[4]; @@ -713,8 +711,8 @@ static int send_boot_data(struct IR_tx *tx) buf[0]); return 0; } - dev_notice(tx-ir-l.dev, Zilog/Hauppauge IR blaster firmware version -%d.%d.%d loaded\n, buf[1], buf[2], buf[3]); + dev_notice(tx-ir-l.dev, Zilog/Hauppauge IR blaster firmware version %d.%d.%d loaded\n, +buf[1], buf[2], buf[3]); return 0; } @@ -794,8 +792,7 @@ static int fw_load(struct IR_tx *tx) if (!read_uint8(data, tx_data-endp, version)) goto corrupt; if (version != 1) { - dev_err(tx-ir-l.dev, unsupported code set file version (%u, expected - 1) -- please upgrade to a newer driver, + dev_err(tx-ir-l.dev, unsupported code set file version (%u, expected1) -- please upgrade to a newer driver, version); fw_unload_locked(); ret = -EFAULT; @@ -983,8 +980,8 @@ static int send_code(struct IR_tx *tx, unsigned int code, unsigned int key) ret = get_key_data(data_block, code, key); if (ret == -EPROTO) { - dev_err(tx-ir-l.dev, failed to get data for code %u, key %u -- check - lircd.conf entries\n, code, key); + dev_err(tx-ir-l.dev, failed to get data for code %u, key %u -- check lircd.conf entries\n, + code, key); return ret; } else if (ret != 0) return ret; @@ -1059,8 +1056,8 @@ static int send_code(struct IR_tx *tx, unsigned int code, unsigned int key) ret = i2c_master_send(tx-c, buf, 1); if (ret == 1) break; - dev_dbg(tx-ir-l.dev, NAK expected: i2c_master_send - failed with %d (try %d)\n, ret, i+1); + dev_dbg(tx-ir-l.dev, NAK expected: i2c_master_send failed with %d (try %d)\n, + ret, i+1); } if (ret != 1) { dev_err(tx-ir-l.dev, IR TX chip never got ready: last i2c_master_send @@ -1167,12 +1164,10 @@ static ssize_t write(struct file *filep, const char __user *buf, size_t n, */ if (ret != 0) { /* Looks like the chip crashed, reset it */ - dev_err(tx-ir-l.dev, sending to the IR transmitter chip - failed, trying reset\n); + dev_err(tx-ir-l.dev, sending to the IR transmitter chip failed, trying reset\n); if (failures = 3) { -
Re: [PATCH] staging: media: lirc: lirc_zilog.c: fix quoted strings split across lines
On Tue, 2014-11-25 at 20:19 +, Luis de Bethencourt wrote: checkpatch makes an exception to the 80-colum rule for quotes strings, and Documentation/CodingStyle recommends not splitting quotes strings across lines because it breaks the ability to grep for the string. Fixing these. [] diff --git a/drivers/staging/media/lirc/lirc_zilog.c b/drivers/staging/media/lirc/lirc_zilog.c [] @@ -794,8 +792,7 @@ static int fw_load(struct IR_tx *tx) if (!read_uint8(data, tx_data-endp, version)) goto corrupt; if (version != 1) { - dev_err(tx-ir-l.dev, unsupported code set file version (%u, expected - 1) -- please upgrade to a newer driver, + dev_err(tx-ir-l.dev, unsupported code set file version (%u, expected1) -- please upgrade to a newer driver, version); Hello Luis. Please look at the strings being coalesced before submitting patches. It's a fairly common defect to have either a missing space between the coalesced fragments or too many spaces. It's almost certain that there should be a space between the expected and 1 here. -- 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 v2] staging: media: lirc: lirc_zilog.c: fix quoted strings split across lines
checkpatch makes an exception to the 80-colum rule for quotes strings, and Documentation/CodingStyle recommends not splitting quotes strings across lines because it breaks the ability to grep for the string. Fixing these. WARNING: quoted string split across lines Signed-off-by: Luis de Bethencourt l...@debethencourt.com --- Changes in v2: - As pointed out by Joe Perches I missed a space when joining a set of strings Thanks for the review Joe drivers/staging/media/lirc/lirc_zilog.c | 39 ++--- 1 file changed, 17 insertions(+), 22 deletions(-) diff --git a/drivers/staging/media/lirc/lirc_zilog.c b/drivers/staging/media/lirc/lirc_zilog.c index dca806a..a35d6f2 100644 --- a/drivers/staging/media/lirc/lirc_zilog.c +++ b/drivers/staging/media/lirc/lirc_zilog.c @@ -372,14 +372,12 @@ static int add_to_buf(struct IR *ir) ret); if (failures = 3) { mutex_unlock(ir-ir_lock); - dev_err(ir-l.dev, unable to read from the IR chip - after 3 resets, giving up\n); + dev_err(ir-l.dev, unable to read from the IR chip after 3 resets, giving up\n); break; } /* Looks like the chip crashed, reset it */ - dev_err(ir-l.dev, polling the IR receiver chip failed, - trying reset\n); + dev_err(ir-l.dev, polling the IR receiver chip failed, trying reset\n); set_current_state(TASK_UNINTERRUPTIBLE); if (kthread_should_stop()) { @@ -405,8 +403,8 @@ static int add_to_buf(struct IR *ir) ret = i2c_master_recv(rx-c, keybuf, sizeof(keybuf)); mutex_unlock(ir-ir_lock); if (ret != sizeof(keybuf)) { - dev_err(ir-l.dev, i2c_master_recv failed with %d -- - keeping last read buffer\n, ret); + dev_err(ir-l.dev, i2c_master_recv failed with %d -- keeping last read buffer\n, + ret); } else { rx-b[0] = keybuf[3]; rx-b[1] = keybuf[4]; @@ -713,8 +711,8 @@ static int send_boot_data(struct IR_tx *tx) buf[0]); return 0; } - dev_notice(tx-ir-l.dev, Zilog/Hauppauge IR blaster firmware version -%d.%d.%d loaded\n, buf[1], buf[2], buf[3]); + dev_notice(tx-ir-l.dev, Zilog/Hauppauge IR blaster firmware version %d.%d.%d loaded\n, +buf[1], buf[2], buf[3]); return 0; } @@ -794,8 +792,7 @@ static int fw_load(struct IR_tx *tx) if (!read_uint8(data, tx_data-endp, version)) goto corrupt; if (version != 1) { - dev_err(tx-ir-l.dev, unsupported code set file version (%u, expected - 1) -- please upgrade to a newer driver, + dev_err(tx-ir-l.dev, unsupported code set file version (%u, expected 1) -- please upgrade to a newer driver, version); fw_unload_locked(); ret = -EFAULT; @@ -983,8 +980,8 @@ static int send_code(struct IR_tx *tx, unsigned int code, unsigned int key) ret = get_key_data(data_block, code, key); if (ret == -EPROTO) { - dev_err(tx-ir-l.dev, failed to get data for code %u, key %u -- check - lircd.conf entries\n, code, key); + dev_err(tx-ir-l.dev, failed to get data for code %u, key %u -- check lircd.conf entries\n, + code, key); return ret; } else if (ret != 0) return ret; @@ -1059,8 +1056,8 @@ static int send_code(struct IR_tx *tx, unsigned int code, unsigned int key) ret = i2c_master_send(tx-c, buf, 1); if (ret == 1) break; - dev_dbg(tx-ir-l.dev, NAK expected: i2c_master_send - failed with %d (try %d)\n, ret, i+1); + dev_dbg(tx-ir-l.dev, NAK expected: i2c_master_send failed with %d (try %d)\n, + ret, i+1); } if (ret != 1) { dev_err(tx-ir-l.dev, IR TX chip never got ready: last i2c_master_send @@ -1167,12 +1164,10 @@ static ssize_t write(struct file *filep, const char __user *buf, size_t n, */ if (ret != 0) { /* Looks like the chip crashed, reset it */ - dev_err(tx-ir-l.dev, sending to the IR transmitter chip - failed, trying reset\n); + dev_err(tx-ir-l.dev, sending to the IR
Re: [PATCH] staging: media: lirc: lirc_zilog.c: fix quoted strings split across lines
On Tue, Nov 25, 2014 at 12:27:24PM -0800, Joe Perches wrote: On Tue, 2014-11-25 at 20:19 +, Luis de Bethencourt wrote: checkpatch makes an exception to the 80-colum rule for quotes strings, and Documentation/CodingStyle recommends not splitting quotes strings across lines because it breaks the ability to grep for the string. Fixing these. [] diff --git a/drivers/staging/media/lirc/lirc_zilog.c b/drivers/staging/media/lirc/lirc_zilog.c [] @@ -794,8 +792,7 @@ static int fw_load(struct IR_tx *tx) if (!read_uint8(data, tx_data-endp, version)) goto corrupt; if (version != 1) { - dev_err(tx-ir-l.dev, unsupported code set file version (%u, expected - 1) -- please upgrade to a newer driver, + dev_err(tx-ir-l.dev, unsupported code set file version (%u, expected1) -- please upgrade to a newer driver, version); Hello Luis. Please look at the strings being coalesced before submitting patches. It's a fairly common defect to have either a missing space between the coalesced fragments or too many spaces. It's almost certain that there should be a space between the expected and 1 here. Hello Joe, Thanks for taking the time to review this. I sent a new version fixing the missing space. -- 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] [media] lmed04: add missing breaks
On 25/11/14 18:00, Mauro Carvalho Chehab wrote: Em Tue, 25 Nov 2014 17:10:00 + Malcolm Priestley malcolmpriest...@gmail.com escreveu: On 25/11/14 11:19, Mauro Carvalho Chehab wrote: drivers/media/usb/dvb-usb-v2/lmedm04.c:828 lme_firmware_switch() warn: missing break? reassigning 'st-dvb_usb_lme2510_firmware' drivers/media/usb/dvb-usb-v2/lmedm04.c:849 lme_firmware_switch() warn: missing break? reassigning 'st-dvb_usb_lme2510_firmware' Signed-off-by: Mauro Carvalho Chehab mche...@osg.samsung.com diff --git a/drivers/media/usb/dvb-usb-v2/lmedm04.c b/drivers/media/usb/dvb-usb-v2/lmedm04.c index 9f2c5459b73a..99587418f4f0 100644 --- a/drivers/media/usb/dvb-usb-v2/lmedm04.c +++ b/drivers/media/usb/dvb-usb-v2/lmedm04.c @@ -826,6 +826,7 @@ static const char *lme_firmware_switch(struct dvb_usb_device *d, int cold) break; } st-dvb_usb_lme2510_firmware = TUNER_LG; + break; case TUNER_LG: fw_lme = fw_lg; ret = request_firmware(fw, fw_lme, udev-dev); @@ -847,6 +848,7 @@ static const char *lme_firmware_switch(struct dvb_usb_device *d, int cold) break; } st-dvb_usb_lme2510_firmware = TUNER_LG; + break; case TUNER_LG: fw_lme = fw_c_lg; ret = request_firmware(fw, fw_lme, udev-dev); The break is not missing it's three lines above. All these switches are fall through until it finds firmware the user has. The switch comes into play when the firmware needs to changed. Oh! Well, I was so sure that the patch was right that I merged it already. My bad. Anyway, smatch complains if dvb_usb_lme2510_firmware is rewritten, and that bothers people that use static analyzers. So, IMO, the best is to rework the code in order to: - document that the breaks should not be used there; - remove smatch warning. What do you think about the following patch? Fine Acked-by: Malcolm Priestley tvbox...@gmail.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] staging: media: lirc: lirc_zilog.c: fix quoted strings split across lines
On Tue, 2014-11-25 at 20:40 +, Luis de Bethencourt wrote: On Tue, Nov 25, 2014 at 12:27:24PM -0800, Joe Perches wrote: On Tue, 2014-11-25 at 20:19 +, Luis de Bethencourt wrote: checkpatch makes an exception to the 80-colum rule for quotes strings, and Documentation/CodingStyle recommends not splitting quotes strings across lines because it breaks the ability to grep for the string. Fixing these. [] diff --git a/drivers/staging/media/lirc/lirc_zilog.c b/drivers/staging/media/lirc/lirc_zilog.c [] @@ -794,8 +792,7 @@ static int fw_load(struct IR_tx *tx) if (!read_uint8(data, tx_data-endp, version)) goto corrupt; if (version != 1) { - dev_err(tx-ir-l.dev, unsupported code set file version (%u, expected - 1) -- please upgrade to a newer driver, + dev_err(tx-ir-l.dev, unsupported code set file version (%u, expected1) -- please upgrade to a newer driver, version); Hello Luis. Please look at the strings being coalesced before submitting patches. It's a fairly common defect to have either a missing space between the coalesced fragments or too mano spaces. It's almost certain that there should be a space between the expected and 1 here. Hello Joe, Thanks for taking the time to review this. I sent a new version fixing the missing space. Thanks. In the future, you might consider being more comprehensive with your patches. This code could be neatened a bit by: o using another set of logging macros o removing the unnecessary ftrace like logging o realigning arguments Something like: --- drivers/staging/media/lirc/lirc_zilog.c | 151 +++- 1 file changed, 73 insertions(+), 78 deletions(-) diff --git a/drivers/staging/media/lirc/lirc_zilog.c b/drivers/staging/media/lirc/lirc_zilog.c index bebb9f1..523af12 100644 --- a/drivers/staging/media/lirc/lirc_zilog.c +++ b/drivers/staging/media/lirc/lirc_zilog.c @@ -158,6 +158,17 @@ static bool debug; /* debug output */ static bool tx_only; /* only handle the IR Tx function */ static int minor = -1; /* minor number */ +/* logging macros */ +#define ir_err(ir, fmt, ...) \ + dev_err((ir)-l.dev, fmt, ##__VA_ARGS__) +#define ir_warn(ir, fmt, ...) \ + dev_warn((ir)-l.dev, fmt, ##__VA_ARGS__) +#define ir_notice(ir, fmt, ...)\ + dev_notice((ir)-l.dev, fmt, ##__VA_ARGS__) +#define ir_info(ir, fmt, ...) \ + dev_info((ir)-l.dev, fmt, ##__VA_ARGS__) +#define ir_dbg(ir, fmt, ...) \ + dev_dbg((ir)-l.dev, fmt, ##__VA_ARGS__) /* struct IR reference counting */ static struct IR *get_ir_device(struct IR *ir, bool ir_devices_lock_held) @@ -322,7 +333,7 @@ static int add_to_buf(struct IR *ir) struct IR_tx *tx; if (lirc_buffer_full(rbuf)) { - dev_dbg(ir-l.dev, buffer overflow\n); + ir_dbg(ir, buffer overflow\n); return -EOVERFLOW; } @@ -368,18 +379,15 @@ static int add_to_buf(struct IR *ir) */ ret = i2c_master_send(rx-c, sendbuf, 1); if (ret != 1) { - dev_err(ir-l.dev, i2c_master_send failed with %d\n, - ret); + ir_err(ir, i2c_master_send failed with %d\n, ret); if (failures = 3) { mutex_unlock(ir-ir_lock); - dev_err(ir-l.dev, unable to read from the IR chip - after 3 resets, giving up\n); + ir_err(ir, unable to read from the IR chip after 3 resets, giving up\n); break; } /* Looks like the chip crashed, reset it */ - dev_err(ir-l.dev, polling the IR receiver chip failed, - trying reset\n); + ir_err(ir, polling the IR receiver chip failed, trying reset\n); set_current_state(TASK_UNINTERRUPTIBLE); if (kthread_should_stop()) { @@ -405,14 +413,13 @@ static int add_to_buf(struct IR *ir) ret = i2c_master_recv(rx-c, keybuf, sizeof(keybuf)); mutex_unlock(ir-ir_lock); if (ret != sizeof(keybuf)) { - dev_err(ir-l.dev, i2c_master_recv failed with %d -- - keeping last read buffer\n, ret); + ir_err(ir, i2c_master_recv failed with %d -- keeping last read buffer\n, + ret); } else { rx-b[0] = keybuf[3]; rx-b[1] = keybuf[4];
Re: [PATCH] staging: media: lirc: lirc_zilog.c: fix quoted strings split across lines
On Tue, Nov 25, 2014 at 01:00:07PM -0800, Joe Perches wrote: On Tue, 2014-11-25 at 20:40 +, Luis de Bethencourt wrote: On Tue, Nov 25, 2014 at 12:27:24PM -0800, Joe Perches wrote: On Tue, 2014-11-25 at 20:19 +, Luis de Bethencourt wrote: checkpatch makes an exception to the 80-colum rule for quotes strings, and Documentation/CodingStyle recommends not splitting quotes strings across lines because it breaks the ability to grep for the string. Fixing these. [] diff --git a/drivers/staging/media/lirc/lirc_zilog.c b/drivers/staging/media/lirc/lirc_zilog.c [] @@ -794,8 +792,7 @@ static int fw_load(struct IR_tx *tx) if (!read_uint8(data, tx_data-endp, version)) goto corrupt; if (version != 1) { - dev_err(tx-ir-l.dev, unsupported code set file version (%u, expected - 1) -- please upgrade to a newer driver, + dev_err(tx-ir-l.dev, unsupported code set file version (%u, expected1) -- please upgrade to a newer driver, version); Hello Luis. Please look at the strings being coalesced before submitting patches. It's a fairly common defect to have either a missing space between the coalesced fragments or too mano spaces. It's almost certain that there should be a space between the expected and 1 here. Hello Joe, Thanks for taking the time to review this. I sent a new version fixing the missing space. Thanks. In the future, you might consider being more comprehensive with your patches. Wasn't sure about the scope of the style fixing patches. I've been reading Kernel Newbies and this looked like a good way to start contributing. Good to know more exhaustive changes are welcome. This code could be neatened a bit by: o using another set of logging macros o removing the unnecessary ftrace like logging o realigning arguments Great ideas. Should this have been all included in one patch, or each as part of a series with the previous one? Want to take the opportunity to learn about the process. Something like: --- drivers/staging/media/lirc/lirc_zilog.c | 151 +++- 1 file changed, 73 insertions(+), 78 deletions(-) diff --git a/drivers/staging/media/lirc/lirc_zilog.c b/drivers/staging/media/lirc/lirc_zilog.c index bebb9f1..523af12 100644 --- a/drivers/staging/media/lirc/lirc_zilog.c +++ b/drivers/staging/media/lirc/lirc_zilog.c @@ -158,6 +158,17 @@ static bool debug; /* debug output */ static bool tx_only; /* only handle the IR Tx function */ static int minor = -1; /* minor number */ +/* logging macros */ +#define ir_err(ir, fmt, ...) \ + dev_err((ir)-l.dev, fmt, ##__VA_ARGS__) +#define ir_warn(ir, fmt, ...)\ + dev_warn((ir)-l.dev, fmt, ##__VA_ARGS__) +#define ir_notice(ir, fmt, ...) \ + dev_notice((ir)-l.dev, fmt, ##__VA_ARGS__) +#define ir_info(ir, fmt, ...)\ + dev_info((ir)-l.dev, fmt, ##__VA_ARGS__) +#define ir_dbg(ir, fmt, ...) \ + dev_dbg((ir)-l.dev, fmt, ##__VA_ARGS__) /* struct IR reference counting */ static struct IR *get_ir_device(struct IR *ir, bool ir_devices_lock_held) @@ -322,7 +333,7 @@ static int add_to_buf(struct IR *ir) struct IR_tx *tx; if (lirc_buffer_full(rbuf)) { - dev_dbg(ir-l.dev, buffer overflow\n); + ir_dbg(ir, buffer overflow\n); return -EOVERFLOW; } @@ -368,18 +379,15 @@ static int add_to_buf(struct IR *ir) */ ret = i2c_master_send(rx-c, sendbuf, 1); if (ret != 1) { - dev_err(ir-l.dev, i2c_master_send failed with %d\n, -ret); + ir_err(ir, i2c_master_send failed with %d\n, ret); if (failures = 3) { mutex_unlock(ir-ir_lock); - dev_err(ir-l.dev, unable to read from the IR chip - after 3 resets, giving up\n); + ir_err(ir, unable to read from the IR chip after 3 resets, giving up\n); break; } /* Looks like the chip crashed, reset it */ - dev_err(ir-l.dev, polling the IR receiver chip failed, - trying reset\n); + ir_err(ir, polling the IR receiver chip failed, trying reset\n); set_current_state(TASK_UNINTERRUPTIBLE); if (kthread_should_stop()) { @@ -405,14 +413,13 @@ static int add_to_buf(struct IR *ir) ret =
Re: [PATCH] media: atmel-isi: increase the burst length to improve the performance
Hi Josh, On Tue, 25 Nov 2014, Josh Wu wrote: The burst length could be BEATS_4/8/16. Before this patch, isi use default value BEATS_4. To imporve the performance we could set it to BEATS_16. Otherwise sometime it would cause the ISI overflow error. Without looking at datasheets - what does this bit do? Change the transfer length? What happens then if the data amount isn't a multiple of the transfer size? Thanks Guennadi Reported-by: Bo Shen voice.s...@atmel.com Signed-off-by: Josh Wu josh...@atmel.com --- drivers/media/platform/soc_camera/atmel-isi.c | 2 ++ include/media/atmel-isi.h | 4 2 files changed, 6 insertions(+) diff --git a/drivers/media/platform/soc_camera/atmel-isi.c b/drivers/media/platform/soc_camera/atmel-isi.c index ee5650f..fda587b 100644 --- a/drivers/media/platform/soc_camera/atmel-isi.c +++ b/drivers/media/platform/soc_camera/atmel-isi.c @@ -839,6 +839,8 @@ static int isi_camera_set_bus_param(struct soc_camera_device *icd) if (isi-pdata.full_mode) cfg1 |= ISI_CFG1_FULL_MODE; + cfg1 |= ISI_CFG1_THMASK_BEATS_16; + isi_writel(isi, ISI_CTRL, ISI_CTRL_DIS); isi_writel(isi, ISI_CFG1, cfg1); diff --git a/include/media/atmel-isi.h b/include/media/atmel-isi.h index c2e5703..6008b09 100644 --- a/include/media/atmel-isi.h +++ b/include/media/atmel-isi.h @@ -59,6 +59,10 @@ #define ISI_CFG1_FRATE_DIV_MASK (7 8) #define ISI_CFG1_DISCR (1 11) #define ISI_CFG1_FULL_MODE (1 12) +/* Definition for THMASK(ISI_V2) */ +#define ISI_CFG1_THMASK_BEATS_4 (0 13) +#define ISI_CFG1_THMASK_BEATS_8 (1 13) +#define ISI_CFG1_THMASK_BEATS_16(2 13) /* Bitfields in CFG2 */ #define ISI_CFG2_GRAYSCALE (1 13) -- 1.9.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 1/2] media: v4l2-image-sizes.h: add SVGA, XGA and UXGA size definitions
Hi Josh, On Tue, 25 Nov 2014, Josh Wu wrote: Add SVGA, UXGA and XGA size definitions to v4l2-image-sizes.h. The definitions are sorted by alphabet order. Signed-off-by: Josh Wu josh...@atmel.com Thanks for your patches. I'm ok with these two, but the second of them depends on the first one, and the first one wouldn't (normally) be going via the soc-camera tree. Mauro, how would you prefer to handle this? Should I pick up and push to you both of them or postpone #2 until the next merge window? Thanks Guennadi --- include/media/v4l2-image-sizes.h | 9 + 1 file changed, 9 insertions(+) diff --git a/include/media/v4l2-image-sizes.h b/include/media/v4l2-image-sizes.h index 10daf92..c70c917 100644 --- a/include/media/v4l2-image-sizes.h +++ b/include/media/v4l2-image-sizes.h @@ -25,10 +25,19 @@ #define QVGA_WIDTH 320 #define QVGA_HEIGHT 240 +#define SVGA_WIDTH 800 +#define SVGA_HEIGHT 680 + #define SXGA_WIDTH 1280 #define SXGA_HEIGHT 1024 #define VGA_WIDTH640 #define VGA_HEIGHT 480 +#define UXGA_WIDTH 1600 +#define UXGA_HEIGHT 1200 + +#define XGA_WIDTH1024 +#define XGA_HEIGHT 768 + #endif /* _IMAGE_SIZES_H */ -- 1.9.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
[linuxtv-media:master 7661/7664] ERROR: omapdss_compat_init [drivers/media/platform/omap/omap-vout.ko] undefined!
tree: git://linuxtv.org/media_tree.git master head: 504febc3f98c87a8bebd8f2f274f32c0724131e4 commit: 6b213e81ddf8b265383c9a1a1884432df88f701e [7661/7664] [media] omap: Fix typo HAS_MMU config: m68k-allmodconfig (attached as .config) reproduce: wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross git checkout 6b213e81ddf8b265383c9a1a1884432df88f701e # save the attached .config to linux build tree make.cross ARCH=m68k All error/warnings: ERROR: omapdss_compat_init [drivers/media/platform/omap/omap-vout.ko] undefined! ERROR: omap_dss_get_overlay_manager [drivers/media/platform/omap/omap-vout.ko] undefined! ERROR: omap_dss_get_num_overlay_managers [drivers/media/platform/omap/omap-vout.ko] undefined! ERROR: omap_dss_get_overlay [drivers/media/platform/omap/omap-vout.ko] undefined! ERROR: omapdss_is_initialized [drivers/media/platform/omap/omap-vout.ko] undefined! ERROR: omap_dispc_register_isr [drivers/media/platform/omap/omap-vout.ko] undefined! ERROR: omapdss_get_version [drivers/media/platform/omap/omap-vout.ko] undefined! ERROR: omap_dss_put_device [drivers/media/platform/omap/omap-vout.ko] undefined! ERROR: omap_dss_get_next_device [drivers/media/platform/omap/omap-vout.ko] undefined! ERROR: omap_dispc_unregister_isr [drivers/media/platform/omap/omap-vout.ko] undefined! ERROR: omapdss_compat_uninit [drivers/media/platform/omap/omap-vout.ko] undefined! ERROR: omap_dss_get_device [drivers/media/platform/omap/omap-vout.ko] undefined! ERROR: omap_dss_get_num_overlays [drivers/media/platform/omap/omap-vout.ko] undefined! --- 0-DAY kernel test infrastructureOpen Source Technology Center http://lists.01.org/mailman/listinfo/kbuild Intel Corporation # # Automatically generated file; DO NOT EDIT. # Linux/m68k 3.18.0-rc4 Kernel Configuration # CONFIG_M68K=y CONFIG_RWSEM_GENERIC_SPINLOCK=y CONFIG_GENERIC_HWEIGHT=y CONFIG_GENERIC_CALIBRATE_DELAY=y CONFIG_TIME_LOW_RES=y CONFIG_NO_IOPORT_MAP=y # CONFIG_NO_DMA is not set CONFIG_ZONE_DMA=y CONFIG_HZ=100 CONFIG_DEFCONFIG_LIST=/lib/modules/$UNAME_RELEASE/.config CONFIG_CONSTRUCTORS=y CONFIG_IRQ_WORK=y # # General setup # CONFIG_BROKEN_ON_SMP=y CONFIG_INIT_ENV_ARG_LIMIT=32 CONFIG_CROSS_COMPILE= CONFIG_COMPILE_TEST=y CONFIG_LOCALVERSION= CONFIG_LOCALVERSION_AUTO=y CONFIG_DEFAULT_HOSTNAME=(none) CONFIG_SWAP=y CONFIG_SYSVIPC=y CONFIG_SYSVIPC_SYSCTL=y CONFIG_POSIX_MQUEUE=y CONFIG_POSIX_MQUEUE_SYSCTL=y CONFIG_CROSS_MEMORY_ATTACH=y CONFIG_FHANDLE=y CONFIG_USELIB=y CONFIG_AUDIT=y # # IRQ subsystem # CONFIG_GENERIC_IRQ_SHOW=y CONFIG_IRQ_DOMAIN=y CONFIG_IRQ_DOMAIN_DEBUG=y CONFIG_ARCH_USES_GETTIMEOFFSET=y # # CPU/Task time and stats accounting # CONFIG_TICK_CPU_ACCOUNTING=y CONFIG_BSD_PROCESS_ACCT=y CONFIG_BSD_PROCESS_ACCT_V3=y CONFIG_TASKSTATS=y CONFIG_TASK_DELAY_ACCT=y CONFIG_TASK_XACCT=y CONFIG_TASK_IO_ACCOUNTING=y # # RCU Subsystem # CONFIG_TINY_RCU=y # CONFIG_PREEMPT_RCU is not set CONFIG_TASKS_RCU=y CONFIG_RCU_STALL_COMMON=y # CONFIG_TREE_RCU_TRACE is not set CONFIG_BUILD_BIN2C=y CONFIG_IKCONFIG=m CONFIG_IKCONFIG_PROC=y CONFIG_LOG_BUF_SHIFT=17 CONFIG_CGROUPS=y CONFIG_CGROUP_DEBUG=y CONFIG_CGROUP_FREEZER=y CONFIG_CGROUP_DEVICE=y CONFIG_CPUSETS=y CONFIG_PROC_PID_CPUSET=y # CONFIG_CGROUP_CPUACCT is not set CONFIG_RESOURCE_COUNTERS=y CONFIG_MEMCG=y CONFIG_MEMCG_SWAP=y CONFIG_MEMCG_SWAP_ENABLED=y CONFIG_MEMCG_KMEM=y CONFIG_CGROUP_SCHED=y CONFIG_FAIR_GROUP_SCHED=y CONFIG_CFS_BANDWIDTH=y CONFIG_RT_GROUP_SCHED=y CONFIG_BLK_CGROUP=y CONFIG_DEBUG_BLK_CGROUP=y CONFIG_CHECKPOINT_RESTORE=y CONFIG_NAMESPACES=y CONFIG_UTS_NS=y CONFIG_IPC_NS=y CONFIG_USER_NS=y CONFIG_PID_NS=y CONFIG_NET_NS=y CONFIG_SCHED_AUTOGROUP=y CONFIG_SYSFS_DEPRECATED=y CONFIG_SYSFS_DEPRECATED_V2=y CONFIG_RELAY=y CONFIG_BLK_DEV_INITRD=y CONFIG_INITRAMFS_SOURCE= CONFIG_RD_GZIP=y CONFIG_RD_BZIP2=y CONFIG_RD_LZMA=y CONFIG_RD_XZ=y CONFIG_RD_LZO=y CONFIG_RD_LZ4=y CONFIG_CC_OPTIMIZE_FOR_SIZE=y CONFIG_SYSCTL=y CONFIG_ANON_INODES=y CONFIG_HAVE_UID16=y CONFIG_BPF=y CONFIG_EXPERT=y CONFIG_UID16=y CONFIG_SGETMASK_SYSCALL=y CONFIG_SYSFS_SYSCALL=y CONFIG_SYSCTL_SYSCALL=y CONFIG_KALLSYMS=y CONFIG_KALLSYMS_ALL=y CONFIG_PRINTK=y CONFIG_BUG=y CONFIG_ELF_CORE=y CONFIG_BASE_FULL=y CONFIG_FUTEX=y CONFIG_HAVE_FUTEX_CMPXCHG=y CONFIG_EPOLL=y CONFIG_SIGNALFD=y CONFIG_TIMERFD=y CONFIG_EVENTFD=y CONFIG_BPF_SYSCALL=y CONFIG_SHMEM=y CONFIG_AIO=y CONFIG_ADVISE_SYSCALLS=y CONFIG_EMBEDDED=y # # Kernel Performance Events And Counters # CONFIG_VM_EVENT_COUNTERS=y CONFIG_SLUB_DEBUG=y CONFIG_COMPAT_BRK=y # CONFIG_SLAB is not set CONFIG_SLUB=y # CONFIG_SLOB is not set CONFIG_SYSTEM_TRUSTED_KEYRING=y CONFIG_PROFILING=y # CONFIG_UPROBES is not set # CONFIG_HAVE_64BIT_ALIGNED_ACCESS is not set CONFIG_ARCH_HAVE_NMI_SAFE_CMPXCHG=y CONFIG_ARCH_WANT_IPC_PARSE_VERSION=y # CONFIG_CC_STACKPROTECTOR is not set CONFIG_HAVE_MOD_ARCH_SPECIFIC=y CONFIG_MODULES_USE_ELF_RELA=y
Re: [PATCH] staging: media: lirc: lirc_zilog.c: fix quoted strings split across lines
On Tue, 2014-11-25 at 21:14 +, Luis de Bethencourt wrote: On Tue, Nov 25, 2014 at 01:00:07PM -0800, Joe Perches wrote: In the future, you might consider being more comprehensive with your patches. Wasn't sure about the scope of the style fixing patches. I've been reading Kernel Newbies and this looked like a good way to start contributing. Good to know more exhaustive changes are welcome. This code could be neatened a bit by: o using another set of logging macros o removing the unnecessary ftrace like logging o realigning arguments Great ideas. Should this have been all included in one patch, or each as part of a series with the previous one? Want to take the opportunity to learn about the process. Hello again Luis. I think the suggestion I posted here is suitable for a single change. Ideally, you'd make individual patches each with a single type of change. There is a script I posted a while back that groups various checkpatch types together and makes it a bit easier to do cleanup style patches. https://lkml.org/lkml/2014/7/11/794 But don't just use checkpatch as the sole decider of what's appropriate to fix or neaten. checkpatch is a stupid, brainless little script. So is the automation script that uses checkpatch. For instance, checkpatch would not have suggested creating and using another logging macro. Please use your own taste to best figure out what to fix and how. Using checkpatch to get familiar with kernel development is fine and all, but fixing actual defects and submitting new code is way more useful. cheers, welcome, Joe -- 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: v4l2-image-sizes.h: add SVGA, XGA and UXGA size definitions
Hi, Sylwester and Mauro On 11/25/2014 6:34 PM, Sylwester Nawrocki wrote: Hi Josh, On 25/11/14 09:54, Josh Wu wrote: Add SVGA, UXGA and XGA size definitions to v4l2-image-sizes.h. The definitions are sorted by alphabet order. Signed-off-by: Josh Wu josh...@atmel.com --- include/media/v4l2-image-sizes.h | 9 + 1 file changed, 9 insertions(+) diff --git a/include/media/v4l2-image-sizes.h b/include/media/v4l2-image-sizes.h index 10daf92..c70c917 100644 --- a/include/media/v4l2-image-sizes.h +++ b/include/media/v4l2-image-sizes.h @@ -25,10 +25,19 @@ #define QVGA_WIDTH320 #define QVGA_HEIGHT 240 +#define SVGA_WIDTH 800 +#define SVGA_HEIGHT680 I think this should be 600. With that fixed, for both patches: Yes, right, It should be 600. It's my bad with such terrible typo here. Hi, Mauro I saw this patch is already merged in the media_tree. But not changing the SVGA_HEIGHT to 600. Would it possible for you to re-modify this commit in the media_tree to fix the SVGA_HEIGHT as 600? Or need I resend the patch or a fix for this? Sorry for such an inconvinencie. Acked-by: Sylwester Nawrocki s.nawro...@samsung.com Thanks a again. Best Regards, Josh Wu #define SXGA_WIDTH1280 #define SXGA_HEIGHT 1024 #define VGA_WIDTH 640 #define VGA_HEIGHT480 +#define UXGA_WIDTH 1600 +#define UXGA_HEIGHT1200 + +#define XGA_WIDTH 1024 +#define XGA_HEIGHT 768 + #endif /* _IMAGE_SIZES_H */ -- 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: [PATCH] media: atmel-isi: increase the burst length to improve the performance
Hi, Gunenadi On 11/26/2014 6:21 AM, Guennadi Liakhovetski wrote: Hi Josh, On Tue, 25 Nov 2014, Josh Wu wrote: The burst length could be BEATS_4/8/16. Before this patch, isi use default value BEATS_4. To imporve the performance we could set it to BEATS_16. Otherwise sometime it would cause the ISI overflow error. Without looking at datasheets - what does this bit do? Change the transfer length? Atmel ISI has two internal 32-bytes FIFOs, one for Preview, another for Codec. This field is the threshold to trigger the FIFO transfer to AHB by DMA. We can set the threshold to allow 4-bytes, 8-bytes or 16-bytes for a burst. BEATS_4, means only allow 4-bytes in a burst. BEATS_8, means only allow 4-bytes and 8-bytes in a burst. BEATS_16, means allow 4-bytes, 8-bytes and 16-bytes in a burst. So BEATS_16 will use the DMA more efficient if has lots of data to transfer. As we are allowed to use 16-bytes in a burst. That will trigger less burst than BEATS_4 to transfer same amount of data. We found this patch can fix ISI FIFO overflow error when system is in a situation that with a very high memory load. If we only allow 4-bytes in a burst, that need more burst to transfer data and less effective. What happens then if the data amount isn't a multiple of the transfer size? BEATS_16 means allowed 4-bytes, 8-bytes and 16-bytes in a burst. So it still can perform a 4-bytes transfer if the data is not multiple of 16. I think all the data transfer are aligned with 4 bytes. The DMA address should be aligned with 4 bytes as well. Best Regards, Josh Wu Thanks Guennadi Reported-by: Bo Shen voice.s...@atmel.com Signed-off-by: Josh Wu josh...@atmel.com --- drivers/media/platform/soc_camera/atmel-isi.c | 2 ++ include/media/atmel-isi.h | 4 2 files changed, 6 insertions(+) diff --git a/drivers/media/platform/soc_camera/atmel-isi.c b/drivers/media/platform/soc_camera/atmel-isi.c index ee5650f..fda587b 100644 --- a/drivers/media/platform/soc_camera/atmel-isi.c +++ b/drivers/media/platform/soc_camera/atmel-isi.c @@ -839,6 +839,8 @@ static int isi_camera_set_bus_param(struct soc_camera_device *icd) if (isi-pdata.full_mode) cfg1 |= ISI_CFG1_FULL_MODE; + cfg1 |= ISI_CFG1_THMASK_BEATS_16; + isi_writel(isi, ISI_CTRL, ISI_CTRL_DIS); isi_writel(isi, ISI_CFG1, cfg1); diff --git a/include/media/atmel-isi.h b/include/media/atmel-isi.h index c2e5703..6008b09 100644 --- a/include/media/atmel-isi.h +++ b/include/media/atmel-isi.h @@ -59,6 +59,10 @@ #define ISI_CFG1_FRATE_DIV_MASK (7 8) #define ISI_CFG1_DISCR(1 11) #define ISI_CFG1_FULL_MODE(1 12) +/* Definition for THMASK(ISI_V2) */ +#defineISI_CFG1_THMASK_BEATS_4 (0 13) +#defineISI_CFG1_THMASK_BEATS_8 (1 13) +#defineISI_CFG1_THMASK_BEATS_16(2 13) /* Bitfields in CFG2 */ #define ISI_CFG2_GRAYSCALE(1 13) -- 1.9.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
cron job: media_tree daily build: ERRORS
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 Nov 26 04:00:18 CET 2014 git branch: test git hash: 504febc3f98c87a8bebd8f2f274f32c0724131e4 gcc version:i686-linux-gcc (GCC) 4.9.1 sparse version: v0.5.0-35-gc1c3f96 smatch version: 0.4.1-3153-g7d56ab3 host hardware: x86_64 host os:3.17-3.slh.2-amd64 linux-git-arm-at91: OK linux-git-arm-davinci: OK linux-git-arm-exynos: OK linux-git-arm-mx: OK linux-git-arm-omap: OK linux-git-arm-omap1: OK linux-git-arm-pxa: OK linux-git-blackfin: OK linux-git-i686: OK linux-git-m32r: OK linux-git-mips: OK linux-git-powerpc64: OK linux-git-sh: OK linux-git-x86_64: WARNINGS linux-2.6.32.27-i686: ERRORS linux-2.6.33.7-i686: ERRORS linux-2.6.34.7-i686: ERRORS linux-2.6.35.9-i686: ERRORS linux-2.6.36.4-i686: ERRORS linux-2.6.37.6-i686: ERRORS linux-2.6.38.8-i686: ERRORS linux-2.6.39.4-i686: ERRORS linux-3.0.60-i686: ERRORS linux-3.1.10-i686: ERRORS linux-3.2.37-i686: ERRORS linux-3.3.8-i686: ERRORS linux-3.4.27-i686: ERRORS linux-3.5.7-i686: ERRORS linux-3.6.11-i686: ERRORS linux-3.7.4-i686: ERRORS linux-3.8-i686: ERRORS linux-3.9.2-i686: ERRORS linux-3.10.1-i686: ERRORS linux-3.11.1-i686: ERRORS linux-3.12.23-i686: ERRORS linux-3.13.11-i686: ERRORS linux-3.14.9-i686: ERRORS linux-3.15.2-i686: ERRORS linux-3.16-i686: ERRORS linux-3.17-i686: ERRORS linux-3.18-rc1-i686: ERRORS linux-2.6.32.27-x86_64: ERRORS linux-2.6.33.7-x86_64: ERRORS linux-2.6.34.7-x86_64: ERRORS linux-2.6.35.9-x86_64: ERRORS linux-2.6.36.4-x86_64: ERRORS linux-2.6.37.6-x86_64: ERRORS linux-2.6.38.8-x86_64: ERRORS linux-2.6.39.4-x86_64: ERRORS linux-3.0.60-x86_64: ERRORS linux-3.1.10-x86_64: ERRORS linux-3.2.37-x86_64: ERRORS linux-3.3.8-x86_64: ERRORS linux-3.4.27-x86_64: ERRORS linux-3.5.7-x86_64: ERRORS linux-3.6.11-x86_64: ERRORS linux-3.7.4-x86_64: ERRORS linux-3.8-x86_64: ERRORS linux-3.9.2-x86_64: ERRORS linux-3.10.1-x86_64: ERRORS linux-3.11.1-x86_64: ERRORS linux-3.12.23-x86_64: ERRORS linux-3.13.11-x86_64: ERRORS linux-3.14.9-x86_64: ERRORS linux-3.15.2-x86_64: ERRORS linux-3.16-x86_64: ERRORS linux-3.17-x86_64: ERRORS linux-3.18-rc1-x86_64: ERRORS apps: OK spec-git: OK sparse: WARNINGS smatch: 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 Media Infrastructure API 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
[PATCH 0/2] v4l: vsp1: crop and a single input issues
Hi, We've found a couple of issues in VSP1 driver. Each issue is described in each patch. They can be applied separetely. Takanari Hayama (2): v4l: vsp1: Reset VSP1 RPF source address v4l: vsp1: Always enable virtual RPF when BRU is in use drivers/media/platform/vsp1/vsp1_rpf.c | 15 +++ drivers/media/platform/vsp1/vsp1_rwpf.h | 2 ++ drivers/media/platform/vsp1/vsp1_wpf.c | 11 ++- 3 files changed, 23 insertions(+), 5 deletions(-) Best Regards, Takanari Hayama -- 1.8.0 -- 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 1/2] v4l: vsp1: Reset VSP1 RPF source address
Source address of VSP1 RPF needs to be reset whenever crop offsets are recalculated. This correctly reflects a crop setting even VIDIOC_QBUF is called before VIDIOIC_STREAMON is called. Signed-off-by: Takanari Hayama t...@igel.co.jp --- drivers/media/platform/vsp1/vsp1_rpf.c | 15 +++ drivers/media/platform/vsp1/vsp1_rwpf.h | 2 ++ 2 files changed, 17 insertions(+) diff --git a/drivers/media/platform/vsp1/vsp1_rpf.c b/drivers/media/platform/vsp1/vsp1_rpf.c index d14d26b..79c0db8 100644 --- a/drivers/media/platform/vsp1/vsp1_rpf.c +++ b/drivers/media/platform/vsp1/vsp1_rpf.c @@ -106,11 +106,22 @@ static int rpf_s_stream(struct v4l2_subdev *subdev, int enable) + crop-left * fmtinfo-bpp[0] / 8; pstride = format-plane_fmt[0].bytesperline VI6_RPF_SRCM_PSTRIDE_Y_SHIFT; + + vsp1_rpf_write(rpf, VI6_RPF_SRCM_ADDR_Y, + rpf-buf_addr[0] + rpf-offsets[0]); + if (format-num_planes 1) { rpf-offsets[1] = crop-top * format-plane_fmt[1].bytesperline + crop-left * fmtinfo-bpp[1] / 8; pstride |= format-plane_fmt[1].bytesperline VI6_RPF_SRCM_PSTRIDE_C_SHIFT; + + vsp1_rpf_write(rpf, VI6_RPF_SRCM_ADDR_C0, + rpf-buf_addr[1] + rpf-offsets[1]); + + if (format-num_planes 2) + vsp1_rpf_write(rpf, VI6_RPF_SRCM_ADDR_C1, + rpf-buf_addr[2] + rpf-offsets[1]); } vsp1_rpf_write(rpf, VI6_RPF_SRCM_PSTRIDE, pstride); @@ -179,6 +190,10 @@ static void rpf_vdev_queue(struct vsp1_video *video, struct vsp1_video_buffer *buf) { struct vsp1_rwpf *rpf = container_of(video, struct vsp1_rwpf, video); + int i; + + for (i = 0; i 3; i++) + rpf-buf_addr[i] = buf-addr[i]; vsp1_rpf_write(rpf, VI6_RPF_SRCM_ADDR_Y, buf-addr[0] + rpf-offsets[0]); diff --git a/drivers/media/platform/vsp1/vsp1_rwpf.h b/drivers/media/platform/vsp1/vsp1_rwpf.h index 28dd9e7..1f98fe3 100644 --- a/drivers/media/platform/vsp1/vsp1_rwpf.h +++ b/drivers/media/platform/vsp1/vsp1_rwpf.h @@ -39,6 +39,8 @@ struct vsp1_rwpf { struct v4l2_rect crop; unsigned int offsets[2]; + + unsigned int buf_addr[3]; }; static inline struct vsp1_rwpf *to_rwpf(struct v4l2_subdev *subdev) -- 1.8.0 -- 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] v4l: vsp1: Always enable virtual RPF when BRU is in use
Regardless of a number of inputs, we should always enable virtual RPF when BRU is used. This allows the case when there's only one input to BRU, and a size of the input is smaller than a size of an output of BRU. Signed-off-by: Takanari Hayama t...@igel.co.jp --- drivers/media/platform/vsp1/vsp1_wpf.c | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/drivers/media/platform/vsp1/vsp1_wpf.c b/drivers/media/platform/vsp1/vsp1_wpf.c index 6e05776..29ea28b 100644 --- a/drivers/media/platform/vsp1/vsp1_wpf.c +++ b/drivers/media/platform/vsp1/vsp1_wpf.c @@ -92,19 +92,20 @@ static int wpf_s_stream(struct v4l2_subdev *subdev, int enable) return 0; } - /* Sources. If the pipeline has a single input configure it as the -* master layer. Otherwise configure all inputs as sub-layers and -* select the virtual RPF as the master layer. + /* Sources. If the pipeline has a single input and BRU is not used, +* configure it as the master layer. Otherwise configure all +* inputs as sub-layers and select the virtual RPF as the master +* layer. */ for (i = 0; i pipe-num_inputs; ++i) { struct vsp1_rwpf *input = pipe-inputs[i]; - srcrpf |= pipe-num_inputs == 1 + srcrpf |= ((!pipe-bru) (pipe-num_inputs == 1)) ? VI6_WPF_SRCRPF_RPF_ACT_MST(input-entity.index) : VI6_WPF_SRCRPF_RPF_ACT_SUB(input-entity.index); } - if (pipe-num_inputs 1) + if ((pipe-bru) || (pipe-num_inputs 1)) srcrpf |= VI6_WPF_SRCRPF_VIRACT_MST; vsp1_wpf_write(wpf, VI6_WPF_SRCRPF, srcrpf); -- 1.8.0 -- 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: [linuxtv-media:master 7661/7664] ERROR: omapdss_compat_init [drivers/media/platform/omap/omap-vout.ko] undefined!
Hi Fengguang, On Wed, 2014-11-26 at 09:34 +0800, kbuild test robot wrote: tree: git://linuxtv.org/media_tree.git master head: 504febc3f98c87a8bebd8f2f274f32c0724131e4 commit: 6b213e81ddf8b265383c9a1a1884432df88f701e [7661/7664] [media] omap: Fix typo HAS_MMU config: m68k-allmodconfig (attached as .config) reproduce: wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross git checkout 6b213e81ddf8b265383c9a1a1884432df88f701e # save the attached .config to linux build tree make.cross ARCH=m68k This is the first time I've made the kbuild test robot trip. So I'm not sure how to interpret this. Is ARCH=m68k the only build that failed through this commit? Or is it the first build that failed? If so, how can I determine which arches build correctly? All error/warnings: ERROR: omapdss_compat_init [drivers/media/platform/omap/omap-vout.ko] undefined! ERROR: omap_dss_get_overlay_manager [drivers/media/platform/omap/omap-vout.ko] undefined! ERROR: omap_dss_get_num_overlay_managers [drivers/media/platform/omap/omap-vout.ko] undefined! ERROR: omap_dss_get_overlay [drivers/media/platform/omap/omap-vout.ko] undefined! ERROR: omapdss_is_initialized [drivers/media/platform/omap/omap-vout.ko] undefined! ERROR: omap_dispc_register_isr [drivers/media/platform/omap/omap-vout.ko] undefined! ERROR: omapdss_get_version [drivers/media/platform/omap/omap-vout.ko] undefined! ERROR: omap_dss_put_device [drivers/media/platform/omap/omap-vout.ko] undefined! ERROR: omap_dss_get_next_device [drivers/media/platform/omap/omap-vout.ko] undefined! ERROR: omap_dispc_unregister_isr [drivers/media/platform/omap/omap-vout.ko] undefined! ERROR: omapdss_compat_uninit [drivers/media/platform/omap/omap-vout.ko] undefined! ERROR: omap_dss_get_device [drivers/media/platform/omap/omap-vout.ko] undefined! ERROR: omap_dss_get_num_overlays [drivers/media/platform/omap/omap-vout.ko] undefined! --- 0-DAY kernel test infrastructureOpen Source Technology Center http://lists.01.org/mailman/listinfo/kbuild Intel Corporation Thanks, Paul Bolle -- 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