[PATCH v2] media: i2c: wm9090: replace codec to component

2018-03-28 Thread Kuninori Morimoto
From: Kuninori Morimoto Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 0 -> .idle_bias_on = 1 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1

Re: [PATCH] media: i2c: wm9090: replace codec to component

2018-03-28 Thread Kuninori Morimoto
Hi Thank you for this report. I will post v2 patch, soon kbuild test robot wrote: > > [1 ] > Hi Kuninori, > > Thank you for the patch! Yet something to improve: > > [auto build test ERROR on linuxtv-media/master] > [also build test ERROR on next-20180328] >

Re: [PATCH for v3.18 00/18] Backport CVE-2017-13166 fixes to Kernel 3.18

2018-03-28 Thread Greg KH
On Thu, Mar 29, 2018 at 08:22:08AM +0900, Inki Dae wrote: > Really thanks for doing this. :) There would be many users who use > Linux-3.18 for their products yet. For new products? They really should not be. The kernel is officially end-of-life, but I'm keeping it alive for a short while

cron job: media_tree daily build: WARNINGS

2018-03-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: Thu Mar 29 05:00:13 CEST 2018 media-tree git hash:6ccd228e0cfce2a4f44558422d25c60fcb1a6710 media_build

Re: [PATCH] media: i2c: wm9090: replace codec to component

2018-03-28 Thread kbuild test robot
Hi Kuninori, Thank you for the patch! Yet something to improve: [auto build test ERROR on linuxtv-media/master] [also build test ERROR on next-20180328] [cannot apply to v4.16-rc7] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https

Re: [linux-sunxi] [PATCH v9 0/2] Initial Allwinner V3s CSI Support

2018-03-28 Thread Yong
Hi, On Wed, 28 Mar 2018 16:29:47 -0700 Martin Kelly wrote: > On 03/05/2018 05:51 PM, Yong Deng wrote: > > This patchset add initial support for Allwinner V3s CSI. > > > > Allwinner V3s SoC features two CSI module. CSI0 is used for MIPI CSI-2 > > interface and CSI1 is used for

Re: [linux-sunxi] [PATCH v9 0/2] Initial Allwinner V3s CSI Support

2018-03-28 Thread Martin Kelly
On 03/05/2018 05:51 PM, Yong Deng wrote: This patchset add initial support for Allwinner V3s CSI. Allwinner V3s SoC features two CSI module. CSI0 is used for MIPI CSI-2 interface and CSI1 is used for parallel interface. This is not documented in datasheet but by test and guess. This patchset

Re: [PATCH for v3.18 00/18] Backport CVE-2017-13166 fixes to Kernel 3.18

2018-03-28 Thread Inki Dae
Hi Mauro, 2018년 03월 29일 03:12에 Mauro Carvalho Chehab 이(가) 쓴 글: > Hi Greg, > > Those are the backports meant to solve CVE-2017-13166 on Kernel 3.18. > > It contains two v4l2-ctrls fixes that are required to avoid crashes > at the test application. > > I wrote two patches myself for Kernel 3.18

Re: [PATCH v4 1/5] dvb-frontends/dvb-pll: add i2c driver support

2018-03-28 Thread Antti Palosaari
On 03/28/2018 08:00 PM, tsk...@gmail.com wrote: From: Akihiro Tsukada registers the module as an i2c driver, but keeps dvb_pll_attach() untouched for compatibility. Signed-off-by: Akihiro Tsukada --- Changes since v3: - use standard i2c_device_id instead

Re: [PATCH v4] dvb-usb/friio, dvb-usb-v2/gl861: decompose friio and merge with gl861

2018-03-28 Thread Antti Palosaari
On 03/28/2018 03:37 PM, Akihiro TSUKADA wrote: Hi, thanks for the comment. You should implement i2c adapter to demod driver and not add such glue to that USB-bridge. I mean that "relayed" stuff, i2c communication to tuner via demod. I2C-mux may not work I think as there is no gate-style

Re: [PATCH] media: v4l2-compat-ioctl32: don't oops on overlay

2018-03-28 Thread Sakari Ailus
Hi Mauro, On Wed, Mar 28, 2018 at 02:59:22PM -0300, Mauro Carvalho Chehab wrote: > At put_v4l2_window32(), it tries to access kp->clips. However, > kp points to an userspace pointer. So, it should be obtained > via get_user(), otherwise it can OOPS: > > vivid-000: == END STATUS

Re: [PATCH 2/8] PCI: Add pci_find_common_upstream_dev()

2018-03-28 Thread Logan Gunthorpe
On 28/03/18 01:44 PM, Christian König wrote: > Well, isn't that exactly what dma_map_resource() is good for? As far as > I can see it makes sure IOMMU is aware of the access route and > translates a CPU address into a PCI Bus address. > I'm using that with the AMD IOMMU driver and at least

Re: [PATCH 2/8] PCI: Add pci_find_common_upstream_dev()

2018-03-28 Thread Christian König
Am 28.03.2018 um 20:57 schrieb Logan Gunthorpe: On 28/03/18 12:28 PM, Christian König wrote: I'm just using amdgpu as blueprint because I'm the co-maintainer of it and know it mostly inside out. Ah, I see. The resource addresses are translated using dma_map_resource(). As far as I know that

Re: [PATCH 02/15] v4l: vsp1: Remove outdated comment

2018-03-28 Thread Kieran Bingham
On 28/03/18 13:27, Kieran Bingham wrote: > Hi Laurent, > > Thank you for the patch. > > On 26/02/18 21:45, Laurent Pinchart wrote: >> The entities in the pipeline are all started when the LIF is setup. >> Remove the outdated comment that state otherwise. >> >> Signed-off-by: Laurent Pinchart

Re: [PATCH 08/15] v4l: vsp1: Setup BRU at atomic commit time

2018-03-28 Thread Kieran Bingham
Hi Laurent, On 26/02/18 21:45, Laurent Pinchart wrote: > To implement fully dynamic plane assignment to pipelines, we need to > reassign the BRU and BRS to the DRM pipelines in the atomic commit > handler. In preparation for this setup factor out the BRU source pad > code and call it both at LIF

Re: [PATCH 2/8] PCI: Add pci_find_common_upstream_dev()

2018-03-28 Thread Logan Gunthorpe
On 28/03/18 12:28 PM, Christian König wrote: > I'm just using amdgpu as blueprint because I'm the co-maintainer of it > and know it mostly inside out. Ah, I see. > The resource addresses are translated using dma_map_resource(). As far > as I know that should be sufficient to offload all the

Re: [PATCH 0/3] Improve latency of IR decoding

2018-03-28 Thread Matthias Reichl
Hi Sean, On Sat, Mar 24, 2018 at 02:50:42PM +, Sean Young wrote: > The current IR decoding is much too slow. Many IR protocols rely on > a trailing space for decoding (e.g. rc-6 needs to know when the bits > end). The trailing space is generated by the IR timeout, and if this > is longer than

Re: [PATCH 2/8] PCI: Add pci_find_common_upstream_dev()

2018-03-28 Thread Christian König
Am 28.03.2018 um 18:25 schrieb Logan Gunthorpe: On 28/03/18 10:02 AM, Christian König wrote: Yeah, that looks very similar to what I picked up from the older patches, going to read up on that after my vacation. Yeah, I was just reading through your patchset and there are a lot of

[PATCH for v3.18 07/18] media: v4l2-compat-ioctl32.c: copy m.userptr in put_v4l2_plane32

2018-03-28 Thread Mauro Carvalho Chehab
From: Hans Verkuil commit 8ed5a59dcb47a6f76034ee760b36e089f3e82529 upstream. The struct v4l2_plane32 should set m.userptr as well. The same happens in v4l2_buffer32 and v4l2-compliance tests for this. Signed-off-by: Hans Verkuil Acked-by: Sakari

[PATCH for v3.18 03/18] media: v4l2-compat-ioctl32.c: add missing VIDIOC_PREPARE_BUF

2018-03-28 Thread Mauro Carvalho Chehab
From: Hans Verkuil commit 3ee6d040719ae09110e5cdf24d5386abe5d1b776 upstream. The result of the VIDIOC_PREPARE_BUF ioctl was never copied back to userspace since it was missing in the switch. Signed-off-by: Hans Verkuil Acked-by: Sakari Ailus

[PATCH for v3.18 15/18] media: v4l2-ctrls: fix sparse warning

2018-03-28 Thread Mauro Carvalho Chehab
From: Hans Verkuil The warning is simple: drivers/media/v4l2-core/v4l2-ctrls.c:1685:15: warning: incorrect type in assignment (different address spaces) but the fix isn't. The core problem was that the conversion from user to kernelspace was done at too low a level

[PATCH for v3.18 09/18] media: v4l2-compat-ioctl32.c: make ctrl_is_pointer work for subdevs

2018-03-28 Thread Mauro Carvalho Chehab
From: Hans Verkuil commit 273caa260035c03d89ad63d72d8cd3d9e5c5e3f1 upstream. If the device is of type VFL_TYPE_SUBDEV then vdev->ioctl_ops is NULL so the 'if (!ops->vidioc_query_ext_ctrl)' check would crash. Add a test for !ops to the condition. All sub-devices that have

[PATCH for v3.18 04/18] media: v4l2-compat-ioctl32.c: fix the indentation

2018-03-28 Thread Mauro Carvalho Chehab
From: Hans Verkuil commit b7b957d429f601d6d1942122b339474f31191d75 upstream. The indentation of this source is all over the place. Fix this. This patch only changes whitespace. Signed-off-by: Hans Verkuil Acked-by: Sakari Ailus

[PATCH for v3.18 10/18] media: v4l2-compat-ioctl32: Copy v4l2_window->global_alpha

2018-03-28 Thread Mauro Carvalho Chehab
From: Daniel Mentz commit 025a26fa14f8fd55d50ab284a30c016a5be953d0 upstream. Commit b2787845fb91 ("V4L/DVB (5289): Add support for video output overlays.") added the field global_alpha to struct v4l2_window but did not update the compat layer accordingly. This change

[PATCH for v3.18 05/18] media: v4l2-compat-ioctl32.c: move 'helper' functions to __get/put_v4l2_format32

2018-03-28 Thread Mauro Carvalho Chehab
From: Hans Verkuil commit 486c521510c44a04cd756a9267e7d1e271c8a4ba upstream. These helper functions do not really help. Move the code to the __get/put_v4l2_format32 functions. Signed-off-by: Hans Verkuil Acked-by: Sakari Ailus

[PATCH for v3.18 13/18] media: v4l2-compat-ioctl32.c: don't copy back the result for certain errors

2018-03-28 Thread Mauro Carvalho Chehab
From: Hans Verkuil commit d83a8243aaefe62ace433e4384a4f077bed86acb upstream. Some ioctls need to copy back the result even if the ioctl returned an error. However, don't do this for the error code -ENOTTY. It makes no sense in that cases. Signed-off-by: Hans Verkuil

[PATCH for v3.18 11/18] media: v4l2-compat-ioctl32.c: copy clip list in put_v4l2_window32

2018-03-28 Thread Mauro Carvalho Chehab
From: Hans Verkuil commit a751be5b142ef6bcbbb96d9899516f4d9c8d0ef4 upstream. put_v4l2_window32() didn't copy back the clip list to userspace. Drivers can update the clip rectangles, so this should be done. Signed-off-by: Hans Verkuil Acked-by:

[PATCH for v3.18 17/18] media: v4l2-compat-ioctl32: use compat_u64 for video standard

2018-03-28 Thread Mauro Carvalho Chehab
Instead of using the "v4l2_std_id" typedef, use compat_u64, as otherwise it fails to properly handle some ioctls. Signed-off-by: Mauro Carvalho Chehab --- drivers/media/v4l2-core/v4l2-compat-ioctl32.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH for v3.18 16/18] media: media/v4l2-ctrls: volatiles should not generate CH_VALUE

2018-03-28 Thread Mauro Carvalho Chehab
From: Ricardo Ribalda Volatile controls should not generate CH_VALUE events. Set has_changed to false to prevent this happening. Signed-off-by: Ricardo Ribalda Delgado Signed-off-by: Hans Verkuil Signed-off-by:

[PATCH for v3.18 08/18] media: v4l2-compat-ioctl32.c: fix ctrl_is_pointer

2018-03-28 Thread Mauro Carvalho Chehab
From: Hans Verkuil commit b8c601e8af2d08f733d74defa8465303391bb930 upstream. ctrl_is_pointer just hardcoded two known string controls, but that caused problems when using e.g. custom controls that use a pointer for the payload. Reimplement this function: it now finds

[PATCH for v3.18 02/18] vb2: V4L2_BUF_FLAG_DONE is set after DQBUF

2018-03-28 Thread Mauro Carvalho Chehab
From: Ricardo Ribalda commit 3171cc2b4eb9831ab4df1d80d0410a945b8bc84e upstream. According to the doc, V4L2_BUF_FLAG_DONE is cleared after DQBUF: V4L2_BUF_FLAG_DONE 0x0004 ... After calling the VIDIOC_QBUF or VIDIOC_DQBUF it is always cleared ... Unfortunately,

[PATCH for v3.18 12/18] media: v4l2-compat-ioctl32.c: drop pr_info for unknown buffer type

2018-03-28 Thread Mauro Carvalho Chehab
From: Hans Verkuil commit 169f24ca68bf0f247d111aef07af00dd3a02ae88 upstream. There is nothing wrong with using an unknown buffer type. So stop spamming the kernel log whenever this happens. The kernel will just return -EINVAL to signal this. Signed-off-by: Hans Verkuil

[PATCH for v3.18 01/18] media: v4l2-ioctl.c: don't copy back the result for -ENOTTY

2018-03-28 Thread Mauro Carvalho Chehab
From: Hans Verkuil commit 181a4a2d5a0a7b43cab08a70710d727e7764ccdd upstream. If the ioctl returned -ENOTTY, then don't bother copying back the result as there is no point. Signed-off-by: Hans Verkuil Acked-by: Sakari Ailus

[PATCH for v3.18 06/18] media: v4l2-compat-ioctl32.c: avoid sizeof(type)

2018-03-28 Thread Mauro Carvalho Chehab
From: Hans Verkuil commit 333b1e9f96ce05f7498b581509bb30cde03018bf upstream. Instead of doing sizeof(struct foo) use sizeof(*up). There even were cases where 4 * sizeof(__u32) was used instead of sizeof(kp->reserved), which is very dangerous when the size of the reserved

[PATCH for v3.18 14/18] media: v4l2-compat-ioctl32.c: refactor compat ioctl32 logic

2018-03-28 Thread Mauro Carvalho Chehab
From: Daniel Mentz commit a1dfb4c48cc1e64eeb7800a27c66a6f7e88d075a upstream. The 32-bit compat v4l2 ioctl handling is implemented based on its 64-bit equivalent. It converts 32-bit data structures into its 64-bit equivalents and needs to provide the data to the 64-bit

[PATCH for v3.18 18/18] media: v4l2-compat-ioctl32: initialize a reserved field

2018-03-28 Thread Mauro Carvalho Chehab
The get_v4l2_create32() function is missing a logic with would be cleaning a reserved field, causing v4l2-compliance to complain: Buffer ioctls (Input 0): fail: v4l2-test-buffers.cpp(506): check_0(crbufs.reserved, sizeof(crbufs.reserved)) test

[PATCH for v3.18 00/18] Backport CVE-2017-13166 fixes to Kernel 3.18

2018-03-28 Thread Mauro Carvalho Chehab
Hi Greg, Those are the backports meant to solve CVE-2017-13166 on Kernel 3.18. It contains two v4l2-ctrls fixes that are required to avoid crashes at the test application. I wrote two patches myself for Kernel 3.18 in order to solve some issues specific for Kernel 3.18 with aren't needed

[PATCH] media: v4l2-compat-ioctl32: don't oops on overlay

2018-03-28 Thread Mauro Carvalho Chehab
At put_v4l2_window32(), it tries to access kp->clips. However, kp points to an userspace pointer. So, it should be obtained via get_user(), otherwise it can OOPS: vivid-000: == END STATUS == BUG: unable to handle kernel paging request at fffb18e0 IP:

[PATCH v2 2/5] tuners: add new i2c driver for Sharp qm1d1b0004 ISDB-S tuner

2018-03-28 Thread tskd08
From: Akihiro Tsukada The tuner is used in Earthsoft PT1/PT2 DVB boards, and the driver was extraced from (the former) va1j5jf8007s.c of PT1. it might contain PT1 specific configs. Signed-off-by: Akihiro Tsukada --- Changes since v1: - none

[PATCH v2 5/5] dvb: earth-pt1: replace schedule_timeout with usleep_range

2018-03-28 Thread tskd08
From: Akihiro Tsukada As described in Document/timers/timers-howto.txt, hrtimer-based delay should be used for small sleeps. Signed-off-by: Akihiro Tsukada --- Changes since v1: - none drivers/media/pci/pt1/pt1.c | 34 +++--- 1

[PATCH v2 3/5] dvb: earth-pt1: decompose pt1 driver into sub drivers

2018-03-28 Thread tskd08
From: Akihiro Tsukada earth-pt1 was a monolithic module and included demod/tuner drivers. This patch removes those FE parts and attach demod/tuner i2c drivers. Signed-off-by: Akihiro Tsukada --- Changes since v1: - use i2c_board_info.name to specify

[PATCH v2 4/5] dvb: earth-pt1: add support for suspend/resume

2018-03-28 Thread tskd08
From: Akihiro Tsukada Without this patch, re-loading of the module was required after resume. Signed-off-by: Akihiro Tsukada --- Changes since v1: - none drivers/media/pci/pt1/pt1.c | 107 +++- 1 file changed, 105

[PATCH v2 1/5] dvb-frontends/dvb-pll: add tda6651 ISDB-T pll_desc

2018-03-28 Thread tskd08
From: Akihiro Tsukada This patch adds a PLL "description" of Philips TDA6651 for ISDB-T. It was extracted from (the former) va1j5jf8007t.c of EarthSoft PT1, thus the desc might include PT1 specific configs. Signed-off-by: Akihiro Tsukada --- Changes since

[PATCH v2 0/5] dvb/pci/pt1: decompose earth-pt1 into sub drivers

2018-03-28 Thread tskd08
From: Akihiro Tsukada Changes since v1: - use new style of specifying pll_desc of the terrestrial tuner Akihiro Tsukada (5): dvb-frontends/dvb-pll: add tda6651 ISDB-T pll_desc tuners: add new i2c driver for Sharp qm1d1b0004 ISDB-S tuner dvb: earth-pt1: decompose pt1

[PATCH] media: coda: do not try to propagate format if capture queue busy

2018-03-28 Thread Philipp Zabel
The driver helpfully resets the capture queue format and selection rectangle whenever output format is changed. This only works while the capture queue is not busy. Signed-off-by: Philipp Zabel --- drivers/media/platform/coda/coda-common.c | 28

[PATCH v4 2/5] dvb-frontends/dvb-pll: add tua6034 ISDB-T tuner used in Friio

2018-03-28 Thread tskd08
From: Akihiro Tsukada This driver already contains tua6034-based device settings, but they are not for ISDB-T and have different parameters. Signed-off-by: Akihiro Tsukada --- Changes since v3: - rebase on the new style of specifying pll_desc Changes since

[PATCH v4 4/5] dvb-usb-v2/gl861: use usleep_range() for short delay

2018-03-28 Thread tskd08
From: Akihiro Tsukada As the kernel doc "timers-howto.txt" reads, short delay with msleep() can take much longer. In a case of raspbery-pi platform where CONFIG_HZ_100 was set, it actually affected the init of Friio devices since it issues lots of i2c transactions with short

[PATCH v4 5/5] dvb-usb-v2/gl861: ensure USB message buffers DMA'able

2018-03-28 Thread tskd08
From: Akihiro Tsukada i2c message buf might be on stack. Signed-off-by: Akihiro Tsukada --- Changes since v3: - none drivers/media/usb/dvb-usb-v2/gl861.c | 20 +--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git

[PATCH v5 3/5] dvb-usb/friio, dvb-usb-v2/gl861: decompose friio and merge with gl861

2018-03-28 Thread tskd08
From: Akihiro Tsukada Friio device contains "gl861" bridge and "tc90522" demod, for which the separate drivers are already in the kernel. But friio driver was monolithic and did not use them, practically copying those features. This patch decomposes friio driver into sub

[PATCH v4 1/5] dvb-frontends/dvb-pll: add i2c driver support

2018-03-28 Thread tskd08
From: Akihiro Tsukada registers the module as an i2c driver, but keeps dvb_pll_attach() untouched for compatibility. Signed-off-by: Akihiro Tsukada --- Changes since v3: - use standard i2c_device_id instead of dvb_pll_config

[PATCH v4 0/5] dvb-usb-friio: decompose friio and merge with gl861

2018-03-28 Thread tskd08
From: Akihiro Tsukada This series decomposes dvb-usb-friio into sub drivers and merge the bridge driver with dvb-usb-gl861. As to the demod & tuner drivers, existing drivers are re-used. Changes since v3: - dvb-pll,gl681: use i2c_device_id/i2c_board_info to specify pll_desc

Re: [PATCH v4] dvb-usb/friio, dvb-usb-v2/gl861: decompose friio and merge with gl861

2018-03-28 Thread kbuild test robot
Hi Akihiro, Thank you for the patch! Yet something to improve: [auto build test ERROR on linuxtv-media/master] [also build test ERROR on v4.16-rc7 next-20180328] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day

Re: [PATCH 2/8] PCI: Add pci_find_common_upstream_dev()

2018-03-28 Thread Logan Gunthorpe
On 28/03/18 10:02 AM, Christian König wrote: > Yeah, that looks very similar to what I picked up from the older > patches, going to read up on that after my vacation. Yeah, I was just reading through your patchset and there are a lot of similarities. Though, I'm not sure what you're trying to

Re: [PATCH 2/8] PCI: Add pci_find_common_upstream_dev()

2018-03-28 Thread Christian König
Am 28.03.2018 um 17:47 schrieb Logan Gunthorpe: On 28/03/18 09:07 AM, Christian König wrote: Am 28.03.2018 um 14:38 schrieb Christoph Hellwig: On Sun, Mar 25, 2018 at 12:59:54PM +0200, Christian König wrote: From: "wda...@nvidia.com" Add an interface to find the first

Re: [PATCH 2/8] PCI: Add pci_find_common_upstream_dev()

2018-03-28 Thread Logan Gunthorpe
On 28/03/18 09:07 AM, Christian König wrote: > Am 28.03.2018 um 14:38 schrieb Christoph Hellwig: >> On Sun, Mar 25, 2018 at 12:59:54PM +0200, Christian König wrote: >>> From: "wda...@nvidia.com" >>> >>> Add an interface to find the first device which is upstream of both >>>

Re: [PATCH 2/8] PCI: Add pci_find_common_upstream_dev()

2018-03-28 Thread Christian König
Am 28.03.2018 um 14:38 schrieb Christoph Hellwig: On Sun, Mar 25, 2018 at 12:59:54PM +0200, Christian König wrote: From: "wda...@nvidia.com" Add an interface to find the first device which is upstream of both devices. Please work with Logan and base this on top of the

Re: [PATCH 09/15] v4l: vsp1: Replace manual DRM pipeline input setup in vsp1_du_setup_lif

2018-03-28 Thread Kieran Bingham
Hi Laurent, On 26/02/18 21:45, Laurent Pinchart wrote: > The vsp1_du_setup_lif() function setups the DRM pipeline input manually. s/ setups the / sets up the / > This duplicates the code from the vsp1_du_pipeline_setup_input() > function. Replace the manual implementation by a call to the

Re: [PATCH 07/15] v4l: vsp1: Move DRM atomic commit pipeline setup to separate function

2018-03-28 Thread Kieran Bingham
Hi Laurent, On 26/02/18 21:45, Laurent Pinchart wrote: > The DRM pipeline setup code used at atomic commit time is similar to the > setup code used when enabling the pipeline. Move it to a separate > function in order to share it. > > Signed-off-by: Laurent Pinchart

Re: [PATCH 12/18] media: staging: atomisp: avoid a warning if 32 bits build

2018-03-28 Thread Mauro Carvalho Chehab
Em Wed, 28 Mar 2018 17:13:29 +0300 Dan Carpenter escreveu: > On Mon, Mar 26, 2018 at 05:10:45PM -0400, Mauro Carvalho Chehab wrote: > > Checking if a size_t value is bigger than ULONG_INT only makes > > sense if building on 64 bits, as warned by: > > > >

Re: [PATCH 06/15] v4l: vsp1: Share duplicated DRM pipeline configuration code

2018-03-28 Thread Kieran Bingham
On 26/02/18 21:45, Laurent Pinchart wrote: > Move the duplicated DRM pipeline configuration code to a function and > call it from vsp1_du_setup_lif() and vsp1_du_atomic_flush(). > > Signed-off-by: Laurent Pinchart LGTM. I thought I had a bit of

Re: [PATCH 12/18] media: staging: atomisp: avoid a warning if 32 bits build

2018-03-28 Thread Dan Carpenter
On Mon, Mar 26, 2018 at 05:10:45PM -0400, Mauro Carvalho Chehab wrote: > Checking if a size_t value is bigger than ULONG_INT only makes > sense if building on 64 bits, as warned by: > > drivers/staging/media/atomisp/platform/intel-mid/atomisp_gmin_platform.c:697 > gmin_get_config_var()

Re: [PATCH 05/15] v4l: vsp1: Use vsp1_entity.pipe to check if entity belongs to a pipeline

2018-03-28 Thread Kieran Bingham
Hi Laurent, On 26/02/18 21:45, Laurent Pinchart wrote: > The DRM pipeline handling code uses the entity's pipe list head to check > whether the entity is already included in a pipeline. This method is a > bit fragile in the sense that it uses list_empty() on a list_head that > is a list member.

[PATCH 22/29] videobuf2-core: add vb2_core_request_has_buffers

2018-03-28 Thread Hans Verkuil
From: Hans Verkuil Add a new helper function that returns true if a media_request contains buffers. Signed-off-by: Hans Verkuil --- drivers/media/common/videobuf2/videobuf2-core.c | 12 include/media/videobuf2-core.h

[PATCH 20/29] videobuf2-core: integrate with media requests

2018-03-28 Thread Hans Verkuil
From: Hans Verkuil Buffers can now be prepared or queued for a request. A buffer is unbound from the request at vb2_buffer_done time or when the queue is cancelled. Signed-off-by: Hans Verkuil --- drivers/media/common/videobuf2/videobuf2-core.c

[PATCH 23/29] videobuf2-v4l2: add vb2_request_queue helper

2018-03-28 Thread Hans Verkuil
From: Hans Verkuil Generic helper function that checks if there are buffers in the request and if so, prepares and queues all objects in the request. Signed-off-by: Hans Verkuil --- drivers/media/common/videobuf2/videobuf2-v4l2.c | 39

[PATCH 27/29] vim2m: support requests

2018-03-28 Thread Hans Verkuil
From: Hans Verkuil Add support for requests to vim2m. Signed-off-by: Hans Verkuil --- drivers/media/platform/vim2m.c | 25 + 1 file changed, 25 insertions(+) diff --git a/drivers/media/platform/vim2m.c

[PATCH 21/29] videobuf2-v4l2: integrate with media requests

2018-03-28 Thread Hans Verkuil
From: Hans Verkuil This implements the V4L2 part of the request support. The main change is that vb2_qbuf and vb2_prepare_buf now have a new media_device pointer. This required changes to several drivers that did not use the vb2_ioctl_qbuf/prepare_buf helper functions.

[PATCH 25/29] media: vim2m: add media device

2018-03-28 Thread Hans Verkuil
From: Alexandre Courbot Request API requires a media node. Add one to the vim2m driver so we can use requests with it. This probably needs a bit more work to correctly represent m2m hardware in the media topology. Signed-off-by: Alexandre Courbot

[PATCH 24/29] Documentation: v4l: document request API

2018-03-28 Thread Hans Verkuil
From: Alexandre Courbot Document the request API for V4L2 devices, and amend the documentation of system calls influenced by it. Signed-off-by: Alexandre Courbot --- Documentation/media/uapi/v4l/buffer.rst| 19 +-

[PATCH 28/29] vivid: add mc

2018-03-28 Thread Hans Verkuil
From: Hans Verkuil Add support for the media_device to vivid. This is a prerequisite for request support. Signed-off-by: Hans Verkuil --- drivers/media/platform/vivid/vivid-core.c | 61 +++

[PATCH 17/29] videodev2.h: Add request_fd field to v4l2_buffer

2018-03-28 Thread Hans Verkuil
From: Hans Verkuil When queuing buffers allow for passing the request that should be associated with this buffer. If V4L2_BUF_FLAG_REQUEST_FD is set, then request_fd is used as the file descriptor. If a buffer is stored in a request, but not yet queued to the driver,

[PATCH 29/29] vivid: add request support

2018-03-28 Thread Hans Verkuil
From: Hans Verkuil Add support for requests to vivid. Signed-off-by: Hans Verkuil --- drivers/media/platform/vivid/vivid-core.c| 7 +++ drivers/media/platform/vivid/vivid-kthread-cap.c | 12

[PATCH 26/29] vim2m: use workqueue

2018-03-28 Thread Hans Verkuil
From: Hans Verkuil v4l2_ctrl uses mutexes, so we can't setup a ctrl_handler in interrupt context. Switch to a workqueue instead. Signed-off-by: Hans Verkuil --- drivers/media/platform/vim2m.c | 15 +-- 1 file changed, 13

[PATCH 18/29] vb2: store userspace data in vb2_v4l2_buffer

2018-03-28 Thread Hans Verkuil
From: Hans Verkuil The userspace-provided plane data needs to be stored in vb2_v4l2_buffer. Currently this information is applied by __fill_vb2_buffer() which is called by the core prepare_buf and qbuf functions, but when using requests these functions aren't called yet

[PATCH 19/29] videobuf2-core: embed media_request_object

2018-03-28 Thread Hans Verkuil
From: Hans Verkuil Make vb2_buffer a request object. Signed-off-by: Hans Verkuil --- include/media/videobuf2-core.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/media/videobuf2-core.h b/include/media/videobuf2-core.h index

Re: [RFCv9 PATCH 00/29] Request API

2018-03-28 Thread Hans Verkuil
On 03/28/2018 03:50 PM, Hans Verkuil wrote: > From: Hans Verkuil > > Hi all, > > This patch series is an attempt to pick the best parts of > Alexandre's RFCv4: "sending too many recipients in a short time. Please try again later." So patches 17 and up will appear a bit

[RFCv9 PATCH 11/29] v4l2-ctrls: use ref in helper instead of ctrl

2018-03-28 Thread Hans Verkuil
From: Hans Verkuil The next patch needs the reference to a control instead of the control itself, so change struct v4l2_ctrl_helper accordingly. Signed-off-by: Hans Verkuil Signed-off-by: Alexandre Courbot ---

[RFCv9 PATCH 04/29] media-request: core request support

2018-03-28 Thread Hans Verkuil
From: Hans Verkuil Implement the core of the media request processing. Drivers can bind request objects to a request. These objects can then be marked completed if the driver finished using them, or just be unbound if the results do not need to be kept (e.g. in the case

[RFCv9 PATCH 08/29] v4l2-ctrls: v4l2_ctrl_add_handler: add from_other_dev

2018-03-28 Thread Hans Verkuil
From: Hans Verkuil Add a 'bool from_other_dev' argument: set to true if the two handlers refer to different devices (e.g. it is true when inheriting controls from a subdev into a main v4l2 bridge driver). This will be used later when implementing support for the request

[RFCv9 PATCH 03/29] media-request: allocate media requests

2018-03-28 Thread Hans Verkuil
From: Hans Verkuil Add support for allocating a new request. This is only supported if mdev->ops->req_queue is set, i.e. the driver indicates that it supports queueing requests. Signed-off-by: Hans Verkuil --- drivers/media/Makefile| 3

[RFCv9 PATCH 02/29] uapi/linux/media.h: add request API

2018-03-28 Thread Hans Verkuil
From: Hans Verkuil Define the public request API. This adds the new MEDIA_IOC_REQUEST_ALLOC ioctl to allocate a request and two ioctls that operate on a request in order to queue the contents of the request to the driver and to re-initialize the request. Signed-off-by:

[RFCv9 PATCH 05/29] media-request: add request ioctls

2018-03-28 Thread Hans Verkuil
From: Hans Verkuil Implement the MEDIA_REQUEST_IOC_QUEUE and MEDIA_REQUEST_IOC_REINIT ioctls. Signed-off-by: Hans Verkuil --- drivers/media/media-request.c | 80 +-- 1 file changed, 78 insertions(+), 2

[RFCv9 PATCH 06/29] media-request: add media_request_find

2018-03-28 Thread Hans Verkuil
From: Hans Verkuil Add media_request_find() to find a request based on the file descriptor. The caller has to call media_request_put() for the returned request since this function increments the refcount. Signed-off-by: Hans Verkuil ---

[RFCv9 PATCH 07/29] media-request: add media_request_object_find

2018-03-28 Thread Hans Verkuil
From: Hans Verkuil Add media_request_object_find to find a request object inside a request based on ops and/or priv values. Objects of the same type (vb2 buffer, control handler) will have the same ops value. And objects that refer to the same 'parent' object (e.g. the

[RFCv9 PATCH 16/29] v4l2-ctrls: integrate with requests

2018-03-28 Thread Hans Verkuil
From: Hans Verkuil Add the media_device pointer to the v4l2_g/s/try_ext_ctrls functions and pass that in from the v4l2 core. The control framework will look up the request from the request_fd file descriptor and bind/unbind the request objects. Signed-off-by: Hans

[RFCv9 PATCH 13/29] v4l2-ctrls: add core request API

2018-03-28 Thread Hans Verkuil
From: Hans Verkuil Add the two core request functions: v4l2_ctrl_request_setup() applies the contents of the request to the current driver state. v4l2_ctrl_request_complete() marks the request complete. After this the contents is fixed. Signed-off-by: Hans Verkuil

[RFCv9 PATCH 14/29] v4l2-ctrls: do not clone non-standard controls

2018-03-28 Thread Hans Verkuil
From: Alexandre Courbot Only standard controls can be successfully cloned: handler_new_ref, used by v4l2_ctrl_request_clone(), forcibly calls v4l2_ctrl_new_std() which fails to find custom controls names, and we eventually hit the condition that name == NULL in

[RFCv9 PATCH 15/29] videodev2.h: add request_fd field to v4l2_ext_controls

2018-03-28 Thread Hans Verkuil
From: Alexandre Courbot If which is V4L2_CTRL_WHICH_REQUEST, then the request_fd field can be used to specify a request for the G/S/TRY_EXT_CTRLS ioctls. Signed-off-by: Alexandre Courbot --- drivers/media/v4l2-core/v4l2-compat-ioctl32.c | 5 -

[RFCv9 PATCH 12/29] v4l2-ctrls: support g/s_ext_ctrls for requests

2018-03-28 Thread Hans Verkuil
From: Hans Verkuil The v4l2_g/s_ext_ctrls functions now support control handlers that represent requests. Signed-off-by: Hans Verkuil Signed-off-by: Alexandre Courbot --- drivers/media/v4l2-core/v4l2-ctrls.c | 37

[RFCv9 PATCH 10/29] v4l2-ctrls: alloc memory for p_req

2018-03-28 Thread Hans Verkuil
From: Hans Verkuil To store request data the handler_new_ref() allocates memory for it if needed. Signed-off-by: Hans Verkuil --- drivers/media/v4l2-core/v4l2-ctrls.c | 18 +++--- 1 file changed, 15 insertions(+), 3 deletions(-)

[RFCv9 PATCH 01/29] v4l2-device.h: always expose mdev

2018-03-28 Thread Hans Verkuil
From: Hans Verkuil The mdev field is only present if CONFIG_MEDIA_CONTROLLER is set. But since we will need to pass the media_device to vb2 snd the control framework it is very convenient to just make this field available all the time. If CONFIG_MEDIA_CONTROLLER is not

[RFCv9 PATCH 09/29] v4l2-ctrls: prepare internal structs for request API

2018-03-28 Thread Hans Verkuil
From: Hans Verkuil Embed and initialize a media_request_object in struct v4l2_ctrl_handler. Add a p_req field to struct v4l2_ctrl_ref that will store the request value. Signed-off-by: Hans Verkuil Signed-off-by: Alexandre Courbot

[RFCv9 PATCH 00/29] Request API

2018-03-28 Thread Hans Verkuil
From: Hans Verkuil Hi all, This patch series is an attempt to pick the best parts of Alexandre's RFCv4: https://lkml.org/lkml/2018/2/19/872 and Sakari's RFCv2: https://www.mail-archive.com/linux-media@vger.kernel.org/msg128170.html and based on the RFCv2 of the

Re: [PATCH 04/15] v4l: vsp1: Store pipeline pointer in vsp1_entity

2018-03-28 Thread Kieran Bingham
Hi Laurent, Thank you for the patch. On 26/02/18 21:45, Laurent Pinchart wrote: > Various types of objects subclassing vsp1_entity currently store a > pointer to the pipeline. Move the pointer to vsp1_entity to simplify the > code and avoid storing the pipeline in more entity subclasses later.

Re: [PATCH 2/8] PCI: Add pci_find_common_upstream_dev()

2018-03-28 Thread Christoph Hellwig
On Sun, Mar 25, 2018 at 12:59:54PM +0200, Christian König wrote: > From: "wda...@nvidia.com" > > Add an interface to find the first device which is upstream of both > devices. Please work with Logan and base this on top of the outstanding peer to peer patchset.

Re: [PATCH 1/8] lib/scatterlist: add sg_set_dma_addr() helper

2018-03-28 Thread Christoph Hellwig
On Sun, Mar 25, 2018 at 12:59:53PM +0200, Christian König wrote: > Use this function to set an sg entry to point to device resources mapped > using dma_map_resource(). The page pointer is set to NULL and only the DMA > address, length and offset values are valid. NAK. Please provide a higher

Re: [PATCH v4] dvb-usb/friio, dvb-usb-v2/gl861: decompose friio and merge with gl861

2018-03-28 Thread Akihiro TSUKADA
Hi, thanks for the comment. > You should implement i2c adapter to demod driver and not add such glue > to that USB-bridge. I mean that "relayed" stuff, i2c communication to > tuner via demod. I2C-mux may not work I think as there is no gate-style > multiplexing so you probably need plain i2c

Re: [PATCH 03/15] v4l: vsp1: Remove unused field from vsp1_drm_pipeline structure

2018-03-28 Thread Kieran Bingham
Hi Laurent, Thanks for the patch, On 26/02/18 21:45, Laurent Pinchart wrote: > The vsp1_drm_pipeline enabled field is set but never used. Remove it. > Indeed - not used. > Signed-off-by: Laurent Pinchart Reviewed-by: Kieran Bingham

Re: [PATCH 02/15] v4l: vsp1: Remove outdated comment

2018-03-28 Thread Kieran Bingham
Hi Laurent, Thank you for the patch. On 26/02/18 21:45, Laurent Pinchart wrote: > The entities in the pipeline are all started when the LIF is setup. > Remove the outdated comment that state otherwise. > > Signed-off-by: Laurent Pinchart I'll start

[PATCH] media: dvb-core: Check for allocation failure in dvb_module_probe()

2018-03-28 Thread Dan Carpenter
We should check if kzalloc() fails. Fixes: 8f569c0b4e6b ("media: dvb-core: add helper functions for I2C binding") Signed-off-by: Dan Carpenter diff --git a/drivers/media/dvb-core/dvbdev.c b/drivers/media/dvb-core/dvbdev.c index cf747d753a79..787fe06df217 100644 ---

  1   2   >