[PATCH v2 1/1] v4l: event: Add subscription to list before calling "add" operation

2018-11-05 Thread Sakari Ailus
Patch ad608fbcf166 changed how events were subscribed to address an issue elsewhere. As a side effect of that change, the "add" callback was called before the event subscription was added to the list of subscribed events, causing the first event (and possibly other events arriving soon afterwards)

Re: [PATCH v7 06/16] intel-ipu3: mmu: Implement driver

2018-11-05 Thread Tomasz Figa
On Tue, Nov 6, 2018 at 2:50 PM Zhi, Yong wrote: > > Hi, Sakari, > > Thanks for the feedback. > > > -Original Message- > > From: Sakari Ailus [mailto:sakari.ai...@linux.intel.com] > > Sent: Monday, November 5, 2018 3:55 AM > > To: Zhi, Yong > > Cc: linux-media@vger.kernel.org;

RE: [PATCH v7 06/16] intel-ipu3: mmu: Implement driver

2018-11-05 Thread Zhi, Yong
Hi, Sakari, Thanks for the feedback. > -Original Message- > From: Sakari Ailus [mailto:sakari.ai...@linux.intel.com] > Sent: Monday, November 5, 2018 3:55 AM > To: Zhi, Yong > Cc: linux-media@vger.kernel.org; tf...@chromium.org; > mche...@kernel.org; hans.verk...@cisco.com; >

cron job: media_tree daily build: ERRORS

2018-11-05 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: Tue Nov 6 05:00:10 CET 2018 media-tree git hash:dafb7f9aef2fd44991ff1691721ff765a23be27b media_build

Re: [RFC] media: imx: queue subdevice events on the video device in the same pipeline

2018-11-05 Thread Steve Longerbeam
Hi Philipp, Thanks, I've been meaning this too. Comments below. On 11/5/18 7:03 AM, Philipp Zabel wrote: While subdevice and video device are in the same pipeline, pass subdevice events on to userspace via the video device node. Signed-off-by: Philipp Zabel --- This would allow to see

Re: [PATCH v2] Input: Add missing event codes for common IR remote buttons

2018-11-05 Thread Sean Young
On Sat, Nov 03, 2018 at 07:55:32AM -0700, Derek Kelly wrote: > The following patch adds event codes for common buttons found on various > provider and universal remote controls. They represent functions not > covered by existing event codes. Once added, rc_keymaps can be updated > accordingly

[PATCH v2 1/3] media: imx-pxp: Check the return value from clk_prepare_enable()

2018-11-05 Thread Fabio Estevam
clk_prepare_enable() may fail, so we should better check its return value and propagate it in the case of error. Signed-off-by: Fabio Estevam --- Changes since v1: - Properly enumerate the series drivers/media/platform/imx-pxp.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff

[PATCH v2 2/3] media: imx-pxp: Check for pxp_soft_reset() error

2018-11-05 Thread Fabio Estevam
pxp_soft_reset() may fail with a timeout, so it is better to propagate the error in this case. Signed-off-by: Fabio Estevam --- Changes since v1: - None drivers/media/platform/imx-pxp.c | 12 +--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git

[PATCH v2 3/3] media: imx-pxp: Improve pxp_soft_reset() error message

2018-11-05 Thread Fabio Estevam
Improve the pxp_soft_reset() error message by moving it to the caller function, associating it with a proper device and also by displaying the error code. Signed-off-by: Fabio Estevam --- Changes since v1: - Newly introduced in this version drivers/media/platform/imx-pxp.c | 8 1 file

[PATCH 2/2] media: imx-pxp: Check for pxp_soft_reset() error

2018-11-05 Thread Fabio Estevam
pxp_soft_reset() may fail with a timeout, so it is better to propagate the error in this case. Signed-off-by: Fabio Estevam --- drivers/media/platform/imx-pxp.c | 12 +--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/drivers/media/platform/imx-pxp.c

[PATCH] media: imx-pxp: Check the return value from clk_prepare_enable()

2018-11-05 Thread Fabio Estevam
clk_prepare_enable() may fail, so we should better check its return value and propagate it in the case of error. Signed-off-by: Fabio Estevam --- drivers/media/platform/imx-pxp.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/media/platform/imx-pxp.c

[PATCH v4l-utils] Add missing linux/bpf_common.h

2018-11-05 Thread Peter Seiderer
Copy from [1], needed by bpf.h. [1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/plain/include/uapi/linux/bpf_common.h?h=v4.19 Signed-off-by: Peter Seiderer --- include/linux/bpf_common.h | 57 ++ 1 file changed, 57 insertions(+)

Astrometa DVB-T2 2018 update

2018-11-05 Thread Abuse
Enable Sony CXD2837ER slave demon on the Astrometa DVB-T2, known as the 2018 update. Originally based on the patch by kapitanf at https://github.com/torvalds/linux/pull/567, it was not quite right. This is more correct, but probably still wrong. I'm not a kernel dev, but someone may be better

Astrometa DVB-T2 2018 update

2018-11-05 Thread Bob Goddard
Enable Sony CXD2837ER slave demon on the Astrometa DVB-T2, known as the 2018 update. Originally based on the patch by kapitanf at https://github.com/torvalds/linux/pull/567, it was not quite right. This is more correct, but probably still wrong. I'm not a kernel dev, but someone may be better

RE: [PATCH v7 05/16] intel-ipu3: abi: Add structs

2018-11-05 Thread Mani, Rajmohan
Hi Sakari, > -Original Message- > From: Sakari Ailus [mailto:sakari.ai...@linux.intel.com] > Sent: Monday, November 05, 2018 12:28 AM > To: Zhi, Yong > Cc: linux-media@vger.kernel.org; tf...@chromium.org; mche...@kernel.org; > hans.verk...@cisco.com; laurent.pinch...@ideasonboard.com;

Re: [PATCH 01/15] media: coda: fix memory corruption in case more than 32 instances are opened

2018-11-05 Thread Ian Arkver
Hi Philipp, On 05/11/2018 15:24, Philipp Zabel wrote: The ffz() return value is undefined if the instance mask does not contain any zeros. If it returned 32, the following set_bit would corrupt the debugfs_root pointer. Switch to IDA for context index allocation. This also removes the

Re: [PATCH 1/1] v4l: event: Add subscription to list before calling "add" operation

2018-11-05 Thread Dave Stevenson
Hi Sakari On Mon, 5 Nov 2018 at 15:46, Sakari Ailus wrote: > > Patch ad608fbcf166 changed how events were subscribed to address an issue > elsewhere. As a side effect of that change, the "add" callback was called > before the event subscription was added to the list of subscribed events, >

Re: [RFC PATCH 00/11] Convert last remaining g/s_crop/cropcap drivers

2018-11-05 Thread Hans Verkuil
On 11/05/2018 05:08 PM, Sylwester Nawrocki wrote: > Hi Hans, > > On 11/05/2018 02:12 PM, Hans Verkuil wrote: >> Thank you for the review. One question: have you also tested this with at >> least >> one of the affected drivers? >> >> I'd like to have at least one Tested-by line. > > I just

Re: [RFC PATCH 00/11] Convert last remaining g/s_crop/cropcap drivers

2018-11-05 Thread Sylwester Nawrocki
Hi Hans, On 11/05/2018 02:12 PM, Hans Verkuil wrote: > Thank you for the review. One question: have you also tested this with at > least > one of the affected drivers? > > I'd like to have at least one Tested-by line. I just tested it now - video playback on Exynos4210 Trats2 so it covers the

[PATCH] media: rc: ensure close() is called on rc_unregister_device

2018-11-05 Thread Sean Young
If userspace has an open file descriptor on the rc input device or lirc device when rc_unregister_device() is called, then the rc close() is never called. This ensures that the receiver is turned off on the nuvoton-cir driver during shutdown. Signed-off-by: Sean Young ---

Re: [PATCH 1/1] v4l: event: Add subscription to list before calling "add" operation

2018-11-05 Thread Hans Verkuil
On 11/05/2018 04:46 PM, Sakari Ailus wrote: > Patch ad608fbcf166 changed how events were subscribed to address an issue > elsewhere. As a side effect of that change, the "add" callback was called > before the event subscription was added to the list of subscribed events, > causing the first event

[PATCH 1/1] v4l: event: Add subscription to list before calling "add" operation

2018-11-05 Thread Sakari Ailus
Patch ad608fbcf166 changed how events were subscribed to address an issue elsewhere. As a side effect of that change, the "add" callback was called before the event subscription was added to the list of subscribed events, causing the first event (and possibly other events arriving soon afterwards)

[PATCH 10/15] media: coda: never set infinite timeperframe

2018-11-05 Thread Philipp Zabel
v4l2-compliance complains if G_PARM returns 0 in the denominator. Signed-off-by: Philipp Zabel --- drivers/media/platform/coda/coda-common.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/media/platform/coda/coda-common.c

[PATCH 05/15] media: coda: reduce minimum frame size to 48x16 pixels.

2018-11-05 Thread Philipp Zabel
Three macroblocks seem to be the minimum resolution that can be encoded and decoded by the CODA960 h.264 codec. Picture run commands fail for smaller resolutions. Signed-off-by: Philipp Zabel --- drivers/media/platform/coda/coda-common.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)

[PATCH 04/15] media: coda: limit queueing into internal bitstream buffer

2018-11-05 Thread Philipp Zabel
From: Lucas Stach The ringbuffer used to hold the bitstream is very conservatively sized, as keyframes can get very large and still need to fit into this buffer. This means that the buffer is way oversized for the average stream to the extend that it will hold a few hundred frames when the video

[PATCH 15/15] media: coda: debug output when setting visible size via crop selection

2018-11-05 Thread Philipp Zabel
In addition to the S_FMT debug output, S_SELECTION (SEL_TGT_CROP) is relevant to determine encoded size. Add debug output for it. Signed-off-by: Philipp Zabel --- drivers/media/platform/coda/coda-common.c | 3 +++ 1 file changed, 3 insertions(+) diff --git

[PATCH 07/15] media: coda: don't disable IRQs across buffer meta handling

2018-11-05 Thread Philipp Zabel
From: Lucas Stach The CODA driver uses threaded IRQs only, so there is nothing happening in hardirq context that could interfere with the buffer meta handling. Signed-off-by: Lucas Stach --- drivers/media/platform/coda/coda-bit.c| 19 +++

[PATCH 13/15] media: coda: improve queue busy error message

2018-11-05 Thread Philipp Zabel
Use v4l2_type_names to indicate which of the two queues is busy. Signed-off-by: Philipp Zabel --- drivers/media/platform/coda/coda-common.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/media/platform/coda/coda-common.c

[PATCH 06/15] media: coda: remove unused instances list

2018-11-05 Thread Philipp Zabel
The per-device instance list is unused, remove it. Signed-off-by: Philipp Zabel --- drivers/media/platform/coda/coda-common.c | 9 - drivers/media/platform/coda/coda.h| 2 -- 2 files changed, 11 deletions(-) diff --git a/drivers/media/platform/coda/coda-common.c

[PATCH 08/15] media: coda: set V4L2_CAP_TIMEPERFRAME flag in coda_s_parm

2018-11-05 Thread Philipp Zabel
The flag is already set in coda_g_parm, but v4l2-compliance complains about it not being set during S_PARM. Signed-off-by: Philipp Zabel --- drivers/media/platform/coda/coda-common.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/media/platform/coda/coda-common.c

[PATCH 02/15] media: coda: store unmasked fifo position in meta

2018-11-05 Thread Philipp Zabel
Storing the unmasked kfifo->in position as meta->start and ->end allows to more easily compare a point past meta->end with the current kfifo->in. Signed-off-by: Philipp Zabel --- drivers/media/platform/coda/coda-bit.c| 9 +++-- drivers/media/platform/coda/coda-common.c | 1 -

[PATCH 11/15] media: coda: fail S_SELECTION for read-only targets

2018-11-05 Thread Philipp Zabel
v4l2-compose complains if S_SELECTION returns 0 for read-only targets. Signed-off-by: Philipp Zabel --- drivers/media/platform/coda/coda-common.c | 51 +-- 1 file changed, 29 insertions(+), 22 deletions(-) diff --git a/drivers/media/platform/coda/coda-common.c

[PATCH 12/15] media: coda: print SEQ_INIT error code as hex value

2018-11-05 Thread Philipp Zabel
From: Michael Tretter The error code looks much more like a bit field than an error value. Print it as hex rather than decimal. Signed-off-by: Michael Tretter Signed-off-by: Philipp Zabel --- drivers/media/platform/coda/coda-bit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

[PATCH 14/15] media: coda: normalise debug output

2018-11-05 Thread Philipp Zabel
Consistently add the context index to debug output, which otherwise is impossible to make sense of when two contexts are running concurrently. For this purpose, add a convenience macro coda_dbg(). Use the function name with the coda_ prefix stripped as keyword where applicable, and consistently

[PATCH 03/15] media: coda: always hold back decoder jobs until we have enough bitstream payload

2018-11-05 Thread Philipp Zabel
The bitstream prefetch unit reads data in 256 byte blocks with some kind of queueing. For the decoder to see data up to a desired position in the next run, the bitstream has to be filled for 2 256 byte blocks past that position aligned up to the next 256 byte boundary. This should make sure we

[PATCH 01/15] media: coda: fix memory corruption in case more than 32 instances are opened

2018-11-05 Thread Philipp Zabel
The ffz() return value is undefined if the instance mask does not contain any zeros. If it returned 32, the following set_bit would corrupt the debugfs_root pointer. Switch to IDA for context index allocation. This also removes the artificial 32 instance limit for all except CodaDx6.

[PATCH 09/15] media: coda: implement ENUM_FRAMEINTERVALS

2018-11-05 Thread Philipp Zabel
v4l2-compliance complains about S_PARM being supported, but not ENUM_FRAMEINTERVALS. Report a continuous frame interval even though the hardware only supports 16-bit numerator and denominator, with min/max values that can be programmed into the mailbox registers. Signed-off-by: Philipp Zabel ---

[PATCH 1/3] media: imx: add capture compose rectangle

2018-11-05 Thread Philipp Zabel
Allowing to compose captured images into larger memory buffers will let us lift alignment restrictions on CSI crop width. Signed-off-by: Philipp Zabel --- drivers/staging/media/imx/imx-ic-prpencvf.c | 3 +- drivers/staging/media/imx/imx-media-capture.c | 38 +++

[PATCH 3/3] media: imx: lift CSI width alignment restriction

2018-11-05 Thread Philipp Zabel
The CSI subdevice shouldn't have to care about IDMAC line start address alignment. With compose rectangle support in the capture driver, it doesn't have to anymore. Signed-off-by: Philipp Zabel --- drivers/staging/media/imx/imx-media-capture.c | 9 -

[PATCH 2/3] media: imx: set compose rectangle to mbus format

2018-11-05 Thread Philipp Zabel
Prepare for mbus format being smaller than the written rectangle due to burst size. Signed-off-by: Philipp Zabel --- drivers/staging/media/imx/imx-media-capture.c | 55 +-- 1 file changed, 38 insertions(+), 17 deletions(-) diff --git

[RFC] media: imx: queue subdevice events on the video device in the same pipeline

2018-11-05 Thread Philipp Zabel
While subdevice and video device are in the same pipeline, pass subdevice events on to userspace via the video device node. Signed-off-by: Philipp Zabel --- This would allow to see source change events from the source subdevice on the video device node, for example. ---

Re: [PATCH] media: imx: csi: fix enum_mbus_code for unknown mbus format codes

2018-11-05 Thread Philipp Zabel
Hi Steve, On Fri, 2018-02-09 at 17:43 -0800, Steve Longerbeam wrote: [...] > I *think* by implementing init_cfg in the CSI, it will prevent the > NULL deref in csi_enum_mbus_code(). However I think this patch > is a good idea in any case. Ack on both. Can we still get this patch applied?

Re: VIDIOC_SUBSCRIBE_EVENT for V4L2_EVENT_CTRL regression?

2018-11-05 Thread Sakari Ailus
Hi Dave, Hans, Thanks for reporting the issue! On Mon, Nov 05, 2018 at 01:56:40PM +, Dave Stevenson wrote: > Hi Hans > > On Mon, 5 Nov 2018 at 13:18, Hans Verkuil wrote: > > > > On 11/05/2018 01:21 PM, Dave Stevenson wrote: > > > Hi All > > > > > > I'm testing with 4.19 and finding that

Re: VIDIOC_SUBSCRIBE_EVENT for V4L2_EVENT_CTRL regression?

2018-11-05 Thread Dave Stevenson
Hi Hans On Mon, 5 Nov 2018 at 13:18, Hans Verkuil wrote: > > On 11/05/2018 01:21 PM, Dave Stevenson wrote: > > Hi All > > > > I'm testing with 4.19 and finding that testEvents in v4l2-compliance > > is failing with ""failed to find event for control '%s' type %u", ie > > it hasn't got the event

Re: VIDIOC_SUBSCRIBE_EVENT for V4L2_EVENT_CTRL regression?

2018-11-05 Thread Hans Verkuil
On 11/05/2018 02:18 PM, Hans Verkuil wrote: > On 11/05/2018 01:21 PM, Dave Stevenson wrote: >> Hi All >> >> I'm testing with 4.19 and finding that testEvents in v4l2-compliance >> is failing with ""failed to find event for control '%s' type %u", ie >> it hasn't got the event for the inital values.

Re: VIDIOC_SUBSCRIBE_EVENT for V4L2_EVENT_CTRL regression?

2018-11-05 Thread Hans Verkuil
On 11/05/2018 01:21 PM, Dave Stevenson wrote: > Hi All > > I'm testing with 4.19 and finding that testEvents in v4l2-compliance > is failing with ""failed to find event for control '%s' type %u", ie > it hasn't got the event for the inital values. This is with the > various BCM2835 drivers that

Re: [RFC PATCH 00/11] Convert last remaining g/s_crop/cropcap drivers

2018-11-05 Thread Hans Verkuil
Hi Sylwester, On 11/02/2018 05:16 PM, Sylwester Nawrocki wrote: > Hi Hans, > > On Fri, 5 Oct 2018 at 09:49, Hans Verkuil wrote: >> >> From: Hans Verkuil >> >> This patch series converts the last remaining drivers that use g/s_crop and >> cropcap to g/s_selection. > > Thank you for this clean

VIDIOC_SUBSCRIBE_EVENT for V4L2_EVENT_CTRL regression?

2018-11-05 Thread Dave Stevenson
Hi All I'm testing with 4.19 and finding that testEvents in v4l2-compliance is failing with ""failed to find event for control '%s' type %u", ie it hasn't got the event for the inital values. This is with the various BCM2835 drivers that I'm involved with. Having looked at the v4l2-core history

Re: [PATCH v7 06/16] intel-ipu3: mmu: Implement driver

2018-11-05 Thread Sakari Ailus
Hi Yong, On Mon, Oct 29, 2018 at 03:23:00PM -0700, Yong Zhi wrote: > From: Tomasz Figa > > This driver translates IO virtual address to physical > address based on two levels page tables. > > Signed-off-by: Tomasz Figa > Signed-off-by: Yong Zhi > --- ... > +static void

Re: [PATCH v7 05/16] intel-ipu3: abi: Add structs

2018-11-05 Thread Sakari Ailus
Hi Yong, On Mon, Oct 29, 2018 at 03:22:59PM -0700, Yong Zhi wrote: > This add all the structs of IPU3 firmware ABI. > > Signed-off-by: Yong Zhi > Signed-off-by: Rajmohan Mani ... > +struct imgu_abi_shd_intra_frame_operations_data { > + struct imgu_abi_acc_operation > +