Re: [PATCH] media: staging/intel-ipu3: reduce kernel stack usage

2019-03-04 Thread Sakari Ailus
Hi Bingbu, Arnd, On Tue, Mar 05, 2019 at 12:25:18AM +, Cao, Bingbu wrote: ... > > @@ -1744,7 +1745,7 @@ int imgu_css_fmt_try(struct imgu_css *css, > > struct v4l2_rect *const bds = &r[IPU3_CSS_RECT_BDS]; > > struct v4l2_rect *const env = &r[IPU3_CSS_RECT_ENVELOPE]; > > struct v4l2_

Re: [RFC PATCH V0 1/4] media: platform: mtk-isp: Add Mediatek sensor interface driver

2019-03-04 Thread Tomasz Figa
+CC Shik and Keiichi On Thu, Feb 21, 2019 at 4:22 PM Louis Kuo wrote: > > This patch adds Mediatek's sensor interface driver. Sensor interface driver > is a MIPI-CSI2 host driver, namely, a HW camera interface controller. > It support a widely adopted, simple, high-speed protocol primarily intend

[PATCH] media: serial_ir: Fix use-after-free in serial_ir_init_module

2019-03-04 Thread Yue Haibing
From: YueHaibing Syzkaller report this: BUG: KASAN: use-after-free in sysfs_remove_file_ns+0x5f/0x70 fs/sysfs/file.c:468 Read of size 8 at addr 8881dc7ae030 by task syz-executor.0/6249 CPU: 1 PID: 6249 Comm: syz-executor.0 Not tainted 5.0.0-rc8+ #3 Hardware name: QEMU Standard PC (i440FX +

cron job: media_tree daily build: OK

2019-03-04 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 Mar 5 05:00:11 CET 2019 media-tree git hash:15d90a6ae98e6d2c68497b44a491cb9efbb98ab1 media_build git

RE: [PATCH] media: staging/intel-ipu3: reduce kernel stack usage

2019-03-04 Thread Cao, Bingbu
__ BRs, Cao, Bingbu > -Original Message- > From: Arnd Bergmann [mailto:a...@arndb.de] > Sent: Tuesday, March 5, 2019 4:28 AM > To: Sakari Ailus ; Mauro Carvalho Chehab > ; Greg Kroah-Hartman > Cc: Arnd Bergmann ; Zhi, Yong ; Cao, > Bingbu ; linux-media@vger.ke

RE: [PATCH] media: staging/intel-ipu3: mark PM function as __maybe_unused

2019-03-04 Thread Cao, Bingbu
Hi, Bergmann, Thanks for your patch. Reviewed-by: Cao, Bingbu __ BRs, Cao, Bingbu > -Original Message- > From: Arnd Bergmann [mailto:a...@arndb.de] > Sent: Tuesday, March 5, 2019 4:29 AM > To: Sakari Ailus ; Mauro Carvalho Chehab > ; Greg Kroah-Hartman > Cc: Ar

[PATCH] [RESEND] media: don't drop front-end reference count for ->detach

2019-03-04 Thread Arnd Bergmann
A bugfix introduce a link failure in configurations without CONFIG_MODULES: In file included from drivers/media/usb/dvb-usb/pctv452e.c:20:0: drivers/media/usb/dvb-usb/pctv452e.c: In function 'pctv452e_frontend_attach': drivers/media/dvb-frontends/stb0899_drv.h:151:36: error: weak declaration of '

[PATCH] media: staging: davinci_vpfe: disallow building with COMPILE_TEST

2019-03-04 Thread Arnd Bergmann
The driver should really call dm365_isif_setup_pinmux() through a callback, but it runs platform specific code by itself, which never actually compiled: /git/arm-soc/drivers/staging/media/davinci_vpfe/dm365_isif.c:2028:2: error: implicit declaration of function 'davinci_cfg_reg' [-Werror,-Wimpli

[PATCH] media: staging/intel-ipu3: mark PM function as __maybe_unused

2019-03-04 Thread Arnd Bergmann
The imgu_rpm_dummy_cb() looks like an API misuse that is explained in the comment above it. Aside from that, it also causes a warning when power management support is disabled: drivers/staging/media/ipu3/ipu3.c:794:12: error: 'imgu_rpm_dummy_cb' defined but not used [-Werror=unused-function] The

[PATCH] media: staging/intel-ipu3-v4l: reduce kernel stack usage

2019-03-04 Thread Arnd Bergmann
The v4l2_pix_format_mplane structure is too large to be put on the kernel stack, as we can see in 32-bit builds: drivers/staging/media/ipu3/ipu3-v4l2.c: In function 'imgu_fmt': drivers/staging/media/ipu3/ipu3-v4l2.c:753:1: error: the frame size of 1028 bytes is larger than 1024 bytes [-Werror=fra

[PATCH] media: staging/intel-ipu3: reduce kernel stack usage

2019-03-04 Thread Arnd Bergmann
The imgu_css_queue structure is too large to be put on the kernel stack, as we can see in 32-bit builds: drivers/staging/media/ipu3/ipu3-css.c: In function 'imgu_css_fmt_try': drivers/staging/media/ipu3/ipu3-css.c:1863:1: error: the frame size of 1172 bytes is larger than 1024 bytes [-Werror=fram

[PATCH v2 10/11] rockchip/vpu: Add support for non-standard controls

2019-03-04 Thread Ezequiel Garcia
Rework the way controls are registered by the driver, so it can support non-standard controls, such as those used by stateless codecs. Signed-off-by: Ezequiel Garcia --- .../media/rockchip/vpu/rk3288_vpu_hw.c| 2 +- .../media/rockchip/vpu/rk3399_vpu_hw.c| 2 +- .../staging/medi

[PATCH v2 11/11] rockchip/vpu: Add support for MPEG-2 decoding

2019-03-04 Thread Ezequiel Garcia
From: Jonas Karlman Add MPEG-2 decoding, only on RK3399. Other SoCs and support for other codecs will be added in the future. Signed-off-by: Jonas Karlman Signed-off-by: Ezequiel Garcia --- drivers/staging/media/rockchip/vpu/Makefile | 4 +- .../media/rockchip/vpu/rk3399_vpu_hw.c|

[PATCH v2 09/11] rockchip/vpu: Add decoder boilerplate

2019-03-04 Thread Ezequiel Garcia
This commit adds the needed boilerplate code to support the VPU in decoding operation. Two v4l2 interfaces are exposed, one for encoding and one for decoding, but a single m2m device is shared by them, so jobs are properly serialized. Signed-off-by: Ezequiel Garcia --- drivers/staging/media/rock

[PATCH v2 06/11] rockchip/vpu: Cleanup JPEG bounce buffer management

2019-03-04 Thread Ezequiel Garcia
In order to make the code more generic, introduce a pair of start/stop codec operations, and use them to allocate and release the JPEG bounce buffer. Signed-off-by: Ezequiel Garcia --- .../media/rockchip/vpu/rk3288_vpu_hw.c| 2 ++ .../rockchip/vpu/rk3288_vpu_hw_jpeg_enc.c | 4 +--

[PATCH v2 07/11] rockchip/vpu: Open-code media controller register

2019-03-04 Thread Ezequiel Garcia
In preparation to support decoders, using a single memory-to-memory device, we need to roll our own media controller entities registration. Signed-off-by: Ezequiel Garcia --- .../staging/media/rockchip/vpu/rockchip_vpu.h | 35 .../media/rockchip/vpu/rockchip_vpu_drv.c | 181 +++

[PATCH v2 05/11] rockchip/vpu: Cleanup macroblock alignment

2019-03-04 Thread Ezequiel Garcia
We need to make the macrobock alignment generic, in order to support multiple codecs. Signed-off-by: Ezequiel Garcia --- .../media/rockchip/vpu/rockchip_vpu_enc.c | 20 --- 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/drivers/staging/media/rockchip/vpu/rockc

[PATCH v2 02/11] media: Introduce helpers to fill pixel format structs

2019-03-04 Thread Ezequiel Garcia
Add two new API helpers, v4l2_fill_pixfmt and v4l2_fill_pixfmt_mp, to be used by drivers to calculate plane sizes and bytes per lines. Note that driver-specific padding and alignment are not taken into account, and must be done by drivers using this API. Signed-off-by: Ezequiel Garcia --- drive

[PATCH v2 03/11] rockchip/vpu: Use pixel format helpers

2019-03-04 Thread Ezequiel Garcia
Now that we've introduced the pixel format helpers, use them in vpu driver, and get rid of the internal helpers. Signed-off-by: Ezequiel Garcia --- .../media/rockchip/vpu/rockchip_vpu_enc.c | 91 +-- 1 file changed, 2 insertions(+), 89 deletions(-) diff --git a/drivers/stagi

[PATCH v2 04/11] rockchip/vpu: Use v4l2_m2m_buf_copy_metadata

2019-03-04 Thread Ezequiel Garcia
Use the recently introduced v4l2_m2m_buf_copy_metadata helper and get rid of some code. Signed-off-by: Ezequiel Garcia --- drivers/staging/media/rockchip/vpu/rockchip_vpu_drv.c | 9 + 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/drivers/staging/media/rockchip/vpu/rockchip

[PATCH v2 08/11] rockchip/vpu: Support the Request API

2019-03-04 Thread Ezequiel Garcia
Introduce support for the Request API. Although the JPEG encoder does not mandate using the Request API, it's perfectly possible to use it, if the application wants to. In addition, add helpers that will be used by video decoders. Signed-off-by: Ezequiel Garcia --- .../rockchip/vpu/rk3399_vpu_h

[PATCH v2 01/11] rockchip/vpu: Rename pixel format helpers

2019-03-04 Thread Ezequiel Garcia
The rockchip VPU driver uses generic names for its pixel format helpers. We want to use the same names for generic versions of these helpers, so rename the rockchip ones. The driver will be switched to the generic helpers later. Signed-off-by: Ezequiel Garcia --- .../staging/media/rockchip/vpu/

[PATCH v2 00/11] Add MPEG-2 decoding to Rockchip VPU

2019-03-04 Thread Ezequiel Garcia
This series introduces the decoding infrastructure that will be used to add support for other codecs such as VP8, VP9 and H.264. As explained in the cover letter for the v1 patchset, the driver is now exposing two video device nodes. The VPU encoder is exposed on /dev/video0, and the VPU decoder i

Re: [PATCH v4 1/2] media: uapi: Add H264 low-level decoder API compound controls.

2019-03-04 Thread Ezequiel Garcia
On Wed, 2019-02-20 at 15:17 +0100, Maxime Ripard wrote: > From: Pawel Osciak > > Stateless video codecs will require both the H264 metadata and slices in > order to be able to decode frames. > > This introduces the definitions for a new pixel format for H264 slices that > have been parsed, as we

Re: [PATCH 3/3] media: tc358746: update MAINTAINERS file

2019-03-04 Thread Sakari Ailus
On Mon, Mar 04, 2019 at 06:31:51PM +0100, Marco Felsch wrote: > Hi Sakari, > > On 19-02-18 13:46, Sakari Ailus wrote: > > Hi Marco, > > > > On Tue, Dec 18, 2018 at 03:12:40PM +0100, Marco Felsch wrote: > > > Add me as partial maintainer, others are welcome too. > > > > > > Signed-off-by: Marco F

Re: [PATCH 1/3] media: dt-bindings: add bindings for Toshiba TC358746

2019-03-04 Thread Sakari Ailus
Hi Marco, On Mon, Mar 04, 2019 at 05:55:28PM +0100, Marco Felsch wrote: > > > (more device specific) > > > tc358746,default-mode = /* Parallel-in -> CSI-out */ > > > tc358746,default-mode = /* CSI-in -> Parallel-out */ > > > > > > or > > > > > > (more generic) > > > tc358746,default-dir = > >

Finding where in kernel a frame is captured

2019-03-04 Thread Ranran
Hello, I try to find the exact place where frame are captured in kernel. I rather find the first place, but if that is a problem, I will use another method you are familiar with. I use tegra tx1 with mipi camera of a development kit, so I tried to add some printing in kernel in vi2_fops.c in tegra

Re: [PATCH 3/3] media: tc358746: update MAINTAINERS file

2019-03-04 Thread Marco Felsch
Hi Sakari, On 19-02-18 13:46, Sakari Ailus wrote: > Hi Marco, > > On Tue, Dec 18, 2018 at 03:12:40PM +0100, Marco Felsch wrote: > > Add me as partial maintainer, others are welcome too. > > > > Signed-off-by: Marco Felsch > > --- > > MAINTAINERS | 7 +++ > > 1 file changed, 7 insertions(+)

Re: [PATCH 1/3] media: dt-bindings: add bindings for Toshiba TC358746

2019-03-04 Thread Marco Felsch
Hi Sakari, On 19-03-04 14:36, Sakari Ailus wrote: > Hi Marco, > > On Fri, Mar 01, 2019 at 02:01:18PM +0100, Marco Felsch wrote: > > Hi Ian, > > > > On 19-03-01 11:07, Ian Arkver wrote: > > > Hi, > > > > > > On 01/03/2019 10:52, Marco Felsch wrote: > > > > Hi Sakari, > > > > > > > > On 19-02-18

Re: [PATCH 1/3] media: dt-bindings: add bindings for Toshiba TC358746

2019-03-04 Thread Marco Felsch
Hi Jacopo, On 19-03-04 10:38, Jacopo Mondi wrote: > Hi Marco, > > On Fri, Mar 01, 2019 at 11:26:48AM +0100, Marco Felsch wrote: > > On 19-02-13 18:57, Jacopo Mondi wrote: > > > Hi Marco, > > > thanks for the patch. > > > > > > I have some comments, which I hope might get the ball rolling... >

Re: [PATCH] media: uvcvideo: Read support

2019-03-04 Thread Laurent Pinchart
Hello, On Mon, Mar 04, 2019 at 03:36:32PM +, Kieran Bingham wrote: > On 04/03/2019 12:35, Hugues Fruchet wrote: > > Add support of read() call from userspace by implementing > > uvc_v4l2_read() with vb2_read() helper. > > Just thinking out loud, > > This opens up UVC devices to read raw full

Re: [PATCH] media: uvcvideo: Read support

2019-03-04 Thread Kieran Bingham
Hi Hughes, On 04/03/2019 12:35, Hugues Fruchet wrote: > Add support of read() call from userspace by implementing > uvc_v4l2_read() with vb2_read() helper. Just thinking out loud, This opens up UVC devices to read raw full frame images through this interface as well. Due to the UVC protocol, th

Spelling errors in lib/libv4l2/libv4l2.c

2019-03-04 Thread Jason H
A very minor point, but I've found some then/than confusion: 746: V4L2_LOG_ERR("attempting to open more then %d video devices\n", // should be than 1038: V4L2_LOG_ERR("set_fmt gave us a different result then try_fmt!\n"); // should be than 1318: /* No more buffers then we can manage please

Re: [linux-uvc-devel] HD Camera (4e45:5501) support

2019-03-04 Thread Amila Manoj
Sending again as plain text to linux-media list. On Mon, Mar 4, 2019 at 3:02 PM Amila Manoj wrote: > > Hello Laurent and Kieran, > > Thank you very much for the information. > > I haven't tried other uvc cameras on the system. This is a fresh Ubuntu > installation. > > Installed all available up

Re: [PATCH] media: uvcvideo: Read support

2019-03-04 Thread Hans Verkuil
On 3/4/19 1:35 PM, Hugues Fruchet wrote: > Add support of read() call from userspace by implementing > uvc_v4l2_read() with vb2_read() helper. > > Signed-off-by: Hugues Fruchet > --- > drivers/media/usb/uvc/uvc_queue.c | 15 ++- > drivers/media/usb/uvc/uvc_v4l2.c | 11 --- >

Re: [PATCH] media: uvcvideo: Read support

2019-03-04 Thread Hans Verkuil
On 3/4/19 1:35 PM, Hugues Fruchet wrote: > Add support of read() call from userspace by implementing > uvc_v4l2_read() with vb2_read() helper. > > Signed-off-by: Hugues Fruchet > --- > drivers/media/usb/uvc/uvc_queue.c | 15 ++- > drivers/media/usb/uvc/uvc_v4l2.c | 11 --- >

[PATCH] media: uvcvideo: Read support

2019-03-04 Thread Hugues Fruchet
Add support of read() call from userspace by implementing uvc_v4l2_read() with vb2_read() helper. Signed-off-by: Hugues Fruchet --- drivers/media/usb/uvc/uvc_queue.c | 15 ++- drivers/media/usb/uvc/uvc_v4l2.c | 11 --- drivers/media/usb/uvc/uvcvideo.h | 2 ++ 3 files chang

Re: [PATCH 1/3] media: dt-bindings: add bindings for Toshiba TC358746

2019-03-04 Thread Sakari Ailus
Hi Marco, On Fri, Mar 01, 2019 at 02:01:18PM +0100, Marco Felsch wrote: > Hi Ian, > > On 19-03-01 11:07, Ian Arkver wrote: > > Hi, > > > > On 01/03/2019 10:52, Marco Felsch wrote: > > > Hi Sakari, > > > > > > On 19-02-18 12:03, Sakari Ailus wrote: > > > > Hi Marco, > > > > > > > > My apologies

[PATCH] Support of /dev/video read with USB camera devices

2019-03-04 Thread Hugues Fruchet
Currently, read() call from /dev/video entry of an USB camera is returning invalid argument error. This is quite common for userspace application to read compressed data such as JPEG from /dev/video then redirect those data to a multimedia player or any other compressed format consumer, see [1]. T

Re: [PATCH v2 09/30] media: entity: Swap pads if route is checked from source to sink

2019-03-04 Thread Jacopo Mondi
Hi Laurent, On Fri, Feb 22, 2019 at 02:18:11PM +0200, Laurent Pinchart wrote: > Hi Jacopo, > > On Mon, Feb 18, 2019 at 10:21:07AM +0100, Jacopo Mondi wrote: > > On Tue, Jan 22, 2019 at 05:20:30PM +0200, Laurent Pinchart wrote: > > > On Tue, Jan 22, 2019 at 05:15:06PM +0200, Sakari Ailus wrote: > >

Re: [PATCH 1/3] media: dt-bindings: add bindings for Toshiba TC358746

2019-03-04 Thread Sakari Ailus
Hi Macro, On Fri, Mar 01, 2019 at 11:52:35AM +0100, Marco Felsch wrote: > Hi Sakari, > > On 19-02-18 12:03, Sakari Ailus wrote: > > Hi Marco, > > > > My apologies for reviewing this so late. You've received good comments > > already. I have a few more. > > Thanks for your review for the other p

Re: [RFC PATCH v2 5/5] media: vsp1: Provide partition overlap algorithm

2019-03-04 Thread Kieran Bingham
On 01/03/2019 17:08, Kieran Bingham wrote: > From: Kieran Bingham > > To improve image quality when scaling using the UDS we need to correctly > determine the start phase value for each partition window, and apply a > margin to overlap discontinous pixels. > > Provide helper functions for calcul

Re: [PATCH 1/3] media: dt-bindings: add bindings for Toshiba TC358746

2019-03-04 Thread Jacopo Mondi
Hi Marco, Ian, On Fri, Mar 01, 2019 at 02:01:18PM +0100, Marco Felsch wrote: > Hi Ian, > > On 19-03-01 11:07, Ian Arkver wrote: > > Hi, > > > > On 01/03/2019 10:52, Marco Felsch wrote: > > > Hi Sakari, > > > > > > On 19-02-18 12:03, Sakari Ailus wrote: > > > > Hi Marco, > > > > > > > > My apologie

Re: [PATCH 1/3] media: dt-bindings: add bindings for Toshiba TC358746

2019-03-04 Thread Jacopo Mondi
Hi Marco, On Fri, Mar 01, 2019 at 11:26:48AM +0100, Marco Felsch wrote: > On 19-02-13 18:57, Jacopo Mondi wrote: > > Hi Marco, > > thanks for the patch. > > > > I have some comments, which I hope might get the ball rolling... > > Hi Jacopo, > > thanks for your review and sorry for the late res