cron job: media_tree daily build: ERRORS

2018-03-23 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: Sat Mar 24 05:00:13 CET 2018 media-tree git hash:6ccd228e0cfce2a4f44558422d25c60fcb1a6710 media_build

Re: [PATCH] [media] vcodec: fix error return value from mtk_jpeg_clk_init()

2018-03-23 Thread Rick Chang
On Fri, 2018-03-23 at 11:44 +0800, Ryder Lee wrote: > The error return value should be fixed as it may return EPROBE_DEFER. > > Cc: Rick Chang > Cc: Bin Liu > Signed-off-by: Ryder Lee > --- >  

Re: [PATCH v2] venus: vdec: fix format enumeration

2018-03-23 Thread Stanimir Varbanov
Hi Hans, Could you take this patch it not too late. On 20.03.2018 15:42, Stanimir Varbanov wrote: Hi Alex, Thanks! On 03/19/2018 11:32 AM, Alexandre Courbot wrote: find_format_by_index() stops enumerating formats as soon as the index matches, and returns NULL if venus_helper_check_codec()

Re: [RFCv2] Request API

2018-03-23 Thread Sakari Ailus
Hi Hans, Thanks for writing this. I generally agree with the RFC to the level of detail available here; a few comments below. On Fri, Mar 23, 2018 at 09:46:00AM +0100, Hans Verkuil wrote: > RFC Request API, version 2 > -- > > This document proposes the public API for

Re: [PATCH 08/30] media: v4l2-ioctl: fix some "too small" warnings

2018-03-23 Thread Sakari Ailus
Hi Mauro, On Fri, Mar 23, 2018 at 07:56:54AM -0400, Mauro Carvalho Chehab wrote: > While the code there is right, it produces three false positives: > drivers/media/v4l2-core/v4l2-ioctl.c:2868 video_usercopy() error: > copy_from_user() 'parg' too small (128 vs 16383) >

Re: [PATCH 06/30] media: ov5670: get rid of a series of __be warnings

2018-03-23 Thread Sakari Ailus
On Fri, Mar 23, 2018 at 07:56:52AM -0400, Mauro Carvalho Chehab wrote: > There are some troubles on this driver with respect to the usage > of __be16 and __b32 macros: > > drivers/media/i2c/ov5670.c:1857:27: warning: incorrect type in > initializer (different base types) >

[RFC v2 06/10] vb2: Add support for requests

2018-03-23 Thread Sakari Ailus
Associate a buffer to a request when it is queued and disassociate when it is done. Signed-off-by: Sakari Ailus --- drivers/media/common/videobuf2/videobuf2-core.c | 43 - drivers/media/common/videobuf2/videobuf2-v4l2.c | 40

[RFC v2 09/10] vim2m: Register V4L2 video device after V4L2 mem2mem init

2018-03-23 Thread Sakari Ailus
Initialise the V4L2 mem2mem framework before creating the video device. Referencing ctx->m2m_dev isn't allowed before that as it is NULL. Signed-off-by: Sakari Ailus --- drivers/media/platform/vim2m.c | 29 +++-- 1 file changed, 15

[RFC v2 02/10] media: Add request API

2018-03-23 Thread Sakari Ailus
From: Laurent Pinchart The request API allows bundling media device parameters with request objects and queueing them to be executed atomically. Signed-off-by: Laurent Pinchart Signed-off-by: Sakari Ailus

[RFC v2 10/10] vim2m: Request support

2018-03-23 Thread Sakari Ailus
Signed-off-by: Sakari Ailus --- drivers/media/platform/vim2m.c | 49 -- 1 file changed, 43 insertions(+), 6 deletions(-) diff --git a/drivers/media/platform/vim2m.c b/drivers/media/platform/vim2m.c index 9b6b456..a8fe3ea

[RFC v2 03/10] videodev2.h: Add request_fd field to v4l2_buffer

2018-03-23 Thread Sakari Ailus
From: Hans Verkuil When queuing buffers allow for passing the request that should be associated with this buffer. Signed-off-by: Hans Verkuil [acour...@chromium.org: make request ID 32-bit] Signed-off-by: Alexandre Courbot

[RFC v2 04/10] videodev2.h: add request_fd field to v4l2_ext_controls

2018-03-23 Thread Sakari Ailus
From: Alexandre Courbot Allow to specify a request to be used with the S_EXT_CTRLS and G_EXT_CTRLS operations. Signed-off-by: Alexandre Courbot [Sakari Ailus: reserved no longer an array, add compat32 code] Signed-off-by: Sakari Ailus

[RFC v2 00/10] Preparing the request API

2018-03-23 Thread Sakari Ailus
Hi folks, This preliminary RFC patchset prepares for the request API. What's new here is support for binding arbitrary configuration or resources to requests. There are a few new concepts here: Class --- a type of configuration or resource a driver (or e.g. the V4L2 framework) can attach to a

[RFC v2 05/10] staging: media: atomisp: Remove v4l2_buffer.reserved2 field hack

2018-03-23 Thread Sakari Ailus
The atomisp driver used to use the reserved2 field in struct v4l2_buffer for picking a particular ISP configuration for the buffer. As reserved2 field will have new use soon, remove this hack. Signed-off-by: Sakari Ailus ---

[RFC v2 01/10] media: Support variable size IOCTL arguments

2018-03-23 Thread Sakari Ailus
Maintain a list of supported IOCTL argument sizes and allow only those in the list. As an additional bonus, IOCTL handlers will be able to check whether the caller actually set (using the argument size) the field vs. assigning it to zero. Separate macro can be provided for that. This will be

[RFC v2 07/10] v4l: m2m: Simplify exiting the function in v4l2_m2m_try_schedule

2018-03-23 Thread Sakari Ailus
The v4l2_m2m_try_schedule function acquires and releases multiple spinlocks; simplify unlocking the job lock by adding a label to unlock the job lock and exit the function. Signed-off-by: Sakari Ailus --- drivers/media/v4l2-core/v4l2-mem2mem.c | 22

[RFC v2 08/10] v4l: m2m: Support requests with video buffers

2018-03-23 Thread Sakari Ailus
Enable supporting requests on V4L2 buffer queues on M2M devices. This requires Media controller. Signed-off-by: Sakari Ailus --- drivers/media/v4l2-core/v4l2-mem2mem.c | 109 + include/media/v4l2-mem2mem.h | 28 +

Re: [PATCH v6] ARM: dts: wheat: Fix ADV7513 address usage

2018-03-23 Thread Kieran Bingham
Hi Simon, On 23/03/18 08:51, Simon Horman wrote: > On Thu, Mar 22, 2018 at 09:30:40PM +, Kieran Bingham wrote: >> The r8a7792 Wheat board has two ADV7513 devices sharing a single I2C >> bus, however in low power mode the ADV7513 will reset it's slave maps to >> use the hardware defined

[PATCH] media: em28xx-cards: output regular messages as info

2018-03-23 Thread Chris Mayo
Messages expected during device probe were being marked as errors. Signed-off-by: Chris Mayo --- drivers/media/usb/em28xx/em28xx-cards.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/media/usb/em28xx/em28xx-cards.c

[GIT PULL for 4.17] Add array size to v4l2_find_nearest_size

2018-03-23 Thread Sakari Ailus
Hi Mauro, Just one patch here, to add the size of the array of the modes for v4l2_find_nearest_size. Please pull. The following changes since commit 238f694e1b7f8297f1256c57e41f69c39576c9b4: media: v4l2-common: fix a compilation breakage (2018-03-21 16:07:01 -0400) are available in the git

Re: [PATCH] [media] vcodec: fix error return value from mtk_jpeg_clk_init()

2018-03-23 Thread Matthias Brugger
On 03/23/2018 04:44 AM, Ryder Lee wrote: > The error return value should be fixed as it may return EPROBE_DEFER. > > Cc: Rick Chang > Cc: Bin Liu > Signed-off-by: Ryder Lee Reviewed-by: Matthias Brugger

Re: [PATCH 1/1] v4l: Bring back array_size parameter to v4l2_find_nearest_size

2018-03-23 Thread Mauro Carvalho Chehab
Em Fri, 23 Mar 2018 17:31:53 +0200 Sakari Ailus escreveu: > On Fri, Mar 23, 2018 at 11:08:55AM -0300, Mauro Carvalho Chehab wrote: > > Em Fri, 23 Mar 2018 11:07:42 -0300 > > Mauro Carvalho Chehab escreveu: > > > > > Em Fri, 23 Mar 2018

[PATCH v2 1/1] v4l: Bring back array_size parameter to v4l2_find_nearest_size

2018-03-23 Thread Sakari Ailus
An older version of the driver patches were merged accidentally which resulted in missing the array_size parameter that tells the length of the array that contains the different supported sizes. Bring it back to v4l2_find_nearest size and make the corresponding change for the drivers using it as

Re: [PATCH 1/1] v4l: Bring back array_size parameter to v4l2_find_nearest_size

2018-03-23 Thread Sakari Ailus
On Fri, Mar 23, 2018 at 11:08:55AM -0300, Mauro Carvalho Chehab wrote: > Em Fri, 23 Mar 2018 11:07:42 -0300 > Mauro Carvalho Chehab escreveu: > > > Em Fri, 23 Mar 2018 15:48:41 +0200 > > Sakari Ailus escreveu: > > > > > An older version

Re: [RFCv2] Request API

2018-03-23 Thread Tomasz Figa
Hi Hans, On Fri, Mar 23, 2018 at 5:46 PM, Hans Verkuil wrote: > RFC Request API, version 2 > -- > > This document proposes the public API for handling requests. > > There has been some confusion about how to do this, so this summarizes the > current

Re: [RFC] Request API

2018-03-23 Thread Tomasz Figa
On Fri, Mar 23, 2018 at 6:33 PM, Sakari Ailus wrote: >> >>> An alternative, maybe a bit crazy, idea would be to allow adding >> >>> MEDIA_REQUEST_IOC_QUEUE ioctl to the request itself. This would be >> >>> similar to the idea of indirect command buffers in the graphics (GPU)

Re: [PATCH v9.1] media: imx258: Add imx258 camera sensor driver

2018-03-23 Thread Sakari Ailus
On Fri, Mar 23, 2018 at 11:08:11PM +0900, Tomasz Figa wrote: > On Fri, Mar 23, 2018 at 10:50 PM, Sakari Ailus > wrote: > > Hi Tomasz, > > > > On Fri, Mar 23, 2018 at 08:43:50PM +0900, Tomasz Figa wrote: > >> Hi Andy, > >> > >> Some issues found when reviewing cherry

Re: [PATCH 1/1] v4l: Bring back array_size parameter to v4l2_find_nearest_size

2018-03-23 Thread Mauro Carvalho Chehab
Em Fri, 23 Mar 2018 11:07:42 -0300 Mauro Carvalho Chehab escreveu: > Em Fri, 23 Mar 2018 15:48:41 +0200 > Sakari Ailus escreveu: > > > An older version of the driver patches were merged accidentally which > > resulted in missing the

Re: [PATCH v9.1] media: imx258: Add imx258 camera sensor driver

2018-03-23 Thread Tomasz Figa
On Fri, Mar 23, 2018 at 10:50 PM, Sakari Ailus wrote: > Hi Tomasz, > > On Fri, Mar 23, 2018 at 08:43:50PM +0900, Tomasz Figa wrote: >> Hi Andy, >> >> Some issues found when reviewing cherry pick of this patch to Chrome >> OS kernel. Please see inline. >> >> On Sat,

Re: [PATCH 1/1] v4l: Bring back array_size parameter to v4l2_find_nearest_size

2018-03-23 Thread Mauro Carvalho Chehab
Em Fri, 23 Mar 2018 15:48:41 +0200 Sakari Ailus escreveu: > An older version of the driver patches were merged accidentally which > resulted in missing the array_size parameter that tells the length of the > array that contains the different supported sizes. > >

Re: [PATCH v9.1] media: imx258: Add imx258 camera sensor driver

2018-03-23 Thread Sakari Ailus
Hi Tomasz, On Fri, Mar 23, 2018 at 08:43:50PM +0900, Tomasz Figa wrote: > Hi Andy, > > Some issues found when reviewing cherry pick of this patch to Chrome > OS kernel. Please see inline. > > On Sat, Mar 17, 2018 at 1:38 AM, Andy Yeh wrote: > > [snip] > > > + case

[PATCH 1/1] v4l: Bring back array_size parameter to v4l2_find_nearest_size

2018-03-23 Thread Sakari Ailus
An older version of the driver patches were merged accidentally which resulted in missing the array_size parameter that tells the length of the array that contains the different supported sizes. Bring it back to v4l2_find_nearest size and make the corresponding change for the drivers using it as

Re: [v2,2/2] media: Add a driver for the ov7251 camera sensor

2018-03-23 Thread jacopo mondi
Hi Todor, thanks for the patch. When running checkpatch --strict I see a few warning you can easily close (braces indentation mostly, and one additional empty line at line 1048). A few more nits below. On Fri, Mar 23, 2018 at 12:14:20PM +0800, Todor Tomov wrote: > The ov7251 sensor is a

[GIT PULL for v4.16-rc7] media fixes

2018-03-23 Thread Mauro Carvalho Chehab
Linus, Please pull from: git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media tags/media/v4.16-4 For 3 fixes: - dvb: fix a Kconfig typo on a help text - tegra-cec: reset rx_buf_cnt when start bit detected - rc: lirc does not use LIRC_CAN_SEND_SCANCODE feature

Re: [PATCH v3 2/2] media: imx-media-csi: Do not propagate the error when pinctrl is not found

2018-03-23 Thread Hans Verkuil
On 03/23/18 14:03, Fabio Estevam wrote: > Hi Mauro and Hans, > > On Sat, Mar 10, 2018 at 12:53 PM, Fabio Estevam wrote: >> Hi, >> >> On Sat, Mar 3, 2018 at 9:56 AM, Fabio Estevam wrote: >>> From: Fabio Estevam >>> >>> Since commit

Re: [PATCH v3 2/2] media: imx-media-csi: Do not propagate the error when pinctrl is not found

2018-03-23 Thread Fabio Estevam
Hi Mauro and Hans, On Sat, Mar 10, 2018 at 12:53 PM, Fabio Estevam wrote: > Hi, > > On Sat, Mar 3, 2018 at 9:56 AM, Fabio Estevam wrote: >> From: Fabio Estevam >> >> Since commit 52e17089d185 ("media: imx: Don't initialize vars

[PATCHv2 1/3] dt-bindings: display: dw_hdmi.txt: add cec-disable property

2018-03-23 Thread Hans Verkuil
From: Hans Verkuil Some boards have both a DesignWare and their own CEC controller. The CEC pin is only hooked up to their own CEC controller and not to the DW controller. Add the cec-disable property to disable the DW CEC controller. This particular situation happens

[PATCHv2 3/3] arm64: dts: meson-gx.dtsi: add cec-disable

2018-03-23 Thread Hans Verkuil
From: Hans Verkuil The meson-gx boards have two CEC controllers: the DesignWare controller and a meson-specific controller. Disable the DW controller since the CEC line is hooked up to the meson controller. Signed-off-by: Hans Verkuil Acked-by:

[PATCHv2 0/3] dw-hdmi: add property to disable CEC

2018-03-23 Thread Hans Verkuil
From: Hans Verkuil Some boards (amlogic) have two CEC controllers: the DesignWare controller and their own CEC controller (meson ao-cec). Since the CEC line is not hooked up to the DW controller we need a way to disable that controller. This patch series adds the

[PATCHv2 2/3] drm: bridge: dw-hdmi: check the cec-disable property

2018-03-23 Thread Hans Verkuil
From: Hans Verkuil If the cec-disable property was set, then disable the DW CEC controller. This is needed for boards that have their own CEC controller. Signed-off-by: Hans Verkuil Reviewed-by: Neil Armstrong ---

[PATCH] media: fimc-capture: get rid of two warnings

2018-03-23 Thread Mauro Carvalho Chehab
Smatch produces two warnings when building this file: ./arch/x86/include/asm/bitops.h:433:22: warning: asm output is not an lvalue ./arch/x86/include/asm/bitops.h:433:22: warning: asm output is not an lvalue On some asm instructions. I suspect that those asm instructions might

[PATCH] media: dvb-usb-v2: fix a missing dependency of I2C_MUX

2018-03-23 Thread Mauro Carvalho Chehab
Now that af9015 requires I2C_MUX, all drivers that select it should also depend on it. drivers/media/dvb-frontends/af9013.o: In function `af9013_remove': >> drivers/media/dvb-frontends/af9013.c:1560: undefined reference to >> `i2c_mux_del_adapters' drivers/media/dvb-frontends/af9013.o: In

Re: [PATCH 07/30] media: v4l2-tpg-core: avoid buffer overflows

2018-03-23 Thread Hans Verkuil
On 03/23/18 12:56, Mauro Carvalho Chehab wrote: > Fix the following warnings: > drivers/media/common/v4l2-tpg/v4l2-tpg-core.c:1146 gen_twopix() error: > buffer overflow 'buf[1]' 8 <= 8 > drivers/media/common/v4l2-tpg/v4l2-tpg-core.c:1152 gen_twopix() error: > buffer overflow 'buf[1]'

[PATCH] media: uvc: to the right check at uvc_ioctl_enum_framesizes()

2018-03-23 Thread Mauro Carvalho Chehab
While the logic there is correct, it tricks both humans and machines, a the check if "i" var is not zero is actually to validate if the "frames" var was initialized when the loop ran for the first time. That produces the following warning: drivers/media/usb/uvc/uvc_v4l2.c:1192

Re: [PATCH 30/30] media: cec-core: fix a bug at cec_error_inj_write()

2018-03-23 Thread Hans Verkuil
On 03/23/18 12:57, Mauro Carvalho Chehab wrote: > If the adapter doesn't have error_inj_parse_line() ops, the > write() logic won't return -EINVAL, but, instead, it will keep > looping, because "count" is a non-negative number. > > Signed-off-by: Mauro Carvalho Chehab

Re: [PATCH 02/30] media: imx-media-utils: fix a warning

2018-03-23 Thread Dan Carpenter
On Fri, Mar 23, 2018 at 07:56:48AM -0400, Mauro Carvalho Chehab wrote: > The logic at find_format() is a little bit confusing even for > humans, and it tricks static code analyzers: > > drivers/staging/media/imx/imx-media-utils.c:259 find_format() error: > buffer overflow 'array' 14 <= 20

[PATCH 10/30] media: tvaudio: improve error handling

2018-03-23 Thread Mauro Carvalho Chehab
The error handling logic at tvaudio is broken on several ways, as it doesn't really check right when an error occurs. Change it to return the proper error code from read/write routines and fix the errors on reads. Shuts up the following warnings: drivers/media/i2c/tvaudio.c:222

[PATCH 16/30] media: videobuf-dma-sg: Fix a weird cast

2018-03-23 Thread Mauro Carvalho Chehab
Just use %p. Fixes this warning: drivers/media/v4l2-core/videobuf-dma-sg.c:247 videobuf_dma_init_kernel() warn: argument 2 to %08lx specifier is cast from pointer Signed-off-by: Mauro Carvalho Chehab --- drivers/media/v4l2-core/videobuf-dma-sg.c | 5 ++--- 1

[PATCH 20/30] media: ir-kbd-i2c: improve error handling code

2018-03-23 Thread Mauro Carvalho Chehab
The current I2C error handling logic makes static analyzers confused, and it doesn't follow the coding style we're using: drivers/media/i2c/ir-kbd-i2c.c:180 get_key_pixelview() error: uninitialized symbol 'b'. drivers/media/i2c/ir-kbd-i2c.c:224 get_key_knc1() error: uninitialized

[PATCH 06/30] media: ov5670: get rid of a series of __be warnings

2018-03-23 Thread Mauro Carvalho Chehab
There are some troubles on this driver with respect to the usage of __be16 and __b32 macros: drivers/media/i2c/ov5670.c:1857:27: warning: incorrect type in initializer (different base types) drivers/media/i2c/ov5670.c:1857:27:expected unsigned short [unsigned] [usertype]

[PATCH 09/30] media: sp887x: fix a warning

2018-03-23 Thread Mauro Carvalho Chehab
drivers/media/dvb-frontends/sp887x.c:179 sp887x_initial_setup() error: memcpy() '[2]' too small (30 vs 16384) This is actually a false alarm, but reverting the check order makes not only for humans to review the code, but also cleans the warning. Signed-off-by: Mauro Carvalho Chehab

[PATCH 17/30] media: ivtvfb: Cleanup some warnings

2018-03-23 Thread Mauro Carvalho Chehab
drivers/media/pci/ivtv/ivtvfb.c:349 ivtvfb_prep_frame() warn: argument 3 to %08lx specifier is cast from pointer drivers/media/pci/ivtv/ivtvfb.c:360 ivtvfb_prep_frame() warn: argument 3 to %08lx specifier is cast from pointer drivers/media/pci/ivtv/ivtvfb.c:363 ivtvfb_prep_frame() warn: argument

[PATCH 02/30] media: imx-media-utils: fix a warning

2018-03-23 Thread Mauro Carvalho Chehab
The logic at find_format() is a little bit confusing even for humans, and it tricks static code analyzers: drivers/staging/media/imx/imx-media-utils.c:259 find_format() error: buffer overflow 'array' 14 <= 20 Rewrite the logic in a way that it makes it clearer to understand, while

[PATCH 04/30] media: vpss: fix annotations for vpss_regs_base2

2018-03-23 Thread Mauro Carvalho Chehab
Fix those warnings: drivers/media/platform/davinci/vpss.c:510:25: warning: incorrect type in argument 1 (different address spaces) drivers/media/platform/davinci/vpss.c:510:25:expected void volatile [noderef] *addr drivers/media/platform/davinci/vpss.c:510:25:got

[PATCH 12/30] media: solo6x10: simplify the logic at solo_p2m_dma_desc()

2018-03-23 Thread Mauro Carvalho Chehab
The logic with gets a p2m_id is more complex than needed, causing false positives with static analyzers: drivers/media/pci/solo6x10/solo6x10-p2m.c:81 solo_p2m_dma_desc() error: buffer overflow 'solo_dev->p2m_dev' 4 <= s32max Make it simpler and use unsigned int. Signed-off-by: Mauro

[PATCH 29/30] media: tda9840: cleanup a warning

2018-03-23 Thread Mauro Carvalho Chehab
There's a false positive warning there: drivers/media/i2c/tda9840.c:79 tda9840_status() error: uninitialized symbol 'byte'. Change the code to match our coding style, in order to fix it. Signed-off-by: Mauro Carvalho Chehab --- drivers/media/i2c/tda9840.c | 6

[PATCH 01/30] media: dvbdev: handle ENOMEM error at dvb_module_probe()

2018-03-23 Thread Mauro Carvalho Chehab
If allocation of struct board_info fails, return NULL from dvb_module_probe(). Fix this warning: drivers/media/dvb-core/dvbdev.c:958 dvb_module_probe() error: potential null dereference 'board_info'. (kzalloc returns null) Signed-off-by: Mauro Carvalho Chehab

[PATCH 27/30] media: em28xx-input: improve error handling code

2018-03-23 Thread Mauro Carvalho Chehab
The current I2C error handling logic makes static analyzers confused: drivers/media/usb/em28xx/em28xx-input.c:96 em28xx_get_key_terratec() error: uninitialized symbol 'b'. Change it to match the coding style we're using elsewhere. Signed-off-by: Mauro Carvalho Chehab

[PATCH 21/30] media: ir-kbd-i2c: change the if logic to avoid a warning

2018-03-23 Thread Mauro Carvalho Chehab
While the code is correct, it produces this warning: drivers/media/i2c/ir-kbd-i2c.c:593 zilog_ir_format() error: buffer overflow 'code_block->codes' 61 <= 173 As static analyzers may be tricked by arithmetic expressions on comparisions. So, change the order, in order to shut up this

[PATCH 22/30] media: zoran: don't cast pointers to print them

2018-03-23 Thread Mauro Carvalho Chehab
drivers/media/pci/zoran/zoran_driver.c:242 v4l_fbuffer_alloc() warn: argument 5 to %lx specifier is cast from pointer Signed-off-by: Mauro Carvalho Chehab --- drivers/media/pci/zoran/zoran_driver.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

[PATCH 07/30] media: v4l2-tpg-core: avoid buffer overflows

2018-03-23 Thread Mauro Carvalho Chehab
Fix the following warnings: drivers/media/common/v4l2-tpg/v4l2-tpg-core.c:1146 gen_twopix() error: buffer overflow 'buf[1]' 8 <= 8 drivers/media/common/v4l2-tpg/v4l2-tpg-core.c:1152 gen_twopix() error: buffer overflow 'buf[1]' 8 <= 8 Signed-off-by: Mauro Carvalho Chehab

[PATCH 25/30] media: vivid-radio-rx: add a cast to avoid a warning

2018-03-23 Thread Mauro Carvalho Chehab
The logic at vivid_radio_rx_g_tuner() is producint an overflow warning: drivers/media/platform/vivid/vivid-radio-rx.c:250 vivid_radio_rx_g_tuner() warn: potential negative subtraction from max '65535 - (__builtin_choose_expr( == || == , , __builtin_choose_expr( == || == , ,

[PATCH 15/30] soc_camera: fix a weird cast on printk

2018-03-23 Thread Mauro Carvalho Chehab
drivers/media/platform/soc_camera/soc_camera.c:790 soc_camera_mmap() warn: argument 4 to %08lx specifier is cast from pointer Signed-off-by: Mauro Carvalho Chehab --- drivers/media/platform/soc_camera/soc_camera.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

[PATCH 13/30] media: cx88: fix two warnings

2018-03-23 Thread Mauro Carvalho Chehab
drivers/media/pci/cx88/cx88-alsa.c:295 cx88_alsa_dma_init() warn: argument 3 to %08lx specifier is cast from pointer drivers/media/pci/cx88/cx88-alsa.c:669 snd_cx88_wm8775_volume_put() warn: potential negative subtraction from max '65535 - (32768 * left) / right' Signed-off-by: Mauro Carvalho

[PATCH 19/30] media: saa7134-input: improve error handling

2018-03-23 Thread Mauro Carvalho Chehab
Currently, the code produces those false-positives: drivers/media/pci/saa7134/saa7134-input.c:203 get_key_msi_tvanywhere_plus() error: uninitialized symbol 'b'. drivers/media/pci/saa7134/saa7134-input.c:251 get_key_kworld_pc150u() error: uninitialized symbol 'b'.

[PATCH 03/30] media: dvb_frontend: add proper __user annotations

2018-03-23 Thread Mauro Carvalho Chehab
Solves those warnings: drivers/media/dvb-core/dvb_frontend.c:2297:39: warning: incorrect type in argument 1 (different address spaces) drivers/media/dvb-core/dvb_frontend.c:2297:39:expected void const [noderef] * drivers/media/dvb-core/dvb_frontend.c:2297:39:got

[PATCH 26/30] media: zr364xx: avoid casting just to print pointer address

2018-03-23 Thread Mauro Carvalho Chehab
Instead of casting, just use %p. Signed-off-by: Mauro Carvalho Chehab --- drivers/media/usb/zr364xx/zr364xx.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/media/usb/zr364xx/zr364xx.c b/drivers/media/usb/zr364xx/zr364xx.c index

[PATCH 11/30] media: bttv-input: better handle errors at I2C transfer

2018-03-23 Thread Mauro Carvalho Chehab
The error handling logic at get_key_pv951() is a little bit akward, with produces this false positive warning: drivers/media/pci/bt8xx/bttv-input.c:344 get_key_pv951() error: uninitialized symbol 'b'. Do a cleanup. As a side effect, it also improves its coding style. Signed-off-by:

[PATCH 08/30] media: v4l2-ioctl: fix some "too small" warnings

2018-03-23 Thread Mauro Carvalho Chehab
While the code there is right, it produces three false positives: drivers/media/v4l2-core/v4l2-ioctl.c:2868 video_usercopy() error: copy_from_user() 'parg' too small (128 vs 16383) drivers/media/v4l2-core/v4l2-ioctl.c:2868 video_usercopy() error: copy_from_user() 'parg' too small

[PATCH 05/30] media: rca: declare formats var as static

2018-03-23 Thread Mauro Carvalho Chehab
As warned: drivers/media/platform/rockchip/rga/rga.c:210:16: warning: symbol 'formats' was not declared. Should it be static? Signed-off-by: Mauro Carvalho Chehab --- drivers/media/platform/rockchip/rga/rga.c | 2 +- 1 file changed, 1 insertion(+), 1

[PATCH 23/30] media: solo6x10: get rid of an address space warning

2018-03-23 Thread Mauro Carvalho Chehab
Instead of using an ancillary function to avoid duplicating a small portion of code that copies data either to kernelspace or between userspace-kernelspace, duplicate the code, as it prevents static analyzers to complain about it: drivers/media/pci/solo6x10/solo6x10-g723.c:260:46:

[PATCH 18/30] media: s2255drv: fix a casting warning

2018-03-23 Thread Mauro Carvalho Chehab
drivers/media/usb/s2255/s2255drv.c:651 s2255_fillbuff() warn: argument 3 to %08lx specifier is cast from pointer Signed-off-by: Mauro Carvalho Chehab --- drivers/media/usb/s2255/s2255drv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

[PATCH 28/30] media: tm6000: avoid casting just to print pointer address

2018-03-23 Thread Mauro Carvalho Chehab
Instead of casting, just use %p. Signed-off-by: Mauro Carvalho Chehab --- drivers/media/usb/tm6000/tm6000-video.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/media/usb/tm6000/tm6000-video.c b/drivers/media/usb/tm6000/tm6000-video.c

[PATCH 24/30] media: saa7134-alsa: don't use casts to print a buffer address

2018-03-23 Thread Mauro Carvalho Chehab
Change the logic there to avoid casting, solving this warning: drivers/media/pci/saa7134/saa7134-alsa.c:276 saa7134_alsa_dma_init() warn: argument 3 to %08lx specifier is cast from pointer Signed-off-by: Mauro Carvalho Chehab ---

[PATCH 30/30] media: cec-core: fix a bug at cec_error_inj_write()

2018-03-23 Thread Mauro Carvalho Chehab
If the adapter doesn't have error_inj_parse_line() ops, the write() logic won't return -EINVAL, but, instead, it will keep looping, because "count" is a non-negative number. Signed-off-by: Mauro Carvalho Chehab --- drivers/media/cec/cec-core.c | 6 +++--- 1 file

[PATCH 14/30] media: cx23885: fix a warning

2018-03-23 Thread Mauro Carvalho Chehab
drivers/media/pci/cx23885/cx23885-alsa.c:92 cx23885_alsa_dma_init() warn: argument 3 to %08lx specifier is cast from pointer Signed-off-by: Mauro Carvalho Chehab --- drivers/media/pci/cx23885/cx23885-alsa.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)

Re: [PATCH v9.1] media: imx258: Add imx258 camera sensor driver

2018-03-23 Thread Tomasz Figa
Hi Andy, Some issues found when reviewing cherry pick of this patch to Chrome OS kernel. Please see inline. On Sat, Mar 17, 2018 at 1:38 AM, Andy Yeh wrote: [snip] > + case V4L2_CID_VBLANK: > + /* > +* Auto Frame Length Line Control is

Re: [PATCH v7 1/2] uvcvideo: send a control event when a Control Change interrupt arrives

2018-03-23 Thread Laurent Pinchart
Hi Guennadi, Thank you for the patch. On Friday, 23 March 2018 11:24:00 EET Laurent Pinchart wrote: > From: Guennadi Liakhovetski > > UVC defines a method of handling asynchronous controls, which sends a > USB packet over the interrupt pipe. This patch implements support

[PATCH] v4l-utils: keytable: add support for imon protocol

2018-03-23 Thread Sean Young
Signed-off-by: Sean Young --- utils/common/ir-encode.c | 1 + utils/keytable/keytable.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/utils/common/ir-encode.c b/utils/common/ir-encode.c index e6b65b5b..c7e319eb 100644 --- a/utils/common/ir-encode.c +++

Re: [RFC] Request API

2018-03-23 Thread Sakari Ailus
Hi Hans and Tomasz, On Fri, Mar 23, 2018 at 08:38:54AM +0100, Hans Verkuil wrote: ... > >>> > >>> Perhaps we need to consider few separate cases here: > >>> > >>> 1) Query control value within a request. Would return the value that > >>> was earlier set to that particular request (and maybe

[PATCH v7 2/2] uvcvideo: handle control pipe protocol STALLs

2018-03-23 Thread Laurent Pinchart
From: Guennadi Liakhovetski When a command ends up in a STALL on the control pipe, use the Request Error Code control to provide a more precise error information to the user. Signed-off-by: Guennadi Liakhovetski ---

[PATCH v7 1/2] uvcvideo: send a control event when a Control Change interrupt arrives

2018-03-23 Thread Laurent Pinchart
From: Guennadi Liakhovetski UVC defines a method of handling asynchronous controls, which sends a USB packet over the interrupt pipe. This patch implements support for such packets by sending a control event to the user. Since this can involve USB traffic and, therefore,

[PATCH v7 0/2] uvcvideo: asynchronous controls

2018-03-23 Thread Laurent Pinchart
Hi Guennadi, As your v7 of this patch series conflicted with the current version of the uvcvideo driver, I thought it would be easier to rebase it myself before reviewing, instead of asking you to do so. Here's the result, I'll send my review comments as replies. Guennadi Liakhovetski (2):

[ragnatech:media-tree 369/405] drivers/media/dvb-frontends/af9013.c:1560: undefined reference to `i2c_mux_del_adapters'

2018-03-23 Thread kbuild test robot
Hi Mauro, It's probably a bug fix that unveils the link errors. tree: git://git.ragnatech.se/linux media-tree head: f67449fdba3b9dbdd340d8cbf17dfa711d5bd2fb commit: 238f694e1b7f8297f1256c57e41f69c39576c9b4 [369/405] media: v4l2-common: fix a compilation breakage config:

Re: [PATCH v6] ARM: dts: wheat: Fix ADV7513 address usage

2018-03-23 Thread Simon Horman
On Thu, Mar 22, 2018 at 09:30:40PM +, Kieran Bingham wrote: > The r8a7792 Wheat board has two ADV7513 devices sharing a single I2C > bus, however in low power mode the ADV7513 will reset it's slave maps to > use the hardware defined default addresses. > > The ADV7511 driver was adapted to

[RFCv2] Request API

2018-03-23 Thread Hans Verkuil
RFC Request API, version 2 -- This document proposes the public API for handling requests. There has been some confusion about how to do this, so this summarizes the current approach based on conversations with the various stakeholders today (Sakari, Alexandre Courbot,

Re: [RFC] Request API

2018-03-23 Thread Hans Verkuil
On 03/23/2018 05:02 AM, Tomasz Figa wrote: > On Fri, Mar 23, 2018 at 1:28 AM, Hans Verkuil wrote: >> On 03/22/18 15:47, Tomasz Figa wrote: >>> Hi Hans, >>> >>> On Thu, Mar 22, 2018 at 11:18 PM, Hans Verkuil wrote: Requests only contain the