Re: [PATCH 02/22] nvmet: Make use of the new sg_map helper function

2017-04-13 Thread Christoph Hellwig
On Thu, Apr 13, 2017 at 11:06:16PM -0600, Logan Gunthorpe wrote: > Or maybe I'll just send a patch for that > separately seeing it doesn't depend on anything and is pretty simple. I > can do that next week. Yes, please just send that patch linux-nvme, we should be able to get it into 4.12.

Re: [PATCH 02/22] nvmet: Make use of the new sg_map helper function

2017-04-13 Thread Logan Gunthorpe
On 13/04/17 10:59 PM, Christoph Hellwig wrote: > On Thu, Apr 13, 2017 at 04:05:15PM -0600, Logan Gunthorpe wrote: >> This is a straight forward conversion in two places. Should kmap fail, >> the code will return an INVALD_DATA error in the completion. > > It really should be using

Re: [PATCH 02/22] nvmet: Make use of the new sg_map helper function

2017-04-13 Thread Christoph Hellwig
On Thu, Apr 13, 2017 at 04:05:15PM -0600, Logan Gunthorpe wrote: > This is a straight forward conversion in two places. Should kmap fail, > the code will return an INVALD_DATA error in the completion. It really should be using nvmet_copy_from_sgl to make things safer, as we don't want to rely on

cron job: media_tree daily build: WARNINGS

2017-04-13 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 14 05:00:15 CEST 2017 media-tree git hash:4aed35ca73f6d9cfd5f7089ba5d04f5fb8623080 media_build

[PATCH v2 15/15] [media] cxd2880 : Update MAINTAINERS file for CXD2880 driver

2017-04-13 Thread Yasunari.Takiguchi
From: Yasunari Takiguchi This is MAINTAINERS file update about the driver for the Sony CXD2880 DVB-T2/T tuner + demodulator. Signed-off-by: Yasunari Takiguchi Signed-off-by: Masayuki Yamamoto Signed-off-by:

[PATCH v2 14/15] [media] cxd2880: Add all Kconfig files for the driver

2017-04-13 Thread Yasunari.Takiguchi
From: Yasunari Takiguchi This is the Kconfig files of driver for the Sony CXD2880 DVB-T2/T tuner + demodulator driver. Signed-off-by: Yasunari Takiguchi Signed-off-by: Masayuki Yamamoto Signed-off-by: Hideki

[PATCH v2 13/15] [media] cxd2880: Add all Makefile files for the driver

2017-04-13 Thread Yasunari.Takiguchi
From: Yasunari Takiguchi This is the Makefile files of driver for the Sony CXD2880 DVB-T2/T tuner + demodulator. Signed-off-by: Yasunari Takiguchi Signed-off-by: Masayuki Yamamoto Signed-off-by: Hideki

[PATCH v2 12/15] [media] cxd2880: Add DVB-T2 monitor and integration layer functions

2017-04-13 Thread Yasunari.Takiguchi
From: Yasunari Takiguchi Provide monitor and integration layer functions (DVB-T2) for the Sony CXD2880 DVB-T2/T tuner + demodulator driver. Signed-off-by: Yasunari Takiguchi Signed-off-by: Masayuki Yamamoto

[PATCH v2 11/15] [media] cxd2880: Add DVB-T2 control functions for the driver

2017-04-13 Thread Yasunari.Takiguchi
From: Yasunari Takiguchi Provide definitions, interfaces and functions needed for DVB-T2 of the Sony CXD2880 DVB-T2/T tuner + demodulator driver. Signed-off-by: Yasunari Takiguchi Signed-off-by: Masayuki Yamamoto

[PATCH v2 10/15] [media] cxd2880: Add DVB-T monitor and integration layer functions

2017-04-13 Thread Yasunari.Takiguchi
From: Yasunari Takiguchi Provide monitor and integration layer functions (DVB-T) for the Sony CXD2880 DVB-T2/T tuner + demodulator driver. Signed-off-by: Yasunari Takiguchi Signed-off-by: Masayuki Yamamoto

[PATCH v2 09/15] [media] cxd2880: Add DVB-T control functions the driver

2017-04-13 Thread Yasunari.Takiguchi
From: Yasunari Takiguchi Provide definitions, interfaces and functions needed for DVB-T of the Sony CXD2880 DVB-T2/T tuner + demodulator driver. Signed-off-by: Yasunari Takiguchi Signed-off-by: Masayuki Yamamoto

[PATCH v2 08/15] [media] cxd2880: Add top level of the driver

2017-04-13 Thread Yasunari.Takiguchi
From: Yasunari Takiguchi This provides the main dvb frontend operation functions for the Sony CXD2880 DVB-T2/T tuner + demodulator driver. Signed-off-by: Yasunari Takiguchi Signed-off-by: Masayuki Yamamoto

[PATCH v2 07/15] [media] cxd2880: Add integration layer for the driver

2017-04-13 Thread Yasunari.Takiguchi
From: Yasunari Takiguchi These functions monitor the driver and watch for task completion. This is part of the Sony CXD2880 DVB-T2/T tuner + demodulator driver. Signed-off-by: Yasunari Takiguchi Signed-off-by: Masayuki Yamamoto

[PATCH v2 06/15] [media] cxd2880: Add tuner part of the driver

2017-04-13 Thread Yasunari.Takiguchi
From: Yasunari Takiguchi This part of the driver has the main routines to handle the tuner and demodulator functionality. The tnrdmd_mon.* files have monitor functions for the driver. This is part of the Sony CXD2880 DVB-T2/T tuner + demodulator driver.

[PATCH v2 05/15] [media] cxd2880: Add spi device IO routines

2017-04-13 Thread Yasunari.Takiguchi
From: Yasunari Takiguchi Add functions for initializing, reading and writing to the SPI device for the Sony CXD2880 DVB-T2/T tuner + demodulator. Signed-off-by: Yasunari Takiguchi Signed-off-by: Masayuki Yamamoto

[PATCH v2 04/15] [media] cxd2880: Add math functions for the driver

2017-04-13 Thread Yasunari.Takiguchi
From: Yasunari Takiguchi Provide some math support functions (fixed-point log functions) for the Sony CXD2880 DVB-T2/T tuner + demodulator driver. Signed-off-by: Yasunari Takiguchi Signed-off-by: Masayuki Yamamoto

[PATCH v2 03/15] [media] cxd2880: Add common files for the driver

2017-04-13 Thread Yasunari.Takiguchi
From: Yasunari Takiguchi These are common files for the driver for the Sony CXD2880 DVB-T2/T tuner + demodulator. These contains helper functions for the driver. Signed-off-by: Yasunari Takiguchi Signed-off-by: Masayuki Yamamoto

[PATCH v2 02/15] [media] cxd2880-spi: Add support for CXD2008 SPI interface

2017-04-13 Thread Yasunari.Takiguchi
From: Yasunari Takiguchi This is the SPI adapter part of the driver for the Sony CXD2880 DVB-T2/T tuner + demodulator. Signed-off-by: Yasunari Takiguchi Signed-off-by: Masayuki Yamamoto Signed-off-by: Hideki

[PATCH v2 01/15] [dt-bindings] [media] Add document file for CXD2880 SPI I/F

2017-04-13 Thread Yasunari.Takiguchi
From: Yasunari Takiguchi This is the document file for Sony CXD2880 DVB-T2/T tuner + demodulator. It contains the description of the SPI adapter binding. Signed-off-by: Yasunari Takiguchi Signed-off-by: Masayuki Yamamoto

[PATCH v2 0/15] [dt-bindings] [media] Add document file and driver for Sony CXD2880 DVB-T2/T tuner + demodulator

2017-04-13 Thread Yasunari.Takiguchi
From: Yasunari Takiguchi Hi, This is the patch series (version 2) of Sony CXD2880 DVB-T2/T tuner + demodulator driver. The driver supports DVB-API and interfaces through SPI. We have tested the driver on Raspberry Pi 3 and got picture and sound from a media

[PATCH 15/22] scsi: libfc, csiostor: Change to sg_copy_buffer in two drivers

2017-04-13 Thread Logan Gunthorpe
These two drivers appear to duplicate the functionality of sg_copy_buffer. So we clean them up to use the common code. This helps us remove a couple of instances that would otherwise be slightly tricky sg_map usages. Signed-off-by: Logan Gunthorpe ---

[PATCH 07/22] crypto: shash, caam: Make use of the new sg_map helper function

2017-04-13 Thread Logan Gunthorpe
Very straightforward conversion to the new function in two crypto drivers. Signed-off-by: Logan Gunthorpe --- crypto/shash.c| 9 ++--- drivers/crypto/caam/caamalg.c | 8 +++- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git

[PATCH 10/22] staging: unisys: visorbus: Make use of the new sg_map helper function

2017-04-13 Thread Logan Gunthorpe
Straightforward conversion to the new function. Signed-off-by: Logan Gunthorpe --- drivers/staging/unisys/visorhba/visorhba_main.c | 12 +++- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/drivers/staging/unisys/visorhba/visorhba_main.c

[PATCH 03/22] libiscsi: Make use of new the sg_map helper function

2017-04-13 Thread Logan Gunthorpe
Convert the kmap and kmap_atomic uses to the sg_map function. We now store the flags for the kmap instead of a boolean to indicate atomicitiy. We also propogate a possible kmap error down and create a new ISCSI_TCP_INTERNAL_ERR error type for this. Signed-off-by: Logan Gunthorpe

[PATCH 12/22] scsi: ipr, pmcraid, isci: Make use of the new sg_map helper in 4 call sites

2017-04-13 Thread Logan Gunthorpe
Very straightforward conversion of three scsi drivers. Signed-off-by: Logan Gunthorpe --- drivers/scsi/ipr.c | 27 ++- drivers/scsi/isci/request.c | 42 +- drivers/scsi/pmcraid.c | 19

[PATCH 04/22] target: Make use of the new sg_map function at 16 call sites

2017-04-13 Thread Logan Gunthorpe
Fairly straightforward conversions in all spots. In a couple of cases any error gets propogated up should sg_map fail. In other cases a warning is issued if the kmap fails seeing there's no clear error path. This should not be an issue until someone tries to use unmappable memory in the sgl with

[PATCH 18/22] mmc: spi: Make use of the new sg_map helper function

2017-04-13 Thread Logan Gunthorpe
We use the sg_map helper but it's slightly more complicated as we only check for the error when the mapping actually gets used. Such that if the mapping failed but wasn't needed then no error occurs. Signed-off-by: Logan Gunthorpe --- drivers/mmc/host/mmc_spi.c | 26

[PATCH 16/22] xen-blkfront: Make use of the new sg_map helper function

2017-04-13 Thread Logan Gunthorpe
Straightforward conversion to the new helper, except due to the lack of error path, we have to warn if unmapable memory is ever present in the sgl. Signed-off-by: Logan Gunthorpe --- drivers/block/xen-blkfront.c | 33 +++-- 1 file changed, 27

[PATCH 22/22] memstick: Make use of the new sg_map helper function

2017-04-13 Thread Logan Gunthorpe
Straightforward conversion, but we have to WARN if unmappable memory finds its way into the sgl. Signed-off-by: Logan Gunthorpe --- drivers/memstick/host/jmb38x_ms.c | 23 ++- drivers/memstick/host/tifm_ms.c | 22 +- 2 files

[PATCH 19/22] mmc: tmio: Make use of the new sg_map helper function

2017-04-13 Thread Logan Gunthorpe
Straightforward conversion to sg_map helper. A couple paths will WARN if the memory does not end up being mappable. Signed-off-by: Logan Gunthorpe --- drivers/mmc/host/tmio_mmc.h | 12 ++-- drivers/mmc/host/tmio_mmc_dma.c | 5 +

[PATCH 08/22] crypto: chcr: Make use of the new sg_map helper function

2017-04-13 Thread Logan Gunthorpe
The get_page in this area looks *highly* suspect due to there being no corresponding put_page. However, I've left that as is to avoid breaking things. I've also removed the KMAP_ATOMIC_ARGS check as it appears to be dead code that dates back to when it was first committed... Signed-off-by: Logan

[PATCH 05/22] drm/i915: Make use of the new sg_map helper function

2017-04-13 Thread Logan Gunthorpe
This is a single straightforward conversion from kmap to sg_map. Signed-off-by: Logan Gunthorpe --- drivers/gpu/drm/i915/i915_gem.c | 27 --- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_gem.c

[PATCH 01/22] scatterlist: Introduce sg_map helper functions

2017-04-13 Thread Logan Gunthorpe
This patch introduces functions which kmap the pages inside an sgl. Two variants are provided: one if an offset is required and one if the offset is zero. These functions replace a common pattern of kmap(sg_page(sg)) that is used in about 50 places within the kernel. The motivation for this work

[PATCH 02/22] nvmet: Make use of the new sg_map helper function

2017-04-13 Thread Logan Gunthorpe
This is a straight forward conversion in two places. Should kmap fail, the code will return an INVALD_DATA error in the completion. Signed-off-by: Logan Gunthorpe --- drivers/nvme/target/fabrics-cmd.c | 16 1 file changed, 12 insertions(+), 4 deletions(-)

[PATCH 11/22] RDS: Make use of the new sg_map helper function

2017-04-13 Thread Logan Gunthorpe
Straightforward conversion except there's no error path, so we WARN if the sg_map fails. Signed-off-by: Logan Gunthorpe --- net/rds/ib_recv.c | 17 ++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/net/rds/ib_recv.c b/net/rds/ib_recv.c index

[PATCH 00/22] Introduce common scatterlist map function

2017-04-13 Thread Logan Gunthorpe
Hi Everyone, As part of my effort to enable P2P DMA transactions with PCI cards, we've identified the need to be able to safely put IO memory into scatterlists (and eventually other spots). This probably involves a conversion from struct page to pfn_t but that migration is a ways off and those

[PATCH 17/22] mmc: sdhci: Make use of the new sg_map helper function

2017-04-13 Thread Logan Gunthorpe
Straightforward conversion, except due to the lack of error path we have to WARN if the memory in the SGL is not mappable. Signed-off-by: Logan Gunthorpe --- drivers/mmc/host/sdhci.c | 35 ++- 1 file changed, 30 insertions(+), 5 deletions(-)

[PATCH 21/22] mmc: tifm_sd: Make use of the new sg_map helper function

2017-04-13 Thread Logan Gunthorpe
This conversion is a bit complicated. We modiy the read_fifo, write_fifo and copy_page functions to take a scatterlist instead of a page. Thus we can use sg_map instead of kmap_atomic. There's a bit of accounting that needed to be done for the offset for this to work. (Seeing sg_map takes care of

[PATCH 13/22] scsi: hisi_sas, mvsas, gdth: Make use of the new sg_map helper function

2017-04-13 Thread Logan Gunthorpe
Very straightforward conversion of three scsi drivers. Signed-off-by: Logan Gunthorpe --- drivers/scsi/gdth.c| 9 +++-- drivers/scsi/hisi_sas/hisi_sas_v1_hw.c | 14 +- drivers/scsi/hisi_sas/hisi_sas_v2_hw.c | 13 +

[PATCH 20/22] mmc: sdricoh_cs: Make use of the new sg_map helper function

2017-04-13 Thread Logan Gunthorpe
This is a straightforward conversion to the new function. Signed-off-by: Logan Gunthorpe --- drivers/mmc/host/sdricoh_cs.c | 14 +- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/drivers/mmc/host/sdricoh_cs.c b/drivers/mmc/host/sdricoh_cs.c index

[PATCH 09/22] dm-crypt: Make use of the new sg_map helper in 4 call sites

2017-04-13 Thread Logan Gunthorpe
Very straightforward conversion to the new function in all four spots. Signed-off-by: Logan Gunthorpe --- drivers/md/dm-crypt.c | 38 +- 1 file changed, 25 insertions(+), 13 deletions(-) diff --git a/drivers/md/dm-crypt.c

[PATCH 14/22] scsi: arcmsr, ips, megaraid: Make use of the new sg_map helper function

2017-04-13 Thread Logan Gunthorpe
Very straightforward conversion of three scsi drivers Signed-off-by: Logan Gunthorpe --- drivers/scsi/arcmsr/arcmsr_hba.c | 16 drivers/scsi/ips.c | 8 drivers/scsi/megaraid.c | 9 +++-- 3 files changed, 23

[PATCH 06/22] crypto: hifn_795x: Make use of the new sg_map helper function

2017-04-13 Thread Logan Gunthorpe
Conversion of a couple kmap_atomic instances to the sg_map helper function. However, it looks like there was a bug in the original code: the source scatter lists offset (t->offset) was passed to ablkcipher_get which added it to the destination address. This doesn't make a lot of sense, but

Re: [PATCH 14/14] atomisp: remove UDS kernel code

2017-04-13 Thread kbuild test robot
-atomisp-use-local-variable-to-reduce-number-of-references/20170413-112312 config: i386-allmodconfig (attached as .config) compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901 reproduce: # save the attached .config to linux build tree make ARCH=i386 All errors (new ones prefixed

Re: [PATCH 40/40] media: imx: set and propagate empty field, colorimetry params

2017-04-13 Thread Steve Longerbeam
On 04/13/2017 03:09 AM, Philipp Zabel wrote: Hi Steve, thanks for cleaning this up. Apart from the comments below, this looks good to me. On Wed, 2017-04-12 at 17:45 -0700, Steve Longerbeam wrote: This patch adds a call to imx_media_fill_empty_mbus_fields() in the *_try_fmt() functions at

[RFC v3.1 05/14] vb2: Anticipate queue specific DMA attributes for USERPTR buffers

2017-04-13 Thread Sakari Ailus
The DMA attributes were available for the memop implementation for MMAP buffers but not for USERPTR buffers. Do the same for USERPTR. This patch makes no functional changes. Signed-off-by: Sakari Ailus --- since RFC v1: - Add missing q->dma_attrs argument to

Re: [PATCH v6 17/39] platform: add video-multiplexer subdevice driver

2017-04-13 Thread Philipp Zabel
Hi Sakari, thank you for the review. On Tue, 2017-04-04 at 15:47 +0300, Sakari Ailus wrote: > Hi Steve, Philipp and Pavel, > > On Mon, Mar 27, 2017 at 05:40:34PM -0700, Steve Longerbeam wrote: > > From: Philipp Zabel > > > > This driver can handle SoC internal and

[GIT PULL FOR v4.12] Voice coil lens controls, use them for ad5820

2017-04-13 Thread Sakari Ailus
Hi Mauro, This pull request adds a control class for voice coil lens controls and makes use of the new control for ad5820. Please pull. The following changes since commit 0538bee6fdec9b79910c1c9835e79be75d0e1bdf: [media] MAINTAINERS: update atmel-isi.c path (2017-04-10 08:13:08 -0300) are

Re: [PATCH 12/14] atomisp: remove fixedbds kernel code

2017-04-13 Thread kbuild test robot
-atomisp-use-local-variable-to-reduce-number-of-references/20170413-112312 config: i386-allmodconfig (attached as .config) compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901 reproduce: # save the attached .config to linux build tree make ARCH=i386 All errors (new ones prefixed

Re: [PATCH 40/40] media: imx: set and propagate empty field, colorimetry params

2017-04-13 Thread Philipp Zabel
Hi Steve, thanks for cleaning this up. Apart from the comments below, this looks good to me. On Wed, 2017-04-12 at 17:45 -0700, Steve Longerbeam wrote: > This patch adds a call to imx_media_fill_empty_mbus_fields() in the > *_try_fmt() functions at the sink pads, to set empty field order and >

Re: [PATCH] [media] imx: csi: retain current field order and colorimetry setting as default

2017-04-13 Thread Philipp Zabel
On Wed, 2017-04-12 at 09:03 +0200, Hans Verkuil wrote: [...] > >> Do you have a git tree with this patch? It is really hard to review without > >> having the full imx-media-csi.c source. > > > > The patch applies on top of > > > > https://github.com/slongerbeam/mediatree.git

[bug report] [media] vp702x: comment dead code

2017-04-13 Thread Dan Carpenter
Hello Mauro Carvalho Chehab, The patch 269d91f53fe3: "[media] vp702x: comment dead code" from Apr 29, 2015, leads to the following static checker warning: drivers/media/usb/dvb-usb/dvb-usb-remote.c:128 legacy_dvb_usb_read_remote_control() error: uninitialized symbol 'state'.

Re: [RFC PATCH 3/3] encoder-tpd12s015: keep the ls_oe_gpio on while the phys_addr is valid

2017-04-13 Thread Tomi Valkeinen
On 13/04/17 12:12, Hans Verkuil wrote: >> Is there anything else CEC needs to access or control (besides the CEC >> IP itself)? > > The CEC framework needs to be informed about the physical address contained > in the EDID (part of the CEA-861 block). And when the HPD goes down it needs > to be

Re: [RFC PATCH 3/3] encoder-tpd12s015: keep the ls_oe_gpio on while the phys_addr is valid

2017-04-13 Thread Hans Verkuil
On 04/13/2017 10:43 AM, Tomi Valkeinen wrote: > On 12/04/17 17:04, Hans Verkuil wrote: > >>> So is some other driver supporting this already? Or is the omap4 the >>> first platform you're trying this on? >> >> No, there are quite a few CEC drivers by now, but typically the CEC block is >> a

Re: [RFC PATCH 3/3] encoder-tpd12s015: keep the ls_oe_gpio on while the phys_addr is valid

2017-04-13 Thread Tomi Valkeinen
On 12/04/17 17:04, Hans Verkuil wrote: >> So is some other driver supporting this already? Or is the omap4 the >> first platform you're trying this on? > > No, there are quite a few CEC drivers by now, but typically the CEC block is > a totally independent IP block with its own power, irq, etc.

[PATCH v2] [media] mceusb: TX -EPIPE (urb status = -32) lockup fix

2017-04-13 Thread A Sun
fix previous v1 patch error; incorrect location of "ir->pipe_in = pipe;" caused null pointer dereference Bug: Once IR blasting or mceusb device commands fail with mce_async_callback() TX -EPIPE error, all subsequent TX to device then fail with the same error. ... [ 249.986174] mceusb

[RFC v3 08/14] vb2: dma-contig: Don't warn on failure in obtaining scatterlist

2017-04-13 Thread Sakari Ailus
vb2_dc_get_base_sgt() which obtains the scatterlist already prints information on why the scatterlist could not be obtained. Also, remove the useless warning of a failed kmalloc(). Signed-off-by: Sakari Ailus Reviewed-by: Laurent Pinchart

[RFC v3 02/14] vb2: Move buffer cache synchronisation to prepare from queue

2017-04-13 Thread Sakari Ailus
The buffer cache should be synchronised in buffer preparation, not when the buffer is queued to the device. Fix this. Mmap buffers do not need cache synchronisation since they are always coherent. Signed-off-by: Sakari Ailus Acked-by: Hans Verkuil

[RFC v3 00/14] vb2: Handle user cache hints, allow drivers to choose cache coherency

2017-04-13 Thread Sakari Ailus
Hello, This is a rebased and partially reworked version of the vb2 cache hints support patch series posted by Laurent more three months ago. The patches have been modified as needed by the upstream changes. There are a number of other changes as well. Since then, patch ccc66e73 ("ARM: 8508/2:

[RFC v3 14/14] vb2: Improve struct vb2_mem_ops documentation; alloc and put are for MMAP

2017-04-13 Thread Sakari Ailus
The alloc() and put() ops are for MMAP buffers only. Document it. Signed-off-by: Sakari Ailus Acked-by: Hans Verkuil Reviewed-by: Laurent Pinchart --- include/media/videobuf2-core.h | 20

[RFC v3 10/14] vb2: dma-contig: Fix DMA attribute and cache management

2017-04-13 Thread Sakari Ailus
Patch ccc66e73 ("ARM: 8508/2: videobuf2-dc: Let drivers specify DMA attrs") added support for driver specific DMA attributes to videobuf2-dma-contig but it had several issues in it. In particular, - cache operations were only performed on USERPTR buffers, - DMA attributes were set only for MMAP

[RFC v3 12/14] vb2: dma-sg: Let drivers decide DMA attrs of MMAP and USERPTR bufs

2017-04-13 Thread Sakari Ailus
The desirable DMA attributes are not generic for all devices using Videobuf2 scatter-gather DMA ops. Let the drivers decide. As a result, also the DMA-BUF exporter must provide ops for synchronising the cache. This adds begin_cpu_access and end_cpu_access ops to vb2_dc_dmabuf_ops. Signed-off-by:

[RFC v3 11/14] vb2: dma-contig: Add WARN_ON_ONCE() to check for potential bugs

2017-04-13 Thread Sakari Ailus
The scatterlist should always be present when the cache would need to be flushed. Each buffer type has its own means to provide that. Add WARN_ON_ONCE() to check the scatterist exists. Signed-off-by: Sakari Ailus Acked-by: Hans Verkuil ---

[RFC v3 06/14] vb2: dma-contig: Assign DMA attrs for a buffer unconditionally

2017-04-13 Thread Sakari Ailus
attrs used to be a pointer and the caller of vb2_dc_alloc() could optionally provide it, or NULL. This was when struct dma_attrs was used to describe DMA attributes rather than an unsigned long value. There is no longer a need to maintain the condition, assign the value unconditionally. There is

[RFC v3 05/14] vb2: Anticipate queue specific DMA attributes for USERPTR buffers

2017-04-13 Thread Sakari Ailus
The DMA attributes were available for the memop implementation for MMAP buffers but not for USERPTR buffers. Do the same for USERPTR. This patch makes no functional changes. Signed-off-by: Sakari Ailus --- drivers/media/v4l2-core/videobuf2-dma-contig.c | 3 ++-

[RFC v3 07/14] vb2: dma-contig: Remove redundant sgt_base field

2017-04-13 Thread Sakari Ailus
The struct vb2_dc_buf contains two struct sg_table fields: sgt_base and dma_sgt. The former is used by DMA-BUF buffers whereas the latter is used by USERPTR. Unify the two, leaving dma_sgt. MMAP buffers do not need cache flushing since they have been allocated using dma_alloc_coherent().

[RFC v3 09/14] vb2: dma-contig: Move vb2_dc_get_base_sgt() up

2017-04-13 Thread Sakari Ailus
Just move the function up. It'll be soon needed earlier than previously. Signed-off-by: Sakari Ailus Reviewed-by: Laurent Pinchart Acked-by: Hans Verkuil --- drivers/media/v4l2-core/videobuf2-dma-contig.c

[RFC v3 13/14] vb2: Don't sync cache for a buffer if so requested

2017-04-13 Thread Sakari Ailus
From: Samu Onkalo The user may request to the driver (vb2) to skip the cache maintenance operations in case the buffer does not need cache synchronisation, e.g. in cases where the buffer is passed between hardware blocks without it being touched by the CPU. Also document

[RFC v3 03/14] vb2: Move cache synchronisation from buffer done to dqbuf handler

2017-04-13 Thread Sakari Ailus
The cache synchronisation may be a time consuming operation and thus not best performed in an interrupt which is a typical context for vb2_buffer_done() calls. This may consume up to tens of ms on some machines, depending on the buffer size. Signed-off-by: Sakari Ailus

[RFC v3 01/14] vb2: Rename confusingly named internal buffer preparation functions

2017-04-13 Thread Sakari Ailus
Rename __qbuf_*() functions which are specific to a buffer type as __prepare_*() which matches with what they do. The naming was there for historical reasons; the purpose of the functions was changed without renaming them. Signed-off-by: Sakari Ailus Acked-by: Hans

[RFC v3 04/14] v4l: Unify cache management hint buffer flags

2017-04-13 Thread Sakari Ailus
The V4L2_BUF_FLAG_NO_CACHE_INVALIDATE and V4L2_BUF_FLAG_NO_CACHE_CLEAN buffer flags are currently not used by the kernel. Replace the definitions by a single V4L2_BUF_FLAG_NO_CACHE_SYNC flag to be used by further patches. Different cache architectures should not be visible to the user space which

[PATCH 1/3] dt-bindings: mt8173: Fix mdp device tree

2017-04-13 Thread Minghsiu Tsai
If the mdp_* nodes are under an mdp sub-node, their corresponding platform device does not automatically get its iommu assigned properly. Fix this by moving the mdp component nodes up a level such that they are siblings of mdp and all other SoC subsystems. This also simplifies the device tree.

[PATCH 0/3] Fix mdp device tree

2017-04-13 Thread Minghsiu Tsai
Fix this by moving the mdp component nodes up a level such that they are siblings of mdp and all other SoC subsystems. This also simplifies the device tree. Daniel Kurtz (2): arm64: dts: mt8173: Fix mdp device tree media: mtk-mdp: Fix mdp device tree Minghsiu Tsai (1): dt-bindings:

[PATCH 2/3] arm64: dts: mt8173: Fix mdp device tree

2017-04-13 Thread Minghsiu Tsai
From: Daniel Kurtz If the mdp_* nodes are under an mdp sub-node, their corresponding platform device does not automatically get its iommu assigned properly. Fix this by moving the mdp component nodes up a level such that they are siblings of mdp and all other SoC

[PATCH 3/3] media: mtk-mdp: Fix mdp device tree

2017-04-13 Thread Minghsiu Tsai
From: Daniel Kurtz If the mdp_* nodes are under an mdp sub-node, their corresponding platform device does not automatically get its iommu assigned properly. Fix this by moving the mdp component nodes up a level such that they are siblings of mdp and all other SoC

Re: [PATCH] [media] mtk-mdp: Fix g_/s_selection capture/compose logic

2017-04-13 Thread 李務誠
Reviewed-by: Wu-Cheng Li On Thu, Apr 13, 2017 at 12:18 PM, Minghsiu Tsai wrote: > From: Daniel Kurtz > > Experiments show that the: > (1) mtk-mdp uses the _MPLANE form of CAPTURE/OUTPUT > (2) CAPTURE types use CROP