[PATCH 5/8] media: Add LE version of RGB LVDS formats

2018-04-19 Thread Jacopo Mondi
Some LVDS controller can output swapped versions of LVDS RGB formats. Define and document them in the list of supported media bus formats Signed-off-by: Jacopo Mondi --- Documentation/media/uapi/v4l/subdev-formats.rst | 174

[PATCH 7/8] drm: panel: Use _LE LVDS formats for data mirroring

2018-04-19 Thread Jacopo Mondi
As now both bridges and panels report supported image formats, use the newly introduced _LE version of LVDS media bus formats in place of the DRM_BUS_FLAG_DATA_ flags defined in drm_connector.h Signed-off-by: Jacopo Mondi --- drivers/gpu/drm/panel/panel-lvds.c | 21

[PATCH 4/8] arm64: dts: renesas: eagle: Add thc63 LVDS map

2018-04-19 Thread Jacopo Mondi
Add LVDS map mode description property to THC63LVD1024 LVDS decoder in R-Car V3M-Eagle board device tree. Signed-off-by: Jacopo Mondi --- arch/arm64/boot/dts/renesas/r8a77970-eagle.dts | 1 + 1 file changed, 1 insertion(+) diff --git

[PATCH 6/8] drm: rcar-du: rcar-lvds: Add bridge format support

2018-04-19 Thread Jacopo Mondi
With the introduction of static input image format enumeration in DRM bridges, add support to retrieve the format in rcar-lvds LVDS encoder from both panel or bridge, to set the desired LVDS mode. Do not rely on 'DRM_BUS_FLAG_DATA_LSB_TO_MSB' flag to mirror the LVDS format, as it is only defined

[PATCH 0/8] drm: bridge: Add support for static image formats

2018-04-19 Thread Jacopo Mondi
Hello DRM list, cc media-list for the mbus format extension cc renesas-soc and devicetree for Eagle DTS patch This series adds support for static image formats to DRM bridges, mimicking what display_info.bus_formats represents for DRM connectors. The main use case of this series is the R-Car

[PATCH 2/8] dt-bindings: display: bridge: thc63lvd1024: Add lvds map property

2018-04-19 Thread Jacopo Mondi
The THC63LVD1024 LVDS to RGB bridge supports two different input mapping modes, selectable by means of an external pin. Describe the LVDS mode map through a newly defined mandatory property in device tree bindings. Signed-off-by: Jacopo Mondi ---

[PATCH 3/8] drm: bridge: thc63lvd1024: Add support for LVDS mode map

2018-04-19 Thread Jacopo Mondi
The THC63LVD1024 LVDS to RGB bridge supports two different LVDS mapping modes, selectable by means of an external pin. Add support for configurable LVDS input mapping modes, using the newly introduced support for bridge input image formats. Signed-off-by: Jacopo Mondi

[PATCH 1/8] drm: bridge: Add support for static image formats

2018-04-19 Thread Jacopo Mondi
Add support for storing image format information in DRM bridges with associated helper function. This patch replicates for bridges what 'drm_display_info_set_bus_formats()' is for connectors. Signed-off-by: Jacopo Mondi --- drivers/gpu/drm/drm_bridge.c | 30

[PATCH 8/8] drm: connector: Remove DRM_BUS_FLAG_DATA_* flags

2018-04-19 Thread Jacopo Mondi
DRM_BUS_FLAG_DATA_* flags, defined in drm_connector.h header file are used to swap ordering of LVDS RGB format to accommodate DRM objects that need to handle LVDS components ordering. Now that the only 2 users of DRM_BUS_FLAG_DATA_* flags have been ported to use the newly introduced

Re: [PATCH v2 02/12] media: ov5640: Add light frequency control

2018-04-19 Thread Laurent Pinchart
Hi Maxime, Thank you for the patch. On Monday, 16 April 2018 15:36:51 EEST Maxime Ripard wrote: > From: Mylène Josserand > > Add the light frequency control to be able to set the frequency > to manual (50Hz or 60Hz) or auto. > > Signed-off-by: Mylène Josserand

Re: [RFCv11 PATCH 00/29] Request API

2018-04-19 Thread Paul Kocialkowski
Hi, On Wed, 2018-04-18 at 02:06 +, Alexandre Courbot wrote: > On Tue, Apr 17, 2018 at 8:41 PM Paul Kocialkowski < > paul.kocialkow...@bootlin.com> wrote: > On Tue, 2018-04-17 at 06:17 +, Alexandre Courbot wrote: > > > On Tue, Apr 17, 2018 at 3:12 PM Hans Verkuil > > >

Re: [PATCH 4/8] dma-buf: add peer2peer flag

2018-04-19 Thread Christoph Hellwig
On Mon, Apr 16, 2018 at 03:38:56PM +0200, Daniel Vetter wrote: > We've broken that assumption in i915 years ago. Not struct page backed > gpu memory is very real. > > Of course we'll never feed such a strange sg table to a driver which > doesn't understand it, but allowing sg_page == NULL works

[PATCH v10 1/2] dt-bindings: media: Add Cadence MIPI-CSI2 TX Device Tree bindings

2018-04-19 Thread Maxime Ripard
The Cadence MIPI-CSI2 TX controller is a CSI2 bridge that supports up to 4 video streams and can output on up to 4 CSI-2 lanes, depending on the hardware implementation. It can operate with an external D-PHY, an internal one or no D-PHY at all in some configurations. Acked-by: Rob Herring

Re: [PATCH 02/15] media: staging/imx7: add imx7 CSI subdev driver

2018-04-19 Thread Rui Miguel Silva
Hi, On Thu 19 Apr 2018 at 12:22, Dan Carpenter wrote: On Thu, Apr 19, 2018 at 11:17:59AM +0100, Rui Miguel Silva wrote: +static int imx7_csi_link_setup(struct media_entity *entity, + const struct media_pad *local, + const struct media_pad *remote, u32

Re: [PATCH 0/5] Remaining COMPILE_TEST and smatch cleanups

2018-04-19 Thread Mauro Carvalho Chehab
Em Wed, 18 Apr 2018 12:04:14 +0300 Sakari Ailus escreveu: > On Tue, Apr 17, 2018 at 06:20:10AM -0400, Mauro Carvalho Chehab wrote: > > There were several interactions at the COMPILE_TEST and smatch > > patch series. While I applied most of them, there are 5 patches that > >

Re: [PATCH v2 00/12] media: ov5640: Misc cleanup and improvements

2018-04-19 Thread Maxime Ripard
Hi Samuel, On Wed, Apr 18, 2018 at 04:39:06PM -0700, Samuel Bobrowicz wrote: > I applied your patches, and they are a big improvement for what I am > trying to do, but things still aren't working right on my platform. > > How confident are you that the MIPI mode will work with this version > of

Re: [PATCH 07/15] media: staging/imx: add 10 bit bayer support

2018-04-19 Thread Philipp Zabel
On Thu, 2018-04-19 at 11:18 +0100, Rui Miguel Silva wrote: > Some sensors can only output 10 bit bayer formats, like the OV2680. Add > support > for that in imx-media. > > Signed-off-by: Rui Miguel Silva > --- > drivers/staging/media/imx/imx-media-utils.c | 24

Re: [PATCH 01/15] media: staging/imx: add support to media dev for no IPU systems

2018-04-19 Thread Rui Miguel Silva
Hi Dan, Thanks for this and the other reviews. On Thu 19 Apr 2018 at 12:06, Dan Carpenter wrote: On Thu, Apr 19, 2018 at 11:17:58AM +0100, Rui Miguel Silva wrote: Some i.MX SoC do not have IPU, like the i.MX7, add to the the media device infrastructure support to be used in this type of

[PATCH 27/61] media: platform: s5p-mfc: simplify getting .drvdata

2018-04-19 Thread Wolfram Sang
We should get drvdata from struct device directly. Going via platform_device is an unneeded step back and forth. Signed-off-by: Wolfram Sang --- Build tested only. buildbot is happy. Please apply individually. drivers/media/platform/s5p-mfc/s5p_mfc.c | 6

Re: [PATCH 07/15] media: staging/imx: add 10 bit bayer support

2018-04-19 Thread Rui Miguel Silva
Hi Philip, Thanks for the review. On Thu 19 Apr 2018 at 13:38, Philipp Zabel wrote: On Thu, 2018-04-19 at 11:18 +0100, Rui Miguel Silva wrote: Some sensors can only output 10 bit bayer formats, like the OV2680. Add support for that in imx-media. Signed-off-by: Rui Miguel Silva

[PATCH 26/61] media: platform: exynos4-is: simplify getting .drvdata

2018-04-19 Thread Wolfram Sang
We should get drvdata from struct device directly. Going via platform_device is an unneeded step back and forth. Signed-off-by: Wolfram Sang --- Build tested only. buildbot is happy. Please apply individually. drivers/media/platform/exynos4-is/media-dev.c | 6

[PATCH 00/61] tree-wide: simplify getting .drvdata

2018-04-19 Thread Wolfram Sang
I got tired of fixing this in Renesas drivers manually, so I took the big hammer. Remove this cumbersome code pattern which got copy-pasted too much already: - struct platform_device *pdev = to_platform_device(dev); - struct ep93xx_keypad *keypad = platform_get_drvdata(pdev); +

[PATCH v10 2/2] v4l: cadence: Add Cadence MIPI-CSI2 TX driver

2018-04-19 Thread Maxime Ripard
The Cadence MIPI-CSI2 TX controller is an hardware block meant to be used as a bridge between pixel interfaces and a CSI-2 bus. It supports operating with an internal or external D-PHY, with up to 4 lanes, or without any D-PHY. The current code only supports the latter case. While the virtual

[PATCH v10 0/2] media: v4l: Add support for the Cadence MIPI-CSI2 TX controller

2018-04-19 Thread Maxime Ripard
Hi, Here is an attempt at supporting the MIPI-CSI2 TX block from Cadence. This IP block is able to receive 4 video streams and stream them over a MIPI-CSI2 link using up to 4 lanes. Those streams are basically the interfaces to controllers generating some video signals, like a camera or a

[PATCH 25/61] media: platform: am437x: simplify getting .drvdata

2018-04-19 Thread Wolfram Sang
We should get drvdata from struct device directly. Going via platform_device is an unneeded step back and forth. Signed-off-by: Wolfram Sang --- Build tested only. buildbot is happy. Please apply individually. drivers/media/platform/am437x/am437x-vpfe.c | 6

Re: [PATCH 05/15] media: staging/imx7: add MIPI CSI-2 receiver subdev for i.MX7

2018-04-19 Thread Rui Miguel Silva
Hi Dan, On Thu 19 Apr 2018 at 12:45, Dan Carpenter wrote: +static int mipi_csis_clk_get(struct csi_state *state) +{ + struct device *dev = >pdev->dev; + int ret = true; Better to leave ret unitialized. ack. + + state->mipi_clk = devm_clk_get(dev, "mipi"); + if

Re: [PATCH RESEND 1/6] omap: omap-iommu.h: allow building drivers with COMPILE_TEST

2018-04-19 Thread Hans Verkuil
On 04/19/18 13:15, Mauro Carvalho Chehab wrote: > Drivers that depend on omap-iommu.h (currently, just omap3isp) > need a stub implementation in order to be built with COMPILE_TEST. > > Cc: Tony Lindgren > Cc: Arnd Bergmann > Acked-by: Sakari Ailus

Re: [PATCH 01/15] media: staging/imx: add support to media dev for no IPU systems

2018-04-19 Thread Dan Carpenter
On Thu, Apr 19, 2018 at 11:17:58AM +0100, Rui Miguel Silva wrote: > Some i.MX SoC do not have IPU, like the i.MX7, add to the the media device > infrastructure support to be used in this type of systems that do not have > internal subdevices besides the CSI. > > Signed-off-by: Rui Miguel Silva

[PATCH v5 1/2] media: ov2680: dt: Add bindings for OV2680

2018-04-19 Thread Rui Miguel Silva
Add device tree binding documentation for the OV2680 camera sensor. Reviewed-by: Rob Herring CC: devicet...@vger.kernel.org Signed-off-by: Rui Miguel Silva --- .../devicetree/bindings/media/i2c/ov2680.txt | 40 +++ 1 file changed, 40

[PATCH v5 2/2] media: ov2680: Add Omnivision OV2680 sensor driver

2018-04-19 Thread Rui Miguel Silva
This patch adds V4L2 sub-device driver for OV2680 image sensor. The OV2680 is a 1/5" CMOS color sensor from Omnivision. Supports output format: 10-bit Raw RGB. The OV2680 has a single lane MIPI interface. The driver exposes following V4L2 controls: - auto/manual exposure, - exposure, -

[PATCH v5 0/2] media: Introduce Omnivision OV2680 driver

2018-04-19 Thread Rui Miguel Silva
Add driver and bindings for the OV2680 2 megapixel CMOS 1/5" sensor, which has a single MIPI lane interface and output format of 10-bit Raw RGB. Features supported are described in PATCH 2/2. v4->v5: Fixes for v4l2-compliance tests: - add init_cfg - add some input arguments validations

[PATCH RESEND 5/6] media: v4l2-compat-ioctl32: better name userspace pointers

2018-04-19 Thread Mauro Carvalho Chehab
In the past, "up" were an acronym for "user pointer" and "kp" for "kernel pointer". However, since a1dfb4c48cc1 ("media: v4l2-compat-ioctl32.c: refactor compat ioctl32 logic"), both are now __user pointers. So, the usage of "kp" is really misleading there. So, rename both to just "p32" and "p64"

[PATCH RESEND 4/6] media: v4l2-compat-ioctl32: fix several __user annotations

2018-04-19 Thread Mauro Carvalho Chehab
Smatch report several issues with bad __user annotations: drivers/media/v4l2-core/v4l2-compat-ioctl32.c:447:21: warning: incorrect type in argument 1 (different address spaces) drivers/media/v4l2-core/v4l2-compat-ioctl32.c:447:21:expected void [noderef] *uptr

[PATCH RESEND 3/6] media: omap3isp: Allow it to build with COMPILE_TEST

2018-04-19 Thread Mauro Carvalho Chehab
From: Arnd Bergmann There aren't much things required for it to build with COMPILE_TEST. It just needs to not compile the code that depends on arm-specific iommu implementation. Signed-off-by: Arnd Bergmann Co-developed-by: Mauro Carvalho Chehab

[PATCH RESEND 6/6] media: v4l2-compat-ioctl32: simplify casts

2018-04-19 Thread Mauro Carvalho Chehab
Making the cast right for get_user/put_user is not trivial, as it needs to ensure that the types are the correct ones. Improve it by using macros. Tested with vivid with: $ sudo modprobe vivid no_error_inj=1 $ v4l2-compliance-32bits -a -s10 >32bits && v4l2-compliance-64bits -a

[PATCH RESEND 1/6] omap: omap-iommu.h: allow building drivers with COMPILE_TEST

2018-04-19 Thread Mauro Carvalho Chehab
Drivers that depend on omap-iommu.h (currently, just omap3isp) need a stub implementation in order to be built with COMPILE_TEST. Cc: Tony Lindgren Cc: Arnd Bergmann Acked-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab

[PATCH RESEND 2/6] media: omap3isp: Enable driver compilation on ARM with COMPILE_TEST

2018-04-19 Thread Mauro Carvalho Chehab
From: Laurent Pinchart The omap3isp driver can't be compiled on non-ARM platforms but has no compile-time dependency on OMAP. It however requires common clock framework support, which isn't provided by all ARM platforms. Drop the OMAP dependency when

Re: [PATCH 02/15] media: staging/imx7: add imx7 CSI subdev driver

2018-04-19 Thread Dan Carpenter
On Thu, Apr 19, 2018 at 11:17:59AM +0100, Rui Miguel Silva wrote: > +static int imx7_csi_link_setup(struct media_entity *entity, > +const struct media_pad *local, > +const struct media_pad *remote, u32 flags) > +{ > + struct v4l2_subdev

[PATCH 11/15] ARM: dts: imx7s: add multiplexer controls

2018-04-19 Thread Rui Miguel Silva
The IOMUXC General Purpose Register has bitfield to control video bus multiplexer to control the CSI input between the MIPI-CSI2 and parallel interface. Add that register and mask. Signed-off-by: Rui Miguel Silva --- arch/arm/boot/dts/imx7s.dtsi | 9 - 1 file

[PATCH 01/15] media: staging/imx: add support to media dev for no IPU systems

2018-04-19 Thread Rui Miguel Silva
Some i.MX SoC do not have IPU, like the i.MX7, add to the the media device infrastructure support to be used in this type of systems that do not have internal subdevices besides the CSI. Signed-off-by: Rui Miguel Silva --- drivers/staging/media/imx/imx-media-dev.c|

[PATCH 15/15] media: staging/imx: add i.MX7 entries to TODO file

2018-04-19 Thread Rui Miguel Silva
Add some i.MX7 related entries to TODO file. Signed-off-by: Rui Miguel Silva --- drivers/staging/media/imx/TODO | 9 + 1 file changed, 9 insertions(+) diff --git a/drivers/staging/media/imx/TODO b/drivers/staging/media/imx/TODO index aeeb15494a49..6f29b5ca5324

[PATCH 02/15] media: staging/imx7: add imx7 CSI subdev driver

2018-04-19 Thread Rui Miguel Silva
This add the media entity subdevice and control driver for the i.MX7 CMOS Sensor Interface. Signed-off-by: Rui Miguel Silva --- drivers/staging/media/imx/Kconfig |9 +- drivers/staging/media/imx/Makefile |2 +

[PATCH 10/15] ARM: dts: imx7s: add mipi phy power domain

2018-04-19 Thread Rui Miguel Silva
Add power domain index 0 related with mipi-phy to imx7s. Signed-off-by: Rui Miguel Silva --- arch/arm/boot/dts/imx7s.dtsi | 6 ++ 1 file changed, 6 insertions(+) diff --git a/arch/arm/boot/dts/imx7s.dtsi b/arch/arm/boot/dts/imx7s.dtsi index 142ea709d296..d913c3f9c284

[PATCH 05/15] media: staging/imx7: add MIPI CSI-2 receiver subdev for i.MX7

2018-04-19 Thread Rui Miguel Silva
Adds MIPI CSI-2 subdev for i.MX7 to connect with sensors with a MIPI CSI-2 interface. Signed-off-by: Rui Miguel Silva --- drivers/staging/media/imx/Makefile |1 + drivers/staging/media/imx/imx7-mipi-csis.c | 1154 2 files changed, 1155

[PATCH 04/15] clk: imx7d: reset parent for mipi csi root

2018-04-19 Thread Rui Miguel Silva
To guarantee that we do not get Overflow in image FIFO the outer bandwidth has to be faster than inputer bandwidth. For that it must be possible to set a faster frequency clock. So set new parent to sys_pfd3 clock for the mipi csi block. Signed-off-by: Rui Miguel Silva ---

[PATCH 06/15] media: staging/imx: add imx7 capture subsystem

2018-04-19 Thread Rui Miguel Silva
Add imx7 capture subsystem to imx-media core to allow the use some of the existing modules for i.MX5/6 with i.MX7 SoC. Since i.MX7 does not have an IPU set the no_ipu_present flag to differentiate some runtime behaviors. Signed-off-by: Rui Miguel Silva ---

[PATCH 13/15] ARM: dts: imx7s: add capture subsystem

2018-04-19 Thread Rui Miguel Silva
Add media capture subsystem device to i.MX7 definitions. Signed-off-by: Rui Miguel Silva --- arch/arm/boot/dts/imx7s.dtsi | 5 + 1 file changed, 5 insertions(+) diff --git a/arch/arm/boot/dts/imx7s.dtsi b/arch/arm/boot/dts/imx7s.dtsi index 6b49b73053f9..333d9fe6b989

[PATCH 03/15] clk: imx7d: fix mipi dphy div parent

2018-04-19 Thread Rui Miguel Silva
Fix the mipi dphy root divider to mipi_dphy_pre_div, this would remove a orphan clock and set the correct parent. before: cat clk_orphan_summary enable prepare protect clock countcountcountrate accuracy phase

[PATCH 09/15] media: dt-bindings: add bindings for i.MX7 media driver

2018-04-19 Thread Rui Miguel Silva
Add bindings documentation for i.MX7 media drivers. Signed-off-by: Rui Miguel Silva --- .../devicetree/bindings/media/imx7.txt| 158 ++ 1 file changed, 158 insertions(+) create mode 100644 Documentation/devicetree/bindings/media/imx7.txt diff

[PATCH 08/15] ARM: dts: increase default cma size to 40MB

2018-04-19 Thread Rui Miguel Silva
To support camera in i.MX7 the cma heap is used to allocate frame buffers. The default size of CMA is 16MB which is not enough for higher resolutions (ex: 1600x1200). So, increase the default CMA size to 40MB. Signed-off-by: Rui Miguel Silva ---

[PATCH 00/15] media: staging/imx7: add i.MX7 media driver

2018-04-19 Thread Rui Miguel Silva
*** BLURB HERE *** Hi, This series introduces the Media driver to work with the i.MX7 SoC. it uses the already existing imx media core drivers but since the i.MX7, contrary to i.MX5/6, do not have an IPU and because of that some changes in the imx media core are made along this series to make it

[PATCH 12/15] ARM: dts: imx7: Add video mux, csi and mipi_csi and connections

2018-04-19 Thread Rui Miguel Silva
This patch adds the device tree nodes for csi, video multiplexer and mipi-csi besides the graph connecting the necessary endpoints to make the media capture entities to work in imx7 Warp board. Also add the pin control related with the mipi_csi in that board. Signed-off-by: Rui Miguel Silva

[PATCH 14/15] media: imx7.rst: add documentation for i.MX7 media driver

2018-04-19 Thread Rui Miguel Silva
Add rst document to describe the i.MX7 media driver and also a working example from the Warp7 board usage with a OV2680 sensor. Signed-off-by: Rui Miguel Silva --- Documentation/media/v4l-drivers/imx7.rst | 157 ++

[PATCH 07/15] media: staging/imx: add 10 bit bayer support

2018-04-19 Thread Rui Miguel Silva
Some sensors can only output 10 bit bayer formats, like the OV2680. Add support for that in imx-media. Signed-off-by: Rui Miguel Silva --- drivers/staging/media/imx/imx-media-utils.c | 24 + 1 file changed, 24 insertions(+) diff --git

[PATCH RESEND 0/6] Remaining COMPILE_TEST and smatch cleanups

2018-04-19 Thread Mauro Carvalho Chehab
I'm re-sending this patch series, because I forgot to add a C/C on the first patch of this series. Also, the last patch was sent in separate. So, better to repost this series. - There were several interactions at the COMPILE_TEST and smatch patch series. While I applied most of them, there are 5

Re: [RFC PATCH]: intel-ipu3: Add uAPI documentation

2018-04-19 Thread Mauro Carvalho Chehab
Em Tue, 3 Apr 2018 19:52:25 -0500 Yong Zhi escreveu: > This is a preliminary effort to add documentation for the > following BNR(bayer noise reduction) structs: > > ipu3_uapi_bnr_static_config_wb_gains_config > ipu3_uapi_bnr_static_config_wb_gains_thr_config >

Re: [PATCH 05/15] media: staging/imx7: add MIPI CSI-2 receiver subdev for i.MX7

2018-04-19 Thread Dan Carpenter
> +static int mipi_csis_clk_get(struct csi_state *state) > +{ > + struct device *dev = >pdev->dev; > + int ret = true; Better to leave ret unitialized. > + > + state->mipi_clk = devm_clk_get(dev, "mipi"); > + if (IS_ERR(state->mipi_clk)) { > + dev_err(dev, "Could not

cron job: media_tree daily build: WARNINGS

2018-04-19 Thread Hans Verkuil
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: Fri Apr 20 05:00:09 CEST 2018 media-tree git hash:42a182282ea2426d56b2d63be634ee419194c45c media_build

Re: [linux-sunxi] [PATCH 5/9] media: platform: Add Sunxi Cedrus decoder driver

2018-04-19 Thread Paul Kocialkowski
Hi, On Mon, 2018-03-12 at 20:29 +, Joonas Kylmälä wrote: > Paul Kocialkowski: > > diff --git a/drivers/media/platform/sunxi-cedrus/sunxi_cedrus.c > > b/drivers/media/platform/sunxi-cedrus/sunxi_cedrus.c > > new file mode 100644 > > index ..88624035e0e3 > > --- /dev/null > > +++

Re: [linux-sunxi] [PATCH 5/9] media: platform: Add Sunxi Cedrus decoder driver

2018-04-19 Thread Paul Kocialkowski
Hi, On Mon, 2018-03-12 at 17:15 +, Joonas Kylmälä wrote: > Paul Kocialkowski: > > diff --git a/drivers/media/platform/sunxi-cedrus/sunxi_cedrus_regs.h > > b/drivers/media/platform/sunxi-cedrus/sunxi_cedrus_regs.h > > new file mode 100644 > > index ..7384daa94737 > > --- /dev/null

[PATCH v2 02/10] media-request: Add a request complete operation to allow m2m scheduling

2018-04-19 Thread Paul Kocialkowski
When using the request API in the context of a m2m driver, the operations that come with a m2m run scheduling call in their (m2m-specific) ioctl handler are delayed until the request is queued (for instance, this includes queuing buffers and streamon). Thus, the m2m run scheduling calls are not

[PATCH v2 04/10] media: vim2m: Implement media request complete op to schedule m2m run

2018-04-19 Thread Paul Kocialkowski
This adds an implementation of the media request complete operation for the vim2m driver, that ensures that the driver will try to schedule a m2m run whenever a request was completed. Without this operation, no m2m device run will be scheduled in many scenarios. Signed-off-by: Paul Kocialkowski

[PATCH v2 01/10] media: v4l2-ctrls: Add missing v4l2 ctrl unlock

2018-04-19 Thread Paul Kocialkowski
This adds a missing v4l2_ctrl_unlock call that is required to avoid deadlocks. Signed-off-by: Paul Kocialkowski --- drivers/media/v4l2-core/v4l2-ctrls.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/media/v4l2-core/v4l2-ctrls.c

[PATCH v2 00/10] Sunxi-Cedrus driver for the Allwinner Video Engine, using media requests

2018-04-19 Thread Paul Kocialkowski
This presents a second iteration of the updated Sunxi-Cedrus driver, that supports the Video Engine found in most Allwinner SoCs, starting with the A10. It was tested on both the A20 and the A33. The initial version of this driver[0] was originally written and submitted by Florent Revest using a

[PATCH v2 03/10] videobuf2-core: Add helper to get buffer private data from media request

2018-04-19 Thread Paul Kocialkowski
When calling media operation driver callbacks related to media requests, only a pointer to the request itself is provided, which is insufficient to retrieve the driver's context. Since the driver context is usually set as vb2 queue private data and given that the core can determine which objects

Re: [PATCH RESEND 6/6] media: v4l2-compat-ioctl32: simplify casts

2018-04-19 Thread Mauro Carvalho Chehab
Em Thu, 19 Apr 2018 13:37:52 +0200 Hans Verkuil escreveu: > On 04/19/18 13:15, Mauro Carvalho Chehab wrote: > > Making the cast right for get_user/put_user is not trivial, as > > it needs to ensure that the types are the correct ones. > > > > Improve it by using macros. > >

[PATCH v2 08/10] dt-bindings: media: Document bindings for the Sunxi-Cedrus VPU driver

2018-04-19 Thread Paul Kocialkowski
This adds a device-tree binding document that specifies the properties used by the Sunxi-Cedurs VPU driver, as well as examples. Signed-off-by: Paul Kocialkowski --- .../devicetree/bindings/media/sunxi-cedrus.txt | 50 ++ 1 file changed, 50

[PATCH v2 07/10] media: platform: Add Sunxi-Cedrus VPU decoder driver

2018-04-19 Thread Paul Kocialkowski
This introduces the Sunxi-Cedrus VPU driver that supports the VPU found in Allwinner SoCs, also known as Video Engine. It is implemented through a v4l2 m2m decoder device and a media device (used for media requests). So far, it only supports MPEG2 decoding. Since this VPU is stateless,

[PATCH v2 10/10] ARM: dts: sun8i-a33: Add Video Engine and reserved memory nodes

2018-04-19 Thread Paul Kocialkowski
This adds nodes for the Video Engine and the associated reserved memory for the Allwinner A33. Up to 96 MiB of memory are dedicated to the VPU. The VPU can only map the first 256 MiB of DRAM, so the reserved memory pool has to be located in that area. Following Allwinner's decision in downstream

Re: [PATCH 5/9] media: platform: Add Sunxi Cedrus decoder driver

2018-04-19 Thread Paul Kocialkowski
Hi and thanks for the review, On Fri, 2018-03-09 at 14:57 +0100, Maxime Ripard wrote: > On Fri, Mar 09, 2018 at 11:14:41AM +0100, Paul Kocialkowski wrote: > > +/* > > + * mem2mem callbacks > > + */ > > + > > +void job_abort(void *priv) > > +{} > > Is that still needed? v2 contains a proper

[PATCH v2 05/10] media: v4l: Add definitions for MPEG2 frame format and header metadata

2018-04-19 Thread Paul Kocialkowski
Stateless video decoding engines require both the MPEG slices and associated metadata from the video stream in order to decode frames. This introduces definitions for a new pixel format, describing buffers with MPEG2 slice data, as well as a control structure for passing the frame header

[PATCH v2 06/10] media: v4l: Add definition for Allwinner's MB32-tiled NV12 format

2018-04-19 Thread Paul Kocialkowski
This introduces support for Allwinner's MB32-tiled NV12 format, where each plane is divided into macroblocks of 32x32 pixels. Hence, the size of each plane has to be aligned to 32 bytes. The pixels inside each macroblock are coded as they would be if the macroblock was a single plane, line after

[PATCH v2 09/10] ARM: dts: sun7i-a20: Add Video Engine and reserved memory nodes

2018-04-19 Thread Paul Kocialkowski
This adds nodes for the Video Engine and the associated reserved memory for the Allwinner A20. Up to 96 MiB of memory are dedicated to the VPU. The VPU can only map the first 256 MiB of DRAM, so the reserved memory pool has to be located in that area. Following Allwinner's decision in downstream

Re: [PATCH 6/9] sunxi-cedrus: Add device tree binding document

2018-04-19 Thread Paul Kocialkowski
Hi, On Sun, 2018-03-18 at 07:48 -0500, Rob Herring wrote: > On Fri, Mar 09, 2018 at 11:14:42AM +0100, Paul Kocialkowski wrote: > > From: Florent Revest > > "device tree binding document" can all be summarized with the subject > prefix "dt-bindings: media: ".

Re: [PATCH v2 08/10] dt-bindings: media: Document bindings for the Sunxi-Cedrus VPU driver

2018-04-19 Thread Philipp Zabel
Hi Paul, On Thu, 2018-04-19 at 17:45 +0200, Paul Kocialkowski wrote: > This adds a device-tree binding document that specifies the properties > used by the Sunxi-Cedurs VPU driver, as well as examples. > > Signed-off-by: Paul Kocialkowski > --- >

Re: [PATCH v2 01/12] media: ov5640: Add auto-focus feature

2018-04-19 Thread Laurent Pinchart
Hi Maxime, Thank you for the patch. On Monday, 16 April 2018 15:36:50 EEST Maxime Ripard wrote: > From: Mylène Josserand > > Add the auto-focus ENABLE/DISABLE feature as V4L2 control. > Disabled by default. > > Signed-off-by: Mylène Josserand

Re: [PATCH RESEND 3/6] media: omap3isp: Allow it to build with COMPILE_TEST

2018-04-19 Thread Hans Verkuil
On 04/19/18 13:15, Mauro Carvalho Chehab wrote: > From: Arnd Bergmann > > There aren't much things required for it to build with COMPILE_TEST. > It just needs to not compile the code that depends on arm-specific > iommu implementation. > > Signed-off-by: Arnd Bergmann

Re: [PATCH RESEND 2/6] media: omap3isp: Enable driver compilation on ARM with COMPILE_TEST

2018-04-19 Thread Hans Verkuil
On 04/19/18 13:15, Mauro Carvalho Chehab wrote: > From: Laurent Pinchart > > The omap3isp driver can't be compiled on non-ARM platforms but has no > compile-time dependency on OMAP. It however requires common clock > framework support, which isn't provided by

Re: [PATCH RESEND 4/6] media: v4l2-compat-ioctl32: fix several __user annotations

2018-04-19 Thread Hans Verkuil
On 04/19/18 13:15, Mauro Carvalho Chehab wrote: > Smatch report several issues with bad __user annotations: > > drivers/media/v4l2-core/v4l2-compat-ioctl32.c:447:21: warning: incorrect > type in argument 1 (different address spaces) > drivers/media/v4l2-core/v4l2-compat-ioctl32.c:447:21:

Re: [PATCH RESEND 6/6] media: v4l2-compat-ioctl32: simplify casts

2018-04-19 Thread Hans Verkuil
On 04/19/18 13:15, Mauro Carvalho Chehab wrote: > Making the cast right for get_user/put_user is not trivial, as > it needs to ensure that the types are the correct ones. > > Improve it by using macros. > > Tested with vivid with: > $ sudo modprobe vivid no_error_inj=1 > $

Re: [PATCH 5/9] cx231xx: Switch to using new dvb i2c helpers

2018-04-19 Thread Matthias Schwarzott
Am 17.04.2018 um 18:39 schrieb Brad Love: > Mostly very straight forward replace of blocks with equivalent code. > > Cleanup added at end of dvb_init in case of failure. > Hi Brad, I have some suggestions. See below. Matthias > Signed-off-by: Brad Love > --- >

Re: [PATCH 2/9] cx231xx: Use board profile values for addresses

2018-04-19 Thread Matthias Schwarzott
Am 17.04.2018 um 18:39 schrieb Brad Love: > Replace all usage of hard coded values with > the proper field from the board profile. > Hi Brad, will there be any interference with the usage to configure the analog tuner via the fields tuner_addr and tuner_type? Regards Matthias > Signed-off-by:

Re: [PATCH v2 08/10] media: ov772x: handle nested s_power() calls

2018-04-19 Thread Akinobu Mita
2018-04-18 21:41 GMT+09:00 jacopo mondi : > Hi Akinobu, > > On Mon, Apr 16, 2018 at 11:51:49AM +0900, Akinobu Mita wrote: >> Depending on the v4l2 driver, calling s_power() could be nested. So the >> actual transitions between power saving mode and normal operation mode >>

Re: [PATCH v2 4/4] media: v4l2-compat-ioctl32: better document the code

2018-04-19 Thread Mauro Carvalho Chehab
Em Thu, 19 Apr 2018 12:33:32 -0400 Mauro Carvalho Chehab escreveu: > This file does a lot of non-trivial struff. Document it using > kernel-doc markups where needed and improve the comments inside > do_video_ioctl(). Sent it too fast. It should be merged with this

Re: imx-media: MT9P031 Capture issues on IMX6

2018-04-19 Thread Fabio Estevam
On Thu, Apr 19, 2018 at 1:55 PM, Ibtsam Ul-Haq wrote: > I can see by using a logic analyzer that the PIXCLK does not look > nice. It looks similar to the issue mentioned here: > https://community.nxp.com/thread/454467 > > except that in my case it looks pulled up

[PATCH v2 2/4] media: v4l2-compat-ioctl32: better name userspace pointers

2018-04-19 Thread Mauro Carvalho Chehab
In the past, "up" were an acronym for "user pointer" and "kp" for "kernel pointer". However, since a1dfb4c48cc1 ("media: v4l2-compat-ioctl32.c: refactor compat ioctl32 logic"), both are now __user pointers. So, the usage of "kp" is really misleading there. So, rename both to just "p32" and "p64"

[PATCH v2 4/4] media: v4l2-compat-ioctl32: better document the code

2018-04-19 Thread Mauro Carvalho Chehab
This file does a lot of non-trivial struff. Document it using kernel-doc markups where needed and improve the comments inside do_video_ioctl(). Signed-off-by: Mauro Carvalho Chehab --- drivers/media/v4l2-core/v4l2-compat-ioctl32.c | 166 +- 1

[PATCH v2 3/4] media: v4l2-compat-ioctl32: simplify casts

2018-04-19 Thread Mauro Carvalho Chehab
Making the cast right for get_user/put_user is not trivial, as it needs to ensure that the types are the correct ones. Improve it by using macros. Tested with vivid with: $ sudo modprobe vivid no_error_inj=1 $ v4l2-compliance-32bits -a -s10 >32bits && v4l2-compliance-64bits -a

Re: imx-media: MT9P031 Capture issues on IMX6

2018-04-19 Thread Ibtsam Ul-Haq
On Tue, Apr 17, 2018 at 2:33 PM, Philipp Zabel wrote: > On Tue, 2018-04-17 at 11:32 +0200, Ibtsam Ul-Haq wrote: >> On Tue, Apr 17, 2018 at 10:34 AM, Philipp Zabel >> wrote: >> > Hi Ibtsam, >> > >> > On Tue, 2018-04-17 at 09:26 +0200, Ibtsam Ul-Haq

[PATCH v2 0/4] Improve v4l2-compat-ioctl32 handler getting rid of smatch warnings

2018-04-19 Thread Mauro Carvalho Chehab
This series correspond to the last 3 patches of my previous patch series: https://www.spinics.net/lists/linux-media/msg132453.html It contains the compat32 related bits. Version 2 addresses some comments from Hans. It adds a new patch better documenting it. Mauro Carvalho Chehab (4):

[PATCH v2 1/4] media: v4l2-compat-ioctl32: fix several __user annotations

2018-04-19 Thread Mauro Carvalho Chehab
Smatch report several issues with bad __user annotations: drivers/media/v4l2-core/v4l2-compat-ioctl32.c:447:21: warning: incorrect type in argument 1 (different address spaces) drivers/media/v4l2-core/v4l2-compat-ioctl32.c:447:21:expected void [noderef] *uptr

[PATCH 1/7] i2c: i2c-gpio: move header to platform_data

2018-04-19 Thread Wolfram Sang
This header only contains platform_data. Move it to the proper directory. Signed-off-by: Wolfram Sang --- MAINTAINERS | 2 +- arch/arm/mach-ks8695/board-acs5k.c | 2 +- arch/arm/mach-omap1/board-htcherald.c| 2 +-

Re: [PATCH 1/7] i2c: i2c-gpio: move header to platform_data

2018-04-19 Thread Tony Lindgren
* Wolfram Sang [180419 20:02]: > This header only contains platform_data. Move it to the proper directory. Acked-by: Tony Lindgren

[PATCH 0/7] i2c: clean up include/linux/i2c-*

2018-04-19 Thread Wolfram Sang
Move all plain platform_data includes to the platform_data-dir (except for i2c-pnx which can be moved into the driver itself). My preference is to take these patches via the i2c tree. I can provide an immutable branch if needed. But we can also discuss those going in via arch-trees if

Re: [PATCH v2 7/7] media: rc: mceusb: allow the timeout to be configurable

2018-04-19 Thread Matthias Reichl
Hi Sean, On Wed, Apr 18, 2018 at 07:42:29PM +0200, Matthias Reichl wrote: > Hi Sean, > > On Wed, Apr 18, 2018 at 12:24:29PM +0100, Sean Young wrote: > > Hello Hias, > > > > On Tue, Apr 17, 2018 at 09:14:57PM +0200, Matthias Reichl wrote: > > > On Sun, Apr 08, 2018 at 10:19:42PM +0100, Sean

Re: [PATCH v2 08/10] dt-bindings: media: Document bindings for the Sunxi-Cedrus VPU driver

2018-04-19 Thread Tomasz Figa
Hi Paul, Philipp, On Fri, Apr 20, 2018 at 1:04 AM Philipp Zabel wrote: > Hi Paul, > On Thu, 2018-04-19 at 17:45 +0200, Paul Kocialkowski wrote: > > This adds a device-tree binding document that specifies the properties > > used by the Sunxi-Cedurs VPU driver, as well as