cron job: media_tree daily build: ERRORS

2018-06-28 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 Jun 29 05:00:21 CEST 2018 media-tree git hash:3c4a737267e89aafa6308c6c456d2ebea3fcd085 media_build

Re: [PATCH] [RFC] em28xx: Fix dual transport stream use

2018-06-28 Thread Brad Love
Hi Mauro, On 2018-06-28 13:43, Mauro Carvalho Chehab wrote: > Em Thu, 28 Jun 2018 12:33:41 -0500 > Brad Love escreveu: > >> Hi Mauro, >> >> >> On 2018-06-28 09:23, Brad Love wrote: >>> Hi Mauro, >>> >>> >>> On 2018-06-28 04:10, Mauro Carvalho Chehab wrote: Em Wed, 27 Jun 2018 14:41:22

[PATCH] tw686x: Fix oops on buffer alloc failure

2018-06-28 Thread Ezequiel Garcia
From: Krzysztof HaƂasa The error path currently calls tw686x_video_free() which requires vc->dev to be initialized, causing a NULL dereference on uninitizalized channels. Fix this by setting the vc->dev fields for all the channels first. Fixes: f8afaa8dbc0d ("[media] tw686x: Introduce an

Re: [git:media_tree/master] media: i2c: lm3560: add support for lm3559 chip

2018-06-28 Thread Pavel Machek
Hi! > This is an automatic generated email to let you know that the following patch > were queued: > > Subject: media: i2c: lm3560: add support for lm3559 chip > Author: Pavel Machek > Date:Sun May 6 04:06:07 2018 -0400 > > Add support for LM3559, as found in Motorola Droid 4 phone, for

Re: [PATCH 00/21] TVP5150 fixes and new features

2018-06-28 Thread Javier Martinez Canillas
Hi Marco, On 06/28/2018 06:20 PM, Marco Felsch wrote: > First some fixes were made which may possibly interesting for other > kernel versions. > > Then I picked most of the patches from Philipp [1] and ported them > to the recent media_tree master branch [3]. > > But the main purpose of this

Re: [PATCH v3 0/2] Memory-to-memory media controller topology

2018-06-28 Thread Ezequiel Garcia
Hi Hans, On Thu, 2018-06-28 at 11:19 +0200, Hans Verkuil wrote: > On 06/27/18 22:35, Ezequiel Garcia wrote: > > As discussed on IRC, memory-to-memory need to be modeled > > properly in order to be supported by the media controller > > framework, and thus to support the Request API. > > > > First

[PATCH 2/2] v4l-helpers: Fix EXPBUF queue type

2018-06-28 Thread Ezequiel Garcia
v4l_queue_export_bufs uses the v4l_fd type when calling EXPBUF ioctl. However, this doesn't work on mem2mem where there are one capture queue and one output queue associated to the device. The current code calls v4l_queue_export_bufs with the wrong type, failing as: fail:

[PATCH 1/2] v4l-helpers: Don't close the fd in {}_s_fd

2018-06-28 Thread Ezequiel Garcia
When creating a second node via copy or assignment: node2 = node The node being assigned to, i.e. node2, obtains the fd. This causes a later call to node2.media_open to close() the fd, thus unintendenly closing the original node fd, via the call path (e.g. for media devices):

Re: [PATCH] [RFC] em28xx: Fix dual transport stream use

2018-06-28 Thread Mauro Carvalho Chehab
Em Thu, 28 Jun 2018 12:33:41 -0500 Brad Love escreveu: > Hi Mauro, > > > On 2018-06-28 09:23, Brad Love wrote: > > Hi Mauro, > > > > > > On 2018-06-28 04:10, Mauro Carvalho Chehab wrote: > >> Em Wed, 27 Jun 2018 14:41:22 -0500 > >> Brad Love escreveu: > >> > >>> When dual transport stream

Re: [PATCH] [RFC] em28xx: Fix dual transport stream use

2018-06-28 Thread Brad Love
Hi Mauro, On 2018-06-28 09:23, Brad Love wrote: > Hi Mauro, > > > On 2018-06-28 04:10, Mauro Carvalho Chehab wrote: >> Em Wed, 27 Jun 2018 14:41:22 -0500 >> Brad Love escreveu: >> >>> When dual transport stream support was added the call to set >>> alt mode on the USB interface was moved to

[PATCH v2] em28xx: Fix dual transport stream operation

2018-06-28 Thread Brad Love
Addresses the following, which introduced a regression itself: Commit 509f89652f83 ("media: em28xx: fix a regression with HVR-950") The regression fix breaks dual transport stream support. Currently, when a tuner starts streaming it sets alt mode on the USB interface. The problem is, in a dual

[PATCH v2] [RFC] em28xx: Fix dual transport stream use

2018-06-28 Thread Brad Love
When dual transport stream support was added the call to set alt mode on the USB interface was moved to em28xx_dvb_init. This was reported to break streaming for a device, so the call was re-added to em28xx_start_streaming. Commit 509f89652f83 ("media: em28xx: fix a regression with HVR-950")

[PATCH] media: coda: add SPS fixup code for frame sizes that are not multiples of 16

2018-06-28 Thread Philipp Zabel
The CODA firmware does not set the VUI frame cropping fields to properly describe coded h.264 streams with frame sizes that are not a multiple of the macroblock size. This adds RBSP parsing code and a SPS fixup routine to manually replace the cropping information in the headers produced by the

[PATCH 09/22] [media] tvp5150: fix standard autodetection

2018-06-28 Thread Marco Felsch
From: Philipp Zabel Make sure to not overwrite decoder->norm when setting the standard in hardware, but only when instructed by V4L2 API calls. Signed-off-by: Philipp Zabel Signed-off-by: Marco Felsch --- drivers/media/i2c/tvp5150.c | 56 - 1 file changed,

[PATCH 01/22] [media] tvp5150: fix width alignment during set_selection()

2018-06-28 Thread Marco Felsch
The driver ignored the width alignment which exists due to the UYVY colorspace format. Fix the width alignment and make use of the the provided v4l2 helper function to set the width, height and all alignments in one. Fixes: 963ddc63e20d ("[media] media: tvp5150: Add cropping support")

[PATCH 19/22] [media] tvp5150: add input source selection of_graph support

2018-06-28 Thread Marco Felsch
The currrent driver layout had the following layout: ++ +---+ |TVP5150 | | Comp0 +--+ || +---+ | | +-+ +---+ | +--+ | Src | | Comp1 +--+--|Sink | +-+ +---+ | +--+ +-+

[PATCH 06/22] [media] tvp5150: add FORMAT_TRY support for get/set selection handlers

2018-06-28 Thread Marco Felsch
Since commit 10d5509c8d50 ("[media] v4l2: remove g/s_crop from video ops") the 'which' field for set/get_selection must be FORMAT_ACTIVE. There is no way to try different selections. The patch adds a helper function to select the correct selection memory space (sub-device file handle or driver

[PATCH 20/22] [media] tvp5150: Add input port connectors DT bindings

2018-06-28 Thread Marco Felsch
The TVP5150/1 decoders support different video input sources to their AIP1A/B pins. Possible configurations are as follows: - Analog Composite signal connected to AIP1A. - Analog Composite signal connected to AIP1B. - Analog S-Video Y (luminance) and C (chrominance) signals connected to

[PATCH 16/22] [media] tvp5150: add querystd

2018-06-28 Thread Marco Felsch
From: Philipp Zabel Add the querystd video_op and make it return V4L2_STD_UNKNOWN while the TVP5150 is not locked to a signal. Signed-off-by: Philipp Zabel Signed-off-by: Marco Felsch --- drivers/media/i2c/tvp5150.c | 10 ++ 1 file changed, 10 insertions(+) diff --git

[PATCH 03/22] [media] tvp5150: convert register access to regmap

2018-06-28 Thread Marco Felsch
From: Philipp Zabel Regmap provides built in debugging, caching and provides dedicated accessors for bit manipulations in registers, which make the following changes a lot simpler. Signed-off-by: Philipp Zabel Signed-off-by: Marco Felsch --- drivers/media/i2c/tvp5150.c | 199

[PATCH 17/22] [media] tvp5150: add g_std callback

2018-06-28 Thread Marco Felsch
Add callback to retrieve the current set norm. Signed-off-by: Marco Felsch --- drivers/media/i2c/tvp5150.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/drivers/media/i2c/tvp5150.c b/drivers/media/i2c/tvp5150.c index 1990aaa17749..3b51b6b67736 100644 ---

[PATCH 08/22] [media] tvp5150: trigger autodetection on subdev open to reset cropping

2018-06-28 Thread Marco Felsch
From: Philipp Zabel If cropping isn't set explicitly by userspace, reset it to the maximum possible rectangle in subdevice open if a standard change is detected. Signed-off-by: Philipp Zabel [m.fel...@pengutronix.de: move code from internal_ops.open() to pad_ops.init_cfg()]

[PATCH 18/22] partial revert of "[media] tvp5150: add HW input connectors support"

2018-06-28 Thread Marco Felsch
From: Javier Martinez Canillas Commit f7b4b54e6364 ("[media] tvp5150: add HW input connectors support") added input signals support for the tvp5150, but the approach was found to be incorrect so the corresponding DT binding commit 82c2ffeb217a ("[media] tvp5150: document input connectors DT

[PATCH 14/22] [media] tvp5150: issue source change events

2018-06-28 Thread Marco Felsch
From: Philipp Zabel Issue a V4L2_EVENT_SOURCE_CHANGE notification when the TVP5150 locks onto a signal and when it loses the lock. Signed-off-by: Philipp Zabel [m.fel...@pengutronix.de: partly mainline part port] Signed-off-by: Marco Felsch --- drivers/media/i2c/tvp5150.c | 8 +++- 1

[PATCH 12/22] [media] tvp5150: Add sync lock interrupt handling

2018-06-28 Thread Marco Felsch
From: Philipp Zabel This patch adds an optional interrupt handler to handle the sync lock interrupt and sync lock status. Signed-off-by: Philipp Zabel Signed-off-by: Lucas Stach [m.fel...@pengutronix.de: move added .g_std callback to separate patch] Signed-off-by: Marco Felsch ---

[PATCH 05/22] [media] v4l2-rect.h: add position and equal helpers

2018-06-28 Thread Marco Felsch
Add two helper functions to check if two rectangles have the same position (top/left) and if two rectangles equals (same size and same position). Signed-off-by: Marco Felsch --- include/media/v4l2-rect.h | 27 +++ 1 file changed, 27 insertions(+) diff --git

[PATCH 21/22] [media] tvp5150: initialize subdev before parsing device tree

2018-06-28 Thread Marco Felsch
From: Michael Tretter There are several debug prints in the tvp5150_parse_dt() function, which do not print the prefix, because the v4l2_subdev is not initialized, yet. Initialize the v4l2_subdev before parsing the device tree to fix the debug messages. Signed-off-by: Michael Tretter

[PATCH 00/21] TVP5150 fixes and new features

2018-06-28 Thread Marco Felsch
First some fixes were made which may possibly interesting for other kernel versions. Then I picked most of the patches from Philipp [1] and ported them to the recent media_tree master branch [3]. But the main purpose of this series is to convert the proprietary connector DT property into the

[PATCH 10/22] [media] tvp5150: split reset/enable routine

2018-06-28 Thread Marco Felsch
From: Philipp Zabel To trigger standard autodetection only the reset part of the routine is necessary during probe(). Split this out to make it callable on its own. Signed-off-by: Philipp Zabel [m.fel...@pengutronix.de: adapt commit message] [m.fel...@pengutronix.de: add tvp5150_enable() to

[PATCH 15/22] [media] tvp5150: add sync lock/loss signal debug messages

2018-06-28 Thread Marco Felsch
From: Philipp Zabel Signed-off-by: Philipp Zabel Signed-off-by: Marco Felsch --- drivers/media/i2c/tvp5150.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/media/i2c/tvp5150.c b/drivers/media/i2c/tvp5150.c index 6296c68ac816..99d887936ea0 100644 ---

[PATCH 04/22] [media] tvp5150: make use of regmap_update_bits

2018-06-28 Thread Marco Felsch
Since commit a27e33e3dd27 ("[media] tvp5150: convert register access to regmap") the driver supports regmap. Now we can drop the handmade bit update sequence and move to the regmap provided helpers. Signed-off-by: Marco Felsch --- drivers/media/i2c/tvp5150.c | 34

[PATCH 02/22] [media] tvp5150: fix switch exit in set control handler

2018-06-28 Thread Marco Felsch
The function only consists of a single switch case block without a default case. Unsupported control requests are indicated by the -EINVAL return code trough the last return statement at the end of the function. So exiting just the switch case block returns the -EINVAL error code but the hue

[PATCH 22/22] [media] tvp5150: Change default input source selection behaviour

2018-06-28 Thread Marco Felsch
The default input is still TVP5150_COMPOSITE1, but if the platform supports DT the default will be changed to the first valid connector. First in this context means the connector at the lowest port number. Signed-off-by: Marco Felsch --- drivers/media/i2c/tvp5150.c | 11 ++- 1 file

[PATCH 11/22] [media] tvp5150: remove pin configuration from initialization tables

2018-06-28 Thread Marco Felsch
From: Philipp Zabel To allow optional interrupt support, we want to configure the pin settings dynamically. Move those register accesses out of the static initialization tables. Signed-off-by: Philipp Zabel [m.fel...@pengutronix.de: drop init_default register remove] [m.fel...@pengutronix.de:

[PATCH 13/22] [media] tvp5150: disable output while signal not locked

2018-06-28 Thread Marco Felsch
From: Philipp Zabel To avoid short frames on stream start, keep output pins at high impedance while we are not properly locked onto the input signal. Signed-off-by: Philipp Zabel Signed-off-by: Marco Felsch --- drivers/media/i2c/tvp5150.c | 39 ++--- 1 file

[PATCH 07/22] [media] tvp5150: add default format helper

2018-06-28 Thread Marco Felsch
The patch adds three macros to bundle the mbus_framefmt default values and a helper function to set the the default crop and mbus_framefmt values. Signed-off-by: Marco Felsch --- drivers/media/i2c/tvp5150.c | 42 ++--- 1 file changed, 25 insertions(+), 17

[PATCH 2/2] media: coda: fix reorder detection for unknown levels

2018-06-28 Thread Philipp Zabel
Whether reordering should be enabled only depends on the h.264 profile. Stop parsing the level and drop the debug message, profile and level can now be determined via read-only decoder controls. Signed-off-by: Philipp Zabel --- drivers/media/platform/coda/coda-bit.c | 25

[PATCH 1/2] media: coda: add read-only h.264 decoder profile/level controls

2018-06-28 Thread Philipp Zabel
The decoder profile/level controls initially can be used to determine supported profiles and levels. The values are set for a given stream once the headers are parsed. Signed-off-by: Philipp Zabel --- drivers/media/platform/coda/coda-common.c | 115 +-

[PATCH] media: coda: fix encoder source stride

2018-06-28 Thread Philipp Zabel
The encoder picture run command takes a picture source stride parameter. This must be set to the output queue's bytesperline, not width. Signed-off-by: Philipp Zabel --- drivers/media/platform/coda/coda-bit.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git

Re: [PATCH] [RFC] em28xx: Fix dual transport stream use

2018-06-28 Thread Brad Love
Hi Mauro, On 2018-06-28 04:10, Mauro Carvalho Chehab wrote: > Em Wed, 27 Jun 2018 14:41:22 -0500 > Brad Love escreveu: > >> When dual transport stream support was added the call to set >> alt mode on the USB interface was moved to em28xx_dvb_init. >> This was reported to break streaming for a

[PATCHv4 00/10] media/mc: fix inconsistencies

2018-06-28 Thread Hans Verkuil
From: Hans Verkuil This series is v4 of my previous attempt: https://www.mail-archive.com/linux-media@vger.kernel.org/msg132942.html The goal is to fix the inconsistencies between the 'old' and 'new' MC API. I hate the terms 'old' and 'new', there is nothing wrong IMHO with using an 'old'

[PATCHv4 06/10] media.h: add MEDIA_ENT_F_DV_ENCODER

2018-06-28 Thread Hans Verkuil
From: Hans Verkuil Add a new function for digital video encoders such as HDMI transmitters. Signed-off-by: Hans Verkuil Acked-by: Sakari Ailus --- Documentation/media/uapi/mediactl/media-types.rst | 7 +++ include/uapi/linux/media.h| 3 ++- 2 files changed, 9

[PATCHv4 03/10] media: add flags field to struct media_v2_entity

2018-06-28 Thread Hans Verkuil
From: Hans Verkuil The v2 entity structure never exposed the entity flags, which made it impossible to detect connector or default entities. It is really trivial to just expose this information, so implement this. Signed-off-by: Hans Verkuil Acked-by: Sakari Ailus ---

[PATCHv4 05/10] media: rename MEDIA_ENT_F_DTV_DECODER to MEDIA_ENT_F_DV_DECODER

2018-06-28 Thread Hans Verkuil
From: Hans Verkuil The use of 'DTV' is very confusing since it normally refers to Digital TV e.g. DVB etc. Instead use 'DV' (Digital Video), which nicely corresponds to the DV Timings API used to configure such receivers and transmitters. We keep an alias to avoid breaking userspace

[PATCHv4 02/10] media-ioc-g-topology.rst: document new 'index' field

2018-06-28 Thread Hans Verkuil
From: Hans Verkuil Document the new struct media_v2_pad 'index' field. Signed-off-by: Hans Verkuil Acked-by: Sakari Ailus --- .../media/uapi/mediactl/media-ioc-g-topology.rst | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git

[PATCHv4 09/10] adv7180/tvp514x/tvp7002: fix entity function

2018-06-28 Thread Hans Verkuil
From: Hans Verkuil The entity function was ORed with the flags field instead of assigned to the function field. Correct this. Signed-off-by: Hans Verkuil Acked-by: Sakari Ailus --- drivers/media/i2c/adv7180.c | 2 +- drivers/media/i2c/tvp514x.c | 2 +- drivers/media/i2c/tvp7002.c | 2 +- 3

[PATCHv4 10/10] media/i2c: add missing entity functions

2018-06-28 Thread Hans Verkuil
From: Hans Verkuil Several drivers in media/i2c do not set the entity function. Correct this. Signed-off-by: Hans Verkuil Acked-by: Sakari Ailus --- drivers/media/i2c/et8ek8/et8ek8_driver.c | 1 + drivers/media/i2c/mt9m032.c | 1 + drivers/media/i2c/mt9p031.c | 1 +

[PATCHv4 07/10] media.h: reorder video en/decoder functions

2018-06-28 Thread Hans Verkuil
From: Hans Verkuil Keep the function defines in numerical order: 0x6000 comes after 0x2000, so move it back. Signed-off-by: Hans Verkuil --- include/uapi/linux/media.h | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/include/uapi/linux/media.h

[PATCHv4 01/10] media: add 'index' to struct media_v2_pad

2018-06-28 Thread Hans Verkuil
From: Hans Verkuil The v2 pad structure never exposed the pad index, which made it impossible to call the MEDIA_IOC_SETUP_LINK ioctl, which needs that information. It is really trivial to just expose this information, so implement this. Signed-off-by: Hans Verkuil Acked-by: Sakari Ailus ---

[PATCHv4 08/10] ad9389b/adv7511: set proper media entity function

2018-06-28 Thread Hans Verkuil
From: Hans Verkuil These two drivers both have function MEDIA_ENT_F_DV_ENCODER. Signed-off-by: Hans Verkuil Acked-by: Sakari Ailus --- drivers/media/i2c/ad9389b.c | 1 + drivers/media/i2c/adv7511.c | 1 + 2 files changed, 2 insertions(+) diff --git a/drivers/media/i2c/ad9389b.c

[PATCHv4 04/10] media-ioc-g-topology.rst: document new 'flags' field

2018-06-28 Thread Hans Verkuil
From: Hans Verkuil Document the new struct media_v2_entity 'flags' field. Signed-off-by: Hans Verkuil Acked-by: Sakari Ailus --- .../media/uapi/mediactl/media-ioc-g-topology.rst | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git

Re: [PATCHv3 0/8] media/mc: fix inconsistencies

2018-06-28 Thread Sakari Ailus
On Thu, Jun 21, 2018 at 09:19:06AM +0200, Hans Verkuil wrote: > From: Hans Verkuil > > This patch series sits on top of this pull request: > > https://patchwork.linuxtv.org/patch/50453/ > > That pull request cleans up the tables in the documentation, making it > easier to add new entries. > >

Re: [GIT PULL FOR v4.19] Convert last soc-camera users, rcar fixes, subdev std support

2018-06-28 Thread Mauro Carvalho Chehab
Em Fri, 8 Jun 2018 16:39:43 +0200 Hans Verkuil escreveu: > Hi Mauro, > > This pull requests converts the last users of soc-camera (thanks, Jacopo!), > has a few rcar fixes and adds support for SDTV to v4l2-subdev (HDTV was > supported, but not SDTV). > > Regards, > > Hans > > The

Re: [PATCH] media: coda: add h.264 level 4.2

2018-06-28 Thread Philipp Zabel
Hi, On Thu, 2018-06-21 at 17:51 +0200, Philipp Zabel wrote: > This enables reordering support for h.264 main profile level 4.2 > streams. > > Signed-off-by: Philipp Zabel > --- > drivers/media/platform/coda/coda-h264.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git

[PATCH] media: coda: add missing h.264 levels

2018-06-28 Thread Philipp Zabel
This enables reordering support for h.264 main profile level 4.2, 5.0, and 5.1 streams. Even though we likely can't play back such streams at full speed, we should still recognize them correctly. Signed-off-by: Philipp Zabel --- drivers/media/platform/coda/coda-h264.c | 3 +++ 1 file changed, 3

[PATCH 1/3] media: coda: move framebuffer size calculation out of loop

2018-06-28 Thread Philipp Zabel
All internal YCbCr frame buffers are the same size, calculate ycbcr_size once before the allocation loop. Signed-off-by: Philipp Zabel --- drivers/media/platform/coda/coda-bit.c | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) diff --git

[PATCH 3/3] media: coda: use encoder crop rectangle to set visible width and height

2018-06-28 Thread Philipp Zabel
Allow to set a crop rectangle on the encoder output queue to set the visible resolution as required by the V4L2 codec API. Signed-off-by: Philipp Zabel --- drivers/media/platform/coda/coda-bit.c| 24 ++-- drivers/media/platform/coda/coda-common.c | 45 --- 2

[PATCH 2/3] media: coda: streamline framebuffer size calculation a bit

2018-06-28 Thread Philipp Zabel
Remove the intermediate width and height variables, the calculation is simple enough. Signed-off-by: Philipp Zabel --- drivers/media/platform/coda/coda-bit.c | 14 +- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/drivers/media/platform/coda/coda-bit.c

Re: [PATCH v3 1/2] media: add helpers for memory-to-memory media controller

2018-06-28 Thread Hans Verkuil
On 06/27/18 22:35, Ezequiel Garcia wrote: > A memory-to-memory pipeline device consists in three > entities: two DMA engine and one video processing entities. > The DMA engine entities are linked to a V4L interface. > > This commit add a new v4l2_m2m_{un}register_media_controller > API to

Re: [PATCH v3 0/2] Memory-to-memory media controller topology

2018-06-28 Thread Hans Verkuil
On 06/27/18 22:35, Ezequiel Garcia wrote: > As discussed on IRC, memory-to-memory need to be modeled > properly in order to be supported by the media controller > framework, and thus to support the Request API. > > First commit introduces a register/unregister API, > that creates/destroys all the

Re: [PATCH] [RFC] em28xx: Fix dual transport stream use

2018-06-28 Thread Mauro Carvalho Chehab
Em Wed, 27 Jun 2018 14:41:22 -0500 Brad Love escreveu: > When dual transport stream support was added the call to set > alt mode on the USB interface was moved to em28xx_dvb_init. > This was reported to break streaming for a device, so the > call was re-added to em28xx_start_streaming. > >