Re: [PATCH v7] V4L2: soc_camera: Renesas R-Car VIN driver
Hi Sergei On Fri, 28 Jun 2013, Sergei Shtylyov wrote: Hello. On 06/28/2013 03:58 AM, Vladimir Barinov wrote: From: Vladimir Barinov vladimir.bari...@cogentembedded.com Add Renesas R-Car VIN (Video In) V4L2 driver. Based on the patch by Phil Edworthy phil.edwor...@renesas.com. Signed-off-by: Vladimir Barinov vladimir.bari...@cogentembedded.com [Sergei: removed deprecated IRQF_DISABLED flag, reordered/renamed 'enum chip_id' values, reordered rcar_vin_id_table[] entries, removed senseless parens from to_buf_list() macro, used ALIGN() macro in rcar_vin_setup(), added {} to the *if* statement and used 'bool' values instead of 0/1 where necessary, removed unused macros, done some reformatting and clarified some comments.] Signed-off-by: Sergei Shtylyov sergei.shtyl...@cogentembedded.com Reviewing this iteration of the patch is still on my todo, in the meantime you might verify whether it works on top of the for-3.11-3 branch of my http://git.linuxtv.org/gliakhovetski/v4l-dvb.git git-tree, or next after it's been pulled by Mauro and pushed upstream. With that branch you shouldn't need any additional patches andy more. Actually we need to apply/merge more patches here that enables VIN support on separate platform (like pinctrl/clock/setup/) :) Despite of above the rcar_vin driver works fine on Marzen board in v4l-dvb.git after adding soc_camera_host_ops clock_start/clock_stop. Guennadi, does that mean that we should rebase the driver to the branch that you've named now? IIUC, your last couple of versions were already developed on top of v4l2-clk + v4l2-asybc + soc_scale_crop patches, right? But those patches were out of tree, and thus unstable. Whereas now they've hit Mauro's tree at git.linuxtv.org and are about to be pulled into next. So, you don't need anymore to apply any external patches, you will be able to just develop on top of next. I presume, this should make your work easier, not harder. Just please make sure to double-check your stack on top of next to make sure it still works. And let's try to get your driver ready for 3.12. Thanks Guennadi --- Guennadi Liakhovetski, Ph.D. Freelance Open-Source Software Developer http://www.open-technology.de/ -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v7] V4L2: soc_camera: Renesas R-Car VIN driver
Hi Guennadi, Guennadi Liakhovetski wrote: Hi Sergei On Fri, 28 Jun 2013, Sergei Shtylyov wrote: Hello. On 06/28/2013 03:58 AM, Vladimir Barinov wrote: From: Vladimir Barinov vladimir.bari...@cogentembedded.com Add Renesas R-Car VIN (Video In) V4L2 driver. Based on the patch by Phil Edworthy phil.edwor...@renesas.com. Signed-off-by: Vladimir Barinov vladimir.bari...@cogentembedded.com [Sergei: removed deprecated IRQF_DISABLED flag, reordered/renamed 'enum chip_id' values, reordered rcar_vin_id_table[] entries, removed senseless parens from to_buf_list() macro, used ALIGN() macro in rcar_vin_setup(), added {} to the *if* statement and used 'bool' values instead of 0/1 where necessary, removed unused macros, done some reformatting and clarified some comments.] Signed-off-by: Sergei Shtylyov sergei.shtyl...@cogentembedded.com Reviewing this iteration of the patch is still on my todo, in the meantime you might verify whether it works on top of the for-3.11-3 branch of my http://git.linuxtv.org/gliakhovetski/v4l-dvb.git git-tree, or next after it's been pulled by Mauro and pushed upstream. With that branch you shouldn't need any additional patches andy more. Actually we need to apply/merge more patches here that enables VIN support on separate platform (like pinctrl/clock/setup/) :) Despite of above the rcar_vin driver works fine on Marzen board in v4l-dvb.git after adding soc_camera_host_ops clock_start/clock_stop. Guennadi, does that mean that we should rebase the driver to the branch that you've named now? IIUC, your last couple of versions were already developed on top of v4l2-clk + v4l2-asybc + soc_scale_crop patches, right? But those patches were out of tree, and thus unstable. Whereas now they've hit Mauro's tree at git.linuxtv.org and are about to be pulled into next. So, you don't need anymore to apply any external patches, you will be able to just develop on top of next. I presume, this should make your work easier, Correct, I was meaning about clock/mux/setup patches against platform code (arch/arm/mash-shmobile) not harder. Just please make sure to double-check your stack on top of next to make sure it still works. And let's try to get your driver ready for 3.12. Ok Regards, Vladimir -- 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 v7] V4L2: soc_camera: Renesas R-Car VIN driver
Hello. On 29-06-2013 14:57, Guennadi Liakhovetski wrote: From: Vladimir Barinov vladimir.bari...@cogentembedded.com Add Renesas R-Car VIN (Video In) V4L2 driver. Based on the patch by Phil Edworthy phil.edwor...@renesas.com. Signed-off-by: Vladimir Barinov vladimir.bari...@cogentembedded.com [Sergei: removed deprecated IRQF_DISABLED flag, reordered/renamed 'enum chip_id' values, reordered rcar_vin_id_table[] entries, removed senseless parens from to_buf_list() macro, used ALIGN() macro in rcar_vin_setup(), added {} to the *if* statement and used 'bool' values instead of 0/1 where necessary, removed unused macros, done some reformatting and clarified some comments.] Signed-off-by: Sergei Shtylyov sergei.shtyl...@cogentembedded.com Reviewing this iteration of the patch is still on my todo, in the meantime you might verify whether it works on top of the for-3.11-3 branch of my http://git.linuxtv.org/gliakhovetski/v4l-dvb.git git-tree, or next after it's been pulled by Mauro and pushed upstream. With that branch you shouldn't need any additional patches andy more. Actually we need to apply/merge more patches here that enables VIN support on separate platform (like pinctrl/clock/setup/) :) Despite of above the rcar_vin driver works fine on Marzen board in v4l-dvb.git after adding soc_camera_host_ops clock_start/clock_stop. Guennadi, does that mean that we should rebase the driver to the branch that you've named now? IIUC, your last couple of versions were already developed on top of v4l2-clk + v4l2-asybc + soc_scale_crop patches, right? No, I think only atop of the latter one. But those patches were out of tree, and thus unstable. Whereas now they've hit Mauro's tree at git.linuxtv.org and are about to be pulled into next. So, you don't need anymore to apply any external patches, you will be able to just develop on top of next. I presume, this should make your work easier, not harder. Just please make sure to double-check your stack on top of next to make sure it still works. OK. And let's try to get your driver ready for 3.12. Sigh, another couple months probably mean nothing for the media tree, but it may be disastrous for Renesas' customers which use the LTSI tree... Thanks Guennadi WBR, Sergei -- 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 v7] V4L2: soc_camera: Renesas R-Car VIN driver
Hello. On 06/28/2013 03:58 AM, Vladimir Barinov wrote: From: Vladimir Barinov vladimir.bari...@cogentembedded.com Add Renesas R-Car VIN (Video In) V4L2 driver. Based on the patch by Phil Edworthy phil.edwor...@renesas.com. Signed-off-by: Vladimir Barinov vladimir.bari...@cogentembedded.com [Sergei: removed deprecated IRQF_DISABLED flag, reordered/renamed 'enum chip_id' values, reordered rcar_vin_id_table[] entries, removed senseless parens from to_buf_list() macro, used ALIGN() macro in rcar_vin_setup(), added {} to the *if* statement and used 'bool' values instead of 0/1 where necessary, removed unused macros, done some reformatting and clarified some comments.] Signed-off-by: Sergei Shtylyov sergei.shtyl...@cogentembedded.com Reviewing this iteration of the patch is still on my todo, in the meantime you might verify whether it works on top of the for-3.11-3 branch of my http://git.linuxtv.org/gliakhovetski/v4l-dvb.git git-tree, or next after it's been pulled by Mauro and pushed upstream. With that branch you shouldn't need any additional patches andy more. Actually we need to apply/merge more patches here that enables VIN support on separate platform (like pinctrl/clock/setup/) :) Despite of above the rcar_vin driver works fine on Marzen board in v4l-dvb.git after adding soc_camera_host_ops clock_start/clock_stop. Guennadi, does that mean that we should rebase the driver to the branch that you've named now? Regards, Vladimir WBR, Sergei -- 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 v7] V4L2: soc_camera: Renesas R-Car VIN driver
Hi Guennadi, Vladimir Barinov wrote: Hi Guennadi, Guennadi Liakhovetski wrote: Hi Sergei On Sat, 22 Jun 2013, Sergei Shtylyov wrote: From: Vladimir Barinov vladimir.bari...@cogentembedded.com Add Renesas R-Car VIN (Video In) V4L2 driver. Based on the patch by Phil Edworthy phil.edwor...@renesas.com. Signed-off-by: Vladimir Barinov vladimir.bari...@cogentembedded.com [Sergei: removed deprecated IRQF_DISABLED flag, reordered/renamed 'enum chip_id' values, reordered rcar_vin_id_table[] entries, removed senseless parens from to_buf_list() macro, used ALIGN() macro in rcar_vin_setup(), added {} to the *if* statement and used 'bool' values instead of 0/1 where necessary, removed unused macros, done some reformatting and clarified some comments.] Signed-off-by: Sergei Shtylyov sergei.shtyl...@cogentembedded.com Reviewing this iteration of the patch is still on my todo, in the meantime you might verify whether it works on top of the for-3.11-3 branch of my http://git.linuxtv.org/gliakhovetski/v4l-dvb.git git-tree, or next after it's been pulled by Mauro and pushed upstream. With that branch you shouldn't need any additional patches andy more. Actually we need to apply/merge more patches here that enables VIN support on separate platform (like pinctrl/clock/setup/) :) Despite of above the rcar_vin driver works fine on Marzen board in v4l-dvb.git after adding soc_camera_host_ops clock_start/clock_stop. A little clarification here. I have been adding empty clock_start/clock_stop callbacks to rcar_vin driver since for my setup rcar_vin + adv7180 the icd-clk is NULL. Regards, Vladimir -- 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 v7] V4L2: soc_camera: Renesas R-Car VIN driver
Hi Guennadi, Guennadi Liakhovetski wrote: Hi Sergei On Sat, 22 Jun 2013, Sergei Shtylyov wrote: From: Vladimir Barinov vladimir.bari...@cogentembedded.com Add Renesas R-Car VIN (Video In) V4L2 driver. Based on the patch by Phil Edworthy phil.edwor...@renesas.com. Signed-off-by: Vladimir Barinov vladimir.bari...@cogentembedded.com [Sergei: removed deprecated IRQF_DISABLED flag, reordered/renamed 'enum chip_id' values, reordered rcar_vin_id_table[] entries, removed senseless parens from to_buf_list() macro, used ALIGN() macro in rcar_vin_setup(), added {} to the *if* statement and used 'bool' values instead of 0/1 where necessary, removed unused macros, done some reformatting and clarified some comments.] Signed-off-by: Sergei Shtylyov sergei.shtyl...@cogentembedded.com Reviewing this iteration of the patch is still on my todo, in the meantime you might verify whether it works on top of the for-3.11-3 branch of my http://git.linuxtv.org/gliakhovetski/v4l-dvb.git git-tree, or next after it's been pulled by Mauro and pushed upstream. With that branch you shouldn't need any additional patches andy more. Actually we need to apply/merge more patches here that enables VIN support on separate platform (like pinctrl/clock/setup/) :) Despite of above the rcar_vin driver works fine on Marzen board in v4l-dvb.git after adding soc_camera_host_ops clock_start/clock_stop. Regards, Vladimir -- 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 v7] V4L2: soc_camera: Renesas R-Car VIN driver
Hi Sergei On Sat, 22 Jun 2013, Sergei Shtylyov wrote: From: Vladimir Barinov vladimir.bari...@cogentembedded.com Add Renesas R-Car VIN (Video In) V4L2 driver. Based on the patch by Phil Edworthy phil.edwor...@renesas.com. Signed-off-by: Vladimir Barinov vladimir.bari...@cogentembedded.com [Sergei: removed deprecated IRQF_DISABLED flag, reordered/renamed 'enum chip_id' values, reordered rcar_vin_id_table[] entries, removed senseless parens from to_buf_list() macro, used ALIGN() macro in rcar_vin_setup(), added {} to the *if* statement and used 'bool' values instead of 0/1 where necessary, removed unused macros, done some reformatting and clarified some comments.] Signed-off-by: Sergei Shtylyov sergei.shtyl...@cogentembedded.com Reviewing this iteration of the patch is still on my todo, in the meantime you might verify whether it works on top of the for-3.11-3 branch of my http://git.linuxtv.org/gliakhovetski/v4l-dvb.git git-tree, or next after it's been pulled by Mauro and pushed upstream. With that branch you shouldn't need any additional patches andy more. Thanks Guennadi --- Guennadi Liakhovetski, Ph.D. Freelance Open-Source Software Developer http://www.open-technology.de/ -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v7] V4L2: soc_camera: Renesas R-Car VIN driver
From: Vladimir Barinov vladimir.bari...@cogentembedded.com Add Renesas R-Car VIN (Video In) V4L2 driver. Based on the patch by Phil Edworthy phil.edwor...@renesas.com. Signed-off-by: Vladimir Barinov vladimir.bari...@cogentembedded.com [Sergei: removed deprecated IRQF_DISABLED flag, reordered/renamed 'enum chip_id' values, reordered rcar_vin_id_table[] entries, removed senseless parens from to_buf_list() macro, used ALIGN() macro in rcar_vin_setup(), added {} to the *if* statement and used 'bool' values instead of 0/1 where necessary, removed unused macros, done some reformatting and clarified some comments.] Signed-off-by: Sergei Shtylyov sergei.shtyl...@cogentembedded.com --- This patch is against the 'media_tree.git' repo. It requires two following patches from Guennadi Liakhovetski: https://patchwork.linuxtv.org/patch/18209/ https://patchwork.linuxtv.org/patch/18210/ Changes since version 6: - sorted #include's alphabetically once again; - BUG() on invalid format in rcar_vin_setup(); - used 'icd-sizeimage' instead of frame size calculation; - moved WARN_ON() into the *if* condition and removed setting 'vb' to NULL in rcar_vin_remove_device(); - fixed 'packing' and 'layout' field values for 'fourcc' V4L2_PIX_FMT_NV16 in rcar_vin_formats[]; - made result handling logic more accurate in case subdevice does not support cropping; - fixed scaling capability for pass-through pixel formats; - resolved reject in the Makefile, refreshed the patch. Changes since version 5: - handled subdevice's inability to support cropping; - set the field format depending on a video standard. Changes since version 4: - added select SOC_CAMERA_SCALE_CROP to Kconfig entry; - added #include soc_scale_crop.h, made use of the functions declared there instead of the analogous functions originally copied from the SH-Mobile CEU driver now that they have been placed in a module of their own, removing now unused private functions. Changes since version 3: - removed the driver's dependency on R-Car M1A/H1 SoCs from Kconfig; - made the driver aware of the differences between R-Car E1/M1/H1 SoCs by having different platform device IDs for different SoCs, introcduced 'enum chips_id' to be used as the 'driver_data' field of 'struct platform_device_id' and then copied to the 'chip' field of 'struct rcar_vin_priv'; - sorted #include's alphabetically, added a number of #includes media/v4l2-*; - removed the 'data_through' field of the 'struct rcar_vin_priv' and the pass- through logic from set_fmt() method; - simplified is_continuous_transfer(), used it where applicable; - removed senseless parens from to_buf_list() macro; - removed the 'code' field from the 'struct rcar_vin_cam'; - largely rewrote the queue_setup() method; - removed 'input_is_yuv' variable from rcar_vin_setup(), made 'progressive' and 'output_is_yuv' variables 'bool', and made setting VnDMR.EXRGB bit only happen on R-Car E1/H1 there; - made use of ALIGN() macro in rcar_vin_setup() and rcar_vin_set_rect(); - fixed missing {} on one branch of the *if* statement in several places, added {} to the *if* statement where necessary; - stopped saving/restoring flags when grabbing/dropping a spinlock in the buf_queue() and buf_cleanup() methods; - made 'dsize' variable calculation depend on R-Car E1 in rcar_vin_set_rect() - fix the continuous capturing to stop when there is no buffer to be set into the VnMBm registers in rcar_vin_irq(); - replaced BUG_ON() with WARN_ON() and *return* in the remove() method, also replaced pm_runtime_put_sync() with pm_runtime_put() there; - removed size_dst() and calc_scale() as the calls to calc_scale() were also removed from the set_fmt() method; - removed the VnMC register value check from capture_restore(); - removed 'cfg' variable initializers from set_bus_param() method and rcar_vin_try_bus_param(); - added bus width check to rcar_vin_try_bus_param(); - removed V4L2_PIX_FMT_YUYV format from rcar_vin_formats[], initialize 'layout' field of every element in this table; - changed dev_err() call and *return* -EINVAL to dev_warn() and *return* 0 in the get_formats() method, - added rcar_vin_packing_supported() and started handling pass-through mode in the get_formats() method; - constified the parameters of is_smaller() and is_inside(); - redid the scaling logic so that it can't scale RGB32 data on R-Car E1 in the set_fmt() method, also stopped assigning to 'cam-code' there; - started selecting the current format if soc_camera_xlate_by_fourcc() call failed in the try_fmt() method, also started letting 'soc-camera' calculate bytes-per-line and image size there; - removed pm_runtime_resume() call from the driver's probe() method - added setting of the 'timestamp_type' field to the init_videobuf2() method. Changes since version 2: - replaced Cyrillic characters in comments with the proper Latinic ones. Changes since the original posting: - added IRQF_SHARED flag in devm_request_irq() call (since