Re: [PATCH 3/6] ARM: OMAP2+: Move plat/iovmm.h to include/linux/omap-iommu.h
Hi Tony, Thanks for the patch. On Wednesday 24 October 2012 17:20:56 Tony Lindgren wrote: Looks like the iommu framework does not have generic functions exported for all the needs yet. The hardware specific functions are defined in files like intel-iommu.h and amd-iommu.h. Follow the same standard for omap-iommu.h. This is needed because we are removing plat and mach includes for ARM common zImage support. Further work should continue in the iommu framework context as only pure platform data will be communicated from arch/arm/*omap*/* code to the iommu framework. Cc: Joerg Roedel joerg.roe...@amd.com Cc: Ohad Ben-Cohen o...@wizery.com Cc: Ido Yariv i...@wizery.com Cc: Laurent Pinchart laurent.pinch...@ideasonboard.com Cc: Omar Ramirez Luna omar.l...@linaro.org Cc: linux-media@vger.kernel.org Acked-by: Mauro Carvalho Chehab mche...@redhat.com Signed-off-by: Tony Lindgren t...@atomide.com --- arch/arm/mach-omap2/iommu2.c |1 arch/arm/plat-omap/include/plat/iommu.h| 10 +-- arch/arm/plat-omap/include/plat/iovmm.h| 89 drivers/iommu/omap-iommu-debug.c | 2 - drivers/iommu/omap-iommu.c |1 drivers/iommu/omap-iovmm.c | 46 ++ drivers/media/platform/omap3isp/isp.c |1 drivers/media/platform/omap3isp/isp.h |4 - drivers/media/platform/omap3isp/ispccdc.c |1 drivers/media/platform/omap3isp/ispstat.c |1 drivers/media/platform/omap3isp/ispvideo.c |2 - include/linux/omap-iommu.h | 52 12 files changed, 107 insertions(+), 103 deletions(-) delete mode 100644 arch/arm/plat-omap/include/plat/iovmm.h create mode 100644 include/linux/omap-iommu.h diff --git a/arch/arm/mach-omap2/iommu2.c b/arch/arm/mach-omap2/iommu2.c index eefc379..e8116cf 100644 --- a/arch/arm/mach-omap2/iommu2.c +++ b/arch/arm/mach-omap2/iommu2.c @@ -15,6 +15,7 @@ #include linux/device.h #include linux/jiffies.h #include linux/module.h +#include linux/omap-iommu.h #include linux/slab.h #include linux/stringify.h diff --git a/arch/arm/plat-omap/include/plat/iommu.h b/arch/arm/plat-omap/include/plat/iommu.h index 7e8c7b6..a4b71b1 100644 --- a/arch/arm/plat-omap/include/plat/iommu.h +++ b/arch/arm/plat-omap/include/plat/iommu.h @@ -216,13 +216,10 @@ static inline struct omap_iommu *dev_to_omap_iommu(struct device *dev) #define MMU_RAM_PADDR_SHIFT12 #define MMU_RAM_PADDR_MASK \ ((~0UL MMU_RAM_PADDR_SHIFT) MMU_RAM_PADDR_SHIFT) -#define MMU_RAM_ENDIAN_SHIFT 9 + #define MMU_RAM_ENDIAN_MASK (1 MMU_RAM_ENDIAN_SHIFT) -#define MMU_RAM_ENDIAN_BIG (1 MMU_RAM_ENDIAN_SHIFT) -#define MMU_RAM_ENDIAN_LITTLE(0 MMU_RAM_ENDIAN_SHIFT) -#define MMU_RAM_ELSZ_SHIFT 7 #define MMU_RAM_ELSZ_MASK(3 MMU_RAM_ELSZ_SHIFT) -#define MMU_RAM_ELSZ_8 (0 MMU_RAM_ELSZ_SHIFT) + #define MMU_RAM_ELSZ_16 (1 MMU_RAM_ELSZ_SHIFT) #define MMU_RAM_ELSZ_32 (2 MMU_RAM_ELSZ_SHIFT) #define MMU_RAM_ELSZ_NONE(3 MMU_RAM_ELSZ_SHIFT) @@ -269,9 +266,6 @@ extern int omap_iommu_set_isr(const char *name, void *priv), void *isr_priv); -extern void omap_iommu_save_ctx(struct device *dev); -extern void omap_iommu_restore_ctx(struct device *dev); - extern int omap_install_iommu_arch(const struct iommu_functions *ops); extern void omap_uninstall_iommu_arch(const struct iommu_functions *ops); diff --git a/arch/arm/plat-omap/include/plat/iovmm.h b/arch/arm/plat-omap/include/plat/iovmm.h deleted file mode 100644 index 498e57c..000 --- a/arch/arm/plat-omap/include/plat/iovmm.h +++ /dev/null @@ -1,89 +0,0 @@ -/* - * omap iommu: simple virtual address space management - * - * Copyright (C) 2008-2009 Nokia Corporation - * - * Written by Hiroshi DOYU hiroshi.d...@nokia.com - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - */ - -#ifndef __IOMMU_MMAP_H -#define __IOMMU_MMAP_H - -#include linux/iommu.h - -struct iovm_struct { - struct omap_iommu *iommu; /* iommu object which this belongs to */ - u32 da_start; /* area definition */ - u32 da_end; - u32 flags; /* IOVMF_: see below */ - struct list_headlist; /* linked in ascending order */ - const struct sg_table *sgt; /* keep 'page' - 'da' mapping */ - void*va; /* mpu side mapped address */ -}; - -/* - * IOVMF_FLAGS: attribute for iommu virtual memory area(iovma) - * - * lower 16 bit is used for h/w and upper 16 bit is for s/w. - */ -#define IOVMF_SW_SHIFT 16 - -/* - * iovma: h/w flags derived from cam and ram attribute - */ -#define
Re: [media-workshop] Tentative Agenda for the November workshop
Hi Laurent, On 10/25/2012 12:42 AM, Laurent Pinchart wrote: Sylwester, would Samsung be able to prepare for a brainstorming session on Monday or Tuesday? Both Laurent and myself have presentations on Wednesday, so that's not the best day for such a session. Kamil has presentation on Tuesday so there would be only Monday left. Do you think we should do a half-day or a full day session on this? Half a day should be more than enough to start with. The topic is quite complex, and we'll need to sleep over it, several times. A full day would just result in brain overheat. I was thinking more in the line of starting our thought process, so maybe twice an hour or two hours would be good. That would allow us to attend the ELCE talks as well :-) (there's definitely a couple of them that I would like to listen to). I agree, I wouldn't like to loose whole day of the conference for that as well. One, two hours for the starters could be sufficient. So we can possibly agree on some initial idea and could get back to it later. I don't think I have already material for a full day session. One hour, possibly twice, would have my preference. That shouldn't be too difficult to organize. When will you and Kamil arrive ? Sounds good to me. We'll arrive on Sunday afternoon, and staying until next Sunday. -- 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: [media-workshop] Tentative Agenda for the November workshop
On Thu October 25 2012 10:43:59 Sylwester Nawrocki wrote: Hi Laurent, On 10/25/2012 12:42 AM, Laurent Pinchart wrote: Sylwester, would Samsung be able to prepare for a brainstorming session on Monday or Tuesday? Both Laurent and myself have presentations on Wednesday, so that's not the best day for such a session. Kamil has presentation on Tuesday so there would be only Monday left. Do you think we should do a half-day or a full day session on this? Half a day should be more than enough to start with. The topic is quite complex, and we'll need to sleep over it, several times. A full day would just result in brain overheat. I was thinking more in the line of starting our thought process, so maybe twice an hour or two hours would be good. That would allow us to attend the ELCE talks as well :-) (there's definitely a couple of them that I would like to listen to). I agree, I wouldn't like to loose whole day of the conference for that as well. One, two hours for the starters could be sufficient. So we can possibly agree on some initial idea and could get back to it later. I don't think I have already material for a full day session. One hour, possibly twice, would have my preference. That shouldn't be too difficult to organize. When will you and Kamil arrive ? Sounds good to me. We'll arrive on Sunday afternoon, and staying until next Sunday. I've tried to get a small room for Monday, but they were all gone, so we will have to find some other place in the hotel. Regards, Hans -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [GIT PULL FOR v3.8] OMAP3 ISP patches
Hi Mauro, Please cancel this pull request. Two of the patches need to be pushed to v3.7. I've sent a separate pull request for them, and I'll resend this one without those two patches. -- Regards, Laurent Pinchart -- 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] s5p-fimc: Fix platform entities registration
Make sure there is no v4l2_device_unregister_subdev() call on a subdev which wasn't registered. Signed-off-by: Sylwester Nawrocki s.nawro...@samsung.com Signed-off-by: Kyungmin Park kyungmin.p...@samsung.com --- drivers/media/platform/s5p-fimc/fimc-mdevice.c | 25 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/drivers/media/platform/s5p-fimc/fimc-mdevice.c b/drivers/media/platform/s5p-fimc/fimc-mdevice.c index 715b258..a69f053 100644 --- a/drivers/media/platform/s5p-fimc/fimc-mdevice.c +++ b/drivers/media/platform/s5p-fimc/fimc-mdevice.c @@ -345,24 +345,23 @@ static int fimc_register_callback(struct device *dev, void *p) struct fimc_dev *fimc = dev_get_drvdata(dev); struct v4l2_subdev *sd = fimc-vid_cap.subdev; struct fimc_md *fmd = p; - int ret = 0; + int ret; - if (!fimc || !fimc-pdev) + if (fimc == NULL) return 0; - if (fimc-pdev-id 0 || fimc-pdev-id = FIMC_MAX_DEVS) + if (fimc-id = FIMC_MAX_DEVS) return 0; fimc-pipeline_ops = fimc_pipeline_ops; - fmd-fimc[fimc-pdev-id] = fimc; sd-grp_id = FIMC_GROUP_ID; ret = v4l2_device_register_subdev(fmd-v4l2_dev, sd); - if (ret) { + if (!ret) + fmd-fimc[fimc-id] = fimc; + else v4l2_err(fmd-v4l2_dev, Failed to register FIMC.%d (%d)\n, fimc-id, ret); - } - return ret; } @@ -380,15 +379,15 @@ static int fimc_lite_register_callback(struct device *dev, void *p) return 0; fimc-pipeline_ops = fimc_pipeline_ops; - fmd-fimc_lite[fimc-index] = fimc; sd-grp_id = FLITE_GROUP_ID; ret = v4l2_device_register_subdev(fmd-v4l2_dev, sd); - if (ret) { + if (!ret) + fmd-fimc_lite[fimc-index] = fimc; + else v4l2_err(fmd-v4l2_dev, Failed to register FIMC-LITE.%d (%d)\n, fimc-index, ret); - } return ret; } @@ -407,10 +406,12 @@ static int csis_register_callback(struct device *dev, void *p) v4l2_info(sd, csis%d sd: %s\n, pdev-id, sd-name); id = pdev-id 0 ? 0 : pdev-id; - fmd-csis[id].sd = sd; + sd-grp_id = CSIS_GROUP_ID; ret = v4l2_device_register_subdev(fmd-v4l2_dev, sd); - if (ret) + if (!ret) + fmd-csis[id].sd = sd; + else v4l2_err(fmd-v4l2_dev, Failed to register CSIS subdevice: %d\n, ret); return ret; -- 1.7.9.5 -- 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] Add MFC device tree support
This patch adds device tree support for MFC driver. The arch side patch for Exynos5250 adding MFC DT node is applied to linux-samsung tree. [1] [1]http://www.mail-archive.com/linux-samsung-soc@vger.kernel.org/msg12672.html Arun Kumar K (1): s5p-mfc: Add device tree support drivers/media/platform/s5p-mfc/s5p_mfc.c | 100 +- 1 files changed, 84 insertions(+), 16 deletions(-) -- 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] s5p-mfc: Add device tree support
This patch will add the device tree support for MFC driver. Signed-off-by: Arun Kumar K arun...@samsung.com --- drivers/media/platform/s5p-mfc/s5p_mfc.c | 100 +- 1 files changed, 84 insertions(+), 16 deletions(-) diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc.c b/drivers/media/platform/s5p-mfc/s5p_mfc.c index d5182d6..4432a82 100644 --- a/drivers/media/platform/s5p-mfc/s5p_mfc.c +++ b/drivers/media/platform/s5p-mfc/s5p_mfc.c @@ -21,6 +21,7 @@ #include linux/videodev2.h #include media/v4l2-event.h #include linux/workqueue.h +#include linux/of.h #include media/videobuf2-core.h #include s5p_mfc_common.h #include s5p_mfc_ctrl.h @@ -1028,6 +1029,8 @@ static int match_child(struct device *dev, void *data) return !strcmp(dev_name(dev), (char *)data); } +static void *mfc_get_drv_data(struct platform_device *pdev); + /* MFC probe function */ static int s5p_mfc_probe(struct platform_device *pdev) { @@ -1035,6 +1038,7 @@ static int s5p_mfc_probe(struct platform_device *pdev) struct video_device *vfd; struct resource *res; int ret; + unsigned int mem_info[2]; pr_debug(%s++\n, __func__); dev = devm_kzalloc(pdev-dev, sizeof(*dev), GFP_KERNEL); @@ -1051,8 +1055,7 @@ static int s5p_mfc_probe(struct platform_device *pdev) return -ENODEV; } - dev-variant = (struct s5p_mfc_variant *) - platform_get_device_id(pdev)-driver_data; + dev-variant = mfc_get_drv_data(pdev); ret = s5p_mfc_init_pm(dev); if (ret 0) { @@ -1082,20 +1085,55 @@ static int s5p_mfc_probe(struct platform_device *pdev) goto err_res; } - dev-mem_dev_l = device_find_child(dev-plat_dev-dev, s5p-mfc-l, - match_child); - if (!dev-mem_dev_l) { - mfc_err(Mem child (L) device get failed\n); - ret = -ENODEV; - goto err_res; - } + if (pdev-dev.of_node) { + dev-mem_dev_l = kzalloc(sizeof(struct device), GFP_KERNEL); + if (!dev-mem_dev_l) { + mfc_err(Not enough memory\n); + ret = -ENOMEM; + goto err_res; + } + of_property_read_u32_array(pdev-dev.of_node, samsung,mfc-l, + mem_info, 2); + if (dma_declare_coherent_memory(dev-mem_dev_l, mem_info[0], + mem_info[0], mem_info[1], + DMA_MEMORY_MAP | DMA_MEMORY_EXCLUSIVE) == 0) { + mfc_err(Failed to declare coherent memory for\n + MFC device\n); + ret = -ENOMEM; + goto err_res; + } - dev-mem_dev_r = device_find_child(dev-plat_dev-dev, s5p-mfc-r, - match_child); - if (!dev-mem_dev_r) { - mfc_err(Mem child (R) device get failed\n); - ret = -ENODEV; - goto err_res; + dev-mem_dev_r = kzalloc(sizeof(struct device), GFP_KERNEL); + if (!dev-mem_dev_r) { + mfc_err(Not enough memory\n); + ret = -ENOMEM; + goto err_res; + } + of_property_read_u32_array(pdev-dev.of_node, samsung,mfc-r, + mem_info, 2); + if (dma_declare_coherent_memory(dev-mem_dev_r, mem_info[0], + mem_info[0], mem_info[1], + DMA_MEMORY_MAP | DMA_MEMORY_EXCLUSIVE) == 0) { + pr_err(Failed to declare coherent memory for\n + MFC device\n); + ret = -ENOMEM; + goto err_res; + } + } else { + dev-mem_dev_l = device_find_child(dev-plat_dev-dev, + s5p-mfc-l, match_child); + if (!dev-mem_dev_l) { + mfc_err(Mem child (L) device get failed\n); + ret = -ENODEV; + goto err_res; + } + dev-mem_dev_r = device_find_child(dev-plat_dev-dev, + s5p-mfc-r, match_child); + if (!dev-mem_dev_r) { + mfc_err(Mem child (R) device get failed\n); + ret = -ENODEV; + goto err_res; + } } dev-alloc_ctx[0] = vb2_dma_contig_init_ctx(dev-mem_dev_l); @@ -1374,6 +1412,35 @@ static struct platform_device_id mfc_driver_ids[] = { }; MODULE_DEVICE_TABLE(platform, mfc_driver_ids); +static const struct of_device_id exynos_mfc_match[] = { + { + .compatible = samsung,mfc-v5, + .data = mfc_drvdata_v5, + }, { +
Re: [PATCH] s5p-fimc: Fix platform entities registration
Hi Sylwester, On Thursday 25 October 2012 11:06:56 Sylwester Nawrocki wrote: Make sure there is no v4l2_device_unregister_subdev() call on a subdev which wasn't registered. I'm not implying that this fix is bad, but doesn't the V4L2 core already handle this ? v4l2_device_unregister_subdev() returns immediately without doing anything if the subdev hasn't been registered. Signed-off-by: Sylwester Nawrocki s.nawro...@samsung.com Signed-off-by: Kyungmin Park kyungmin.p...@samsung.com --- drivers/media/platform/s5p-fimc/fimc-mdevice.c | 25 ++-- 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/drivers/media/platform/s5p-fimc/fimc-mdevice.c b/drivers/media/platform/s5p-fimc/fimc-mdevice.c index 715b258..a69f053 100644 --- a/drivers/media/platform/s5p-fimc/fimc-mdevice.c +++ b/drivers/media/platform/s5p-fimc/fimc-mdevice.c @@ -345,24 +345,23 @@ static int fimc_register_callback(struct device *dev, void *p) struct fimc_dev *fimc = dev_get_drvdata(dev); struct v4l2_subdev *sd = fimc-vid_cap.subdev; struct fimc_md *fmd = p; - int ret = 0; + int ret; - if (!fimc || !fimc-pdev) + if (fimc == NULL) return 0; - if (fimc-pdev-id 0 || fimc-pdev-id = FIMC_MAX_DEVS) + if (fimc-id = FIMC_MAX_DEVS) return 0; fimc-pipeline_ops = fimc_pipeline_ops; - fmd-fimc[fimc-pdev-id] = fimc; sd-grp_id = FIMC_GROUP_ID; ret = v4l2_device_register_subdev(fmd-v4l2_dev, sd); - if (ret) { + if (!ret) + fmd-fimc[fimc-id] = fimc; + else v4l2_err(fmd-v4l2_dev, Failed to register FIMC.%d (%d)\n, fimc-id, ret); - } - return ret; } @@ -380,15 +379,15 @@ static int fimc_lite_register_callback(struct device *dev, void *p) return 0; fimc-pipeline_ops = fimc_pipeline_ops; - fmd-fimc_lite[fimc-index] = fimc; sd-grp_id = FLITE_GROUP_ID; ret = v4l2_device_register_subdev(fmd-v4l2_dev, sd); - if (ret) { + if (!ret) + fmd-fimc_lite[fimc-index] = fimc; + else v4l2_err(fmd-v4l2_dev, Failed to register FIMC-LITE.%d (%d)\n, fimc-index, ret); - } return ret; } @@ -407,10 +406,12 @@ static int csis_register_callback(struct device *dev, void *p) v4l2_info(sd, csis%d sd: %s\n, pdev-id, sd-name); id = pdev-id 0 ? 0 : pdev-id; - fmd-csis[id].sd = sd; + sd-grp_id = CSIS_GROUP_ID; ret = v4l2_device_register_subdev(fmd-v4l2_dev, sd); - if (ret) + if (!ret) + fmd-csis[id].sd = sd; + else v4l2_err(fmd-v4l2_dev, Failed to register CSIS subdevice: %d\n, ret); return ret; -- Regards, Laurent Pinchart -- 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] s5p-fimc: Fix platform entities registration
Hi Laurent, On 10/25/2012 01:35 PM, Laurent Pinchart wrote: On Thursday 25 October 2012 11:06:56 Sylwester Nawrocki wrote: Make sure there is no v4l2_device_unregister_subdev() call on a subdev which wasn't registered. I'm not implying that this fix is bad, but doesn't the V4L2 core already handle this ? v4l2_device_unregister_subdev() returns immediately without doing anything if the subdev hasn't been registered. Indeed, the patch summary might be a bit misleading and incomplete. I of course wanted to make sure the platform subdevs are not treated as registered when any part of v4l2_device_register_subdev() fails. Looking at function v4l2_device_register_subdev(), I'm wondering whether line 159 sd-v4l2_dev = v4l2_dev; shouldn't be moved right before 190 spin_lock(v4l2_dev-lock); so sd-v4l2_dev is set only if we return 0 in this function ? Since in function v4l2_device_unregister_subdev() there is a check like 259 /* return if it isn't registered */ 260 if (sd == NULL || sd-v4l2_dev == NULL) 261 return; i.e. if subdev is not really registered, e.g. internal .registered op fails, it should be NULL. In my case sd wasn't null since this structure was embedded in other one. -- Thanks, Sylwester -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] [media] fix tua6034 pll bandwich configuration
commit 80d8d4985f280dca3c395286d13b49f910a029e7 introduce a bug that set the wrong bandwich bit on the tua6034 pll. Signed-off-by: Arne Fitzenreiter arne.fitzenrei...@ipfire.org diff -Naur a/drivers/media/dvb-frontends/dvb-pll.c b/drivers/media/dvb-frontends/dvb-pll.c --- a/drivers/media/dvb-frontends/dvb-pll.c 2012-08-14 05:45:22.0 +0200 +++ b/drivers/media/dvb-frontends/dvb-pll.c 2012-10-25 14:06:42.123360189 +0200 @@ -247,7 +247,7 @@ static void tua6034_bw(struct dvb_frontend *fe, u8 *buf) { u32 bw = fe-dtv_property_cache.bandwidth_hz; - if (bw == 700) + if (bw != 700) buf[3] |= 0x08; } -- 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: [RESEND-PATCH] media:davinci: clk - {prepare/unprepare} for common clk
Hi Murali, Thanks for the patch. I'll queue this patch for 3.8. On Mon, Oct 22, 2012 at 9:06 PM, Murali Karicheri m-kariche...@ti.com wrote: As a first step towards migrating davinci platforms to use common clock framework, replace all instances of clk_enable() with clk_prepare_enable() and clk_disable() with clk_disable_unprepare(). Also fixes some issues related to clk clean up in the driver Signed-off-by: Murali Karicheri m-kariche...@ti.com Acked-by: Lad, Prabhakar prabhakar@ti.com Tested-by: Lad, Prabhakar prabhakar@ti.com Regards, --Prabhakar --- rebased to v3.7-rc1 drivers/media/platform/davinci/dm355_ccdc.c |8 ++-- drivers/media/platform/davinci/dm644x_ccdc.c | 16 ++-- drivers/media/platform/davinci/isif.c|5 - drivers/media/platform/davinci/vpbe.c| 10 +++--- drivers/media/platform/davinci/vpif.c|8 5 files changed, 31 insertions(+), 16 deletions(-) diff --git a/drivers/media/platform/davinci/dm355_ccdc.c b/drivers/media/platform/davinci/dm355_ccdc.c index ce0e413..030950d 100644 --- a/drivers/media/platform/davinci/dm355_ccdc.c +++ b/drivers/media/platform/davinci/dm355_ccdc.c @@ -1003,7 +1003,7 @@ static int __devinit dm355_ccdc_probe(struct platform_device *pdev) status = PTR_ERR(ccdc_cfg.mclk); goto fail_nomap; } - if (clk_enable(ccdc_cfg.mclk)) { + if (clk_prepare_enable(ccdc_cfg.mclk)) { status = -ENODEV; goto fail_mclk; } @@ -1014,7 +1014,7 @@ static int __devinit dm355_ccdc_probe(struct platform_device *pdev) status = PTR_ERR(ccdc_cfg.sclk); goto fail_mclk; } - if (clk_enable(ccdc_cfg.sclk)) { + if (clk_prepare_enable(ccdc_cfg.sclk)) { status = -ENODEV; goto fail_sclk; } @@ -1034,8 +1034,10 @@ static int __devinit dm355_ccdc_probe(struct platform_device *pdev) printk(KERN_NOTICE %s is registered with vpfe.\n, ccdc_hw_dev.name); return 0; fail_sclk: + clk_disable_unprepare(ccdc_cfg.sclk); clk_put(ccdc_cfg.sclk); fail_mclk: + clk_disable_unprepare(ccdc_cfg.mclk); clk_put(ccdc_cfg.mclk); fail_nomap: iounmap(ccdc_cfg.base_addr); @@ -1050,6 +1052,8 @@ static int dm355_ccdc_remove(struct platform_device *pdev) { struct resource *res; + clk_disable_unprepare(ccdc_cfg.sclk); + clk_disable_unprepare(ccdc_cfg.mclk); clk_put(ccdc_cfg.mclk); clk_put(ccdc_cfg.sclk); iounmap(ccdc_cfg.base_addr); diff --git a/drivers/media/platform/davinci/dm644x_ccdc.c b/drivers/media/platform/davinci/dm644x_ccdc.c index ee7942b..0215ab6 100644 --- a/drivers/media/platform/davinci/dm644x_ccdc.c +++ b/drivers/media/platform/davinci/dm644x_ccdc.c @@ -994,7 +994,7 @@ static int __devinit dm644x_ccdc_probe(struct platform_device *pdev) status = PTR_ERR(ccdc_cfg.mclk); goto fail_nomap; } - if (clk_enable(ccdc_cfg.mclk)) { + if (clk_prepare_enable(ccdc_cfg.mclk)) { status = -ENODEV; goto fail_mclk; } @@ -1005,7 +1005,7 @@ static int __devinit dm644x_ccdc_probe(struct platform_device *pdev) status = PTR_ERR(ccdc_cfg.sclk); goto fail_mclk; } - if (clk_enable(ccdc_cfg.sclk)) { + if (clk_prepare_enable(ccdc_cfg.sclk)) { status = -ENODEV; goto fail_sclk; } @@ -1013,8 +1013,10 @@ static int __devinit dm644x_ccdc_probe(struct platform_device *pdev) printk(KERN_NOTICE %s is registered with vpfe.\n, ccdc_hw_dev.name); return 0; fail_sclk: + clk_disable_unprepare(ccdc_cfg.sclk); clk_put(ccdc_cfg.sclk); fail_mclk: + clk_disable_unprepare(ccdc_cfg.mclk); clk_put(ccdc_cfg.mclk); fail_nomap: iounmap(ccdc_cfg.base_addr); @@ -1029,6 +1031,8 @@ static int dm644x_ccdc_remove(struct platform_device *pdev) { struct resource *res; + clk_disable_unprepare(ccdc_cfg.mclk); + clk_disable_unprepare(ccdc_cfg.sclk); clk_put(ccdc_cfg.mclk); clk_put(ccdc_cfg.sclk); iounmap(ccdc_cfg.base_addr); @@ -1046,8 +1050,8 @@ static int dm644x_ccdc_suspend(struct device *dev) /* Disable CCDC */ ccdc_enable(0); /* Disable both master and slave clock */ - clk_disable(ccdc_cfg.mclk); - clk_disable(ccdc_cfg.sclk); + clk_disable_unprepare(ccdc_cfg.mclk); + clk_disable_unprepare(ccdc_cfg.sclk); return 0; } @@ -1055,8 +1059,8 @@ static int dm644x_ccdc_suspend(struct device *dev) static int dm644x_ccdc_resume(struct device *dev) { /* Enable both master and slave clock */ - clk_enable(ccdc_cfg.mclk); -
Re: [PATCH v2] media: davinci: vpbe: fix build warning
Hi Prabhakar, Thanks for the patch. On Tuesday 23 October 2012 18:54:37 Prabhakar Lad wrote: From: Lad, Prabhakar prabhakar@ti.com Warnings were generated because of the following commit changed data type for address pointer 195bbca ARM: 7500/1: io: avoid writeback addressing modes for __raw_ accessors add __iomem annotation to fix following warnings drivers/media/platform/davinci/vpbe_osd.c: In function ‘osd_read’: drivers/media/platform/davinci/vpbe_osd.c:49:2: warning: passing argument 1 of ‘__raw_readl’ makes pointer from integer without a cast [enabled by default] arch/arm/include/asm/io.h:104:19: note: expected ‘const volatile void *’ but argument is of type ‘long unsigned int’ Please add a sentence here that explains what your patch does. Something like Store the ioremap_nocache() returned address in a void __iomem * instead of a unsigned long. Signed-off-by: Lad, Prabhakar prabhakar@ti.com Signed-off-by: Manjunath Hadli manjunath.ha...@ti.com Cc: Laurent Pinchart laurent.pinch...@ideasonboard.com Cc: Mauro Carvalho Chehab mche...@infradead.org Acked-by: Laurent Pinchart laurent.pinch...@ideasonboard.com --- Changes for v2: 1: Made the base addr to void __iomem * instead of long unsigned, as pointed by Laurent. drivers/media/platform/davinci/vpbe_osd.c |9 - include/media/davinci/vpbe_osd.h |2 +- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/drivers/media/platform/davinci/vpbe_osd.c b/drivers/media/platform/davinci/vpbe_osd.c index bba299d..707f243 100644 --- a/drivers/media/platform/davinci/vpbe_osd.c +++ b/drivers/media/platform/davinci/vpbe_osd.c @@ -62,7 +62,7 @@ static inline u32 osd_set(struct osd_state *sd, u32 mask, u32 offset) { struct osd_state *osd = sd; - u32 addr = osd-osd_base + offset; + void __iomem *addr = osd-osd_base + offset; u32 val = readl(addr) | mask; writel(val, addr); @@ -74,7 +74,7 @@ static inline u32 osd_clear(struct osd_state *sd, u32 mask, u32 offset) { struct osd_state *osd = sd; - u32 addr = osd-osd_base + offset; + void __iomem *addr = osd-osd_base + offset; u32 val = readl(addr) ~mask; writel(val, addr); @@ -87,7 +87,7 @@ static inline u32 osd_modify(struct osd_state *sd, u32 mask, u32 val, { struct osd_state *osd = sd; - u32 addr = osd-osd_base + offset; + void __iomem *addr = osd-osd_base + offset; u32 new_val = (readl(addr) ~mask) | (val mask); writel(new_val, addr); @@ -1559,8 +1559,7 @@ static int osd_probe(struct platform_device *pdev) ret = -ENODEV; goto free_mem; } - osd-osd_base = (unsigned long)ioremap_nocache(res-start, - osd-osd_size); + osd-osd_base = ioremap_nocache(res-start, osd-osd_size); if (!osd-osd_base) { dev_err(osd-dev, Unable to map the OSD region\n); ret = -ENODEV; diff --git a/include/media/davinci/vpbe_osd.h b/include/media/davinci/vpbe_osd.h index d7e397a..5ab0d8d 100644 --- a/include/media/davinci/vpbe_osd.h +++ b/include/media/davinci/vpbe_osd.h @@ -357,7 +357,7 @@ struct osd_state { spinlock_t lock; struct device *dev; dma_addr_t osd_base_phys; - unsigned long osd_base; + void __iomem *osd_base; unsigned long osd_size; /* 1--the isr will toggle the VID0 ping-pong buffer */ int pingpong; -- Regards, Laurent Pinchart -- 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 0/5] media: ov7670: driver cleanup and support for ov7674.
Hi Mauro, do you have any problems with this series? Regards. On 29 September 2012 21:20, Jonathan Corbet cor...@lwn.net wrote: On Thu, 27 Sep 2012 17:38:20 +0200 Javier Martin javier.mar...@vista-silicon.com wrote: The following series includes all the changes discussed in [1] that don't affect either bridge drivers that use ov7670 or soc-camera framework For this reason they are considered non controversial and sent separately. At least 1 more series will follow in order to implement all features described in [1]. I'd have preferred to avoid the unrelated white space changes in #1, but so be it; you can put my Acked-by on the whole set. Thanks, jon -- Javier Martin Vista Silicon S.L. CDTUC - FASE C - Oficina S-345 Avda de los Castros s/n 39005- Santander. Cantabria. Spain +34 942 25 32 60 www.vista-silicon.com -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v3 0/4] ov7670: migrate this sensor and its users to ctrl framework.
Hi Mauro, Jon, any more issues related with this series? Regards. On 29 September 2012 21:25, Jonathan Corbet cor...@lwn.net wrote: On Fri, 28 Sep 2012 13:26:39 +0200 Javier Martin javier.mar...@vista-silicon.com wrote: The following series migrate ov7670 sensor and current users to ctrl framework as discussed in [1]. This has been tested against mx2_camera soc-camera bridge, so tests or acks will be required from people using cam-core and via-camera out there. Looking over the code, I can't really find much to get grumpy about. Certainly I like how it removes more code than it adds. I'm not really up on the control framework, though. What's really needed is to see this code actually work on the relevant systems. I will *try* to do that testing, but it's going to take a little while; I don't think I can do it by the 3.7 merge window. Mauro willing, perhaps it can go in this time around anyway with the idea that we can sort out any little difficulties after -rc1. jon -- Javier Martin Vista Silicon S.L. CDTUC - FASE C - Oficina S-345 Avda de los Castros s/n 39005- Santander. Cantabria. Spain +34 942 25 32 60 www.vista-silicon.com -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] Fixed list_del corruption in videobuf-core.c : videobuf_queue_cancel()
Hi Vaibhav/Andrei, Em Tue, 9 Oct 2012 17:32:25 + Hiremath, Vaibhav hvaib...@ti.com escreveu: On Tue, Oct 09, 2012 at 14:08:18, Andrey Mandychev wrote: Hi, Please find below some additional comments. Actually it's not a real issue. It's more warning than issue. When you are trying to delete element from the queue the implementation of list_del (in list_debug.c) checks that previous element and next element of the element you are going to delete reference to this element properly. In other words the method checks the integrity of the queue before deleting the element and it generates warning if something is wrong. In my case the head looses a pointer to the next element because of INIT_LIST_HEAD() and when we try to delete this element from the queue the list_del() generates warning because the previous element (i.e. head) doesn't reference to this element (element we want to delete). void __list_del_entry(struct list_head *entry) { struct list_head *prev, *next; prev = entry-prev; next = entry-next; if (WARN(next == LIST_POISON1, list_del corruption, %p-next is LIST_POISON1 (%p)\n, entry, LIST_POISON1) || WARN(prev == LIST_POISON2, list_del corruption, %p-prev is LIST_POISON2 (%p)\n, entry, LIST_POISON2) || WARN(prev-next != entry, list_del corruption. prev-next should be %p, but was %p\n, entry, prev-next) || WARN(next-prev != entry, list_del corruption. next-prev should be %p, but was %p\n, entry, next-prev)) return; __list_del(prev, next); } So my patch is a small improvement that avoids generating this kind of warning. Any mechanism or suggestion to reproduce this issue, which I can use to reproduce this issue. Just switching between LCD=TV, will be enough to hit this issue? Thanks, Vaibhav -- BR, Andrei On Mon, Oct 8, 2012 at 4:50 PM, Hiremath, Vaibhav hvaib...@ti.com wrote: On Fri, Oct 05, 2012 at 21:14:25, Andrei Mandychev wrote: If there is a buffer with VIDEOBUF_QUEUED state it won't be deleted properly because the head of queue loses its elements by calling INIT_LIST_HEAD() before videobuf_streamoff(). dma_queue is driver internal queue and videobuf_streamoff() function will end up into buf_release() callback, which in our case doesn't do anything with dmaqueue. Did you face any runtime issues with this? I still did not understand about this corruption thing. Thanks, Vaibhav --- drivers/media/video/omap/omap_vout.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/video/omap/omap_vout.c b/drivers/media/video/omap/omap_vout.c index 409da0f..f02eb8e 100644 --- a/drivers/media/video/omap/omap_vout.c +++ b/drivers/media/video/omap/omap_vout.c @@ -1738,8 +1738,8 @@ static int vidioc_streamoff(struct file *file, void *fh, enum v4l2_buf_type i) v4l2_err(vout-vid_dev-v4l2_dev, failed to change mode in streamoff\n); - INIT_LIST_HEAD(vout-dma_queue); ret = videobuf_streamoff(vout-vbq); + INIT_LIST_HEAD(vout-dma_queue); Why do we ever need to call INIT_LIST_HEAD() here in the first place? List initialization should happen only once, when vout is created. After that, list add/del macros should be used. Having a code like this here seems to indicate that there are something wrong somewhere. 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 1/2] ARM: clk-imx27: Add missing clock for mx2-camera
Hi Fábio, Em Fri, 5 Oct 2012 18:53:01 -0300 Fabio Estevam fabio.este...@freescale.com escreveu: During the clock conversion for mx27 the per4_gate clock was missed to get registered as a dependency of mx2-camera driver. In the old mx27 clock driver we used to have: DEFINE_CLOCK1(csi_clk, 0, NULL, 0, parent, csi_clk1, per4_clk); ,so does the same in the new clock driver. Signed-off-by: Fabio Estevam fabio.este...@freescale.com --- arch/arm/mach-imx/clk-imx27.c |1 + As this patch is for arch/arm, I'm understanding that it will be merged via arm tree. So, Acked-by: Mauro Carvalho Chehab mche...@redhat.com 1 file changed, 1 insertion(+) diff --git a/arch/arm/mach-imx/clk-imx27.c b/arch/arm/mach-imx/clk-imx27.c index 3b6b640..5ef0f08 100644 --- a/arch/arm/mach-imx/clk-imx27.c +++ b/arch/arm/mach-imx/clk-imx27.c @@ -224,6 +224,7 @@ int __init mx27_clocks_init(unsigned long fref) clk_register_clkdev(clk[lcdc_ipg_gate], ipg, imx-fb.0); clk_register_clkdev(clk[lcdc_ahb_gate], ahb, imx-fb.0); clk_register_clkdev(clk[csi_ahb_gate], ahb, mx2-camera.0); + clk_register_clkdev(clk[per4_gate], per, mx2-camera.0); clk_register_clkdev(clk[usb_div], per, fsl-usb2-udc); clk_register_clkdev(clk[usb_ipg_gate], ipg, fsl-usb2-udc); clk_register_clkdev(clk[usb_ahb_gate], ahb, fsl-usb2-udc); -- 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 1/2] ARM: clk-imx27: Add missing clock for mx2-camera
Em Thu, 25 Oct 2012 11:38:41 -0200 Mauro Carvalho Chehab mche...@redhat.com escreveu: Hi Fábio, Em Fri, 5 Oct 2012 18:53:01 -0300 Fabio Estevam fabio.este...@freescale.com escreveu: During the clock conversion for mx27 the per4_gate clock was missed to get registered as a dependency of mx2-camera driver. In the old mx27 clock driver we used to have: DEFINE_CLOCK1(csi_clk, 0, NULL, 0, parent, csi_clk1, per4_clk); ,so does the same in the new clock driver. Signed-off-by: Fabio Estevam fabio.este...@freescale.com --- arch/arm/mach-imx/clk-imx27.c |1 + As this patch is for arch/arm, I'm understanding that it will be merged via arm tree. So, Acked-by: Mauro Carvalho Chehab mche...@redhat.com Forgot to comment: as patch 2 relies on this change, the better, IMHO, is to send both via the same tree. If you decide to do so, please get arm maintainer's ack, instead, and we can merge both via my tree. 1 file changed, 1 insertion(+) diff --git a/arch/arm/mach-imx/clk-imx27.c b/arch/arm/mach-imx/clk-imx27.c index 3b6b640..5ef0f08 100644 --- a/arch/arm/mach-imx/clk-imx27.c +++ b/arch/arm/mach-imx/clk-imx27.c @@ -224,6 +224,7 @@ int __init mx27_clocks_init(unsigned long fref) clk_register_clkdev(clk[lcdc_ipg_gate], ipg, imx-fb.0); clk_register_clkdev(clk[lcdc_ahb_gate], ahb, imx-fb.0); clk_register_clkdev(clk[csi_ahb_gate], ahb, mx2-camera.0); + clk_register_clkdev(clk[per4_gate], per, mx2-camera.0); clk_register_clkdev(clk[usb_div], per, fsl-usb2-udc); clk_register_clkdev(clk[usb_ipg_gate], ipg, fsl-usb2-udc); clk_register_clkdev(clk[usb_ahb_gate], ahb, fsl-usb2-udc); -- 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] omap_vout: Set DSS overlay_info only if paddr is non zero
On 2012-03-09 10:03, Hiremath, Vaibhav wrote: On Fri, Mar 09, 2012 at 05:17:41, Laurent Pinchart wrote: Hi Archit, On Wednesday 07 March 2012 14:31:16 Archit Taneja wrote: The omap_vout driver tries to set the DSS overlay_info using set_overlay_info() when the physical address for the overlay is still not configured. This happens in omap_vout_probe() and vidioc_s_fmt_vid_out(). The calls to omapvid_init(which internally calls set_overlay_info()) are removed from these functions. They don't need to be called as the omap_vout_device struct anyway maintains the overlay related changes made. Also, remove the explicit call to set_overlay_info() in vidioc_streamon(), this was used to set the paddr, this isn't needed as omapvid_init() does the same thing later. These changes are required as the DSS2 driver since 3.3 kernel doesn't let you set the overlay info with paddr as 0. Signed-off-by: Archit Taneja arc...@ti.com Thanks for the patch. This seems to fix memory corruption that would result in sysfs-related crashes such as [ 31.279541] [ cut here ] [ 31.284423] WARNING: at fs/sysfs/file.c:343 sysfs_open_file+0x70/0x1f8() [ 31.291503] missing sysfs attribute operations for kobject: (null) [ 31.298004] Modules linked in: mt9p031 aptina_pll omap3_isp [ 31.303924] [c0018260] (unwind_backtrace+0x0/0xec) from [c0034488] (warn_slowpath_common+0x4c/0x64) [ 31.313812] [c0034488] (warn_slowpath_common+0x4c/0x64) from [c0034520] (warn_slowpath_fmt+0x2c/0x3c) [ 31.323913] [c0034520] (warn_slowpath_fmt+0x2c/0x3c) from [c01219bc] (sysfs_open_file+0x70/0x1f8) [ 31.333618] [c01219bc] (sysfs_open_file+0x70/0x1f8) from [c00ccc94] (__dentry_open+0x1f8/0x30c) [ 31.343139] [c00ccc94] (__dentry_open+0x1f8/0x30c) from [c00cce58] (nameidata_to_filp+0x50/0x5c) [ 31.352752] [c00cce58] (nameidata_to_filp+0x50/0x5c) from [c00db4c0] (do_last+0x55c/0x6a0) [ 31.361999] [c00db4c0] (do_last+0x55c/0x6a0) from [c00db6bc] (path_openat+0xb8/0x37c) [ 31.370605] [c00db6bc] (path_openat+0xb8/0x37c) from [c00dba60] (do_filp_open+0x30/0x7c) [ 31.379486] [c00dba60] (do_filp_open+0x30/0x7c) from [c00cc904] (do_sys_open+0xd8/0x170) [ 31.388366] [c00cc904] (do_sys_open+0xd8/0x170) from [c0012760] (ret_fast_syscall+0x0/0x3c) [ 31.397552] ---[ end trace 13639ab74f345d7e ]--- Tested-by: Laurent Pinchart laurent.pinch...@ideasonboard.com Thanks Laurent for testing this patch. Please push it to v3.3 :-) Will send a pull request today itself. Vaibhav, I don't see this crash fix in 3.3, 3.4, 3.5, 3.6 nor in 3.7-rc. Are you still maintaining the omap v4l2 driver? Can you finally push this fix? Tomi signature.asc Description: OpenPGP digital signature
[PATCH] s5p-fimc: Fix platform entities registration
Make sure the platform sub-devices are registered to the media device driver only when v4l2_device_unregister_subdev() succeeds. Signed-off-by: Sylwester Nawrocki s.nawro...@samsung.com Signed-off-by: Kyungmin Park kyungmin.p...@samsung.com --- drivers/media/platform/s5p-fimc/fimc-mdevice.c | 33 1 file changed, 16 insertions(+), 17 deletions(-) diff --git a/drivers/media/platform/s5p-fimc/fimc-mdevice.c b/drivers/media/platform/s5p-fimc/fimc-mdevice.c index 715b258..0ffde5b 100644 --- a/drivers/media/platform/s5p-fimc/fimc-mdevice.c +++ b/drivers/media/platform/s5p-fimc/fimc-mdevice.c @@ -345,25 +345,23 @@ static int fimc_register_callback(struct device *dev, void *p) struct fimc_dev *fimc = dev_get_drvdata(dev); struct v4l2_subdev *sd = fimc-vid_cap.subdev; struct fimc_md *fmd = p; - int ret = 0; - - if (!fimc || !fimc-pdev) - return 0; + int ret; - if (fimc-pdev-id 0 || fimc-pdev-id = FIMC_MAX_DEVS) + if (fimc == NULL || fimc-id = FIMC_MAX_DEVS) return 0; - fimc-pipeline_ops = fimc_pipeline_ops; - fmd-fimc[fimc-pdev-id] = fimc; sd-grp_id = FIMC_GROUP_ID; ret = v4l2_device_register_subdev(fmd-v4l2_dev, sd); if (ret) { v4l2_err(fmd-v4l2_dev, Failed to register FIMC.%d (%d)\n, fimc-id, ret); + return ret; } - return ret; + fimc-pipeline_ops = fimc_pipeline_ops; + fmd-fimc[fimc-id] = fimc; + return 0; } static int fimc_lite_register_callback(struct device *dev, void *p) @@ -373,14 +371,9 @@ static int fimc_lite_register_callback(struct device *dev, void *p) struct fimc_md *fmd = p; int ret; - if (fimc == NULL) + if (fimc == NULL || fimc-index = FIMC_LITE_MAX_DEVS) return 0; - if (fimc-index = FIMC_LITE_MAX_DEVS) - return 0; - - fimc-pipeline_ops = fimc_pipeline_ops; - fmd-fimc_lite[fimc-index] = fimc; sd-grp_id = FLITE_GROUP_ID; ret = v4l2_device_register_subdev(fmd-v4l2_dev, sd); @@ -388,8 +381,12 @@ static int fimc_lite_register_callback(struct device *dev, void *p) v4l2_err(fmd-v4l2_dev, Failed to register FIMC-LITE.%d (%d)\n, fimc-index, ret); + return ret; } - return ret; + + fimc-pipeline_ops = fimc_pipeline_ops; + fmd-fimc_lite[fimc-index] = fimc; + return 0; } static int csis_register_callback(struct device *dev, void *p) @@ -407,10 +404,12 @@ static int csis_register_callback(struct device *dev, void *p) v4l2_info(sd, csis%d sd: %s\n, pdev-id, sd-name); id = pdev-id 0 ? 0 : pdev-id; - fmd-csis[id].sd = sd; sd-grp_id = CSIS_GROUP_ID; + ret = v4l2_device_register_subdev(fmd-v4l2_dev, sd); - if (ret) + if (!ret) + fmd-csis[id].sd = sd; + else v4l2_err(fmd-v4l2_dev, Failed to register CSIS subdevice: %d\n, ret); return ret; -- 1.7.9.5 -- 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] ARM: clk-imx27: Add missing clock for mx2-camera
Hi Sascha, On Thu, Oct 25, 2012 at 11:46 AM, Mauro Carvalho Chehab mche...@redhat.com wrote: As this patch is for arch/arm, I'm understanding that it will be merged via arm tree. So, Acked-by: Mauro Carvalho Chehab mche...@redhat.com Forgot to comment: as patch 2 relies on this change, the better, IMHO, is to send both via the same tree. If you decide to do so, please get arm maintainer's ack, instead, and we can merge both via my tree. Can you please send your Ack to this series so that Mauro can merge it via his tree? Thanks, Fabio Estevam -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] pvr2: fix minor storage
From: Alan Cox a...@linux.intel.com This should have break statements in it. Signed-off-by: Alan Cox a...@linux.intel.com --- drivers/media/usb/pvrusb2/pvrusb2-hdw.c |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/media/usb/pvrusb2/pvrusb2-hdw.c b/drivers/media/usb/pvrusb2/pvrusb2-hdw.c index fb828ba..299751a 100644 --- a/drivers/media/usb/pvrusb2/pvrusb2-hdw.c +++ b/drivers/media/usb/pvrusb2/pvrusb2-hdw.c @@ -3563,9 +3563,9 @@ void pvr2_hdw_v4l_store_minor_number(struct pvr2_hdw *hdw, enum pvr2_v4l_type index,int v) { switch (index) { - case pvr2_v4l_type_video: hdw-v4l_minor_number_video = v; - case pvr2_v4l_type_vbi: hdw-v4l_minor_number_vbi = v; - case pvr2_v4l_type_radio: hdw-v4l_minor_number_radio = v; + case pvr2_v4l_type_video: hdw-v4l_minor_number_video = v;break; + case pvr2_v4l_type_vbi: hdw-v4l_minor_number_vbi = v;break; + case pvr2_v4l_type_radio: hdw-v4l_minor_number_radio = v;break; default: break; } } -- 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] v4l2: sn9c102 incorrectly blocks FMT_SN9C10X
From: Alan Cox a...@linux.intel.com Missing break Signed-off-by: Alan Cox a...@linux.intel.com --- drivers/media/usb/sn9c102/sn9c102_core.c |2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/media/usb/sn9c102/sn9c102_core.c b/drivers/media/usb/sn9c102/sn9c102_core.c index 5bfc8e2..7360586 100644 --- a/drivers/media/usb/sn9c102/sn9c102_core.c +++ b/drivers/media/usb/sn9c102/sn9c102_core.c @@ -2481,11 +2481,13 @@ sn9c102_vidioc_enum_framesizes(struct sn9c102_device* cam, void __user * arg) if (frmsize.pixel_format != V4L2_PIX_FMT_SN9C10X frmsize.pixel_format != V4L2_PIX_FMT_SBGGR8) return -EINVAL; + break; case BRIDGE_SN9C105: case BRIDGE_SN9C120: if (frmsize.pixel_format != V4L2_PIX_FMT_JPEG frmsize.pixel_format != V4L2_PIX_FMT_SBGGR8) return -EINVAL; + break; } frmsize.type = V4L2_FRMSIZE_TYPE_STEPWISE; -- 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 v3] media: davinci: vpbe: fix build warning
From: Lad, Prabhakar prabhakar@ti.com Warnings were generated because of the following commit changed data type for address pointer 195bbca ARM: 7500/1: io: avoid writeback addressing modes for __raw_ accessors add __iomem annotation to fix following warnings drivers/media/platform/davinci/vpbe_osd.c: In function ‘osd_read’: drivers/media/platform/davinci/vpbe_osd.c:49:2: warning: passing argument 1 of ‘__raw_readl’ makes pointer from integer without a cast [enabled by default] arch/arm/include/asm/io.h:104:19: note: expected ‘const volatile void *’ but argument is of type ‘long unsigned int’ This patch stores the ioremap_nocache() returned address in a void __iomem * instead of a unsigned long and passes the same to readl/writel functions which fixes the above warnings. Signed-off-by: Lad, Prabhakar prabhakar@ti.com Signed-off-by: Manjunath Hadli manjunath.ha...@ti.com Acked-by: Laurent Pinchart laurent.pinch...@ideasonboard.com --- Changes for v3: 1: Elaborated the commit message as pointed by Laurent. Changes for v2: 1: Made the base addr to void __iomem * instead of long unsigned, as pointed by Laurent. drivers/media/platform/davinci/vpbe_osd.c |9 - include/media/davinci/vpbe_osd.h |2 +- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/drivers/media/platform/davinci/vpbe_osd.c b/drivers/media/platform/davinci/vpbe_osd.c index bba299d..707f243 100644 --- a/drivers/media/platform/davinci/vpbe_osd.c +++ b/drivers/media/platform/davinci/vpbe_osd.c @@ -62,7 +62,7 @@ static inline u32 osd_set(struct osd_state *sd, u32 mask, u32 offset) { struct osd_state *osd = sd; - u32 addr = osd-osd_base + offset; + void __iomem *addr = osd-osd_base + offset; u32 val = readl(addr) | mask; writel(val, addr); @@ -74,7 +74,7 @@ static inline u32 osd_clear(struct osd_state *sd, u32 mask, u32 offset) { struct osd_state *osd = sd; - u32 addr = osd-osd_base + offset; + void __iomem *addr = osd-osd_base + offset; u32 val = readl(addr) ~mask; writel(val, addr); @@ -87,7 +87,7 @@ static inline u32 osd_modify(struct osd_state *sd, u32 mask, u32 val, { struct osd_state *osd = sd; - u32 addr = osd-osd_base + offset; + void __iomem *addr = osd-osd_base + offset; u32 new_val = (readl(addr) ~mask) | (val mask); writel(new_val, addr); @@ -1559,8 +1559,7 @@ static int osd_probe(struct platform_device *pdev) ret = -ENODEV; goto free_mem; } - osd-osd_base = (unsigned long)ioremap_nocache(res-start, - osd-osd_size); + osd-osd_base = ioremap_nocache(res-start, osd-osd_size); if (!osd-osd_base) { dev_err(osd-dev, Unable to map the OSD region\n); ret = -ENODEV; diff --git a/include/media/davinci/vpbe_osd.h b/include/media/davinci/vpbe_osd.h index d7e397a..5ab0d8d 100644 --- a/include/media/davinci/vpbe_osd.h +++ b/include/media/davinci/vpbe_osd.h @@ -357,7 +357,7 @@ struct osd_state { spinlock_t lock; struct device *dev; dma_addr_t osd_base_phys; - unsigned long osd_base; + void __iomem *osd_base; unsigned long osd_size; /* 1--the isr will toggle the VID0 ping-pong buffer */ int pingpong; -- 1.7.4.1 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] Rotate the videout via V4L2_CID_ROTATE based on fb_var_screeninfo.rotate
Hi Laurent You are very fast on implementing new features in omap3-isp-live. I appreciate much the new panning-feature - thank you! On my beagleboard I use omap-vout with vrfb-rotation. As I already configured omapfb to rotate the screen upon start (kernel-argument omapfb.rotate), I thought it might be useful to rotate omap-vout accordingly in your application. This is what the following patch does. The patch is a diff against your latest commit 619164a994c8d878249d6c1b8b16c27074a04209. I hope it is useful. Greetings, Florian diff -rupN '--exclude=.git' omap3-isp-live/live.c omap3-isp-live-voisee/live.c --- omap3-isp-live/live.c 2012-10-24 18:14:58.830555741 +0200 +++ omap3-isp-live-voisee/live.c2012-10-24 22:28:49.278056954 +0200 @@ -661,7 +674,36 @@ struct color_rgb24 { unsigned int value:24; } __attribute__((__packed__)); -static int fb_init(struct v4l2_rect *rect) +/* + * Convert DSS rotation to V4L2 rotation + * V4L2 understand 0, 90, 180, 270 degrees. + */ +static int dss_rot_to_v4l2_rot(int dss_rotation, +int *v4l2_rotation) +{ +int ret = 0; + +switch (dss_rotation) { +case 1: +*v4l2_rotation = 90; +break; +case 2: +*v4l2_rotation = 180; +break; +case 3: +*v4l2_rotation = 270; +break; +case 0: +*v4l2_rotation = 0; +break; +default: +ret = -EINVAL; +break; +} +return ret; +} + +static int fb_init(struct v4l2_rect *rect, int *rotation) { struct color_24bpp ; @@ -745,6 +787,8 @@ static int fb_init(struct v4l2_rect *rec rect-width = var.xres; rect-height = var.yres; + /* Return the rotation (if any) in degrees */ + dss_rot_to_v4l2_rot(var.rotate, rotation); done: if (mem != NULL) munmap(mem, fix.smem_len); @@ -812,6 +858,7 @@ int main(int argc __attribute__((__unuse unsigned int colorkey; bool enable_aewb = true; float fps; + int rotation; int ret; int c; @@ -851,10 +898,10 @@ int main(int argc __attribute__((__unuse } events_init(events); input_init(input); memset(rect, 0, sizeof rect); - ret = fb_init(rect); + ret = fb_init(rect, rotation); if (ret 0) { printf(error: unable to initialize frame buffer\n); goto cleanup; @@ -879,7 +929,7 @@ int main(int argc __attribute__((__unuse format.pixelformat = V4L2_PIX_FMT_YUYV; format.width = rect.width; format.height = rect.height; - vo = vo_init(vo_devname, vo_ops, buffers, format); + vo = vo_init(vo_devname, vo_ops, buffers, format, rotation); if (vo == NULL) { printf(error: unable to initialize video output\n); goto cleanup; diff -rupN '--exclude=.git' omap3-isp-live/snapshot.c omap3-isp-live-voisee/snapshot.c --- omap3-isp-live/snapshot.c 2012-10-24 18:14:58.830555741 +0200 +++ omap3-isp-live-voisee/snapshot.c2012-10-24 22:28:49.274057063 +0200 @@ -45,6 +45,7 @@ #if USE_LIBJPEG #include jpeglib.h #include setjmp.h +#include jpeg.h #endif #include isp/list.h @@ -55,7 +56,6 @@ #include events.h #include iq.h -#include jpeg.h #define MEDIA_DEVICE /dev/media0 diff -rupN '--exclude=.git' omap3-isp-live/videoout.c omap3-isp-live-voisee/videoout.c --- omap3-isp-live/videoout.c 2012-09-28 14:43:53.978198906 +0200 +++ omap3-isp-live-voisee/videoout.c2012-10-24 22:28:49.278056954 +0200 @@ -54,7 +54,8 @@ struct videoout struct videoout *vo_init(const char *devname, const struct video_out_operations *ops, unsigned int buffers, -struct v4l2_pix_format *format) +struct v4l2_pix_format *format, +int rotation) { struct v4l2_pix_format pixfmt; struct v4l2_format fmt; @@ -76,6 +77,14 @@ struct videoout *vo_init(const char *dev goto error; } + /* setup the rotation here, we have to do it BEFORE +* setting the format. */ + ret = v4l2_set_control(vo-dev, V4L2_CID_ROTATE, rotation); + if (ret 0){ + perror(Failed to setup rotation\n); + goto error; + } + pixfmt.pixelformat = format-pixelformat; pixfmt.width = format-width; pixfmt.height = format-height; diff -rupN '--exclude=.git' omap3-isp-live/videoout.h omap3-isp-live-voisee/videoout.h --- omap3-isp-live/videoout.h 2012-09-28 14:43:53.978198906 +0200 +++ omap3-isp-live-voisee/videoout.h2012-10-24 22:28:49.274057063 +0200 @@ -34,10 +34,13 @@ struct video_out_operations { void (*unwatch_fd)(int fd); }; +int vo_set_rotation(struct videoout *vo, int rotation); +
Re: [PATCH 1/2] ARM: clk-imx27: Add missing clock for mx2-camera
On Fri, Oct 05, 2012 at 06:53:01PM -0300, Fabio Estevam wrote: During the clock conversion for mx27 the per4_gate clock was missed to get registered as a dependency of mx2-camera driver. In the old mx27 clock driver we used to have: DEFINE_CLOCK1(csi_clk, 0, NULL, 0, parent, csi_clk1, per4_clk); ,so does the same in the new clock driver. Signed-off-by: Fabio Estevam fabio.este...@freescale.com I'm fine with merging this through the media tree. Acked-by: Sascha Hauer s.ha...@pengutronix.de Sascha --- arch/arm/mach-imx/clk-imx27.c |1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/mach-imx/clk-imx27.c b/arch/arm/mach-imx/clk-imx27.c index 3b6b640..5ef0f08 100644 --- a/arch/arm/mach-imx/clk-imx27.c +++ b/arch/arm/mach-imx/clk-imx27.c @@ -224,6 +224,7 @@ int __init mx27_clocks_init(unsigned long fref) clk_register_clkdev(clk[lcdc_ipg_gate], ipg, imx-fb.0); clk_register_clkdev(clk[lcdc_ahb_gate], ahb, imx-fb.0); clk_register_clkdev(clk[csi_ahb_gate], ahb, mx2-camera.0); + clk_register_clkdev(clk[per4_gate], per, mx2-camera.0); clk_register_clkdev(clk[usb_div], per, fsl-usb2-udc); clk_register_clkdev(clk[usb_ipg_gate], ipg, fsl-usb2-udc); clk_register_clkdev(clk[usb_ahb_gate], ahb, fsl-usb2-udc); -- 1.7.9.5 -- Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0| Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917- | -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v3 0/4] ov7670: migrate this sensor and its users to ctrl framework.
Hi Javier, Em Thu, 25 Oct 2012 15:27:08 +0200 javier Martin javier.mar...@vista-silicon.com escreveu: Hi Mauro, Jon, any more issues related with this series? Patch doesn't apply anymore: patching file drivers/media/i2c/ov7670.c Hunk #2 succeeded at 191 (offset -32 lines). Hunk #3 succeeded at 220 (offset -35 lines). Hunk #4 succeeded at 1062 (offset -153 lines). Hunk #5 succeeded at 1091 (offset -153 lines). Hunk #6 succeeded at 1127 (offset -153 lines). Hunk #7 succeeded at 1147 (offset -153 lines). Hunk #8 succeeded at 1195 (offset -153 lines). Hunk #9 succeeded at 1211 (offset -153 lines). Hunk #10 succeeded at 1237 (offset -153 lines). Hunk #11 succeeded at 1255 (offset -153 lines). Hunk #12 succeeded at 1351 (offset -153 lines). Hunk #13 FAILED at 1605. Hunk #14 FAILED at 1616. Hunk #15 succeeded at 1434 (offset -189 lines). 2 out of 15 hunks FAILED -- rejects in file drivers/media/i2c/ov7670.c Could you please rebase it? I tried to force its merge, but it seemed that the conflicts are not that trivial, so I prefer if you could do it and test if everything still applies. Regards, Mauro -- 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
[PATCH] [media] drxk_hard: fix a few warnings
drivers/media/dvb-frontends/drxk_hard.c:68:6: warning: no previous prototype for 'IsA1WithPatchCode' [-Wmissing-prototypes] drivers/media/dvb-frontends/drxk_hard.c:73:6: warning: no previous prototype for 'IsA1WithRomCode' [-Wmissing-prototypes] drivers/media/dvb-frontends/drxk_hard.c:192:12: warning: no previous prototype for 'Frac28a' [-Wmissing-prototypes] drivers/media/dvb-frontends/drxk_hard.c:590:5: warning: no previous prototype for 'PowerUpDevice' [-Wmissing-prototypes] Signed-off-by: Mauro Carvalho Chehab mche...@redhat.com --- drivers/media/dvb-frontends/drxk_hard.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/media/dvb-frontends/drxk_hard.c b/drivers/media/dvb-frontends/drxk_hard.c index 894b6eca..fb23496 100644 --- a/drivers/media/dvb-frontends/drxk_hard.c +++ b/drivers/media/dvb-frontends/drxk_hard.c @@ -65,12 +65,12 @@ static bool IsQAM(struct drxk_state *state) state-m_OperationMode == OM_QAM_ITU_C; } -bool IsA1WithPatchCode(struct drxk_state *state) +static bool IsA1WithPatchCode(struct drxk_state *state) { return state-m_DRXK_A1_PATCH_CODE; } -bool IsA1WithRomCode(struct drxk_state *state) +static bool IsA1WithRomCode(struct drxk_state *state) { return state-m_DRXK_A1_ROM_CODE; } @@ -189,7 +189,7 @@ static inline u32 MulDiv32(u32 a, u32 b, u32 c) return (u32) tmp64; } -inline u32 Frac28a(u32 a, u32 c) +static inline u32 Frac28a(u32 a, u32 c) { int i = 0; u32 Q1 = 0; @@ -587,7 +587,7 @@ static int write_block(struct drxk_state *state, u32 Address, #define DRXK_MAX_RETRIES_POWERUP 20 #endif -int PowerUpDevice(struct drxk_state *state) +static int PowerUpDevice(struct drxk_state *state) { int status; u8 data = 0; -- 1.7.11.7 -- 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
[GIT PULL FOR 3.7] Samsung media drivers fixes
Hi Mauro, please pull following fixes for v3.7-rc. The following changes since commit 1fdead8ad31d3aa833bc37739273fcde89ace93c: [media] m5mols: Add missing #include linux/sizes.h (2012-10-10 08:17:16 -0300) are available in the git repository at: git://git.infradead.org/users/kmpark/linux-samsung v4l_fixes_for_v3.7 for you to fetch changes up to df79eb9e19331685e509d62112972b3c35569f0b: s5p-fimc: Fix potential NULL pointer dereference (2012-10-25 16:08:12 +0200) Jesper Juhl (1): s5p-tv: don't include linux/version.h in mixer_video.c Sachin Kamat (5): s5p-mfc: Fix compilation warning exynos-gsc: Fix compilation warning s5p-mfc: Make 'clk_ref' static in s5p_mfc_pm.c s5p-fimc: Make 'fimc_pipeline_s_stream' function static s5p-fimc: Fix potential NULL pointer dereference Shaik Ameer Basha (3): exynos-gsc: change driver compatible string exynos-gsc: fix variable type in gsc_m2m_device_run() s5p-fimc: fix variable type in fimc_device_run() Sylwester Nawrocki (4): s5p-fimc: Don't ignore return value of vb2_queue_init() s5p-csis: Select S5P_SETUP_MIPIPHY s5p-fimc: Add missing new line character s5p-fimc: Fix platform entities registration drivers/media/platform/exynos-gsc/gsc-core.c |8 +++-- drivers/media/platform/exynos-gsc/gsc-m2m.c|2 +- drivers/media/platform/s5p-fimc/Kconfig|1 + drivers/media/platform/s5p-fimc/fimc-capture.c |4 ++- drivers/media/platform/s5p-fimc/fimc-lite.c|4 ++- drivers/media/platform/s5p-fimc/fimc-m2m.c |2 +- drivers/media/platform/s5p-fimc/fimc-mdevice.c | 45 drivers/media/platform/s5p-mfc/s5p_mfc_enc.c |2 +- drivers/media/platform/s5p-mfc/s5p_mfc_pm.c|2 +- drivers/media/platform/s5p-tv/mixer_video.c|1 - 10 files changed, 38 insertions(+), 33 deletions(-) Thanks, Sylwester -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v2 0/5] media: ov7670: driver cleanup and support for ov7674.
Em Thu, 25 Oct 2012 15:24:49 +0200 javier Martin javier.mar...@vista-silicon.com escreveu: Hi Mauro, do you have any problems with this series? It didn't apply here, maybe due to its dependency from your previous ov7670 (v3) series. From my side, feel free to rebase them and re-submit. Regards, Mauro -- 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: [GIT PULL FOR 3.7] Samsung media drivers fixes
Em Thu, 25 Oct 2012 18:01:17 +0200 Sylwester Nawrocki s.nawro...@samsung.com escreveu: Hi Mauro, please pull following fixes for v3.7-rc. The following changes since commit 1fdead8ad31d3aa833bc37739273fcde89ace93c: [media] m5mols: Add missing #include linux/sizes.h (2012-10-10 08:17:16 -0300) are available in the git repository at: git://git.infradead.org/users/kmpark/linux-samsung v4l_fixes_for_v3.7 for you to fetch changes up to df79eb9e19331685e509d62112972b3c35569f0b: s5p-fimc: Fix potential NULL pointer dereference (2012-10-25 16:08:12 +0200) Jesper Juhl (1): s5p-tv: don't include linux/version.h in mixer_video.c Sachin Kamat (5): s5p-mfc: Fix compilation warning exynos-gsc: Fix compilation warning s5p-mfc: Make 'clk_ref' static in s5p_mfc_pm.c s5p-fimc: Make 'fimc_pipeline_s_stream' function static s5p-fimc: Fix potential NULL pointer dereference Shaik Ameer Basha (3): exynos-gsc: change driver compatible string exynos-gsc: fix variable type in gsc_m2m_device_run() s5p-fimc: fix variable type in fimc_device_run() Sylwester Nawrocki (4): s5p-fimc: Don't ignore return value of vb2_queue_init() s5p-csis: Select S5P_SETUP_MIPIPHY s5p-fimc: Add missing new line character s5p-fimc: Fix platform entities registration Only a few of the above seems to be material for -rc: s5p-fimc: Fix potential NULL pointer dereference (59 seconds ago) s5p-fimc: Fix platform entities registration (60 seconds ago) s5p-csis: Select S5P_SETUP_MIPIPHY (60 seconds ago) s5p-fimc: Don't ignore return value of vb2_queue_init() (61 seconds ago) The other ones are warnings/sparse warnings and cleanups. I'll be applying only the 4 above patches for 3.7, adding the other ones for 3.8. 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 3/6] ARM: OMAP2+: Move plat/iovmm.h to include/linux/omap-iommu.h
* Laurent Pinchart laurent.pinch...@ideasonboard.com [121025 01:39]: I still think you should split this in two files, omap-iommu.h and omap- iovmm.h. The later would just be arch/arm/plat-omap/include/plat/iovmm.h moved to include/linux.h. Can you please explain a bit more why you're thinking a separate omap-iovmm.h is needed in addtion to omap-iommu.h? My reasoning for not adding it is that neither intel nor amd needs more than intel-iommu.h and amd-iommu.h. And hopefully the iommu framework will eventually provide the API needed. And I'd rather not be the person introducing this second new file into include/linux :) Joerg and Ohad, do you have any opinions on this? Regards, Tony -- 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: [media-workshop] Tentative Agenda for the November workshop
Hi Hans, Em Mon, 22 Oct 2012 10:35:56 +0200 Hans Verkuil hverk...@xs4all.nl escreveu: Hi all, This is the tentative agenda for the media workshop on November 8, 2012. If you have additional things that you want to discuss, or something is wrong or incomplete in this list, please let me know so I can update the list. Thank you for taking care of it. - Explain current merging process (Mauro) - Open floor for discussions on how to improve it (Mauro) - Write down minimum requirements for new V4L2 (and DVB?) drivers, both for staging and mainline acceptance: which frameworks to use, v4l2-compliance, etc. (Hans Verkuil) - V4L2 ambiguities (Hans Verkuil) - TSMux device (a mux rather than a demux): Alain Volmat - dmabuf status, esp. with regards to being able to test (Mauro/Samsung) - Device tree support (Guennadi, not known yet whether this topic is needed) - Creating/selecting contexts for hardware that supports this (Samsung, only if time is available) I have an extra theme for discussions there: what should we do with the drivers that don't have any MAINTAINERS entry. It probably makes sense to mark them as Orphan (or, at least, have some criteria to mark them as such). Perhaps before doing that, we could try to see if are there any developer at the community with time and patience to handle them. This could of course be handled as part of the discussions about how to improve the merge process, but I suspect that this could generate enough discussions to be handled as a separate theme. There are some issues by not having a MAINTAINERS entry: - patches may not flow into the driver maintainer; - patches will likely be applied without tests/reviews or may stay for a long time queued; - ./scripts/get_maintainer.pl at --no-git-fallback won't return any maintainer[1]. [1] Letting get_maintainer.pl is very time/CPU consuming. Letting it would delay a lot the patch review process, if applied for every patch, with unreliable and doubtful results. I don't do it, due to the large volume of patches, and because the 'other' results aren't typically the driver maintainer. An example of this is the results for a patch I just applied (changeset 2866aed103b915ca8ba0ff76d5790caea4e62ced): $ git show --pretty=email|./scripts/get_maintainer.pl Mauro Carvalho Chehab mche...@infradead.org (maintainer:MEDIA INPUT INFRA...,commit_signer:7/7=100%) Hans Verkuil hans.verk...@cisco.com (commit_signer:4/7=57%) Anatolij Gustschin ag...@denx.de (commit_signer:1/7=14%) Wei Yongjun yongjun_...@trendmicro.com.cn (commit_signer:1/7=14%) Hans de Goede hdego...@redhat.com (commit_signer:1/7=14%) linux-media@vger.kernel.org (open list:MEDIA INPUT INFRA...) linux-ker...@vger.kernel.org (open list) According with this driver's copyrights: * Copyright 2008-2010 Freescale Semiconductor, Inc. All Rights Reserved. * * Freescale VIU video driver * * Authors: Hongjun Chen hong-jun.c...@freescale.com * Porting to 2.6.35 by DENX Software Engineering, * Anatolij Gustschin ag...@denx.de The driver author (Hongjun Chen hong-jun.c...@freescale.com) was not even shown there, and the co-author got only 15% hit, while I got 100% and Hans got 57%. This happens not only to this driver. In a matter of fact, on most cases where no MAINTAINERS entry exist, the driver's author gets a very small hit chance, as, on several of those drivers, the author doesn't post anything else but the initial patch series. 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: [GIT PULL FOR 3.7] Samsung media drivers fixes
On 10/25/2012 06:46 PM, Mauro Carvalho Chehab wrote: Em Thu, 25 Oct 2012 18:01:17 +0200 Sylwester Nawrockis.nawro...@samsung.com escreveu: Hi Mauro, please pull following fixes for v3.7-rc. The following changes since commit 1fdead8ad31d3aa833bc37739273fcde89ace93c: [media] m5mols: Add missing #includelinux/sizes.h (2012-10-10 08:17:16 -0300) are available in the git repository at: git://git.infradead.org/users/kmpark/linux-samsung v4l_fixes_for_v3.7 for you to fetch changes up to df79eb9e19331685e509d62112972b3c35569f0b: s5p-fimc: Fix potential NULL pointer dereference (2012-10-25 16:08:12 +0200) Jesper Juhl (1): s5p-tv: don't include linux/version.h in mixer_video.c Sachin Kamat (5): s5p-mfc: Fix compilation warning exynos-gsc: Fix compilation warning s5p-mfc: Make 'clk_ref' static in s5p_mfc_pm.c s5p-fimc: Make 'fimc_pipeline_s_stream' function static s5p-fimc: Fix potential NULL pointer dereference Shaik Ameer Basha (3): exynos-gsc: change driver compatible string exynos-gsc: fix variable type in gsc_m2m_device_run() s5p-fimc: fix variable type in fimc_device_run() Sylwester Nawrocki (4): s5p-fimc: Don't ignore return value of vb2_queue_init() s5p-csis: Select S5P_SETUP_MIPIPHY s5p-fimc: Add missing new line character s5p-fimc: Fix platform entities registration Only a few of the above seems to be material for -rc: s5p-fimc: Fix potential NULL pointer dereference (59 seconds ago) s5p-fimc: Fix platform entities registration (60 seconds ago) s5p-csis: Select S5P_SETUP_MIPIPHY (60 seconds ago) s5p-fimc: Don't ignore return value of vb2_queue_init() (61 seconds ago) The other ones are warnings/sparse warnings and cleanups. I'll be applying only the 4 above patches for 3.7, adding the other ones for 3.8. Sorry for mixing them up. Except those 4, exynos-gsc: change driver compatible string really needs to go in 3.7. Bootloaders will be supplying an FDT node for this device with compatible string samsung,exynos5-gsc, not samsung,exynos5250-gsc. In case this patch is applied only starting from 3.8, kernels 3.7, where the GScaler driver was first added, will have broken support for this device. Hence this patch should be considered as a real bug fix. For those embedded systems it might not be a big deal, since it rarely happens pure mainline kernel is used for production. But in principle it's better to apply that patch, to avoid mess where different kernels require different compatible string. This would mean an ABI breakage. -- Thanks, Sylwester -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] MAINTAINERS: update email and git tree
While mche...@infradead.org is valid, I prefer to use just one email for all patches upstream, instead of receiving some things on one emails, and others on some other place. While here, also update the main linux-media development tree, as the one at kernel.org is used mainly for patch merging and it is generally delayed. Signed-off-by: Mauro Carvalho Chehab mche...@redhat.com --- MAINTAINERS | 44 ++-- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/MAINTAINERS b/MAINTAINERS index e73060f..2bf8543 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -1724,10 +1724,10 @@ F: Documentation/filesystems/btrfs.txt F: fs/btrfs/ BTTV VIDEO4LINUX DRIVER -M: Mauro Carvalho Chehab mche...@infradead.org +M: Mauro Carvalho Chehab mche...@redhat.com L: linux-media@vger.kernel.org W: http://linuxtv.org -T: git git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media.git +T: git git://linuxtv.org/media_tree.git S: Maintained F: Documentation/video4linux/bttv/ F: drivers/media/pci/bt8xx/bttv* @@ -1757,7 +1757,7 @@ F:fs/cachefiles/ CAFE CMOS INTEGRATED CAMERA CONTROLLER DRIVER M: Jonathan Corbet cor...@lwn.net L: linux-media@vger.kernel.org -T: git git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media.git +T: git git://linuxtv.org/media_tree.git S: Maintained F: Documentation/video4linux/cafe_ccic F: drivers/media/platform/marvell-ccic/ @@ -2144,7 +2144,7 @@ CX18 VIDEO4LINUX DRIVER M: Andy Walls awa...@md.metrocast.net L: ivtv-de...@ivtvdriver.org (moderated for non-subscribers) L: linux-media@vger.kernel.org -T: git git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media.git +T: git git://linuxtv.org/media_tree.git W: http://linuxtv.org W: http://www.ivtvdriver.org/index.php/Cx18 S: Maintained @@ -3318,56 +3318,56 @@ F: drivers/net/ethernet/aeroflex/ GSPCA FINEPIX SUBDRIVER M: Frank Zago fr...@zago.net L: linux-media@vger.kernel.org -T: git git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media.git +T: git git://linuxtv.org/media_tree.git S: Maintained F: drivers/media/usb/gspca/finepix.c GSPCA GL860 SUBDRIVER M: Olivier Lorin o.lo...@laposte.net L: linux-media@vger.kernel.org -T: git git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media.git +T: git git://linuxtv.org/media_tree.git S: Maintained F: drivers/media/usb/gspca/gl860/ GSPCA M5602 SUBDRIVER M: Erik Andren erik.and...@gmail.com L: linux-media@vger.kernel.org -T: git git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media.git +T: git git://linuxtv.org/media_tree.git S: Maintained F: drivers/media/usb/gspca/m5602/ GSPCA PAC207 SONIXB SUBDRIVER M: Hans de Goede hdego...@redhat.com L: linux-media@vger.kernel.org -T: git git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media.git +T: git git://linuxtv.org/media_tree.git S: Maintained F: drivers/media/usb/gspca/pac207.c GSPCA SN9C20X SUBDRIVER M: Brian Johnson brij...@gmail.com L: linux-media@vger.kernel.org -T: git git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media.git +T: git git://linuxtv.org/media_tree.git S: Maintained F: drivers/media/usb/gspca/sn9c20x.c GSPCA T613 SUBDRIVER M: Leandro Costantino lcostant...@gmail.com L: linux-media@vger.kernel.org -T: git git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media.git +T: git git://linuxtv.org/media_tree.git S: Maintained F: drivers/media/usb/gspca/t613.c GSPCA USB WEBCAM DRIVER M: Hans de Goede hdego...@redhat.com L: linux-media@vger.kernel.org -T: git git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media.git +T: git git://linuxtv.org/media_tree.git S: Maintained F: drivers/media/usb/gspca/ STK1160 USB VIDEO CAPTURE DRIVER M: Ezequiel Garcia elezegar...@gmail.com L: linux-media@vger.kernel.org -T: git git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media.git +T: git git://linuxtv.org/media_tree.git S: Maintained F: drivers/media/usb/stk1160/ @@ -4095,7 +4095,7 @@ IVTV VIDEO4LINUX DRIVER M: Andy Walls awa...@md.metrocast.net L: ivtv-de...@ivtvdriver.org (moderated for non-subscribers) L: linux-media@vger.kernel.org -T: git git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media.git +T: git git://linuxtv.org/media_tree.git W: http://www.ivtvdriver.org S: Maintained F: Documentation/video4linux/*.ivtv @@ -4728,12 +4728,12 @@ F: Documentation/hwmon/max6650 F: drivers/hwmon/max6650.c MEDIA INPUT INFRASTRUCTURE (V4L/DVB) -M: Mauro Carvalho Chehab mche...@infradead.org +M: Mauro Carvalho Chehab mche...@redhat.com P: LinuxTV.org
Pinnacle PCTV pcmcia through yenta pci brighe
Hi, I have a Pinnacle PCTV (310c) board that I was trying to make work on a Quad core PC tower with Ubuntu 12.04 kernel 3.0.0-26 Unfortunately there is a kernel panic and the computer resets has soon as the card is plugged in the yenta pcmcia to pci adapter. Even after reset, the kernel raises a kernel panic. May I ask is some one tried this pcmcia board with this kernel. I would love to give more information but I was not able to capture the console traces from the kernel after the reset. Hop I can find 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
Re: [PATCH v3 2/6] Add the main bulk of core driver for SI476x code
On Tue, Oct 23, 2012 at 11:44:28AM -0700, Andrey Smirnov wrote: + core-regmap = devm_regmap_init_si476x(core); + if (IS_ERR(core-regmap)) { This really makes little sense to me, why are you doing this? Does the device *really* layer a byte stream on top of I2C for sending messages that look like marshalled register reads and writes? signature.asc Description: Digital signature
cron job: media_tree daily build: WARNINGS
This message is generated daily by a cron job that builds media_tree for the kernels and architectures in the list below. Results of the daily build of media_tree: date:Thu Oct 25 19:00:22 CEST 2012 git hash:542fb082b9c76af8e71e9ea286d2dafdfba27099 gcc version: i686-linux-gcc (GCC) 4.7.1 host hardware:x86_64 host os: 3.4.07-marune linux-git-arm-eabi-davinci: WARNINGS linux-git-arm-eabi-exynos: WARNINGS linux-git-arm-eabi-omap: WARNINGS linux-git-i686: WARNINGS linux-git-m32r: WARNINGS linux-git-mips: WARNINGS linux-git-powerpc64: OK linux-git-sh: WARNINGS linux-git-x86_64: WARNINGS linux-2.6.31.12-i686: WARNINGS linux-2.6.32.6-i686: WARNINGS linux-2.6.33-i686: WARNINGS linux-2.6.34-i686: WARNINGS linux-2.6.35.3-i686: WARNINGS linux-2.6.36-i686: WARNINGS linux-2.6.37-i686: WARNINGS linux-2.6.38.2-i686: WARNINGS linux-2.6.39.1-i686: WARNINGS linux-3.0-i686: WARNINGS linux-3.1-i686: WARNINGS linux-3.2.1-i686: WARNINGS linux-3.3-i686: WARNINGS linux-3.4-i686: WARNINGS linux-3.5-i686: WARNINGS linux-3.6-i686: WARNINGS linux-3.7-rc1-i686: WARNINGS linux-2.6.31.12-x86_64: WARNINGS linux-2.6.32.6-x86_64: WARNINGS linux-2.6.33-x86_64: WARNINGS linux-2.6.34-x86_64: WARNINGS linux-2.6.35.3-x86_64: WARNINGS linux-2.6.36-x86_64: WARNINGS linux-2.6.37-x86_64: WARNINGS linux-2.6.38.2-x86_64: WARNINGS linux-2.6.39.1-x86_64: WARNINGS linux-3.0-x86_64: WARNINGS linux-3.1-x86_64: WARNINGS linux-3.2.1-x86_64: WARNINGS linux-3.3-x86_64: WARNINGS linux-3.4-x86_64: WARNINGS linux-3.5-x86_64: WARNINGS linux-3.6-x86_64: WARNINGS linux-3.7-rc1-x86_64: WARNINGS apps: WARNINGS spec-git: WARNINGS sparse: ERRORS Detailed results are available here: http://www.xs4all.nl/~hverkuil/logs/Thursday.log Full logs are available here: http://www.xs4all.nl/~hverkuil/logs/Thursday.tar.bz2 The V4L-DVB specification from this daily build is here: http://www.xs4all.nl/~hverkuil/spec/media.html -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 3/6] ARM: OMAP2+: Move plat/iovmm.h to include/linux/omap-iommu.h
Hi Tony, On Thursday 25 October 2012 09:56:44 Tony Lindgren wrote: * Laurent Pinchart laurent.pinch...@ideasonboard.com [121025 01:39]: I still think you should split this in two files, omap-iommu.h and omap- iovmm.h. The later would just be arch/arm/plat-omap/include/plat/iovmm.h moved to include/linux.h. Can you please explain a bit more why you're thinking a separate omap-iovmm.h is needed in addtion to omap-iommu.h? The IOVMM API is layered top of the IOMMU API. It's really a separate API, so two header files make sense. This patch creates a hybrid omap-iommu.h header with mixed definitions, it just doesn't feel right :-) I won't insist for a split though, if you think it's better to have a single header we can keep it that way. My reasoning for not adding it is that neither intel nor amd needs more than intel-iommu.h and amd-iommu.h. And hopefully the iommu framework will eventually provide the API needed. And I'd rather not be the person introducing this second new file into include/linux :) Joerg and Ohad, do you have any opinions on this? -- Regards, Laurent Pinchart -- 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] omap3isp: Remove unneeded module memory address definitions
The OMAP3ISP_*_REG_OFFSET, OMAP3ISP_*_REG_BASE and OMAP3ISP_*_REG macros are not needed. Remove them. The only expection is the OMAP3ISP_HIST_REG_BASE address. Replace it with the memory address received through platform resources. Signed-off-by: Laurent Pinchart laurent.pinch...@ideasonboard.com Acked-by: Sakari Ailus sakari.ai...@iki.fi --- drivers/media/platform/omap3isp/isphist.c |8 ++- drivers/media/platform/omap3isp/ispreg.h | 77 - 2 files changed, 6 insertions(+), 79 deletions(-) Changes since v1: - Fix a crash in hist_dma_config() caused by the unset hist-isp field. diff --git a/drivers/media/platform/omap3isp/isphist.c b/drivers/media/platform/omap3isp/isphist.c index d1a8dee..74326ff 100644 --- a/drivers/media/platform/omap3isp/isphist.c +++ b/drivers/media/platform/omap3isp/isphist.c @@ -72,11 +72,14 @@ static void hist_reset_mem(struct ispstat *hist) static void hist_dma_config(struct ispstat *hist) { + struct isp_device *isp = hist-isp; + hist-dma_config.data_type = OMAP_DMA_DATA_TYPE_S32; hist-dma_config.sync_mode = OMAP_DMA_SYNC_ELEMENT; hist-dma_config.frame_count = 1; hist-dma_config.src_amode = OMAP_DMA_AMODE_CONSTANT; - hist-dma_config.src_start = OMAP3ISP_HIST_REG_BASE + ISPHIST_DATA; + hist-dma_config.src_start = isp-mmio_base_phys[OMAP3_ISP_IOMEM_HIST] + + ISPHIST_DATA; hist-dma_config.dst_amode = OMAP_DMA_AMODE_POST_INC; hist-dma_config.src_or_dst_synch = OMAP_DMA_SRC_SYNC; } @@ -477,6 +480,8 @@ int omap3isp_hist_init(struct isp_device *isp) return -ENOMEM; memset(hist, 0, sizeof(*hist)); + hist-isp = isp; + if (HIST_CONFIG_DMA) ret = omap_request_dma(OMAP24XX_DMA_NO_DEVICE, DMA_ISP_HIST, hist_dma_cb, hist, hist-dma_ch); @@ -494,7 +499,6 @@ int omap3isp_hist_init(struct isp_device *isp) hist-ops = hist_ops; hist-priv = hist_cfg; hist-event_type = V4L2_EVENT_OMAP3ISP_HIST; - hist-isp = isp; ret = omap3isp_stat_init(hist, histogram, hist_subdev_ops); if (ret) { diff --git a/drivers/media/platform/omap3isp/ispreg.h b/drivers/media/platform/omap3isp/ispreg.h index e2c57f3..fd13d8b 100644 --- a/drivers/media/platform/omap3isp/ispreg.h +++ b/drivers/media/platform/omap3isp/ispreg.h @@ -29,83 +29,6 @@ #define CM_CAM_MCLK_HZ 17280 /* Hz */ -/* ISP Submodules offset */ - -#define L4_34XX_BASE 0x4800 -#define OMAP3430_ISP_BASE (L4_34XX_BASE + 0xBC000) - -#define OMAP3ISP_REG_BASE OMAP3430_ISP_BASE -#define OMAP3ISP_REG(offset) (OMAP3ISP_REG_BASE + (offset)) - -#define OMAP3ISP_CCP2_REG_OFFSET 0x0400 -#define OMAP3ISP_CCP2_REG_BASE (OMAP3ISP_REG_BASE +\ -OMAP3ISP_CCP2_REG_OFFSET) -#define OMAP3ISP_CCP2_REG(offset) (OMAP3ISP_CCP2_REG_BASE + (offset)) - -#define OMAP3ISP_CCDC_REG_OFFSET 0x0600 -#define OMAP3ISP_CCDC_REG_BASE (OMAP3ISP_REG_BASE +\ -OMAP3ISP_CCDC_REG_OFFSET) -#define OMAP3ISP_CCDC_REG(offset) (OMAP3ISP_CCDC_REG_BASE + (offset)) - -#define OMAP3ISP_HIST_REG_OFFSET 0x0A00 -#define OMAP3ISP_HIST_REG_BASE (OMAP3ISP_REG_BASE +\ -OMAP3ISP_HIST_REG_OFFSET) -#define OMAP3ISP_HIST_REG(offset) (OMAP3ISP_HIST_REG_BASE + (offset)) - -#define OMAP3ISP_H3A_REG_OFFSET0x0C00 -#define OMAP3ISP_H3A_REG_BASE (OMAP3ISP_REG_BASE +\ -OMAP3ISP_H3A_REG_OFFSET) -#define OMAP3ISP_H3A_REG(offset) (OMAP3ISP_H3A_REG_BASE + (offset)) - -#define OMAP3ISP_PREV_REG_OFFSET 0x0E00 -#define OMAP3ISP_PREV_REG_BASE (OMAP3ISP_REG_BASE +\ -OMAP3ISP_PREV_REG_OFFSET) -#define OMAP3ISP_PREV_REG(offset) (OMAP3ISP_PREV_REG_BASE + (offset)) - -#define OMAP3ISP_RESZ_REG_OFFSET 0x1000 -#define OMAP3ISP_RESZ_REG_BASE (OMAP3ISP_REG_BASE +\ -OMAP3ISP_RESZ_REG_OFFSET) -#define OMAP3ISP_RESZ_REG(offset) (OMAP3ISP_RESZ_REG_BASE + (offset)) - -#define OMAP3ISP_SBL_REG_OFFSET0x1200 -#define OMAP3ISP_SBL_REG_BASE (OMAP3ISP_REG_BASE +\ -OMAP3ISP_SBL_REG_OFFSET) -#define OMAP3ISP_SBL_REG(offset) (OMAP3ISP_SBL_REG_BASE + (offset)) - -#define OMAP3ISP_CSI2A_REGS1_REG_OFFSET0x1800 -#define OMAP3ISP_CSI2A_REGS1_REG_BASE (OMAP3ISP_REG_BASE +\ -OMAP3ISP_CSI2A_REGS1_REG_OFFSET) -#define OMAP3ISP_CSI2A_REGS1_REG(offset) \ -
Re: [Linaro-mm-sig] [PATCH] dma-buf: Use EXPORT_SYMBOL
Unlikely as most of the code I've written belongs to Intel or Red Hat. I also have better things to do with life than sue Nvidia and start an all out copyright and patent war in Linuxspace. I forgot to ask, but after your petty G+ trolling, if most of the code belings to Intel or Red Hat, why do we need to listen to *your* lawyers advice? It seems like you aren't a major rights holder but a troll. Dave. -- 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] omap3isp: Prepare/unprepare clocks before/after enable/disable
Clock enable (disable) is split in two operations, prepare and enable (disable and unprepare). Perform both when enabling/disabling the ISP clocks. Signed-off-by: Laurent Pinchart laurent.pinch...@ideasonboard.com --- drivers/media/platform/omap3isp/isp.c | 25 + 1 files changed, 13 insertions(+), 12 deletions(-) diff --git a/drivers/media/platform/omap3isp/isp.c b/drivers/media/platform/omap3isp/isp.c index e8e724e..7da622e 100644 --- a/drivers/media/platform/omap3isp/isp.c +++ b/drivers/media/platform/omap3isp/isp.c @@ -1332,7 +1332,8 @@ void omap3isp_subclk_disable(struct isp_device *isp, * isp_enable_clocks - Enable ISP clocks * @isp: OMAP3 ISP device * - * Return 0 if successful, or clk_enable return value if any of tthem fails. + * Return 0 if successful, or clk_prepare_enable return value if any of them + * fails. */ static int isp_enable_clocks(struct isp_device *isp) { @@ -1354,9 +1355,9 @@ static int isp_enable_clocks(struct isp_device *isp) else divisor = 2; - r = clk_enable(isp-clock[ISP_CLK_CAM_ICK]); + r = clk_prepare_enable(isp-clock[ISP_CLK_CAM_ICK]); if (r) { - dev_err(isp-dev, clk_enable cam_ick failed\n); + dev_err(isp-dev, failed to enable cam_ick clock\n); goto out_clk_enable_ick; } r = clk_set_rate(isp-clock[ISP_CLK_DPLL4_M5_CK], @@ -1365,9 +1366,9 @@ static int isp_enable_clocks(struct isp_device *isp) dev_err(isp-dev, clk_set_rate for dpll4_m5_ck failed\n); goto out_clk_enable_mclk; } - r = clk_enable(isp-clock[ISP_CLK_CAM_MCLK]); + r = clk_prepare_enable(isp-clock[ISP_CLK_CAM_MCLK]); if (r) { - dev_err(isp-dev, clk_enable cam_mclk failed\n); + dev_err(isp-dev, failed to enable cam_mclk clock\n); goto out_clk_enable_mclk; } rate = clk_get_rate(isp-clock[ISP_CLK_CAM_MCLK]); @@ -1375,17 +1376,17 @@ static int isp_enable_clocks(struct isp_device *isp) dev_warn(isp-dev, unexpected cam_mclk rate:\n expected : %d\n actual : %ld\n, CM_CAM_MCLK_HZ, rate); - r = clk_enable(isp-clock[ISP_CLK_CSI2_FCK]); + r = clk_prepare_enable(isp-clock[ISP_CLK_CSI2_FCK]); if (r) { - dev_err(isp-dev, clk_enable csi2_fck failed\n); + dev_err(isp-dev, failed to enable csi2_fck clock\n); goto out_clk_enable_csi2_fclk; } return 0; out_clk_enable_csi2_fclk: - clk_disable(isp-clock[ISP_CLK_CAM_MCLK]); + clk_disable_unprepare(isp-clock[ISP_CLK_CAM_MCLK]); out_clk_enable_mclk: - clk_disable(isp-clock[ISP_CLK_CAM_ICK]); + clk_disable_unprepare(isp-clock[ISP_CLK_CAM_ICK]); out_clk_enable_ick: return r; } @@ -1396,9 +1397,9 @@ out_clk_enable_ick: */ static void isp_disable_clocks(struct isp_device *isp) { - clk_disable(isp-clock[ISP_CLK_CAM_ICK]); - clk_disable(isp-clock[ISP_CLK_CAM_MCLK]); - clk_disable(isp-clock[ISP_CLK_CSI2_FCK]); + clk_disable_unprepare(isp-clock[ISP_CLK_CAM_ICK]); + clk_disable_unprepare(isp-clock[ISP_CLK_CAM_MCLK]); + clk_disable_unprepare(isp-clock[ISP_CLK_CSI2_FCK]); } static const char *isp_clocks[] = { -- 1.7.8.6 -- 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] omap3isp: video: Merge two pipeline search operations at streamon time
The current code first iterates over entities with external connectivity to locate the external source, and then walks the pipeline to verify its connectivity. Merge both search operations. This has the side effect of removing the bogus can't find source, failing now warning message printed when using memory-to-memory pipelines that include the preview engine and/or resizer only. Signed-off-by: Laurent Pinchart laurent.pinch...@ideasonboard.com --- drivers/media/platform/omap3isp/ispvideo.c | 179 --- 1 files changed, 80 insertions(+), 99 deletions(-) diff --git a/drivers/media/platform/omap3isp/ispvideo.c b/drivers/media/platform/omap3isp/ispvideo.c index 249ef71..81c0832 100644 --- a/drivers/media/platform/omap3isp/ispvideo.c +++ b/drivers/media/platform/omap3isp/ispvideo.c @@ -280,39 +280,90 @@ static int isp_video_get_graph_data(struct isp_video *video, return 0; } +static int isp_video_check_external_subdevs(struct isp_pipeline *pipe, + struct media_pad *external) +{ + struct isp_device *isp = pipe-output-isp; + struct v4l2_subdev_format fmt; + struct v4l2_ext_controls ctrls; + struct v4l2_ext_control ctrl; + int ret; + + pipe-external = media_entity_to_v4l2_subdev(external-entity); + + fmt.pad = external-index; + fmt.which = V4L2_SUBDEV_FORMAT_ACTIVE; + ret = v4l2_subdev_call(media_entity_to_v4l2_subdev(external-entity), + pad, get_fmt, NULL, fmt); + if (unlikely(ret 0)) { + dev_warn(isp-dev, get_fmt returned null!\n); + return ret; + } + + pipe-external_width = + omap3isp_video_format_info(fmt.format.code)-width; + + memset(ctrls, 0, sizeof(ctrls)); + memset(ctrl, 0, sizeof(ctrl)); + + ctrl.id = V4L2_CID_PIXEL_RATE; + + ctrls.count = 1; + ctrls.controls = ctrl; + + ret = v4l2_g_ext_ctrls(pipe-external-ctrl_handler, ctrls); + if (ret 0) { + dev_warn(isp-dev, no pixel rate control in subdev %s\n, +pipe-external-name); + return ret; + } + + pipe-external_rate = ctrl.value64; + + return 0; +} + /* - * Validate a pipeline by checking both ends of all links for format - * discrepancies. + * Validate the pipeline connectivity and retrieve external subdev information. * * Compute the minimum time per frame value as the maximum of time per frame * limits reported by every block in the pipeline. * - * Return 0 if all formats match, or -EPIPE if at least one link is found with - * different formats on its two ends or if the pipeline doesn't start with a - * video source (either a subdev with no input pad, or a non-subdev entity). + * Return 0 if the pipeline is valid, or one of the following error codes + * otherwise: + * + * -EPIPE if the pipeline doesn't start with a video source (either a subdev + * with no input pad, or a non-subdev entity) + * + * -ENOSPC if the external pixel rate exceeds the pipeline pixel rate limit + * + * Other error codes can be returned if the external subdev fails to return its + * output format or pixel rate. */ static int isp_video_validate_pipeline(struct isp_pipeline *pipe) { struct isp_device *isp = pipe-output-isp; + struct media_pad *external = NULL; struct media_pad *pad; struct v4l2_subdev *subdev; + int ret; subdev = isp_video_remote_subdev(pipe-output, NULL); if (subdev == NULL) return -EPIPE; while (1) { - /* Retrieve the sink format */ + /* All ISP entities have their sink pad numbered 0. */ pad = subdev-entity.pads[0]; if (!(pad-flags MEDIA_PAD_FL_SINK)) break; - /* Update the maximum frame rate */ + /* Update the maximum frame rate. */ if (subdev == isp-isp_res.subdev) omap3isp_resizer_max_rate(isp-isp_res, pipe-max_rate); - /* Retrieve the source format. Return an error if no source + /* Find the connected source. Return an error if no source * entity can be found, and stop checking the pipeline if the * source entity isn't a subdev. */ @@ -324,6 +375,27 @@ static int isp_video_validate_pipeline(struct isp_pipeline *pipe) break; subdev = media_entity_to_v4l2_subdev(pad-entity); + + /* Store the first external pad. */ + if (external == NULL subdev-grp_id != (1 16)) + external = pad; + } + + if (external == NULL) + return 0; + + ret = isp_video_check_external_subdevs(pipe, external); + if (ret 0) + return ret; + +
Re: [PATCH 3/6] ARM: OMAP2+: Move plat/iovmm.h to include/linux/omap-iommu.h
* Laurent Pinchart laurent.pinch...@ideasonboard.com [121025 13:23]: Hi Tony, On Thursday 25 October 2012 09:56:44 Tony Lindgren wrote: * Laurent Pinchart laurent.pinch...@ideasonboard.com [121025 01:39]: I still think you should split this in two files, omap-iommu.h and omap- iovmm.h. The later would just be arch/arm/plat-omap/include/plat/iovmm.h moved to include/linux.h. Can you please explain a bit more why you're thinking a separate omap-iovmm.h is needed in addtion to omap-iommu.h? The IOVMM API is layered top of the IOMMU API. It's really a separate API, so two header files make sense. This patch creates a hybrid omap-iommu.h header with mixed definitions, it just doesn't feel right :-) I won't insist for a split though, if you think it's better to have a single header we can keep it that way. Yes it's true it's a separate layer. But it's still iommu specific. The functions exported by omap-iovmm.c have iommu_ prefix in the name except for one: drivers/iommu/omap-iovmm.c:EXPORT_SYMBOL_GPL(omap_find_iovm_area); drivers/iommu/omap-iovmm.c:EXPORT_SYMBOL_GPL(omap_da_to_va); drivers/iommu/omap-iovmm.c:EXPORT_SYMBOL_GPL(omap_iommu_vmap); drivers/iommu/omap-iovmm.c:EXPORT_SYMBOL_GPL(omap_iommu_vunmap); drivers/iommu/omap-iovmm.c:EXPORT_SYMBOL_GPL(omap_iommu_vmalloc); drivers/iommu/omap-iovmm.c:EXPORT_SYMBOL_GPL(omap_iommu_vfree); So it should be OK to keep it all in omap-iommu.h file. Let's see hear what.. My reasoning for not adding it is that neither intel nor amd needs more than intel-iommu.h and amd-iommu.h. And hopefully the iommu framework will eventually provide the API needed. And I'd rather not be the person introducing this second new file into include/linux :) Joerg and Ohad, do you have any opinions on this? ..Joerg and Ohad say. Regards, Tony -- 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] omap3isp: Prepare/unprepare clocks before/after enable/disable
Hi Laurent, On Thu, Oct 25, 2012 at 11:39:42PM +0200, Laurent Pinchart wrote: Clock enable (disable) is split in two operations, prepare and enable (disable and unprepare). Perform both when enabling/disabling the ISP clocks. Signed-off-by: Laurent Pinchart laurent.pinch...@ideasonboard.com --- drivers/media/platform/omap3isp/isp.c | 25 + 1 files changed, 13 insertions(+), 12 deletions(-) Thanks for the patch! Acked-by: Sakari Ailus sakari.ai...@iki.fi -- Sakari Ailus e-mail: sakari.ai...@iki.fi XMPP: sai...@retiisi.org.uk -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v3 2/6] Add the main bulk of core driver for SI476x code
On 10/25/2012 12:45 PM, Mark Brown wrote: On Tue, Oct 23, 2012 at 11:44:28AM -0700, Andrey Smirnov wrote: +core-regmap = devm_regmap_init_si476x(core); +if (IS_ERR(core-regmap)) { This really makes little sense to me, why are you doing this? Does the device *really* layer a byte stream on top of I2C for sending messages that look like marshalled register reads and writes? The SI476x chips has a concept of a property. Each property having 16-bit address and 16-bit value. At least a portion of a chip configuration is done by modifying those properties. In order to manipulate those properties user is expected to issue what is called a command. For manipulating properties there are two commands: - SET_PROPERTY which is I2C write of 6 bytes of the following layout: | 0x13 | 0x00 | Address High Byte | Address Low Byte | Property Data High Byte | Property Data Low Byte | After the command is finished being executed the 1 byte read would contain the status byte followed by 1 byte read which contain status byte - GET_PROPERTY which is I2C write of 4 bytes of the following layout: | 0x13 | 0x00 | Address High Byte | Address Low Byte | After the command is finished being executed the 4 byte read would have the following layout: | Status Byte | Reserved Byte | Property Value High Byte | Property Value Low Byte | The chip does not operate continuously in the AM/FM frequency range, instead the user is expected to power-down/power-up the chip in a certain mode which in my case can be either AM or FM tuner. There are two ways of doing that one is to send a power down command to the device, the second one is to toggle reset line of the chip. Both methods will reset the values of the aforementioned properties. Because V4L2 user-space interface presents a tuner as the one continuously operating in the whole AM/FM range it is necessary for me to do those AM/FM switches transparently when handling tuning or seeking requests from the user. That means that I need to cache the values of the properties I care about in the driver and restore them when user switches to the mode(for example when AM-FM-AM transition happens) The other quirk of that chip is that some properties are only accessible in certain modes(for example it is impossible to configure RDS interrupt sources, which is FM specific, in AM mode), but some of the controls I expose to user-land change the values of the properties and since AM/FM switches happen transparently to the user in the situation when FM specific property is changed while tuner is in AM mode, the driver has to cache the value and write it when the switch to FM would take place. Also due to the way the driver uses the chip it is only powered up when the corresponding file in devfs(e.g. /dev/radio0) is opened at least by one user which means that unless there is a user who opened the file all the SET/GET_PROPERTY commands sent to it will be lost. The codec driver for that chip does not have any say in the power management policy(while all the audio configuration is done via properties) if the chip is not powered up the driver has to cache the configuration values it has so that they can be applied later. So, since I have to implement a caching functionality in the driver, in order to avoid reinventing the wheel I opted for using 'regmap' API for this. Of course, It is possible that I misunderstood the purpose and capabilities of the 'regmap' framework, which would make my code look very silly indeed. If that is the case I'll just re-implement it using some sort of ad-hoc version of caching. -- 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: add temporary clock helpers
Hello, On Sunday 21 October 2012 20:52:21 Sylwester Nawrocki wrote: On 10/20/2012 12:20 AM, Guennadi Liakhovetski wrote: Typical video devices like camera sensors require an external clock source. Many such devices cannot even access their hardware registers without a running clock. These clock sources should be controlled by their consumers. This should be performed, using the generic clock framework. Unfortunately so far only very few systems have been ported to that framework. This patch adds a set of temporary helpers, mimicking the generic clock API, to V4L2. Platforms, adopting the clock API, should switch to using it. Eventually this temporary API should be removed. So I gave this patch a try this weekend. I would have a few comments/ questions. Thank you for sharing this! I've finally found time to give it a try, and I can report successful results. My development target here is a Beagleboard-xM with an MT9P031 sensor. With this patch and Sylwester's additional patches [1], I've been able to remove the board code callback from the mt9p031 driver platform data, as well as the last omap3-isp platform callback. The result is available in the devel/v4l2-clock branch of http://git.linuxtv.org/pinchartl/media.git. Sylwester, that branch includes a minor fix titled v4l2-clk: Fix clock id matching for your v4l2-clk: Rework to accept more than one clock with null clock id patch. Could you please have a look at it ? On the downside, there's now a circular dependency between the mt9p031 and omap3-isp drivers, so neither of them can be removed. That will need to be fixed. [1] http://git.linuxtv.org/snawrocki/media.git/shortlog/refs/heads/s3c-camif- devel -- Regards, Laurent Pinchart -- 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] pvr2: fix minor storage
Completely agree! Thanks for spotting that one. Signed-off-by: Mike Isely is...@pobox.com -Mike On Thu, 25 Oct 2012, Alan Cox wrote: From: Alan Cox a...@linux.intel.com This should have break statements in it. Signed-off-by: Alan Cox a...@linux.intel.com --- drivers/media/usb/pvrusb2/pvrusb2-hdw.c |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/media/usb/pvrusb2/pvrusb2-hdw.c b/drivers/media/usb/pvrusb2/pvrusb2-hdw.c index fb828ba..299751a 100644 --- a/drivers/media/usb/pvrusb2/pvrusb2-hdw.c +++ b/drivers/media/usb/pvrusb2/pvrusb2-hdw.c @@ -3563,9 +3563,9 @@ void pvr2_hdw_v4l_store_minor_number(struct pvr2_hdw *hdw, enum pvr2_v4l_type index,int v) { switch (index) { - case pvr2_v4l_type_video: hdw-v4l_minor_number_video = v; - case pvr2_v4l_type_vbi: hdw-v4l_minor_number_vbi = v; - case pvr2_v4l_type_radio: hdw-v4l_minor_number_radio = v; + case pvr2_v4l_type_video: hdw-v4l_minor_number_video = v;break; + case pvr2_v4l_type_vbi: hdw-v4l_minor_number_vbi = v;break; + case pvr2_v4l_type_radio: hdw-v4l_minor_number_radio = v;break; default: break; } } -- 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 -- Mike Isely isely @ isely (dot) net PGP: 03 54 43 4D 75 E5 CC 92 71 16 01 E2 B5 F5 C1 E8 -- 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/6] ARM: OMAP2+: Move plat/iovmm.h to include/linux/omap-iommu.h
On Thu, Oct 25, 2012 at 11:39 PM, Tony Lindgren t...@atomide.com wrote: Joerg and Ohad, do you have any opinions on this? I agree that there's some merit in having a separate header file for IOVMM, since it's a different layer from the IOMMU API. But in reality it's tightly coupled with OMAP's IOMMU, and ideally it really should go away and be replaced with the DMA API. For this reason, and for the fact that anyway there's only a single user for it (omap3isp) and there will never be any more, maybe we shouldn't pollute include/linux anymore. Anyone volunteering to remove IOVMM and adapt omap3isp to the DMA API instead ? ;) Thanks, Ohad. -- 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