Re: Summary of the V4L2 discussions during LDS - was: Re: Embedded Linux memory management interest group list

2011-05-19 Thread Sakari Ailus
to inform the sensor that the receiver has run out of buffer space. These interfaces are just unidirectional. Regards, -- Sakari Ailus sakari.ai...@maxwell.research.nokia.com ___ dri-devel mailing list dri-devel@lists.freedesktop.org http

Re: [Linaro-mm-sig] [RFC v2 1/2] dma-buf: Introduce dma buffer sharing mechanism

2011-12-20 Thread Sakari Ailus
to suggest special cache handling for buffers. Kind regards, -- Sakari Ailus e-mail: sakari.ai...@iki.fi jabber/XMPP/Gmail: sai...@retiisi.org.uk ___ dri-devel mailing list dri-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/dri

Re: [PATCH 2/3] dma-buf: Documentation for buffer sharing framework

2012-01-02 Thread Sakari Ailus
a + map_dma_buf() API has been called, it simply returns an error. + +References: +[1] struct dma_buf_ops in include/linux/dma-buf.h +[2] All interfaces mentioned above defined in include/linux/dma-buf.h Kind regards, -- Sakari Ailus e-mail: sakari.ai...@iki.fi jabber/XMPP/Gmail: sai

Re: [Linaro-mm-sig] [RFC v2 1/2] dma-buf: Introduce dma buffer sharing mechanism

2012-01-02 Thread Sakari Ailus
Hi Arnd, On Tue, Dec 20, 2011 at 03:36:49PM +, Arnd Bergmann wrote: On Tuesday 20 December 2011, Sakari Ailus wrote: (I'm jumping into the discussion in the middle, and might miss something that has already been talked about. I still hope what I'm about to say is relevant

Re: [PATCH 3/3] dma_buf: Add documentation for the new cpu access support

2012-03-04 Thread Sakari Ailus
, + enum dma_data_direction dir); + + +Miscellaneous notes +--- + - Any exporters or users of the dma-buf buffer sharing framework must have a 'select DMA_SHARED_BUFFER' in their respective Kconfigs. Kind regards, -- Sakari Ailus e-mail: sakari.ai...@iki.fi jabber/XMPP

Re: [PATCHv2 3/9] v4l: add buffer exporting via dmabuf

2012-08-08 Thread Sakari Ailus
in the V4L2 core itself. While I'm not aware of a driver that'd allow creating more buffers than that the changes required to support more would be likely limited to videobuf2. Regards, -- Sakari Ailus e-mail: sakari.ai...@iki.fi jabber/XMPP/Gmail: sai...@retiisi.org.uk

[PATCH 1/1] media: Entities with sink pads must have at least one enabled link

2012-10-28 Thread Sakari Ailus
connected to the aforementioned one should be used for the purpose. Signed-off-by: Sakari Ailus sakari.ai...@iki.fi --- drivers/media/media-entity.c | 16 +--- 1 files changed, 13 insertions(+), 3 deletions(-) diff --git a/drivers/media/media-entity.c b/drivers/media/media-entity.c

Re: [PATCH 1/1] media: Entities with sink pads must have at least one enabled link

2012-11-13 Thread Sakari Ailus
Hi all, Comments would be appreciated, either positive or negative. The omap3isp driver does the same check itself currently, but I think this is more generic than that. Thanks. On Fri, Oct 26, 2012 at 10:46:17PM +0300, Sakari Ailus wrote: If an entity has sink pads, at least one of them must

Re: [PATCH 1/1] media: Entities with sink pads must have at least one enabled link

2012-11-14 Thread Sakari Ailus
Hi Sylwester, Thanks for the comments. On Wed, Nov 14, 2012 at 10:23:19AM +0100, Sylwester Nawrocki wrote: On 11/13/2012 03:24 PM, Sakari Ailus wrote: Hi all, Comments would be appreciated, either positive or negative. The omap3isp driver does the same check itself currently, but I

Re: [PATCH 1/1] media: Entities with sink pads must have at least one enabled link

2012-11-14 Thread Sakari Ailus
either it has no configurable links or it's broken. :-) -- Sakari Ailus e-mail: sakari.ai...@iki.fi XMPP: sai...@retiisi.org.uk ___ dri-devel mailing list dri-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/dri-devel

Re: [PATCH 1/1] media: Entities with sink pads must have at least one enabled link

2012-11-16 Thread Sakari Ailus
Hi Laurent, Thanks for the comments. On Thu, Nov 15, 2012 at 01:46:23AM +0100, Laurent Pinchart wrote: On Wednesday 14 November 2012 23:13:45 Sakari Ailus wrote: On Wed, Nov 14, 2012 at 10:23:19AM +0100, Sylwester Nawrocki wrote: On 11/13/2012 03:24 PM, Sakari Ailus wrote: Hi all

[PATCH 2/2] [media] v4l: Add 10-bits per channel YUV pixel formats

2017-01-02 Thread Sakari Ailus
#define V4L2_PIX_FMT_NV12MT_16X16 v4l2_fourcc('V', 'M', '1', '2') /* 12 > Y/CbCr 4:2:0 16x16 macroblocks */ > +#define V4L2_PIX_FMT_P010M v4l2_fourcc('P', 'M', '1', '0') /* 15 Y/CbCr > 4:2:0, 10 bits per channel */ > > /* three planes - Y Cb, Cr */ > #define V4L2_PIX_FMT_YUV4

[PATCH 2/2] [media] v4l: Add 10-bits per channel YUV pixel formats

2017-01-02 Thread Sakari Ailus
Hi, On Mon, Jan 02, 2017 at 06:53:16PM +0800, ayaka wrote: > > > On 01/02/2017 05:10 PM, Sakari Ailus wrote: > >Hi Randy, > > > >Thanks for the patch. > > > >On Mon, Jan 02, 2017 at 04:50:04PM +0800, Randy Li wrote: > >>The formats ad

[PATCH v2 2/2] [media] v4l: Add 10/16-bits per channel YUV pixel formats

2017-01-05 Thread Sakari Ailus
dering also that NV12 was never a great name for a format... -- Kind regards, Sakari Ailus e-mail: sakari.ailus at iki.fi XMPP: sailus at retiisi.org.uk

[PATCH v2 2/2] [media] v4l: Add 10/16-bits per channel YUV pixel formats

2017-01-05 Thread Sakari Ailus
Hi Randy, On Thu, Jan 05, 2017 at 11:22:26PM +0800, ayaka wrote: > > > On 01/05/2017 06:30 PM, Sakari Ailus wrote: > >Hi Randy, > > > >Thanks for the update. > > > >On Thu, Jan 05, 2017 at 12:29:11AM +0800, Randy Li wrote: > >>The formats ad

[PATCH 3/3] dma_buf: Add documentation for the new cpu access support

2012-03-03 Thread Sakari Ailus
fter end_cpu_access is undefined. > + > + Interface: > + void dma_buf_end_cpu_access(struct dma_buf *dma_buf, > + size_t start, size_t len, > + enum dma_data_direction dir); > + > + > +Miscellaneous notes > +--- > + > - Any exporters or users of the dma-buf buffer sharing framework must have >a 'select DMA_SHARED_BUFFER' in their respective Kconfigs. Kind regards, -- Sakari Ailus e-mail: sakari.ailus at iki.fi jabber/XMPP/Gmail: sailus at retiisi.org.uk

[PATCH 1/1] media: Entities with sink pads must have at least one enabled link

2012-11-13 Thread Sakari Ailus
Hi all, Comments would be appreciated, either positive or negative. The omap3isp driver does the same check itself currently, but I think this is more generic than that. Thanks. On Fri, Oct 26, 2012 at 10:46:17PM +0300, Sakari Ailus wrote: > If an entity has sink pads, at least one of them m

[PATCH 1/1] media: Entities with sink pads must have at least one enabled link

2012-11-14 Thread Sakari Ailus
Hi Sylwester, Thanks for the comments. On Wed, Nov 14, 2012 at 10:23:19AM +0100, Sylwester Nawrocki wrote: > On 11/13/2012 03:24 PM, Sakari Ailus wrote: > > Hi all, > > > > Comments would be appreciated, either positive or negative. The omap3isp > > driver does the

[PATCH 1/1] media: Entities with sink pads must have at least one enabled link

2012-11-14 Thread Sakari Ailus
't. Quite likelye either it has no configurable links or it's broken. :-) -- Sakari Ailus e-mail: sakari.ailus at iki.fi XMPP: sailus at retiisi.org.uk

[PATCH 1/1] media: Entities with sink pads must have at least one enabled link

2012-11-15 Thread Sakari Ailus
Hi Laurent, Thanks for the comments. On Thu, Nov 15, 2012 at 01:46:23AM +0100, Laurent Pinchart wrote: > On Wednesday 14 November 2012 23:13:45 Sakari Ailus wrote: > > On Wed, Nov 14, 2012 at 10:23:19AM +0100, Sylwester Nawrocki wrote: > > > On 11/13/2012 03:24 PM, Sakari Ailus

[PATCH 1/1] media: Entities with sink pads must have at least one enabled link

2012-10-26 Thread Sakari Ailus
connected to the aforementioned one should be used for the purpose. Signed-off-by: Sakari Ailus --- drivers/media/media-entity.c | 16 +--- 1 files changed, 13 insertions(+), 3 deletions(-) diff --git a/drivers/media/media-entity.c b/drivers/media/media-entity.c index e1cd132

[PATCH v2 05/10] Add RGB666_1X24_CPADHI media bus format

2015-02-04 Thread Sakari Ailus
> #define MEDIA_BUS_FMT_RGB666_1X18 0x1009 > +#define MEDIA_BUS_FMT_RGB666_1X24_CPADHI 0x1015 > #define MEDIA_BUS_FMT_RGB666_1X7X3_SPWG 0x1010 > #define MEDIA_BUS_FMT_BGR888_1X24 0x1013 > #define MEDIA_BUS_FMT_GBR888_1X24 0x1014 > -- Kind regards, Sakari Ailus sakari.ailus at linux.intel.com

[PATCH v2 05/10] Add RGB666_1X24_CPADHI media bus format

2015-02-05 Thread Sakari Ailus
Hi Philipp, Philipp Zabel wrote: > Hi Sakari, > > Am Mittwoch, den 04.02.2015, 16:37 +0200 schrieb Sakari Ailus: >> Hi Philipp, >> >> Could you add linux-media next time you send the set, please? I think >> that's the most relevant list for the format related

[PATCHv2 3/9] v4l: add buffer exporting via dmabuf

2012-08-08 Thread Sakari Ailus
und in the V4L2 core itself. While I'm not aware of a driver that'd allow creating more buffers than that the changes required to support more would be likely limited to videobuf2. Regards, -- Sakari Ailus e-mail: sakari.ailus at iki.fi jabber/XMPP/Gmail: sailus at retiisi.org.uk

[PATCH 2/3] dma-buf: Documentation for buffer sharing framework

2012-01-01 Thread Sakari Ailus
ake sense to return EBUSY instead since it's not known when the unmapping will be done. > +Once all users have finished accessing and have unmapped this buffer, the > +exporter could potentially move the buffer to the stricter > backing-storage, > +and then allow further {map,unmap}_dma_buf operations from any > buffer-user > +from the migrated backing-storage. > + > + If the exporter cannot fulfil the backing-storage constraints of the new > + buffer-user device as requested, dma_buf_attach() would return an error to > + denote non-compatibility of the new buffer-sharing request with the > current > + buffer. > + > + If the exporter chooses not to allow an attach() operation once a > + map_dma_buf() API has been called, it simply returns an error. > + > +References: > +[1] struct dma_buf_ops in include/linux/dma-buf.h > +[2] All interfaces mentioned above defined in include/linux/dma-buf.h Kind regards, -- Sakari Ailus e-mail: sakari.ailus at iki.fi jabber/XMPP/Gmail: sailus at retiisi.org.uk

[Linaro-mm-sig] [RFC v2 1/2] dma-buf: Introduce dma buffer sharing mechanism

2012-01-01 Thread Sakari Ailus
Hi Arnd, On Tue, Dec 20, 2011 at 03:36:49PM +, Arnd Bergmann wrote: > On Tuesday 20 December 2011, Sakari Ailus wrote: > > (I'm jumping into the discussion in the middle, and might miss something > > that has already been talked about. I still hope what I'm about to say

[Linaro-mm-sig] [RFC v2 1/2] dma-buf: Introduce dma buffer sharing mechanism

2011-12-20 Thread Sakari Ailus
r to know how the user space intends to user the buffer. Flushing the cache is quite expensive: typically it's the best to flush the whole data cache when one needs to flush buffers. The V4L2 DQBUF and QBUF IOCTLs already have flags to suggest special cache handling for buffers. Kind regards, -- Sakari Ailus e-mail: sakari.ailus at iki.fi jabber/XMPP/Gmail: sailus at retiisi.org.uk

Summary of the V4L2 discussions during LDS - was: Re: Embedded Linux memory management interest group list

2011-05-18 Thread Sakari Ailus
t provide means to inform the sensor that the receiver has run out of buffer space. These interfaces are just unidirectional. Regards, -- Sakari Ailus sakari.ailus at maxwell.research.nokia.com

Re: [RFC v2 07/11] vb2: dma-contig: Remove redundant sgt_base field

2017-04-07 Thread Sakari Ailus
Hi Shuah, On Mon, Mar 27, 2017 at 04:51:40PM -0600, Shuah Khan wrote: > On Thu, Dec 15, 2016 at 6:24 PM, Laurent Pinchart > <laurent.pinchart+rene...@ideasonboard.com> wrote: > > From: Sakari Ailus <sakari.ai...@linux.intel.com> > > > > The struct vb2_dc_buf

Re: [RFC, v2, 10/11] vb2: dma-contig: Let drivers decide DMA attrs of MMAP and USERPTR bufs

2017-04-05 Thread Sakari Ailus
Hi Ricky, On Mon, Dec 26, 2016 at 03:58:07PM +0800, Ricky Liang wrote: > Hi Laurent, > > On Fri, Dec 16, 2016 at 9:24 AM, Laurent Pinchart > <laurent.pinchart+rene...@ideasonboard.com> wrote: > > From: Sakari Ailus <sakari.ai...@linux.intel.com> > &

[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 <sakari.ai...@linux.intel.com> Reviewed-by: Laurent Pinchart <laurent.pinch...@ideasonboard.com> Acked-by: Hans Verkuil <hans.verk...@cisco.com> --- drivers/media/v4l2-core/vide

[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 <sakari.ai...@linux.intel.com> Acked-by: Hans Verkuil <

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

2017-04-13 Thread Sakari Ailus
cument that the prepare and finish vb2_mem_ops might not get called every time the buffer ownership changes between the kernel and the user space. Signed-off-by: Samu Onkalo <samu.onk...@intel.com> Signed-off-by: Sakari Ailus <sakari.ai...@linux.intel.com> Acked-by: Hans Verkuil <h

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

2017-04-13 Thread Sakari Ailus
drivers specify DMA attrs") Signed-off-by: Sakari Ailus <sakari.ai...@linux.intel.com> --- drivers/media/v4l2-core/videobuf2-dma-contig.c | 90 -- 1 file changed, 69 insertions(+), 21 deletions(-) diff --git a/drivers/media/v4l2-core/videobuf2-dma-contig.c

[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 <sakari.ai...@linux.intel.com> Acked-by: Hans Verkuil <hans.verk...@

[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 <sakari.ai...@linux.intel.com> Acked-by

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

2017-04-13 Thread Sakari Ailus
-off-by: Sakari Ailus <sakari.ai...@linux.intel.com> Acked-by: Hans Verkuil <hans.verk...@cisco.com> --- drivers/media/v4l2-core/videobuf2-dma-contig.c | 25 + 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/drivers/media/v4l2-core/videobuf2-dma

[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 <sakari.ai...@linux.intel.com> --- drivers/media/v4l2-core/videobuf2-dma-contig

[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 <sakari

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

2017-04-13 Thread Sakari Ailus
ttrs for MMAP buffers. - Don't call vb2_dc_get_base_sgt() until buf->dev is set. - Provide {begin,end}_cpu_access() dmabuf ops for cache management. - Make similar changes to dma-sg memops to support DMA attributes. Sakari Ailus (13): vb2: Rename confusingly named internal buffer preparation

[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 <sakari.ai...@linux.intel.com> Reviewed-by: Laurent Pinchart <laur

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

2017-04-13 Thread Sakari Ailus
-by: Sakari Ailus <sakari.ai...@linux.intel.com> --- drivers/media/v4l2-core/videobuf2-dma-sg.c | 81 +++--- 1 file changed, 62 insertions(+), 19 deletions(-) diff --git a/drivers/media/v4l2-core/videobuf2-dma-sg.c b/drivers/media/v4l2-core/videobuf2-dma-sg.c index 1

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

2017-04-13 Thread Sakari Ailus
operation (clean and invalidate, respectively). No user input is required. Signed-off-by: Sakari Ailus <sakari.ai...@linux.intel.com> Acked-by: Hans Verkuil <hans.verk...@cisco.com> --- Documentation/media/uapi/v4l/buffer.rst| 24 -- .../media/uapi/v4l/vi

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

2017-04-13 Thread Sakari Ailus
. There is no functional difference because the memory was initialised to zero anyway. Fixes: 00085f1e ("dma-mapping: use unsigned long for dma_attrs") Signed-off-by: Sakari Ailus <sakari.ai...@linux.intel.com> --- drivers/media/v4l2-core/videobuf2-dma-contig.c | 3 +-- 1 file changed, 1

[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 <sakari.ai...@linux.intel.com> Acked-by: Hans Verkuil <hans.verk...@cisco.com> Reviewed-by: Laurent Pinchart <laurent.pinch...@ideasonboard.com> --- include/media/vid

[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 <sakari.ai...@linux.intel.com> --- since RFC v1: - Add missing q->dma_attrs

Re: [RFC 0/4] Exynos DRM: add Picture Processor extension

2017-04-25 Thread Sakari Ailus
Hi Marek, On Thu, Apr 20, 2017 at 01:23:09PM +0200, Marek Szyprowski wrote: > Hi Laurent, > > On 2017-04-20 12:25, Laurent Pinchart wrote: > >Hi Marek, > > > >(CC'ing Sakari Ailus) > > > >Thank you for the patches. > > > >On Thursday 20 Apr

Re: [RFC v4 13/18] vb2: Don't sync cache for a buffer if so requested

2017-05-23 Thread Sakari Ailus
Hi Tomasz, On Wed, May 10, 2017 at 07:00:10PM +0800, Tomasz Figa wrote: > Hi Sakari, > > Few comments inline. > > On Mon, May 8, 2017 at 11:03 PM, Sakari Ailus > <sakari.ai...@linux.intel.com> wrote: > > From: Samu Onkalo <samu.onk...@intel.com> > > &

Re: [RFC v4 10/18] vb2: dma-contig: Fix DMA attribute and cache management

2017-05-23 Thread Sakari Ailus
10, 2017 at 06:32:43PM +0800, Tomasz Figa wrote: > Hi Sakari, > > Some comments inline. > > On Mon, May 8, 2017 at 11:03 PM, Sakari Ailus > <sakari.ai...@linux.intel.com> wrote: > > Patch ccc66e73 ("ARM: 8508/2: videobuf2-dc: Let drivers specify DMA > >

Re: [RFC v4 00/18] vb2: Handle user cache hints, allow drivers to choose cache coherency

2017-06-07 Thread Sakari Ailus
Hi Mauro, Mauro Carvalho Chehab wrote: Hi Sakari, Em Mon, 8 May 2017 18:03:12 +0300 Sakari Ailus <sakari.ai...@linux.intel.com> escreveu: Hello, This is a rebased and partially reworked version of the vb2 cache hints support patch series posted by first myself, then Laurent and then

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

2017-05-08 Thread Sakari Ailus
The alloc() and put() ops are for MMAP buffers only. Document it. Signed-off-by: Sakari Ailus <sakari.ai...@linux.intel.com> Acked-by: Hans Verkuil <hans.verk...@cisco.com> Reviewed-by: Laurent Pinchart <laurent.pinch...@ideasonboard.com> --- include/media/vid

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

2017-05-08 Thread Sakari Ailus
-by: Sakari Ailus <sakari.ai...@linux.intel.com> --- drivers/media/v4l2-core/videobuf2-dma-sg.c | 81 +++--- 1 file changed, 62 insertions(+), 19 deletions(-) diff --git a/drivers/media/v4l2-core/videobuf2-dma-sg.c b/drivers/media/v4l2-core/videobuf2-dma-sg.c index 1

[RFC v4 16/18] vb2: Do sync plane cache only for CAPTURE buffers in finish memop

2017-05-08 Thread Sakari Ailus
There is no need synchronise buffer cache for OUTPUT devices when the buffer is dequeued as the hardware only reads from the buffer. Only sync for capture buffers. Signed-off-by: Sakari Ailus <sakari.ai...@linux.intel.com> --- drivers/media/v4l2-core/videobuf2-dma-contig.c | 5 +++-- d

[RFC v4 18/18] v4l: Use non-consistent DMA mappings for hardware that deserves it

2017-05-08 Thread Sakari Ailus
Set DMA_ATTR_NON_CONSISTENT for hardware that uses non-consistent memory. Signed-off-by: Sakari Ailus <sakari.ai...@linux.intel.com> --- drivers/media/platform/omap3isp/ispvideo.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/media/platform/omap3isp/ispvideo.c b/drivers

[RFC v4 05/18] vb2: Anticipate queue specific DMA attributes for USERPTR buffers

2017-05-08 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 <sakari.ai...@linux.intel.com> --- drivers/media/v4l2-core/videobuf2-core.c

[RFC v4 01/18] vb2: Rename confusingly named internal buffer preparation functions

2017-05-08 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 <sakari.ai...@linux.intel.com> Acked-by

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

2017-05-08 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 <sakari

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

2017-05-08 Thread Sakari Ailus
memops to support DMA attributes. Sakari Ailus (13): vb2: Rename confusingly named internal buffer preparation functions vb2: Move buffer cache synchronisation to prepare from queue vb2: Move cache synchronisation from buffer done to dqbuf handler v4l: Unify cache management hint buffer flags

[RFC v4 02/18] vb2: Move buffer cache synchronisation to prepare from queue

2017-05-08 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 <sakari.ai...@linux.intel.com> Acked-by: Hans Verkuil <

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

2017-05-08 Thread Sakari Ailus
drivers specify DMA attrs") Signed-off-by: Sakari Ailus <sakari.ai...@linux.intel.com> --- drivers/media/v4l2-core/videobuf2-dma-contig.c | 94 -- 1 file changed, 72 insertions(+), 22 deletions(-) diff --git a/drivers/media/v4l2-core/videobuf2-dma-contig.c

[RFC v4 04/18] v4l: Unify cache management hint buffer flags

2017-05-08 Thread Sakari Ailus
operation (clean and invalidate, respectively). No user input is required. Signed-off-by: Sakari Ailus <sakari.ai...@linux.intel.com> Acked-by: Hans Verkuil <hans.verk...@cisco.com> --- Documentation/media/uapi/v4l/buffer.rst| 24 -- .../media/uapi/v4l/vi

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

2017-05-08 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 <sakari.ai...@linux.intel.com> Acked-by: Hans Verkuil <hans.verk...@

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

2017-05-08 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 <sakari.ai...@linux.intel.com> Reviewed-by: Laurent Pinchart <laur

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

2017-05-08 Thread Sakari Ailus
cument that the prepare and finish vb2_mem_ops might not get called every time the buffer ownership changes between the kernel and the user space. Signed-off-by: Samu Onkalo <samu.onk...@intel.com> Signed-off-by: Sakari Ailus <sakari.ai...@linux.intel.com> Acked-by: Hans Verkuil <h

[RFC v4 07/18] vb2: dma-contig: Remove redundant sgt_base field

2017-05-08 Thread Sakari Ailus
-off-by: Sakari Ailus <sakari.ai...@linux.intel.com> Acked-by: Hans Verkuil <hans.verk...@cisco.com> --- drivers/media/v4l2-core/videobuf2-dma-contig.c | 25 + 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/drivers/media/v4l2-core/videobuf2-dma

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

2017-05-08 Thread Sakari Ailus
. There is no functional difference because the memory was initialised to zero anyway. Fixes: 00085f1e ("dma-mapping: use unsigned long for dma_attrs") Signed-off-by: Sakari Ailus <sakari.ai...@linux.intel.com> --- drivers/media/v4l2-core/videobuf2-dma-contig.c | 3 +-- 1 file changed, 1

[RFC v4 09/18] vb2: dma-contig: Allocate sgt as part of struct vb2_dc_buf

2017-05-08 Thread Sakari Ailus
The scatterlist table is needed in the vast majority of the cases. Allocate struct sg_table as part of the struct. This has the benefit of making managing the buffer data structure allocation, setup and release more simple. Signed-off-by: Sakari Ailus <sakari.ai...@linux.intel.com> --- d

[RFC v4 15/18] vb2: Dma direction is always DMA_TO_DEVICE in buffer preparation

2017-05-08 Thread Sakari Ailus
by the device, hence DMA_TO_DEVICE. If an application can guarantee that it has not written to the buffer, it can specify the V4L2_BUF_FLAG_NO_CACHE_SYNC flag to omit the sync operation. Signed-off-by: Sakari Ailus <sakari.ai...@linux.intel.com> --- drivers/media/v4l2-core/videobuf2-dma-contig

[RFC v4 17/18] docs-rst: Document precise V4L2_BUF_FLAG_NO_CACHE_SYNC flag behaviour

2017-05-08 Thread Sakari Ailus
Document when should the user specify V4L2_BUF_FLAG_NO_CACHE_SYNC flag. Signed-off-by: Sakari Ailus <sakari.ai...@linux.intel.com> --- Documentation/media/uapi/v4l/buffer.rst | 21 + 1 file changed, 21 insertions(+) diff --git a/Documentation/media/uapi/v4l/buffer.

Re: [-next PATCH 3/4] treewide: Use DEVICE_ATTR_RO

2017-12-21 Thread Sakari Ailus
DEVICE_ATTR_RO(dynamic_pool); > > static struct attribute *sysfs_attrs_ctrl[] = { > _attr_active_bo.attr, I have the exact same changes queued up in my tree. As there seem to be no dependencies to other patches in your set, how about dropping this c

Re: [PATCH v6 2/3] dt-bindings: display: atmel: optional video-interface of endpoints

2018-08-03 Thread Sakari Ailus
#size-cells = <0>; > + reg = <0>; > + > + hlcdc_panel_output: endpoint@0 { > + reg = <0>; > + bus-type = <0>; > +

[PATCH v2.1 06/23] v4l: mediabus: Recognise CSI-2 D-PHY and C-PHY

2018-08-31 Thread Sakari Ailus
The CSI-2 bus may use either D-PHY or C-PHY. Make this visible in media bus enum. Signed-off-by: Sakari Ailus Tested-by: Steve Longerbeam --- since v2: - drivers/gpu/ipu-v3/ipu-csi.c got changed, requiring changes here. drivers/gpu/ipu-v3/ipu-csi.c | 6 +++--- drivers

Re: [PATCH v2 1/9] phy: Add MIPI D-PHY mode

2018-11-07 Thread Sakari Ailus
On Tue, Nov 06, 2018 at 03:54:13PM +0100, Maxime Ripard wrote: > MIPI D-PHY is a MIPI standard meant mostly for display and cameras in > embedded systems. Add a mode for it. > > Reviewed-by: Laurent Pinchart > Signed-off-by: Maxime Ripard Reviewed-by: Sakari Ailus -- Saka

Re: [PATCH v3 02/10] phy: Add configuration interface

2018-12-13 Thread sakari . ailus
_calibrate(struct phy *phy) > return -ENOSYS; > } > > +static inline int phy_configure(struct phy *phy, > + union phy_configure_opts *opts) > +{ > + if (!phy) > + return 0; > + > + return -ENOSYS; > +} > + > +static inline int phy_validate(struct phy *phy, enum phy_mode mode, int > submode, > +union phy_configure_opts *opts) > +{ > + if (!phy) > + return 0; > + > + return -ENOSYS; > +} > + > static inline int phy_get_bus_width(struct phy *phy) > { > return -ENOSYS; -- Kind regar, Sakari Ailus ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel

Re: [PATCH v3 03/10] phy: Add MIPI D-PHY configuration options

2018-12-13 Thread sakari . ailus
2 * @lpx > + */ > + unsigned intta_sure; > + > + /** > + * @wakeup: > + * > + * Time, in picoseconds, that a transmitter drives a Mark-1 > + * state prior to a Stop state in order to initiate an exit > + * from ULPS. > + * &

Re: [PATCH v3 03/10] phy: Add MIPI D-PHY configuration options

2018-12-13 Thread sakari . ailus
is is very close to the higher limit of the type's value range. How about > using ns or µs for this one? Same for init actually. -- Sakari Ailus ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel

Re: [PATCH v3 03/10] phy: Add MIPI D-PHY configuration options

2018-12-13 Thread sakari . ailus
> + * from ULPS. > + * > + * Minimum value: 10 ps > + */ > + unsigned intwakeup; This is very close to the higher limit of the type's value range. How about using ns or µs for this one? -- Sakari Ailus ___

Re: [PATCH v3 03/10] phy: Add MIPI D-PHY configuration options

2018-12-17 Thread sakari . ailus
ed between the two devices on hardware, and this field is specifying how many of them are in use. In order for the bus to function, both ends need to be in agreement on which of these lanes are actually being used. The current practice I've seen without exceptions is that these are the first n lanes.

Re: [PATCH v2 4/9] phy: dphy: Add configuration helpers

2018-11-19 Thread Sakari Ailus
+ return -EINVAL; > + > + if (cfg->ta_go != 4 * cfg->lpx) > + return -EINVAL; > + > + if (cfg->ta_sure < cfg->lpx || cfg->ta_sure > 2 * cfg->lpx) > + return -EINVAL; > + > + if (cfg->wakeup < 100) > +

Re: [PATCH v2 3/9] phy: Add MIPI D-PHY configuration options

2018-11-19 Thread Sakari Ailus
ar lanes; This is related to the data_lanes DT property. I assume this is intended to be the number of active lanes. And presumably the first "lanes" number of lanes would be used in that case? > +}; > + > +#endif /* __PHY_MIPI_DPHY_H_ */ > diff --git a/i

Re: [PATCH v2 6/9] phy: Move Allwinner A31 D-PHY driver to drivers/phy/

2018-11-19 Thread Sakari Ailus
inner/phy-sun6i-mipi-dphy.c | 318 +- > 6 files changed, 332 insertions(+), 328 deletions(-) > delete mode 100644 drivers/gpu/drm/sun4i/sun6i_mipi_dphy.c > create mode 100644 drivers/phy/allwinner/phy-sun6i-mipi-dphy.c Could you use git format-patch -M option on the n

Re: [PATCH v2 8/9] phy: Add Cadence D-PHY support

2018-11-19 Thread Sakari Ailus
dev_set_drvdata(>dev, dphy); > + > + dphy->ops = of_device_get_match_data(>dev); > + if (!dphy->ops) > + return -EINVAL; > + > + res = platform_get_resource(pdev, IORESOURCE_MEM, 0); > + dphy->regs

Re: [PATCH v4 7/9] dt-bindings: phy: Move the Cadence D-PHY bindings

2019-01-09 Thread Sakari Ailus
: Maxime Ripard Reviewed-by: Sakari Ailus Could you also send this to the devicetree list, please? > --- > Documentation/devicetree/bindings/display/bridge/cdns,dsi.txt | 21 +--- > Documentation/devicetree/bindings/phy/cdns,dphy.txt | 20 +++- > 2 files changed, 20

Re: [PATCH v4 8/9] phy: Add Cadence D-PHY support

2019-01-09 Thread Sakari Ailus
e > the v4l2 drivers are completely missing any phy support. In order to make > that phy support available to all these drivers, without having to > duplicate that code three times, let's create a generic phy framework > driver. > > Signed-off-by: Maxime Ripard Reviewed-by: S

Re: [PATCH v4 0/9] phy: Add configuration interface for MIPI D-PHY devices

2019-01-09 Thread Sakari Ailus
w what you think, > Maxime > > Changes from v3 > - Rebased on 5.0-rc1 > - Added the fixes suggested by Sakari Thanks! For patches 1--3: Acked-by: Sakari Ailus -- Sakari Ailus ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel

[PATCH v3 07/23] v4l: fwnode: Let the caller provide V4L2 fwnode endpoint

2018-09-12 Thread Sakari Ailus
Instead of allocating the V4L2 fwnode endpoint in v4l2_fwnode_endpoint_alloc_parse, let the caller to do this. This allows setting default parameters for the endpoint which is a very common need for drivers. Signed-off-by: Sakari Ailus Tested-by: Steve Longerbeam --- drivers/media/i2c/ov2659.c

[PATCH v3 01/23] v4l: fwnode: Add debug prints for V4L2 endpoint property parsing

2018-09-12 Thread Sakari Ailus
Print debug info as standard V4L2 endpoint are parsed. Signed-off-by: Sakari Ailus Reviewed-by: Niklas Söderlund Tested-by: Steve Longerbeam --- drivers/media/v4l2-core/v4l2-fwnode.c | 108 ++ 1 file changed, 85 insertions(+), 23 deletions(-) diff --git

[PATCH v3 00/23] V4L2 fwnode rework; support for default configuration

2018-09-12 Thread Sakari Ailus
ode endpoints in drivers/staging/media/imx/imx-media-csi.c (thanks to Steve for the changes). Sakari Ailus (23): v4l: fwnode: Add debug prints for V4L2 endpoint property parsing v4l: fwnode: Use fwnode_graph_for_each_endpoint v4l: fwnode: The CSI-2 clock is continuous if it's not non-continuous

[PATCH v3 05/23] v4l: fwnode: Add definitions for CSI-2 D-PHY, parallel and Bt.656 busses

2018-09-12 Thread Sakari Ailus
Add definitions corresponding to DT bindings to the CSI-2 D-PHY, parallel and Bt.656 busses. Signed-off-by: Sakari Ailus Tested-by: Steve Longerbeam --- drivers/media/v4l2-core/v4l2-fwnode.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/media/v4l2-core/v4l2-fwnode.c b/drivers

[PATCH v3 02/23] v4l: fwnode: Use fwnode_graph_for_each_endpoint

2018-09-12 Thread Sakari Ailus
Use fwnode_graph_for_each_endpoint iterator for better readability. Signed-off-by: Sakari Ailus Reviewed-by: Niklas Söderlund Tested-by: Steve Longerbeam --- drivers/media/v4l2-core/v4l2-fwnode.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/media/v4l2-core

[PATCH v3 22/23] v4l: fwnode: Update V4L2 fwnode endpoint parsing documentation

2018-09-12 Thread Sakari Ailus
The semantics of v4l2_fwnode_endpoint_parse() and v4l2_fwnode_endpoint_alloc_parse() have changed slightly: they now take the bus type from the user as well as a default configuration for the bus that shall reflect the DT binding defaults. Document this. Signed-off-by: Sakari Ailus Tested

[PATCH v3 11/23] v4l: fwnode: Only assign configuration if there is no error

2018-09-12 Thread Sakari Ailus
Only assign endpoint configuration if the endpoint is parsed successfully. Signed-off-by: Sakari Ailus Tested-by: Steve Longerbeam --- drivers/media/v4l2-core/v4l2-fwnode.c | 30 ++ 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/drivers/media/v4l2

[PATCH v3 08/23] v4l: fwnode: Detect bus type correctly

2018-09-12 Thread Sakari Ailus
. Default to Bt.656 if no properties suggesting a bus type are found. Signed-off-by: Sakari Ailus Tested-by: Steve Longerbeam --- drivers/media/v4l2-core/v4l2-fwnode.c | 31 +-- include/media/v4l2-mediabus.h | 2 ++ 2 files changed, 19 insertions(+), 14 deletions

[PATCH v3 15/23] v4l: fwnode: Use default parallel flags

2018-09-12 Thread Sakari Ailus
The caller may provide default flags for the endpoint. Change the configuration based on what is available through the fwnode property API. Signed-off-by: Sakari Ailus Tested-by: Steve Longerbeam --- drivers/media/v4l2-core/v4l2-fwnode.c | 19 +++ 1 file changed, 19 insertions

[PATCH v3 03/23] v4l: fwnode: The CSI-2 clock is continuous if it's not non-continuous

2018-09-12 Thread Sakari Ailus
The continuous clock flag was only set if there was a clock or data lanes. This isn't needed as such a configuration is invalid to begin with. Always set the continuous clock flag if the non-continuous property is not found. Signed-off-by: Sakari Ailus Tested-by: Steve Longerbeam --- drivers

[PATCH v3 04/23] dt-bindings: media: Specify bus type for MIPI D-PHY, others, explicitly

2018-09-12 Thread Sakari Ailus
and Bt.656 interfaces but the means to pass that information to software wasn't there. Autodetection (value 0) is removed as an option as the property could be simply omitted in that case. Signed-off-by: Sakari Ailus Reviewed-by: Rob Herring --- Documentation/devicetree/bindings/media/video

[PATCH v3 18/23] v4l: fwnode: Use media bus type for bus parser selection

2018-09-12 Thread Sakari Ailus
Use the media bus types instead of the fwnode bus types internally. This is the interface to the drivers as well, making the use of the fwnode bus types more localised to the V4L2 fwnode framework. Signed-off-by: Sakari Ailus Tested-by: Steve Longerbeam --- drivers/media/v4l2-core/v4l2

[PATCH v3 21/23] v4l: fwnode: Support parsing of CSI-2 C-PHY endpoints

2018-09-12 Thread Sakari Ailus
The V4L2 fwnode framework only parsed CSI-2 D-PHY endpoints while C-PHY support wasn't there. Also parse endpoints for media bus type V4L2_MBUS_CSI2_CPHY. Signed-off-by: Sakari Ailus Tested-by: Steve Longerbeam --- drivers/media/v4l2-core/v4l2-fwnode.c | 10 +++--- 1 file changed, 7

[PATCH v3 19/23] v4l: fwnode: Print bus type

2018-09-12 Thread Sakari Ailus
Print bus type either as set by the driver or as parsed from the bus-type property, as well as the guessed V4L2 media bus type. Signed-off-by: Sakari Ailus Tested-by: Steve Longerbeam --- drivers/media/v4l2-core/v4l2-fwnode.c | 38 +++ 1 file changed, 38

[PATCH v3 06/23] v4l: mediabus: Recognise CSI-2 D-PHY and C-PHY

2018-09-12 Thread Sakari Ailus
The CSI-2 bus may use either D-PHY or C-PHY. Make this visible in media bus enum. Signed-off-by: Sakari Ailus Tested-by: Steve Longerbeam --- drivers/gpu/ipu-v3/ipu-csi.c | 6 +++--- drivers/media/i2c/adv7180.c | 2 +- drivers/media/i2c/ov5640.c

  1   2   3   >