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

2019-02-21 Thread Tomasz Figa
Hi Maxime, On Wed, Feb 20, 2019 at 11:17 PM 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 pa

[linux-next:master 8840/10202] drivers/staging/media/imx/imx7-media-csi.c:1082 imx7_csi_set_fmt() error: uninitialized symbol 'cc'.

2019-02-21 Thread Dan Carpenter
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master head: 550f4769c7c4a84e3966f20887c6e249c5f2afc4 commit: 05f634040c0d05f59f2dcd39722157cb3b57c85b [8840/10202] media: staging/imx7: add imx7 CSI subdev driver New smatch warnings: drivers/staging/media/imx/imx7-me

[PATCH] media: cx18: update *pos correctly in cx18_read_pos()

2019-02-21 Thread Dan Carpenter
We should be updating *pos. The current code is a no-op. Fixes: 1c1e45d17b66 ("V4L/DVB (7786): cx18: new driver for the Conexant CX23418 MPEG encoder chip") Signed-off-by: Dan Carpenter --- drivers/media/pci/cx18/cx18-fileops.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH] media: ivtv: update *pos correctly in ivtv_read_pos()

2019-02-21 Thread Dan Carpenter
We had intended to update *pos, but the current code is a no-op. Fixes: 1a0adaf37c30 ("V4L/DVB (5345): ivtv driver for Conexant cx23416/cx23415 MPEG encoder/decoder") Signed-off-by: Dan Carpenter --- drivers/media/pci/ivtv/ivtv-fileops.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) di

[PATCH] media: staging/imx7: Fix an error code in mipi_csis_clk_get()

2019-02-21 Thread Dan Carpenter
We accidentally return IS_ERR(), which is 1, instead of the PTR_ERR() which is the negative error code. Fixes: 7807063b862b ("media: staging/imx7: add MIPI CSI-2 receiver subdev for i.MX7") Signed-off-by: Dan Carpenter --- drivers/staging/media/imx/imx7-mipi-csis.c | 2 +- 1 file changed, 1 ins

cron job: media_tree daily build: OK

2019-02-21 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 Feb 22 05:00:15 CET 2019 media-tree git hash:9fabe1d108ca4755a880de43f751f1c054f8894d media_build git

Re: [PATCH] media: imx: vdic: add frame skipping support

2019-02-21 Thread Steve Longerbeam
Hi Gael, Some general comments before getting to specifics below. First, the frame skipping register interface in IPUv3 is very similar between CSI/SMFC, VDIC, IC PRPENC, and IC PRPVF. They all support the same register frame skipping interface, the only difference being the maximum skip set.

Never checked NULL pointer in drivers/media/v4l2-core/videobuf-core.c

2019-02-21 Thread Shaobo He
Hello everyone, I found that macro `CALLPTR` in drivers/media/v4l2-core/videobuf-core.c can evaluate to NULL yet all its usages (__videobuf_copy_to_user, __videobuf_copy_stream) are never NULL checked. I doubt but am not completely sure that use cases of the CALLPTR macro can accept NULL point

Re: Problematic code in media/v4l2-core/v4l2-mem2mem.c

2019-02-21 Thread Shaobo He
Hi Laurent, Thank you very much for your reply. While I was working on a patch, I realized that if we drop the two problematic NULL checks, we essentially eliminate one path of `v4l2_m2m_get_vq` where a NULL pointer is returned. So here comes a question, we may want to remove all the NULL chec

Re: [PATCH v2 17/30] v4l: subdev: compat: Implement handling for VIDIOC_SUBDEV_[GS]_ROUTING

2019-02-21 Thread Sakari Ailus
On Mon, Feb 18, 2019 at 12:21:09PM +0100, Jacopo Mondi wrote: > Hi Laurent, Sakari, > > On Wed, Jan 16, 2019 at 01:53:03AM +0200, Laurent Pinchart wrote: > > Hi Niklas, > > > > Thank you for the patch. > > > > On Fri, Nov 02, 2018 at 12:31:31AM +0100, Niklas Söderlund wrote: > > > From: Sakari Ail

Re: [PATCH v2 16/30] v4l: subdev: Add [GS]_ROUTING subdev ioctls and operations

2019-02-21 Thread Sakari Ailus
Hi Jacopo, On Thu, Feb 21, 2019 at 03:59:20PM +0100, Jacopo Mondi wrote: > Hi Sakari, Laurent, Niklas, >(another) quick question, but a different one :) > > On Wed, Jan 16, 2019 at 01:51:45AM +0200, Laurent Pinchart wrote: > > Hi Niklas, > > > > Thank you for the patch. > > > > On Fri, Nov 02

Re: [PATCH v4 0/7] VSP1: Display writeback support

2019-02-21 Thread Laurent Pinchart
Hi Brian, On Thu, Feb 21, 2019 at 01:44:56PM +, Brian Starkey wrote: > On Thu, Feb 21, 2019 at 02:23:10PM +0200, Laurent Pinchart wrote: > > On Thu, Feb 21, 2019 at 12:19:13PM +, Brian Starkey wrote: > > [snip] > > >> I used a pre-existing internal tool which does exactly that. > > > >

Re: [PATCH v2 16/30] v4l: subdev: Add [GS]_ROUTING subdev ioctls and operations

2019-02-21 Thread Sakari Ailus
Hi Jacopo, On Thu, Feb 21, 2019 at 03:39:40PM +0100, Jacopo Mondi wrote: > Hi Sakari, >one quick question > > On Fri, Nov 02, 2018 at 12:31:30AM +0100, Niklas Söderlund wrote: > > From: Laurent Pinchart > > > > Signed-off-by: Laurent Pinchart > > Signed-off-by: Michal Simek > > > > - Add s

Re: [RESEND PATCH 3/7] mm/gup: Change GUP fast to use flags rather than a write 'bool'

2019-02-21 Thread Ira Weiny
On Thu, Feb 21, 2019 at 08:48:41AM +0530, Souptick Joarder wrote: > Hi Ira, > > On Wed, Feb 20, 2019 at 11:01 AM wrote: > > > > From: Ira Weiny > > > > To facilitate additional options to get_user_pages_fast() change the > > singular write parameter to be gup_flags. > > > > This patch does not c

Re: Problematic code in media/v4l2-core/v4l2-mem2mem.c

2019-02-21 Thread Laurent Pinchart
Hi Shaobo, On Thu, Feb 21, 2019 at 11:11:32AM -0700, Shaobo wrote: > Hello everyone, > > I think I brought up this issue before but didn't resolve it completely. > Now I'd like to double check this and if we can agree on it, I'd also > like to submit a patch to fix it. The problem is that funct

Re: [PATCH 01/10] media: Introduce helpers to fill pixel format structs

2019-02-21 Thread Ezequiel Garcia
On Wed, 2019-02-20 at 09:39 +0100, Hans Verkuil wrote: > On 2/20/19 7:53 AM, Tomasz Figa wrote: > > On Thu, Feb 7, 2019 at 1:36 AM Hans Verkuil wrote: > > > On 2/6/19 5:22 PM, Ezequiel Garcia wrote: > > > > On Wed, 2019-02-06 at 11:43 +0100, Hans Verkuil wrote: > > > > > Hi Ezequiel, > > > > > >

Problematic code in media/v4l2-core/v4l2-mem2mem.c

2019-02-21 Thread Shaobo
Hello everyone, I think I brought up this issue before but didn't resolve it completely. Now I'd like to double check this and if we can agree on it, I'd also like to submit a patch to fix it. The problem is that function `get_queue_ctx` can never return a NULL pointer unless pointer overflow

Re: [PATCH v4 2/2] media: cedrus: Add H264 decoding support

2019-02-21 Thread Jernej Škrabec
Hi, Dne sreda, 20. februar 2019 ob 18:50:54 CET je Jernej Škrabec napisal(a): > Hi! > > I really wanted to do another review on previous series but got distracted > by analyzing one particulary troublesome H264 sample. It still doesn't work > correctly, so I would ask you if you can test it with

Re: [PATCH v4 05/12] media: ov5640: Compute the clock rate at runtime

2019-02-21 Thread Benoit Parrot
Hi Maxime, A couple of questions, Maxime Ripard wrote on Thu [2018-Oct-11 04:21:00 -0500]: > The clock rate, while hardcoded until now, is actually a function of the > resolution, framerate and bytes per pixel. Now that we have an algorithm to > adjust our clock rate, we can select it dynamical

Re: [PATCH v2 16/30] v4l: subdev: Add [GS]_ROUTING subdev ioctls and operations

2019-02-21 Thread Jacopo Mondi
Hi Sakari, Laurent, Niklas, (another) quick question, but a different one :) On Wed, Jan 16, 2019 at 01:51:45AM +0200, Laurent Pinchart wrote: > Hi Niklas, > > Thank you for the patch. > > On Fri, Nov 02, 2018 at 12:31:30AM +0100, Niklas Söderlund wrote: > > From: Laurent Pinchart > > > > Sign

Re: [PATCH v2 16/30] v4l: subdev: Add [GS]_ROUTING subdev ioctls and operations

2019-02-21 Thread Jacopo Mondi
Hi Sakari, one quick question On Fri, Nov 02, 2018 at 12:31:30AM +0100, Niklas Söderlund wrote: > From: Laurent Pinchart > > Signed-off-by: Laurent Pinchart > Signed-off-by: Michal Simek > > - Add sink and source streams for multiplexed links > - Copy the argument back in case of an error. T

Re: [PATCH] media: dvb/earth-pt1: fix wrong initialization for demod blocks

2019-02-21 Thread Akihiro TSUKADA
Hi, thank you for reviewing my patch, ( <20190110095623.28070-1-tsk...@gmail.com> https://patchwork.linuxtv.org/patch/53834/ ), and excuse me for my late reply. I somehow lost your mail and noticed it just today by checking Patchwork. On Mon, 18 Feb 2019 21:04:28 +, you wrote: > It might b

[PATCH 4/7] media-entity: set ent_enum->bmap to NULL after freeing it

2019-02-21 Thread Hans Verkuil
Ensure that this pointer is set to NULL after it is freed. The vimc driver has a static media_entity and after unbinding and rebinding the vimc device the media code will try to free this pointer again since it wasn't set to NULL. Signed-off-by: Hans Verkuil --- drivers/media/media-entity.c | 1

[PATCH 7/7] vimc: free vimc_cap_device when the last user disappears

2019-02-21 Thread Hans Verkuil
Don't free vimc_cap_device immediately, instead do this in the video_device release function which is called when the last user closes the video device. Only then is it safe to free the memory. Signed-off-by: Hans Verkuil --- drivers/media/platform/vimc/vimc-capture.c | 13 ++--- 1 file

[PATCH 3/7] vivid: use vzalloc for dev->bitmap_out

2019-02-21 Thread Hans Verkuil
When vivid is unloaded it used vfree to free dev->bitmap_out, but it was actually allocated using kmalloc. Use vzalloc instead, conform what vivid-vid-cap.c does. Signed-off-by: Hans Verkuil --- drivers/media/platform/vivid/vivid-vid-out.c | 14 +- 1 file changed, 9 insertions(+), 5

[PATCH 2/7] media-devnode: fill in media chardev kobject to ease debugging

2019-02-21 Thread Hans Verkuil
The media chardev kobject has no name, which made it hard to debug when kobject debugging is turned on. Signed-off-by: Hans Verkuil --- drivers/media/media-devnode.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/media/media-devnode.c b/drivers/media/media-devnode.c index 6b87a721dc

[PATCH 1/7] cec: fill in cec chardev kobject to ease debugging

2019-02-21 Thread Hans Verkuil
The cec chardev kobject has no name, which made it hard to debug when kobject debugging is turned on. Signed-off-by: Hans Verkuil --- drivers/media/cec/cec-core.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/media/cec/cec-core.c b/drivers/media/cec/cec-core.c index cc875dabd765..f

[PATCH 5/7] vim2m: replace devm_kzalloc by kzalloc

2019-02-21 Thread Hans Verkuil
It is not possible to use devm_kzalloc since that memory is freed immediately when the device instance is unbound. Various objects like the video device may still be in use since someone has the device node open, and when that is closed it expects the memory to be around. So use kzalloc and relea

[PATCH 0/7] Various core and virtual driver fixes

2019-02-21 Thread Hans Verkuil
Various fixes for bugs that I found while working on the regression test-media script. The CONFIG_DEBUG_KOBJECT_RELEASE=y option in particular found a bunch of bugs where things were not released in the right order. Note that the first two patches are not bug fixes, but they help debugging kobjec

[PATCH 6/7] v4l2-device: v4l2_device_release_subdev_node can't reference sd

2019-02-21 Thread Hans Verkuil
When the v4l-subdev device node is released it calls the v4l2_device_release_subdev_node() function which sets sd->devnode to NULL. However, the v4l2_subdev struct may already be released causing this to write in freed memory. Instead just use the regular video_device_release release function (ju

Re: [PATCH v2 25/30] adv748x: csi2: only allow formats on sink pads

2019-02-21 Thread Jacopo Mondi
Hi Niklas, On Fri, Nov 02, 2018 at 12:31:39AM +0100, Niklas Söderlund wrote: > Once the CSI-2 subdevice of the ADV748X becomes aware of multiplexed > streams the format of the source pad is of no value as it carries > multiple streams. Prepare for this by explicitly denying setting a > format on a

Re: [PATCH v4 0/7] VSP1: Display writeback support

2019-02-21 Thread Daniel Vetter
On Thu, Feb 21, 2019 at 12:19:13PM +, Brian Starkey wrote: > Hi Laurent, > > On Thu, Feb 21, 2019 at 12:02:57PM +0200, Laurent Pinchart wrote: > > Hi Brian, > > > > On Thu, Feb 21, 2019 at 09:50:19AM +, Brian Starkey wrote: > > > On Thu, Feb 21, 2019 at 10:23:17AM +0200, Laurent Pinchart

Re: [PATCH v4 0/7] VSP1: Display writeback support

2019-02-21 Thread Brian Starkey
On Thu, Feb 21, 2019 at 02:23:10PM +0200, Laurent Pinchart wrote: > On Thu, Feb 21, 2019 at 12:19:13PM +, Brian Starkey wrote: [snip] > > > > I used a pre-existing internal tool which does exactly that. > > Any hope of sharing the sources ? > Not in a timescale or form which would be usef

Re: [PATCH v4 0/7] VSP1: Display writeback support

2019-02-21 Thread Laurent Pinchart
Hi Brian, On Thu, Feb 21, 2019 at 12:19:13PM +, Brian Starkey wrote: > On Thu, Feb 21, 2019 at 12:02:57PM +0200, Laurent Pinchart wrote: > > On Thu, Feb 21, 2019 at 09:50:19AM +, Brian Starkey wrote: > >> On Thu, Feb 21, 2019 at 10:23:17AM +0200, Laurent Pinchart wrote: > >>> On Mon, Feb 1

Re: [PATCH v4 0/7] VSP1: Display writeback support

2019-02-21 Thread Brian Starkey
Hi Laurent, On Thu, Feb 21, 2019 at 12:02:57PM +0200, Laurent Pinchart wrote: > Hi Brian, > > On Thu, Feb 21, 2019 at 09:50:19AM +, Brian Starkey wrote: > > On Thu, Feb 21, 2019 at 10:23:17AM +0200, Laurent Pinchart wrote: > > > On Mon, Feb 18, 2019 at 12:22:58PM +, Brian Starkey wrote: >

Re: [PATCH v4 0/7] VSP1: Display writeback support

2019-02-21 Thread Laurent Pinchart
Hi Brian, On Thu, Feb 21, 2019 at 09:50:19AM +, Brian Starkey wrote: > On Thu, Feb 21, 2019 at 10:23:17AM +0200, Laurent Pinchart wrote: > > On Mon, Feb 18, 2019 at 12:22:58PM +, Brian Starkey wrote: > >> On Sun, Feb 17, 2019 at 04:48:45AM +0200, Laurent Pinchart wrote: > >>> Hello, > >>>

Re: [PATCH v4 0/7] VSP1: Display writeback support

2019-02-21 Thread Brian Starkey
Hi Laurent, On Thu, Feb 21, 2019 at 10:23:17AM +0200, Laurent Pinchart wrote: > Hi Brian, > > On Mon, Feb 18, 2019 at 12:22:58PM +, Brian Starkey wrote: > > On Sun, Feb 17, 2019 at 04:48:45AM +0200, Laurent Pinchart wrote: > > > Hello, > > > > > > This patch series implements display writeba

Re: [PATCH V2 2/2] Add suport for Avermedia TD310

2019-02-21 Thread Sean Young
s/suport/support in title. On Wed, Feb 20, 2019 at 10:36:16PM +0100, Jose Alberto Reguero wrote: > This patch add support for Avermedia TD310 usb stik. stick > > Signed-off-by: Jose Alberto Reguero > > diff -upr linux/drivers/media/usb/dvb-usb-v2/af9035.c > linux.new/drivers/media/usb/dvb-

Re: [PATCH V2 1/2] af9035: init i2c already in it930x_frontend_attach

2019-02-21 Thread Sean Young
On Wed, Feb 20, 2019 at 10:36:04PM +0100, Jose Alberto Reguero wrote: > This patch init i2c in it930x_frontend_attach instead of it930x_tuner_attach. This needs to describe why you are moving it. We can see in the patch that you've moved it. Something like "we need i2c to be available in it930x_f

Re: [PATCH v4 0/7] VSP1: Display writeback support

2019-02-21 Thread Laurent Pinchart
Hi Brian, On Mon, Feb 18, 2019 at 12:22:58PM +, Brian Starkey wrote: > On Sun, Feb 17, 2019 at 04:48:45AM +0200, Laurent Pinchart wrote: > > Hello, > > > > This patch series implements display writeback support for the R-Car > > Gen3 platforms in the VSP1 driver. > > > > DRM/KMS provides a w