Re: [RFCv11 PATCH 27/29] vim2m: support requests

2018-04-12 Thread Tomasz Figa
Hi Hans, On Mon, Apr 9, 2018 at 11:20 PM Hans Verkuil wrote: > From: Hans Verkuil > Add support for requests to vim2m. > Signed-off-by: Hans Verkuil > --- > drivers/media/platform/vim2m.c | 25 + >

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

2018-04-12 Thread Sakari Ailus
On Wed, Apr 11, 2018 at 01:13:44PM -0300, Mauro Carvalho Chehab wrote: > Em Wed, 11 Apr 2018 18:35:14 +0300 > Sakari Ailus escreveu: > > > On Wed, Apr 11, 2018 at 12:17:27PM -0300, Mauro Carvalho Chehab wrote: > > > Em Wed, 11 Apr 2018 18:02:19 +0300 > > > Sakari Ailus

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

2018-04-12 Thread Sakari Ailus
Hi Tomasz, On Tue, Apr 10, 2018 at 08:59:23AM +, Tomasz Figa wrote: > Hi Hans, > > On Mon, Apr 9, 2018 at 11:21 PM Hans Verkuil wrote: > > > From: Hans Verkuil > > > Implement the MEDIA_REQUEST_IOC_QUEUE and MEDIA_REQUEST_IOC_REINIT > > ioctls.

Re: [RFCv11 PATCH 19/29] videobuf2-core: integrate with media requests

2018-04-12 Thread Tomasz Figa
Hi Hans, On Mon, Apr 9, 2018 at 11:20 PM Hans Verkuil wrote: > 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. Please see my

Re: [RFCv11 PATCH 22/29] videobuf2-v4l2: add vb2_request_queue helper

2018-04-12 Thread Tomasz Figa
On Mon, Apr 9, 2018 at 11:20 PM Hans Verkuil wrote: > 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

Re: [RFCv11 PATCH 26/29] vim2m: use workqueue

2018-04-12 Thread Tomasz Figa
Hi Hans, On Mon, Apr 9, 2018 at 11:20 PM Hans Verkuil wrote: > From: Hans Verkuil > v4l2_ctrl uses mutexes, so we can't setup a ctrl_handler in > interrupt context. Switch to a workqueue instead. Could it make more sense to just replace the old

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

2018-04-12 Thread Sakari Ailus
Hi Hans, On Mon, Apr 09, 2018 at 04:20:02PM +0200, Hans Verkuil wrote: > 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 |

Re: [RESEND PATCH v7 2/2] media: dw9807: Add dw9807 vcm driver

2018-04-12 Thread jacopo mondi
HI Andy, thanks for addressing my comments on v6. Some more questions below. On Tue, Apr 10, 2018 at 11:48:44PM +0800, Andy Yeh wrote: > From: Alan Chiang > > DW9807 is a 10 bit DAC from Dongwoon, designed for linear > control of voice coil motor. > > This driver

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

2018-04-12 Thread Tomasz Figa
Hi Hans, On Mon, Apr 9, 2018 at 11:21 PM Hans Verkuil wrote: [snip] > @@ -514,6 +517,11 @@ Buffer Flags > streaming may continue as normal and the buffer may be reused > normally. Drivers set this flag when the ``VIDIOC_DQBUF`` ioctl is > called. >

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

2018-04-12 Thread Tomasz Figa
On Mon, Apr 9, 2018 at 11:21 PM Hans Verkuil wrote: > 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 >

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

2018-04-12 Thread Sakari Ailus
Hi Mauro, On Tue, Apr 10, 2018 at 07:57:56AM -0300, Mauro Carvalho Chehab wrote: > Em Mon, 9 Apr 2018 16:20:02 +0200 > Hans Verkuil escreveu: > > > From: Hans Verkuil > > > > Implement the MEDIA_REQUEST_IOC_QUEUE and MEDIA_REQUEST_IOC_REINIT > >

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

2018-04-12 Thread Sakari Ailus
Hi Hans, On Mon, Apr 09, 2018 at 04:20:03PM +0200, Hans Verkuil wrote: > 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

Re: [RFCv11 PATCH 08/29] videodev2.h: add request_fd field to v4l2_ext_controls

2018-04-12 Thread Sakari Ailus
On Mon, Apr 09, 2018 at 04:20:05PM +0200, Hans Verkuil wrote: > 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

Re: [RESEND PATCH v7 2/2] media: dw9807: Add dw9807 vcm driver

2018-04-12 Thread Sakari Ailus
Hi Jacopo, On Thu, Apr 12, 2018 at 10:57:01AM +0200, jacopo mondi wrote: ... > > + if (MAX_RETRY == ++retry) { > > + dev_err(>dev, > > + "Cannot do the write operation because VCM is > > busy\n"); > > Nit: this is over 80 cols, it's fine,

[PATCH 0/4] Random ov7740 fixes

2018-04-12 Thread Sakari Ailus
Hi folks, I wrote these fixes to the ov7740 driver for the problems I saw. Mostly error handling as well as setting the events flag to enable control events. Sakari Ailus (4): ov7740: Fix number of controls hint ov7740: Check for possible NULL return value in control creation ov7740: Fix

[PATCH 3/4] ov7740: Fix control handler error at the end of control init

2018-04-12 Thread Sakari Ailus
Check that no error happened during adding controls to the driver's control handler. Print an error message and bail out if there was one. Signed-off-by: Sakari Ailus --- drivers/media/i2c/ov7740.c | 7 +++ 1 file changed, 7 insertions(+) diff --git

[PATCH 4/4] ov7740: Set subdev HAS_EVENT flag

2018-04-12 Thread Sakari Ailus
The driver has event support implemented but fails to set the flag enabling event support. Set the flag to enable control events. Signed-off-by: Sakari Ailus --- drivers/media/i2c/ov7740.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

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

2018-04-12 Thread Sakari Ailus
Hi Mauro, On Tue, Apr 10, 2018 at 08:04:09AM -0300, Mauro Carvalho Chehab wrote: > Em Mon, 9 Apr 2018 16:20:03 +0200 > Hans Verkuil escreveu: > > > From: Hans Verkuil > > > > Add media_request_find() to find a request based on the file > >

Re: [PATCH] media: imx: Skip every second frame in VDIC DIRECT mode

2018-04-12 Thread Philipp Zabel
On Sat, 2018-04-07 at 15:04 +0200, Marek Vasut wrote: > In VDIC direct mode, the VDIC applies combing filter during and > doubles the framerate, that is, after the first two half-frames > are received and the first frame is emitted by the VDIC, every > subsequent half-frame is patched into the

[PATCH v1.1 3/4] ov7740: Fix control handler error at the end of control init

2018-04-12 Thread Sakari Ailus
Check that no error happened during adding controls to the driver's control handler. Print an error message and bail out if there was one. Signed-off-by: Sakari Ailus --- since v1: - Move error checking after clustering. While clustering won't cause an error now,

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

2018-04-12 Thread Sakari Ailus
Hi Hans, On Mon, Apr 09, 2018 at 04:20:04PM +0200, Hans Verkuil wrote: > 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

[PATCH 1/4] ov7740: Fix number of controls hint

2018-04-12 Thread Sakari Ailus
The driver has 12 controls, not 2. Signed-off-by: Sakari Ailus --- drivers/media/i2c/ov7740.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/i2c/ov7740.c b/drivers/media/i2c/ov7740.c index 01f578785e79..c9b8bec6373f 100644 ---

[PATCH 2/4] ov7740: Check for possible NULL return value in control creation

2018-04-12 Thread Sakari Ailus
Check that creating the control actually succeeded before accessing it. A failure would lead to NULL pointer reference. Fix this. Signed-off-by: Sakari Ailus --- drivers/media/i2c/ov7740.c | 11 --- 1 file changed, 8 insertions(+), 3 deletions(-) diff

[PATCH 1/1] tda1997x: Use bitwise or for setting subdev flags

2018-04-12 Thread Sakari Ailus
Assigning subdev flags in probe() after v4l2_i2c_subdev_init() clears the I2C flag set by that function. Fix this by using bitwise or instead. Signed-off-by: Sakari Ailus --- drivers/media/i2c/tda1997x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

imx-media: MT9P031 Capture issues on IMX6

2018-04-12 Thread Ibtsam Ul-Haq
Greetings everyone, I am using Linux 4.14.31 on an IMX6 platform, with an MT9P031 sensor attached to the ipu1_csi0 (parallel). My Gstreamer version is 1.14.0 and v4l-utils version is 1.14.2. The problem is that I am unable to set up a capture pipeline. Even the simplest capture pipeline such as:

buffer sharing across VMs - xen-zcopy and hyper_dmabuf discussion

2018-04-12 Thread Dongwon Kim
(changed subject and decoupling from udmabuf thread) On Wed, Apr 11, 2018 at 08:59:32AM +0300, Oleksandr Andrushchenko wrote: > On 04/10/2018 08:26 PM, Dongwon Kim wrote: > >On Tue, Apr 10, 2018 at 09:37:53AM +0300, Oleksandr Andrushchenko wrote: > >>On 04/06/2018 09:57 PM, Dongwon Kim wrote: >

Re: [PATCH] media: v4l2-compat-ioctl32: fix several __user annotations

2018-04-12 Thread Mauro Carvalho Chehab
Em Thu, 12 Apr 2018 09:02:34 -0400 Mauro Carvalho Chehab escreveu: > Smatch report several issues with bad __user annotations: Please ignore this one. Sent to early. > > drivers/media/v4l2-core/v4l2-compat-ioctl32.c:447:21: warning: incorrect > type in argument 1

Re: [RFCv11 PATCH 10/29] v4l2-ctrls: v4l2_ctrl_add_handler: add from_other_dev

2018-04-12 Thread Sakari Ailus
Hi Hans, I don't really have an opinion on the patch yet; a few trivial comments below. On Mon, Apr 09, 2018 at 04:20:07PM +0200, Hans Verkuil wrote: ... > diff --git a/include/media/v4l2-ctrls.h b/include/media/v4l2-ctrls.h > index 5b445b5654f7..f8faa54b5e7e 100644 > ---

[PATCH 1/1] videodev2: Mark all user pointers as such

2018-04-12 Thread Sakari Ailus
A number of uAPI structs have pointers but some lack the __user modifier. Add this to the pointers that do not have it. Signed-off-by: Sakari Ailus --- Hi Mauro, I wonder if this would fix some smatch errors or would allow also cleaning up the casts in the compat

Re: Confusion about API: please clarify

2018-04-12 Thread Josef Wolf
On Di, Apr 10, 2018 at 05:22:39 -0300, Mauro Carvalho Chehab wrote: > That's said, adding suport for DiSEqC with more than 6 bytes should > likely be enabled driver per driver, after checking that the device > supports it. Do you know which length saa7146/stv0299 could do? -- Josef Wolf

[PATCH v1.1 1/1] videodev2: Mark all user pointers as such

2018-04-12 Thread Sakari Ailus
A number of uAPI structs have pointers but some lack the __user modifier. Add this to the pointers that do not have it. Signed-off-by: Sakari Ailus --- since v1: - Against the master branch (not Hans's reqv10) include/uapi/linux/videodev2.h | 6 +++--- 1 file

Re: [PATCH v1.1 1/1] videodev2: Mark all user pointers as such

2018-04-12 Thread Sakari Ailus
On Thu, Apr 12, 2018 at 04:03:22PM +0300, Sakari Ailus wrote: > A number of uAPI structs have pointers but some lack the __user modifier. > Add this to the pointers that do not have it. > > Signed-off-by: Sakari Ailus Please ignore these patches; the issue is not

[PATCH] media: v4l2-compat-ioctl32: fix several __user annotations

2018-04-12 Thread Mauro Carvalho Chehab
Smatch report several issues with bad __user annotations: drivers/media/v4l2-core/v4l2-compat-ioctl32.c:447:21: warning: incorrect type in argument 1 (different address spaces) drivers/media/v4l2-core/v4l2-compat-ioctl32.c:447:21:expected void [noderef] *uptr

[PATCH 06/13] imx274: remove non-indexed pointers from mode_table

2018-04-12 Thread Luca Ceresoli
mode_table[] has 3 members that are accessed based on their index, which makes worth using an array. The other members are always accessed with a constant index. This added indirection gives no improvement and only makes code more verbose. Remove these pointers from the array and access them

[PATCH 13/13] imx274: add SELECTION support for cropping

2018-04-12 Thread Luca Ceresoli
Currently this driver does not support cropping. The supported modes are the following, all capturing the entire area: - 3840x2160, 1:1 binning (native sensor resolution) - 1920x1080, 2:1 binning - 1280x720, 3:1 binning The set_fmt callback chooses among these 3 configurations the one that

[PATCH 00/13] imx274: add cropping and misc improvements

2018-04-12 Thread Luca Ceresoli
Hi, this patchset introduces cropping support for the Sony IMX274 sensor using the SELECTION API, after several cleanups and general code improvements. Patches 1-6 clean up and restructure code in various places and are pretty much independent from the cropping feature. Patches 7-11 are further

[PATCH 03/13] imx274: slightly simplify code

2018-04-12 Thread Luca Ceresoli
imx274_s_frame_interval() already has a direct pointer to the v4l2 exposure control, so reuse it to simplify code. Signed-off-by: Luca Ceresoli --- drivers/media/i2c/imx274.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/i2c/imx274.c

[PATCH 09/13] imx274: get rid of mode_index

2018-04-12 Thread Luca Ceresoli
After restructuring struct imx274_frmfmt, the mode_index field is still in use only for two dev_dbg() calls in imx274_s_stream(). Let's remove it and avoid duplicated information. Replacing the first usage requires a rather annoying but trivial computation. The other one can be removed entirely

[PATCH 08/13] imx274: consolidate per-mode data in imx274_frmfmt

2018-04-12 Thread Luca Ceresoli
Data about for the implemented readout modes is partially stored in imx274_formats[], the rest is scattered in several arrays. The latter are then accessed using the mode index, e.g.: min_frame_len[priv->mode_index] Consolidate all these data in imx274_formats[], and store a pointer to the

[PATCH 07/13] imx274: initialize format before v4l2 controls

2018-04-12 Thread Luca Ceresoli
The current probe function calls v4l2_ctrl_handler_setup() before initializing the format info. This triggers call paths such as: imx274_probe -> v4l2_ctrl_handler_setup -> imx274_s_ctrl -> imx274_set_exposure, where priv->mode_index is accessed before being assigned. This is wrong but does not

[PATCH 10/13] imx274: actually use IMX274_DEFAULT_MODE

2018-04-12 Thread Luca Ceresoli
IMX274_DEFAULT_MODE is defined but not used. Start using it, so the default can be more easily changed without digging into the code. Signed-off-by: Luca Ceresoli --- drivers/media/i2c/imx274.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

Re: [PATCH 08/15] ASoC: pxa: remove the dmaengine compat need

2018-04-12 Thread Robert Jarzmik
Mark Brown writes: > On Mon, Apr 02, 2018 at 04:26:49PM +0200, Robert Jarzmik wrote: >> As the pxa architecture switched towards the dmaengine slave map, the >> old compatibility mechanism to acquire the dma requestor line number and >> priority are not needed anymore. > >

[PATCH 12/13] imx274: add helper function to fill a reg_8 table chunk

2018-04-12 Thread Luca Ceresoli
Tables of struct reg_8 are used to simplify multi-byte register assignment. However filling these snippets with values computed at runtime is currently implemented by very similar functions doing the needed shift & mask manipulation. Replace all those functions with a unique helper function to

[PATCH 11/13] imx274: simplify imx274_write_table()

2018-04-12 Thread Luca Ceresoli
imx274_write_table() is a mere wrapper (and the only user) to imx274_regmap_util_write_table_8(). Remove this useless indirection by merging the two functions into one. Also get rid of the wait_ms_addr and end_addr parameters since it does not make any sense to give them any values other than

[PATCH 01/13] imx274: document reset delays more clearly

2018-04-12 Thread Luca Ceresoli
Document the unit to avoid having to look through the code to compute it. Also clarify that these are min and max values. Signed-off-by: Luca Ceresoli --- drivers/media/i2c/imx274.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH 05/13] imx274: rename and reorder register address definitions

2018-04-12 Thread Luca Ceresoli
Most registers are defined using the name used in the datasheet. E.g. the defines for the HMAX register are IMX274_HMAX_REG_*. Rename the SHR and VMAX register accordingly. Also move them close to related registers: SHR close to SVR, VMAX close to HMAX. Signed-off-by: Luca Ceresoli

[PATCH 02/13] imx274: fix typo in comment

2018-04-12 Thread Luca Ceresoli
Signed-off-by: Luca Ceresoli --- drivers/media/i2c/imx274.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/i2c/imx274.c b/drivers/media/i2c/imx274.c index 5e425db9204d..dfd04edcdd48 100644 --- a/drivers/media/i2c/imx274.c +++

[PATCH 04/13] imx274: remove unused data from struct imx274_frmfmt

2018-04-12 Thread Luca Ceresoli
struct imx274_frmfmt is instantiated only in the imx274_formats[] array, where imx274_formats[N].mode always equals N (via enum imx274_mode). So .mode carries no information, and unsurprisingly it is never used. mbus_code is never used because the 12 bit modes are not implemented. The

Re: [PATCH] media: imx: Skip every second frame in VDIC DIRECT mode

2018-04-12 Thread Marek Vasut
On 04/12/2018 12:04 PM, Philipp Zabel wrote: > On Sat, 2018-04-07 at 15:04 +0200, Marek Vasut wrote: >> In VDIC direct mode, the VDIC applies combing filter during and >> doubles the framerate, that is, after the first two half-frames >> are received and the first frame is emitted by the VDIC,

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

2018-04-12 Thread Sean Young
On Tue, Apr 10, 2018 at 09:24:19PM +0200, Matthias Reichl wrote: > On Tue, Apr 10, 2018 at 07:39:43PM +0100, Sean Young wrote: > > On Tue, Apr 10, 2018 at 07:53:43PM +0200, Matthias Reichl wrote: > > > Hi Sean, > > > > > > On Sun, Apr 08, 2018 at 10:19:35PM +0100, Sean Young wrote: > > > > The

Re: [PATCH 15/17] media: st_rc: Don't stay on an IRQ handler forever

2018-04-12 Thread Sean Young
On Thu, Apr 12, 2018 at 11:24:07AM -0400, Mauro Carvalho Chehab wrote: > As warned by smatch: > drivers/media/rc/st_rc.c:110 st_rc_rx_interrupt() warn: this loop > depends on readl() succeeding > > If something goes wrong at readl(), the logic will stay there > inside an IRQ code forever.

[PATCH] media: rcar-vin: Fix image alignment for setting pre clipping

2018-04-12 Thread Kuninori Morimoto
From: Koji Matsuoka In Video Pixel/Line Pre-Clip Register, the setting value can be set in 1 line unit, but it can only be specified as a multiple of 4 by v4l_bound_align_image function(). So correct that it can be specified in 1 line unit with this patch.

Re: DVB-T2 support for TVR801 USB stick (Astrometa DVB-T2)

2018-04-12 Thread TPClmml
On Fri, 30 Mar 2018, tpcl...@mklab.ph.rhul.ac.uk wrote: Could anyone clarify what is supported on this stick for me? According to https://www.linuxtv.org/wiki/index.php/Astrometa_DVB-T2 DVB-T2 has been supported since kernel 4.6. I tried using a 4.9.9 kernel about a year ago and again today

cron job: media_tree daily build: ERRORS

2018-04-12 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 Apr 13 05:00:14 CEST 2018 media-tree git hash:b284d4d5a6785f8cd07eda2646a95782373cd01e media_build

[PATCH 11/17] media: atomisp: compat32: use get_user() before referencing user data

2018-04-12 Thread Mauro Carvalho Chehab
The logic at get_atomisp_parameters32() is broken, as pointed by smatch: drivers/staging/media/atomisp/pci/atomisp2/atomisp_compat_ioctl32.c:737:21: warning: dereference of noderef expression drivers/staging/media/atomisp/pci/atomisp2/atomisp_compat_ioctl32.c:744:60: warning:

[PATCH 04/17] media: staging: atomisp: fix string comparation logic

2018-04-12 Thread Mauro Carvalho Chehab
it makes no sense to use strncmp() with a size with is bigger than the string we're comparing with. Fix those warnings: drivers/staging/media/atomisp/pci/atomisp2/atomisp_fops.c:776 atomisp_open() error: strncmp() '"ATOMISP ISP ACC"' too small (16 vs 32)

[PATCH 07/17] media: cec: fix smatch error

2018-04-12 Thread Mauro Carvalho Chehab
From: Hans Verkuil drivers/media/cec/cec-pin-error-inj.c:231 cec_pin_error_inj_parse_line() error: uninitialized symbol 'pos'. The tx-add-bytes command didn't check for the presence of an argument, and also didn't check that it was > 0. This should fix this error.

[PATCH 16/17] media: mantis: prevent staying forever in a loop at IRQ

2018-04-12 Thread Mauro Carvalho Chehab
As warned by smatch: drivers/media/pci/mantis/mantis_uart.c:105 mantis_uart_work() warn: this loop depends on readl() succeeding If something goes wrong at readl(), the logic will stay there inside an IRQ code forever. This is not the nicest thing to do :-) So, add a timeout there,

[PATCH 15/17] media: st_rc: Don't stay on an IRQ handler forever

2018-04-12 Thread Mauro Carvalho Chehab
As warned by smatch: drivers/media/rc/st_rc.c:110 st_rc_rx_interrupt() warn: this loop depends on readl() succeeding If something goes wrong at readl(), the logic will stay there inside an IRQ code forever. This is not the nicest thing to do :-) So, add a timeout there, preventing

[PATCH 06/17] media: v4l2-fwnode: simplify v4l2_fwnode_reference_parse_int_props()

2018-04-12 Thread Mauro Carvalho Chehab
The logic at v4l2_fwnode_reference_parse_int_props() is somewhat complex and violates Linux coding style, as it does multiple statements on a single line. That makes static analyzers to be confused, as warned by smatch: drivers/media/v4l2-core/v4l2-fwnode.c:832

[PATCH 08/17] atomisp: remove an impossible condition

2018-04-12 Thread Mauro Carvalho Chehab
Changeset dc9f65cf9aea ("media: staging: atomisp: avoid a warning if 32 bits build") was meant to solve an impossible condition when building with 32 bits. It turns that this impossible condition also happens wit 64 bits:

[PATCH 01/17] media: staging: atomisp: fix number conversion

2018-04-12 Thread Mauro Carvalho Chehab
smatch says that there's an issue with number conversion: drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_params.c:4154 sh_css_params_write_to_ddr_internal() warn: '((-(1 << ((14 - 1)' 4294959104 can't fit into 32767 'converted_macc_table.data[idx]'

[PATCH 12/17] media: staging: atomisp: add missing include

2018-04-12 Thread Mauro Carvalho Chehab
There are two functions used externally: drivers/staging/media/atomisp/pci/atomisp2/atomisp_compat_ioctl32.c:866:6: warning: symbol 'atomisp_do_compat_ioctl' was not declared. Should it be static? drivers/staging/media/atomisp/pci/atomisp2/atomisp_compat_ioctl32.c:1110:6:

[PATCH 17/17] media: v4l2-compat-ioctl32: fix several __user annotations

2018-04-12 Thread Mauro Carvalho Chehab
Smatch report several issues with bad __user annotations: drivers/media/v4l2-core/v4l2-compat-ioctl32.c:447:21: warning: incorrect type in argument 1 (different address spaces) drivers/media/v4l2-core/v4l2-compat-ioctl32.c:447:21:expected void [noderef] *uptr

[PATCH 09/17] media: platform: fix some 64-bits warnings

2018-04-12 Thread Mauro Carvalho Chehab
The omap/omap3 and viu drivers are for 32 bit platforms only. There, a pointer has 32 bits. Now that those drivers build for 64 bits with COMPILE_TEST, they produce the following warnings: drivers/media/platform/omap/omap_vout_vrfb.c: In function 'omap_vout_allocate_vrfb_buffers':

[PATCH 14/17] media: atomisp: get rid of a warning

2018-04-12 Thread Mauro Carvalho Chehab
On smatch, this warning is trigged: drivers/staging/media/atomisp/pci/atomisp2/hmm/hmm_bo.c:324 __bo_take_off_handling() error: we previously assumed 'bo->prev' could be null (see line 314) Because it can't properly analize the truth table for the above function. So, add an explicit

[PATCH 13/17] media: atomisp: compat32: fix __user annotations

2018-04-12 Thread Mauro Carvalho Chehab
The __user annotations at the compat32 code is not right: drivers/staging/media/atomisp/pci/atomisp2/atomisp_compat_ioctl32.c:81:18: warning: incorrect type in assignment (different address spaces) drivers/staging/media/atomisp/pci/atomisp2/atomisp_compat_ioctl32.c:81:18: expected void

[PATCH 03/17] media: atomisp: fix __user annotations

2018-04-12 Thread Mauro Carvalho Chehab
There are lots of troubles with atomisp __user annotations. Fix them. drivers/staging/media/atomisp/pci/atomisp2/atomisp_acc.c:357:49: warning: incorrect type in argument 2 (different address spaces) drivers/staging/media/atomisp/pci/atomisp2/atomisp_acc.c:357:49:expected void *userptr

[PATCH 02/17] media: staging: atomisp: don't declare the same vars as both private and public

2018-04-12 Thread Mauro Carvalho Chehab
The mmu_private.h header is included at mmu.c, with duplicates the already existing definitions at mmu_public.h. Fix this by removing the erroneous header file. Solve those issues: drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_common/host/mmu_private.h:24:26: warning:

[PATCH 10/17] media: v4l2-compat-ioctl32: prevent go past max size

2018-04-12 Thread Mauro Carvalho Chehab
As warned by smatch: drivers/media/v4l2-core/v4l2-compat-ioctl32.c:879 put_v4l2_ext_controls32() warn: check for integer overflow 'count' The access_ok() logic should check for too big arrays too. Cc: sta...@vger.kernel.org Signed-off-by: Mauro Carvalho Chehab

[PATCH 05/17] dvb_frontend: fix locking issues at dvb_frontend_get_event()

2018-04-12 Thread Mauro Carvalho Chehab
As warned by smatch: drivers/media/dvb-core/dvb_frontend.c:314 dvb_frontend_get_event() warn: inconsistent returns 'sem:>sem'. Locked on: line 288 line 295 line 306 line 314 Unlocked on: line 303

Re: [PATCH 08/15] ASoC: pxa: remove the dmaengine compat need

2018-04-12 Thread Mark Brown
On Mon, Apr 02, 2018 at 04:26:49PM +0200, Robert Jarzmik wrote: > As the pxa architecture switched towards the dmaengine slave map, the > old compatibility mechanism to acquire the dma requestor line number and > priority are not needed anymore. Acked-by: Mark Brown If