Re: [PATCH 22/86] drm/ingenic: Run DRM default client setup

2024-08-17 Thread Paul Cercueil
c driver specifies a preferred color mode of 32. As this > is the default if no format has been given, leave it out entirely. > > Signed-off-by: Thomas Zimmermann > Cc: Paul Cercueil Acked-by: Paul Cercueil Cheers, -Paul > --- >  drivers/gpu/drm/ingenic/ingenic-drm-drv.c | 4 +++-

Re: (subset) [PATCH v12 0/7] iio: new DMABUF based API v12

2024-06-30 Thread Paul Cercueil
Hi Jonathan, Fantastic news, thanks! Cheers, -Paul Le 30 juin 2024 12:32:03 GMT+02:00, Jonathan Cameron a écrit  : >On Fri, 21 Jun 2024 15:36:24 +0530 >Vinod Koul wrote: > >> On Thu, 20 Jun 2024 14:27:19 +0200, Paul Cercueil wrote: >> > Here's the v12 of my pa

[PATCH v12 6/7] Documentation: iio: Document high-speed DMABUF based API

2024-06-20 Thread Paul Cercueil
Document the new DMABUF based API. Signed-off-by: Paul Cercueil Co-developed-by: Nuno Sa Signed-off-by: Nuno Sa --- v2: - Explicitly state that the new interface is optional and is not implemented by all drivers. - The IOCTLs can now only be called on the buffer FD returned by

[PATCH v12 7/7] Documentation: dmaengine: Document new dma_vec API

2024-06-20 Thread Paul Cercueil
Document the dmaengine_prep_peripheral_dma_vec() API function, the device_prep_peripheral_dma_vec() backend function, and the dma_vec struct. Signed-off-by: Paul Cercueil Reviewed-by: Bagas Sanjaya --- v11: New patch --- Documentation/driver-api/dmaengine/client.rst | 9

[PATCH v12 5/7] iio: buffer-dmaengine: Support new DMABUF based userspace API

2024-06-20 Thread Paul Cercueil
DMA addresses + lengths, which is then passed to dmaengine_prep_slave_dma_array(). Signed-off-by: Paul Cercueil Co-developed-by: Nuno Sa Signed-off-by: Nuno Sa --- v3: Use the new dmaengine_prep_slave_dma_array(), and adapt the code to work with the new functions introduced in industrialio

[PATCH v12 4/7] iio: buffer-dma: Enable support for DMABUFs

2024-06-20 Thread Paul Cercueil
Implement iio_dma_buffer_attach_dmabuf(), iio_dma_buffer_detach_dmabuf() and iio_dma_buffer_transfer_dmabuf(), which can then be used by the IIO DMA buffer implementations. Signed-off-by: Paul Cercueil Co-developed-by: Nuno Sa Signed-off-by: Nuno Sa --- v3: Update code to provide the

[PATCH v12 3/7] iio: core: Add new DMABUF interface infrastructure

2024-06-20 Thread Paul Cercueil
he IIO buffer's file descriptor, obtained using the IIO_BUFFER_GET_FD_IOCTL() ioctl. Signed-off-by: Paul Cercueil Co-developed-by: Nuno Sa Signed-off-by: Nuno Sa --- v2: Only allow the new IOCTLs on the buffer FD created with IIO_BUFFER_GET_FD_IOCTL(). v3: - Get rid of the old IOCTL

[PATCH v12 2/7] dmaengine: dma-axi-dmac: Implement device_prep_peripheral_dma_vec

2024-06-20 Thread Paul Cercueil
Add implementation of the .device_prep_peripheral_dma_vec() callback. Signed-off-by: Paul Cercueil Co-developed-by: Nuno Sa Signed-off-by: Nuno Sa --- v3: New patch v5: Implement .device_prep_slave_dma_vec() instead of v3's .device_prep_slave_dma_array(). v6: Use new prototyp

[PATCH v12 1/7] dmaengine: Add API function dmaengine_prep_peripheral_dma_vec()

2024-06-20 Thread Paul Cercueil
address of each segment will be higher than the one of the previous segment, which we just cannot guarantee in case of a scatter-gather transfer. Signed-off-by: Paul Cercueil Co-developed-by: Nuno Sa Signed-off-by: Nuno Sa --- v3: New patch v5: Replace with function dmaengine_prep_slave_dma_vec

[PATCH v12 0/7] iio: new DMABUF based API v12

2024-06-20 Thread Paul Cercueil
og: - [3/7]: - Revert to mutex_lock/mutex_unlock in iio_buffer_attach_dmabuf(), as it uses cleanup GOTOs - [6/7]: - "obtained using..." -> "which can be obtained using..." This is based on next-20240619. Cheers, -Paul Paul Cercueil (7): dmaengine: Add API function

Re: [v11 3/7] iio: core: Add new DMABUF interface infrastructure

2024-06-19 Thread Paul Cercueil
Le mercredi 19 juin 2024 à 13:56 +0200, Markus Elfring a écrit : > … > > https://lore.kernel.org/linux-iio/219abc43b4fdd4a13b307ed2efaa0e6869e68e3f.ca...@gmail.com/T/#eefd360069c4261aec9621fafde30924706571c94 > > > > (and responses below) > > > > It's more nuanced than I remembered. > … > > > >

Re: [PATCH v11 3/7] iio: core: Add new DMABUF interface infrastructure

2024-06-19 Thread Paul Cercueil
Le mercredi 19 juin 2024 à 13:43 +0200, Markus Elfring a écrit : > … > > +++ b/drivers/iio/industrialio-buffer.c > … > > +static void iio_buffer_dmabuf_release(struct kref *ref) > > +{ > … > > + dma_resv_lock(dmabuf->resv, NULL); > > + dma_buf_unmap_attachment(attach, priv->sgt, priv->dir); > >

Re: [v11 3/7] iio: core: Add new DMABUF interface infrastructure

2024-06-19 Thread Paul Cercueil
Le mercredi 19 juin 2024 à 13:13 +0200, Markus Elfring a écrit : > > > Would you dare to transform the remaining goto chain into further > > > applications > > > of scope-based resource management? > > > > We discussed this after v6 or v7, DRM/DMABUF maintainers were not > > keen > > on doing that

Re: [v11 3/7] iio: core: Add new DMABUF interface infrastructure

2024-06-19 Thread Paul Cercueil
Hi Markus, Le mercredi 19 juin 2024 à 12:03 +0200, Markus Elfring a écrit : > … > > All errors (new ones prefixed by >>): > > > > > > drivers/iio/industrialio-buffer.c:1715:3: error: cannot jump > > > > from this goto statement to its label > >     1715 | goto err_dmabuf_unmap_att

[PATCH v11 7/7] Documentation: dmaengine: Document new dma_vec API

2024-06-18 Thread Paul Cercueil
Document the dmaengine_prep_peripheral_dma_vec() API function, the device_prep_peripheral_dma_vec() backend function, and the dma_vec struct. Signed-off-by: Paul Cercueil --- v11: New patch --- Documentation/driver-api/dmaengine/client.rst | 9 + Documentation/driver-api/dmaengine

[PATCH v11 6/7] Documentation: iio: Document high-speed DMABUF based API

2024-06-18 Thread Paul Cercueil
Document the new DMABUF based API. Signed-off-by: Paul Cercueil Co-developed-by: Nuno Sa Signed-off-by: Nuno Sa --- v2: - Explicitly state that the new interface is optional and is not implemented by all drivers. - The IOCTLs can now only be called on the buffer FD returned by

[PATCH v11 5/7] iio: buffer-dmaengine: Support new DMABUF based userspace API

2024-06-18 Thread Paul Cercueil
DMA addresses + lengths, which is then passed to dmaengine_prep_slave_dma_array(). Signed-off-by: Paul Cercueil Co-developed-by: Nuno Sa Signed-off-by: Nuno Sa --- v3: Use the new dmaengine_prep_slave_dma_array(), and adapt the code to work with the new functions introduced in industrialio

[PATCH v11 4/7] iio: buffer-dma: Enable support for DMABUFs

2024-06-18 Thread Paul Cercueil
Implement iio_dma_buffer_attach_dmabuf(), iio_dma_buffer_detach_dmabuf() and iio_dma_buffer_transfer_dmabuf(), which can then be used by the IIO DMA buffer implementations. Signed-off-by: Paul Cercueil Co-developed-by: Nuno Sa Signed-off-by: Nuno Sa --- v3: Update code to provide the

[PATCH v11 3/7] iio: core: Add new DMABUF interface infrastructure

2024-06-18 Thread Paul Cercueil
he IIO buffer's file descriptor, obtained using the IIO_BUFFER_GET_FD_IOCTL() ioctl. Signed-off-by: Paul Cercueil Co-developed-by: Nuno Sa Signed-off-by: Nuno Sa --- v2: Only allow the new IOCTLs on the buffer FD created with IIO_BUFFER_GET_FD_IOCTL(). v3: - Get rid of the old IOCTL

[PATCH v11 2/7] dmaengine: dma-axi-dmac: Implement device_prep_peripheral_dma_vec

2024-06-18 Thread Paul Cercueil
Add implementation of the .device_prep_peripheral_dma_vec() callback. Signed-off-by: Paul Cercueil Co-developed-by: Nuno Sa Signed-off-by: Nuno Sa --- v3: New patch v5: Implement .device_prep_slave_dma_vec() instead of v3's .device_prep_slave_dma_array(). v6: Use new prototyp

[PATCH v11 1/7] dmaengine: Add API function dmaengine_prep_peripheral_dma_vec()

2024-06-18 Thread Paul Cercueil
address of each segment will be higher than the one of the previous segment, which we just cannot guarantee in case of a scatter-gather transfer. Signed-off-by: Paul Cercueil Co-developed-by: Nuno Sa Signed-off-by: Nuno Sa --- v3: New patch v5: Replace with function dmaengine_prep_slave_dma_vec

[PATCH v11 0/7] iio: new DMABUF based API v11

2024-06-18 Thread Paul Cercueil
an IIO buffer" - Add variable name in IOCTL calls - [7/7]: New patch, to document the DMA changes Cheers, -Paul Paul Cercueil (7): dmaengine: Add API function dmaengine_prep_peripheral_dma_vec() dmaengine: dma-axi-dmac: Implement device_prep_peripheral_dma_vec iio: core: Add new

Re: [PATCH v10 3/6] iio: core: Add new DMABUF interface infrastructure

2024-06-18 Thread Paul Cercueil
Hi Markus, Le lundi 17 juin 2024 à 08:56 +0200, Markus Elfring a écrit : > … > > +++ b/drivers/iio/industrialio-buffer.c > … > >  static int iio_buffer_chrdev_release(struct inode *inode, struct > > file *filep) > >  { > … > >   wake_up(&buffer->pollq); > > > > + mutex_lock(&buffer->dmabufs_m

Re: [PATCH v10 3/6] iio: core: Add new DMABUF interface infrastructure

2024-06-15 Thread Paul Cercueil
Le dimanche 09 juin 2024 à 10:53 +0100, Jonathan Cameron a écrit : > On Wed,  5 Jun 2024 13:08:42 +0200 > Paul Cercueil wrote: > > > Add the necessary infrastructure to the IIO core to support a new > > optional DMABUF based interface. > > > > With this new inte

Re: [PATCH v10 6/6] Documentation: iio: Document high-speed DMABUF based API

2024-06-07 Thread Paul Cercueil
Hi Randy, Le jeudi 06 juin 2024 à 10:32 -0700, Randy Dunlap a écrit : > Hi, > > On 6/5/24 4:08 AM, Paul Cercueil wrote: > > Document the new DMABUF based API. > > > > Signed-off-by: Paul Cercueil > > Signed-off-by: Nuno Sa > > > > --- > &g

[PATCH v10 3/6] iio: core: Add new DMABUF interface infrastructure

2024-06-05 Thread Paul Cercueil
he IIO buffer's file descriptor, obtained using the IIO_BUFFER_GET_FD_IOCTL() ioctl. Signed-off-by: Paul Cercueil Signed-off-by: Nuno Sa --- v2: Only allow the new IOCTLs on the buffer FD created with IIO_BUFFER_GET_FD_IOCTL(). v3: - Get rid of the old IOCTLs. The IIO subsystem does not

[PATCH v10 6/6] Documentation: iio: Document high-speed DMABUF based API

2024-06-05 Thread Paul Cercueil
Document the new DMABUF based API. Signed-off-by: Paul Cercueil Signed-off-by: Nuno Sa --- v2: - Explicitly state that the new interface is optional and is not implemented by all drivers. - The IOCTLs can now only be called on the buffer FD returned by IIO_BUFFER_GET_FD_IOCTL

[PATCH v10 5/6] iio: buffer-dmaengine: Support new DMABUF based userspace API

2024-06-05 Thread Paul Cercueil
DMA addresses + lengths, which is then passed to dmaengine_prep_slave_dma_array(). Signed-off-by: Paul Cercueil Signed-off-by: Nuno Sa --- v3: Use the new dmaengine_prep_slave_dma_array(), and adapt the code to work with the new functions introduced in industrialio-buffer-dma.c. v5: - Use

[PATCH v10 4/6] iio: buffer-dma: Enable support for DMABUFs

2024-06-05 Thread Paul Cercueil
Implement iio_dma_buffer_attach_dmabuf(), iio_dma_buffer_detach_dmabuf() and iio_dma_buffer_transfer_dmabuf(), which can then be used by the IIO DMA buffer implementations. Signed-off-by: Paul Cercueil Signed-off-by: Nuno Sa --- v3: Update code to provide the functions that will be used as

[PATCH v10 1/6] dmaengine: Add API function dmaengine_prep_peripheral_dma_vec()

2024-06-05 Thread Paul Cercueil
address of each segment will be higher than the one of the previous segment, which we just cannot guarantee in case of a scatter-gather transfer. Signed-off-by: Paul Cercueil Signed-off-by: Nuno Sa --- v3: New patch v5: Replace with function dmaengine_prep_slave_dma_vec(), and struct 'dm

[PATCH v10 2/6] dmaengine: dma-axi-dmac: Implement device_prep_peripheral_dma_vec

2024-06-05 Thread Paul Cercueil
Add implementation of the .device_prep_peripheral_dma_vec() callback. Signed-off-by: Paul Cercueil Signed-off-by: Nuno Sa --- v3: New patch v5: Implement .device_prep_slave_dma_vec() instead of v3's .device_prep_slave_dma_array(). v6: Use new prototype for axi_dmac_alloc_desc()

[PATCH v10 0/6] iio: new DMABUF based API v10

2024-06-05 Thread Paul Cercueil
/6]: - Use the new function prototype (without the extra prep_flags). - [5/6]: - Remove extra flags parameter to dmaengine_prep_peripheral_dma_vec() - Add support for TX transfers Cheers, -Paul Paul Cercueil (6): dmaengine: Add API function dmaengine_prep_peripheral_dma_vec() dmaengine: dma

Re: [PATCH v2 25/43] drm/ingenic: Use fbdev-dma

2024-04-10 Thread Paul Cercueil
> Signed-off-by: Thomas Zimmermann > Cc: Paul Cercueil Acked-by: Paul Cercueil Cheers, -Paul > --- >  drivers/gpu/drm/ingenic/ingenic-drm-drv.c | 4 ++-- >  1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/gpu/drm/ingenic/ingenic-drm-drv.c > b/

Re: [PATCH v9 1/6] dmaengine: Add API function dmaengine_prep_peripheral_dma_vec()

2024-04-02 Thread Paul Cercueil
Hi Vinod, Le jeudi 28 mars 2024 à 11:53 +0530, Vinod Koul a écrit : > On 10-03-24, 13:48, Paul Cercueil wrote: > > This function can be used to initiate a scatter-gather DMA > > transfer, > > where the address and size of each segment is located in one entry > &g

Re: [PATCH v9 3/6] iio: core: Add new DMABUF interface infrastructure

2024-03-27 Thread Paul Cercueil
Hi Andrew, Le mercredi 27 mars 2024 à 12:21 -0500, Andrew Davis a écrit : > On 3/10/24 7:48 AM, Paul Cercueil wrote: > > Add the necessary infrastructure to the IIO core to support a new > > optional DMABUF based interface. > > > > With this new interface, DMABUF objec

[PATCH v9 6/6] Documentation: iio: Document high-speed DMABUF based API

2024-03-10 Thread Paul Cercueil
Document the new DMABUF based API. Signed-off-by: Paul Cercueil Signed-off-by: Nuno Sa --- v2: - Explicitly state that the new interface is optional and is not implemented by all drivers. - The IOCTLs can now only be called on the buffer FD returned by IIO_BUFFER_GET_FD_IOCTL

[PATCH v9 5/6] iio: buffer-dmaengine: Support new DMABUF based userspace API

2024-03-10 Thread Paul Cercueil
DMA addresses + lengths, which is then passed to dmaengine_prep_slave_dma_array(). Signed-off-by: Paul Cercueil Signed-off-by: Nuno Sa --- v3: Use the new dmaengine_prep_slave_dma_array(), and adapt the code to work with the new functions introduced in industrialio-buffer-dma.c. v5: - Use

[PATCH v9 4/6] iio: buffer-dma: Enable support for DMABUFs

2024-03-10 Thread Paul Cercueil
Implement iio_dma_buffer_attach_dmabuf(), iio_dma_buffer_detach_dmabuf() and iio_dma_buffer_transfer_dmabuf(), which can then be used by the IIO DMA buffer implementations. Signed-off-by: Paul Cercueil Signed-off-by: Nuno Sa --- v3: Update code to provide the functions that will be used as

[PATCH v9 3/6] iio: core: Add new DMABUF interface infrastructure

2024-03-10 Thread Paul Cercueil
he IIO buffer's file descriptor, obtained using the IIO_BUFFER_GET_FD_IOCTL() ioctl. Signed-off-by: Paul Cercueil Signed-off-by: Nuno Sa --- v2: Only allow the new IOCTLs on the buffer FD created with IIO_BUFFER_GET_FD_IOCTL(). v3: - Get rid of the old IOCTLs. The IIO subsystem does not

[PATCH v9 2/6] dmaengine: dma-axi-dmac: Implement device_prep_peripheral_dma_vec

2024-03-10 Thread Paul Cercueil
Add implementation of the .device_prep_peripheral_dma_vec() callback. Signed-off-by: Paul Cercueil Signed-off-by: Nuno Sa --- v3: New patch v5: Implement .device_prep_slave_dma_vec() instead of v3's .device_prep_slave_dma_array(). v6: Use new prototype for axi_dmac_alloc_desc()

[PATCH v9 1/6] dmaengine: Add API function dmaengine_prep_peripheral_dma_vec()

2024-03-10 Thread Paul Cercueil
address of each segment will be higher than the one of the previous segment, which we just cannot guarantee in case of a scatter-gather transfer. Signed-off-by: Paul Cercueil Signed-off-by: Nuno Sa --- v3: New patch v5: Replace with function dmaengine_prep_slave_dma_vec(), and struct 'dm

[PATCH v9 0/6] iio: new DMABUF based API

2024-03-10 Thread Paul Cercueil
7; - Import DMA-BUF namespace - Add missing __user tag to iio_buffer_detach_dmabuf() argument Cheers, -Paul Paul Cercueil (6): dmaengine: Add API function dmaengine_prep_peripheral_dma_vec() dmaengine: dma-axi-dmac: Implement device_prep_peripheral_dma_vec iio: core: Add new D

[PATCH v8 6/6] Documentation: iio: Document high-speed DMABUF based API

2024-03-08 Thread Paul Cercueil
Document the new DMABUF based API. Signed-off-by: Paul Cercueil Signed-off-by: Nuno Sa --- v2: - Explicitly state that the new interface is optional and is not implemented by all drivers. - The IOCTLs can now only be called on the buffer FD returned by IIO_BUFFER_GET_FD_IOCTL

[PATCH v8 5/6] iio: buffer-dmaengine: Support new DMABUF based userspace API

2024-03-08 Thread Paul Cercueil
DMA addresses + lengths, which is then passed to dmaengine_prep_slave_dma_array(). Signed-off-by: Paul Cercueil Signed-off-by: Nuno Sa --- v3: Use the new dmaengine_prep_slave_dma_array(), and adapt the code to work with the new functions introduced in industrialio-buffer-dma.c. v5: - Use

[PATCH v8 4/6] iio: buffer-dma: Enable support for DMABUFs

2024-03-08 Thread Paul Cercueil
Implement iio_dma_buffer_attach_dmabuf(), iio_dma_buffer_detach_dmabuf() and iio_dma_buffer_transfer_dmabuf(), which can then be used by the IIO DMA buffer implementations. Signed-off-by: Paul Cercueil Signed-off-by: Nuno Sa --- v3: Update code to provide the functions that will be used as

[PATCH v8 3/6] iio: core: Add new DMABUF interface infrastructure

2024-03-08 Thread Paul Cercueil
he IIO buffer's file descriptor, obtained using the IIO_BUFFER_GET_FD_IOCTL() ioctl. Signed-off-by: Paul Cercueil Signed-off-by: Nuno Sa --- v2: Only allow the new IOCTLs on the buffer FD created with IIO_BUFFER_GET_FD_IOCTL(). v3: - Get rid of the old IOCTLs. The IIO subsystem does not

[PATCH v8 2/6] dmaengine: dma-axi-dmac: Implement device_prep_peripheral_dma_vec

2024-03-08 Thread Paul Cercueil
Add implementation of the .device_prep_peripheral_dma_vec() callback. Signed-off-by: Paul Cercueil Signed-off-by: Nuno Sa --- v3: New patch v5: Implement .device_prep_slave_dma_vec() instead of v3's .device_prep_slave_dma_array(). v6: Use new prototype for axi_dmac_alloc_desc()

[PATCH v8 0/6] iio: new DMABUF based API

2024-03-08 Thread Paul Cercueil
DMABUFs - [6/6]: Renamed dmabuf_api.rst -> iio_dmabuf_api.rst, and updated index.rst whose format changed in iio/togreg. Cheers, -Paul Paul Cercueil (6): dmaengine: Add API function dmaengine_prep_peripheral_dma_vec() dmaengine: dma-axi-dmac: Implement device_prep_peripheral_dma_vec

[PATCH v8 1/6] dmaengine: Add API function dmaengine_prep_peripheral_dma_vec()

2024-03-08 Thread Paul Cercueil
address of each segment will be higher than the one of the previous segment, which we just cannot guarantee in case of a scatter-gather transfer. Signed-off-by: Paul Cercueil Signed-off-by: Nuno Sa --- v3: New patch v5: Replace with function dmaengine_prep_slave_dma_vec(), and struct 'dm

Re: [PATCH v7 0/6] iio: new DMABUF based API

2024-03-05 Thread Paul Cercueil
Hi Jonathan, Le mardi 05 mars 2024 à 10:07 +, Jonathan Cameron a écrit : > On Mon, 04 Mar 2024 08:59:47 +0100 > Nuno Sá wrote: > > > On Sun, 2024-03-03 at 17:42 +, Jonathan Cameron wrote: > > > On Fri, 23 Feb 2024 13:13:58 +0100 > > > Nuno Sa wrote: > > >   > > > > Hi Jonathan, likely

Re: [PATCH v7 3/6] iio: core: Add new DMABUF interface infrastructure

2024-03-04 Thread Paul Cercueil
> > > Am 23.02.24 um 13:14 schrieb Nuno Sa: > > > > > From: Paul Cercueil > > > > > > > > > > Add the necessary infrastructure to the IIO core to support a > > > > > new > > > > > optional DMABUF base

Re: [PATCH v7 3/6] iio: core: Add new DMABUF interface infrastructure

2024-03-04 Thread Paul Cercueil
Le lundi 04 mars 2024 à 15:07 +0100, Christian König a écrit : >  Am 04.03.24 um 14:59 schrieb Paul Cercueil: >   > > [SNIP] > >   > > >   > > > >   > > > > + dma_to_ram = buffer->direction == > > > >

Re: [PATCH v7 3/6] iio: core: Add new DMABUF interface infrastructure

2024-03-04 Thread Paul Cercueil
Hi Christian, Le lundi 04 mars 2024 à 13:44 +0100, Christian König a écrit : > Am 23.02.24 um 13:14 schrieb Nuno Sa: > > From: Paul Cercueil > > > > Add the necessary infrastructure to the IIO core to support a new > > optional DMABUF based interface. > > &g

Re: [PATCH v6 1/6] dmaengine: Add API function dmaengine_prep_slave_dma_vec()

2024-01-30 Thread Paul Cercueil
Hi Vinod, Le mardi 30 janvier 2024 à 21:38 +0530, Vinod Koul a écrit : > On 29-01-24, 18:01, Paul Cercueil wrote: > > This function can be used to initiate a scatter-gather DMA > > transfer, > > where the address and size of each segment is located in one entry > &g

[PATCH v6 4/4] Documentation: usb: Document FunctionFS DMABUF API

2024-01-30 Thread Paul Cercueil
Add documentation for the three ioctls used to attach or detach externally-created DMABUFs, and to request transfers from/to previously attached DMABUFs. Signed-off-by: Paul Cercueil --- v3: New patch --- Documentation/usb/functionfs.rst | 36 1 file changed

[PATCH v6 3/4] usb: gadget: functionfs: Add DMABUF import interface

2024-01-30 Thread Paul Cercueil
ransfer data between the USB stack and a DMABUF object, which can be provided by a driver from a completely different subsystem, in a zero-copy fashion. Signed-off-by: Paul Cercueil Acked-by: Daniel Vetter Acked-by: Christian König --- v2: - Make ffs_dma_resv_lock() static - Add MODULE_IMPOR

[PATCH v6 2/4] usb: gadget: functionfs: Factorize wait-for-endpoint code

2024-01-30 Thread Paul Cercueil
This exact same code was duplicated in two different places. Signed-off-by: Paul Cercueil --- drivers/usb/gadget/function/f_fs.c | 48 +- 1 file changed, 27 insertions(+), 21 deletions(-) diff --git a/drivers/usb/gadget/function/f_fs.c b/drivers/usb/gadget/function

[PATCH v6 1/4] usb: gadget: Support already-mapped DMA SGs

2024-01-30 Thread Paul Cercueil
Add a new 'sg_was_mapped' field to the struct usb_request. This field can be used to indicate that the scatterlist associated to the USB transfer has already been mapped into the DMA space, and it does not have to be done internally. Signed-off-by: Paul Cercueil --- drivers/usb/

[PATCH v6 0/4] usb: gadget: functionfs: DMABUF import interface

2024-01-30 Thread Paul Cercueil
l never be signaled. - Use list_for_each_entry_safe() in ffs_dmabuf_detach(), because there is a list_del() in there. - use pr_vdebug() instead of pr_debug() - Rename ffs_dmabuf_unmap_work() -> ffs_dmabuf_cleanup() --- Paul Cercueil (4): usb: gadget: Support already-mapped DMA SGs

Re: [Linaro-mm-sig] Re: [PATCH v5 1/6] dma-buf: Add dma_buf_{begin,end}_access()

2024-01-30 Thread Paul Cercueil
Hi Christian, (Your email software is configured for HTML btw) Le mardi 30 janvier 2024 à 10:23 +0100, Christian König a écrit : >  Am 30.01.24 um 10:01 schrieb Daniel Vetter: >   > >   > > On Fri, Jan 26, 2024 at 05:42:50PM +0100, Christian König wrote: > >   > > > [SNIP] > > > Well I think we

[PATCH v6 6/6] Documentation: iio: Document high-speed DMABUF based API

2024-01-29 Thread Paul Cercueil
Document the new DMABUF based API. Signed-off-by: Paul Cercueil --- v2: - Explicitly state that the new interface is optional and is not implemented by all drivers. - The IOCTLs can now only be called on the buffer FD returned by IIO_BUFFER_GET_FD_IOCTL. - Move the page up a

[PATCH v6 4/6] iio: buffer-dma: Enable support for DMABUFs

2024-01-29 Thread Paul Cercueil
Implement iio_dma_buffer_attach_dmabuf(), iio_dma_buffer_detach_dmabuf() and iio_dma_buffer_transfer_dmabuf(), which can then be used by the IIO DMA buffer implementations. Signed-off-by: Paul Cercueil --- v3: Update code to provide the functions that will be used as callbacks for the new

[PATCH v6 5/6] iio: buffer-dmaengine: Support new DMABUF based userspace API

2024-01-29 Thread Paul Cercueil
DMA addresses + lengths, which is then passed to dmaengine_prep_slave_dma_array(). Signed-off-by: Paul Cercueil --- v3: Use the new dmaengine_prep_slave_dma_array(), and adapt the code to work with the new functions introduced in industrialio-buffer-dma.c. v5: - Use the new

[PATCH v6 3/6] iio: core: Add new DMABUF interface infrastructure

2024-01-29 Thread Paul Cercueil
he IIO buffer's file descriptor, obtained using the IIO_BUFFER_GET_FD_IOCTL() ioctl. Signed-off-by: Paul Cercueil --- v2: Only allow the new IOCTLs on the buffer FD created with IIO_BUFFER_GET_FD_IOCTL(). v3: - Get rid of the old IOCTLs. The IIO subsystem does not create or manage

[PATCH v6 1/6] dmaengine: Add API function dmaengine_prep_slave_dma_vec()

2024-01-29 Thread Paul Cercueil
address of each segment will be higher than the one of the previous segment, which we just cannot guarantee in case of a scatter-gather transfer. Signed-off-by: Paul Cercueil --- v3: New patch v5: Replace with function dmaengine_prep_slave_dma_vec(), and struct 'dma_vec'. Note th

[PATCH v6 2/6] dmaengine: dma-axi-dmac: Implement device_prep_slave_dma_vec

2024-01-29 Thread Paul Cercueil
Add implementation of the .device_prep_slave_dma_vec() callback. Signed-off-by: Paul Cercueil --- v3: New patch v5: Implement .device_prep_slave_dma_vec() instead of v3's .device_prep_slave_dma_array(). v6: Use new prototype for axi_dmac_alloc_desc() as it changed upstream. --- dr

[PATCH v6 0/6] iio: new DMABUF based API, v6

2024-01-29 Thread Paul Cercueil
F. * [5/6]: - Populate .lock_queue / .unlock_queue callbacks - Switch to atomic memory allocations in .submit_queue, because of the dma_fence critical section - Make sure that the size of the scatterlist is enough --- Paul Cercueil (6): dmaengine: Add API function dmaengine_pre

Re: [PATCH v5 5/8] iio: core: Add new DMABUF interface infrastructure

2024-01-29 Thread Paul Cercueil
Le lundi 29 janvier 2024 à 14:32 +0100, Paul Cercueil a écrit : > Le lundi 29 janvier 2024 à 14:17 +0100, Christian König a écrit : > > Am 29.01.24 um 14:06 schrieb Paul Cercueil: > > > Hi Christian, > > > > > > Le lundi 29 janvier 2024 à 13:52 +0100, Christian

Re: [PATCH v5 5/8] iio: core: Add new DMABUF interface infrastructure

2024-01-29 Thread Paul Cercueil
Le lundi 29 janvier 2024 à 14:17 +0100, Christian König a écrit : > Am 29.01.24 um 14:06 schrieb Paul Cercueil: > > Hi Christian, > > > > Le lundi 29 janvier 2024 à 13:52 +0100, Christian König a écrit : > > > Am 27.01.24 um 17:50 schrieb Jonathan Cameron: > &g

Re: [PATCH v5 5/8] iio: core: Add new DMABUF interface infrastructure

2024-01-29 Thread Paul Cercueil
Hi Christian, Le lundi 29 janvier 2024 à 13:52 +0100, Christian König a écrit : > Am 27.01.24 um 17:50 schrieb Jonathan Cameron: > > > > > + iio_buffer_dmabuf_put(attach); > > > > > + > > > > > +out_dmabuf_put: > > > > > + dma_buf_put(dmabuf); > > > > As below. Feels like a __free(dma_buf_

Re: [PATCH v5 5/8] iio: core: Add new DMABUF interface infrastructure

2024-01-25 Thread Paul Cercueil
Hi Jonathan, Le jeudi 21 décembre 2023 à 12:06 +, Jonathan Cameron a écrit : > On Tue, 19 Dec 2023 18:50:06 +0100 > Paul Cercueil wrote: > > > Add the necessary infrastructure to the IIO core to support a new > > optional DMABUF based interface. > > > >

Re: [Linaro-mm-sig] [PATCH v5 1/6] dma-buf: Add dma_buf_{begin,end}_access()

2024-01-24 Thread Paul Cercueil
Hi Andrew, Le mercredi 24 janvier 2024 à 09:38 -0600, Andrew Davis a écrit : > On 1/24/24 4:58 AM, Paul Cercueil wrote: > > Hi Christian, > > > > Le mardi 23 janvier 2024 à 14:28 +0100, Christian König a écrit : > > >   Am 23.01.24 um 14:02 schrieb Paul Ce

Re: [Linaro-mm-sig] [PATCH v5 1/6] dma-buf: Add dma_buf_{begin,end}_access()

2024-01-24 Thread Paul Cercueil
Hi Christian, Le mardi 23 janvier 2024 à 14:28 +0100, Christian König a écrit : >  Am 23.01.24 um 14:02 schrieb Paul Cercueil: >   > > [SNIP] > >   > > >   > > > >    > > > > >   > > > > > That an exporter has to call extra f

Re: [Linaro-mm-sig] [PATCH v5 1/6] dma-buf: Add dma_buf_{begin,end}_access()

2024-01-23 Thread Paul Cercueil
Le mardi 23 janvier 2024 à 12:52 +0100, Christian König a écrit : > Am 23.01.24 um 11:10 schrieb Paul Cercueil: > > Hi Christian, > > > > Le lundi 22 janvier 2024 à 14:41 +0100, Christian König a écrit : > > > Am 22.01.24 um 12:01 schrieb Paul Cercueil: > > &

Re: [Linaro-mm-sig] [PATCH v5 1/6] dma-buf: Add dma_buf_{begin,end}_access()

2024-01-23 Thread Paul Cercueil
Hi Christian, Le lundi 22 janvier 2024 à 14:41 +0100, Christian König a écrit : > Am 22.01.24 um 12:01 schrieb Paul Cercueil: > > Hi Christian, > > > > Le lundi 22 janvier 2024 à 11:35 +0100, Christian König a écrit : > > > Am 19.01.24 um 15:13 schrieb Paul Cer

Re: [Linaro-mm-sig] [PATCH v5 1/6] dma-buf: Add dma_buf_{begin,end}_access()

2024-01-22 Thread Paul Cercueil
Hi Christian, Le lundi 22 janvier 2024 à 11:35 +0100, Christian König a écrit : > Am 19.01.24 um 15:13 schrieb Paul Cercueil: > > These functions should be used by device drivers when they start > > and > > stop accessing the data of DMABUF. It allows DMABUF importers

Re: [PATCH v4 1/4] usb: gadget: Support already-mapped DMA SGs

2024-01-19 Thread Paul Cercueil
Hi Frank, Le vendredi 19 janvier 2024 à 16:49 -0500, Frank Li a écrit : > On Wed, Jan 17, 2024 at 01:26:43PM +0100, Paul Cercueil wrote: > > Add a new 'sg_was_mapped' field to the struct usb_request. This > > field > > can be used to indicate that the sc

[PATCH v5 6/6] Documentation: usb: Document FunctionFS DMABUF API

2024-01-19 Thread Paul Cercueil
Add documentation for the three ioctls used to attach or detach externally-created DMABUFs, and to request transfers from/to previously attached DMABUFs. Signed-off-by: Paul Cercueil --- v3: New patch --- Documentation/usb/functionfs.rst | 36 1 file changed

[PATCH v5 5/6] usb: gadget: functionfs: Add DMABUF import interface

2024-01-19 Thread Paul Cercueil
ransfer data between the USB stack and a DMABUF object, which can be provided by a driver from a completely different subsystem, in a zero-copy fashion. Signed-off-by: Paul Cercueil Acked-by: Daniel Vetter Acked-by: Christian König --- v2: - Make ffs_dma_resv_lock() static - Add MODULE_IMPOR

[PATCH v5 4/6] usb: gadget: functionfs: Factorize wait-for-endpoint code

2024-01-19 Thread Paul Cercueil
This exact same code was duplicated in two different places. Signed-off-by: Paul Cercueil --- drivers/usb/gadget/function/f_fs.c | 48 +- 1 file changed, 27 insertions(+), 21 deletions(-) diff --git a/drivers/usb/gadget/function/f_fs.c b/drivers/usb/gadget/function

[PATCH v5 3/6] usb: gadget: Support already-mapped DMA SGs

2024-01-19 Thread Paul Cercueil
Add a new 'sg_was_mapped' field to the struct usb_request. This field can be used to indicate that the scatterlist associated to the USB transfer has already been mapped into the DMA space, and it does not have to be done internally. Signed-off-by: Paul Cercueil --- drivers/usb/

[PATCH v5 2/6] dma-buf: udmabuf: Implement .{begin,end}_access

2024-01-19 Thread Paul Cercueil
Implement .begin_access() and .end_access() callbacks. For now these functions will simply sync/flush the CPU cache when needed. Signed-off-by: Paul Cercueil --- v5: New patch --- drivers/dma-buf/udmabuf.c | 27 +++ 1 file changed, 27 insertions(+) diff --git a

[PATCH v5 1/6] dma-buf: Add dma_buf_{begin,end}_access()

2024-01-19 Thread Paul Cercueil
These functions should be used by device drivers when they start and stop accessing the data of DMABUF. It allows DMABUF importers to cache the dma_buf_attachment while ensuring that the data they want to access is available for their device when the DMA transfers take place. Signed-off-by: Paul

[PATCH v5 0/6] usb: gadget: functionfs: DMABUF import interface

2024-01-19 Thread Paul Cercueil
a...@gmail.com/T/ [2] https://github.com/analogdevicesinc/libiio/tree/pcercuei/dev-new-dmabuf-api Paul Cercueil (6): dma-buf: Add dma_buf_{begin,end}_access() dma-buf: udmabuf: Implement .{begin,end}_access usb: gadget: Support already-mapped DMA SGs usb: gadget: functionfs: Factorize wa

Re: [PATCH v3 3/4] usb: gadget: functionfs: Add DMABUF import interface

2024-01-18 Thread Paul Cercueil
Hi Daniel / Sima, Le jeudi 18 janvier 2024 à 14:59 +0100, Daniel Vetter a écrit : > On Thu, Jan 18, 2024 at 02:56:31PM +0100, Daniel Vetter wrote: > > On Mon, Jan 15, 2024 at 01:54:27PM +0100, Paul Cercueil wrote: > > > Hi Daniel / Sima, > > > > > > Le mardi 0

[PATCH v4 4/4] Documentation: usb: Document FunctionFS DMABUF API

2024-01-17 Thread Paul Cercueil
Add documentation for the three ioctls used to attach or detach externally-created DMABUFs, and to request transfers from/to previously attached DMABUFs. Signed-off-by: Paul Cercueil --- v3: New patch --- Documentation/usb/functionfs.rst | 36 1 file changed

[PATCH v4 3/4] usb: gadget: functionfs: Add DMABUF import interface

2024-01-17 Thread Paul Cercueil
ransfer data between the USB stack and a DMABUF object, which can be provided by a driver from a completely different subsystem, in a zero-copy fashion. Signed-off-by: Paul Cercueil Acked-by: Daniel Vetter --- v2: - Make ffs_dma_resv_lock() static - Add MODULE_IMPORT_NS(DMA_BUF); - The attach/

[PATCH v4 2/4] usb: gadget: functionfs: Factorize wait-for-endpoint code

2024-01-17 Thread Paul Cercueil
This exact same code was duplicated in two different places. Signed-off-by: Paul Cercueil --- drivers/usb/gadget/function/f_fs.c | 48 +- 1 file changed, 27 insertions(+), 21 deletions(-) diff --git a/drivers/usb/gadget/function/f_fs.c b/drivers/usb/gadget/function

[PATCH v4 1/4] usb: gadget: Support already-mapped DMA SGs

2024-01-17 Thread Paul Cercueil
Add a new 'sg_was_mapped' field to the struct usb_request. This field can be used to indicate that the scatterlist associated to the USB transfer has already been mapped into the DMA space, and it does not have to be done internally. Signed-off-by: Paul Cercueil --- drivers/usb/

[PATCH v4 0/4] usb: gadget: functionfs: DMABUF import interface

2024-01-17 Thread Paul Cercueil
/linux-iio/219abc43b4fdd4a13b307ed2efaa0e6869e68e3f.ca...@gmail.com/T/ [2] https://github.com/analogdevicesinc/libiio/tree/pcercuei/dev-new-dmabuf-api Paul Cercueil (4): usb: gadget: Support already-mapped DMA SGs usb: gadget: functionfs: Factorize wait-for-endpoint code usb: gadget: functionfs: Add DMABUF import

Re: [PATCH v3 4/4] Documentation: usb: Document FunctionFS DMABUF API

2024-01-17 Thread Paul Cercueil
Hi Vegard, Le mardi 09 janvier 2024 à 14:08 +0100, Vegard Nossum a écrit : > On 08/01/2024 13:00, Paul Cercueil wrote: > > Add documentation for the three ioctls used to attach or detach > > externally-created DMABUFs, and to request transfers from/to > > previously

Re: [PATCH v3 3/4] usb: gadget: functionfs: Add DMABUF import interface

2024-01-15 Thread Paul Cercueil
Hi Daniel / Sima, Le mardi 09 janvier 2024 à 14:01 +0100, Daniel Vetter a écrit : > On Tue, Jan 09, 2024 at 12:06:58PM +0100, Paul Cercueil wrote: > > Hi Daniel / Sima, > > > > Le lundi 08 janvier 2024 à 20:19 +0100, Daniel Vetter a écrit : > > > On Mon, Jan 08,

Re: [PATCH v5 0/8] iio: new DMABUF based API, v5

2024-01-12 Thread Paul Cercueil
Hi Andrew, Le jeudi 11 janvier 2024 à 11:30 -0600, Andrew Davis a écrit : > On 1/11/24 3:20 AM, Paul Cercueil wrote: > > Hi Andrew, > > > > Le lundi 08 janvier 2024 à 15:12 -0600, Andrew Davis a écrit : > > > On 12/19/23 11:50 AM, Paul Cercueil wrote: > >

Re: [PATCH v5 0/8] iio: new DMABUF based API, v5

2024-01-11 Thread Paul Cercueil
Hi Andrew, Le lundi 08 janvier 2024 à 15:12 -0600, Andrew Davis a écrit : > On 12/19/23 11:50 AM, Paul Cercueil wrote: > > [V4 was: "iio: Add buffer write() support"][1] > > > > Hi Jonathan, > > > > This is a respin of the V3 of my patchset that int

Re: [PATCH v3 3/4] usb: gadget: functionfs: Add DMABUF import interface

2024-01-09 Thread Paul Cercueil
Hi Daniel / Sima, Le lundi 08 janvier 2024 à 20:19 +0100, Daniel Vetter a écrit : > On Mon, Jan 08, 2024 at 05:27:33PM +0100, Paul Cercueil wrote: > > Le lundi 08 janvier 2024 à 16:29 +0100, Daniel Vetter a écrit : > > > On Mon, Jan 08, 2024 at 03:21:21PM +0100, Paul Cercueil

Re: [PATCH v3 3/4] usb: gadget: functionfs: Add DMABUF import interface

2024-01-08 Thread Paul Cercueil
Le lundi 08 janvier 2024 à 16:29 +0100, Daniel Vetter a écrit : > On Mon, Jan 08, 2024 at 03:21:21PM +0100, Paul Cercueil wrote: > > Hi Daniel (Sima?), > > > > Le lundi 08 janvier 2024 à 13:39 +0100, Daniel Vetter a écrit : > > > On Mon, Jan 08, 2024 at 01:00:5

Re: [PATCH v3 3/4] usb: gadget: functionfs: Add DMABUF import interface

2024-01-08 Thread Paul Cercueil
Hi Daniel (Sima?), Le lundi 08 janvier 2024 à 13:39 +0100, Daniel Vetter a écrit : > On Mon, Jan 08, 2024 at 01:00:55PM +0100, Paul Cercueil wrote: > > This patch introduces three new ioctls. They all should be called > > on a > > data endpoint (i

Re: [PATCH v5 3/8] dmaengine: Add API function dmaengine_prep_slave_dma_vec()

2024-01-08 Thread Paul Cercueil
Hi Vinod, Le jeudi 21 décembre 2023 à 20:44 +0530, Vinod Koul a écrit : > On 19-12-23, 18:50, Paul Cercueil wrote: > > This function can be used to initiate a scatter-gather DMA > > transfer, > > where the address and size of each segment is located in one entry > &g

[PATCH v3 4/4] Documentation: usb: Document FunctionFS DMABUF API

2024-01-08 Thread Paul Cercueil
Add documentation for the three ioctls used to attach or detach externally-created DMABUFs, and to request transfers from/to previously attached DMABUFs. Signed-off-by: Paul Cercueil --- v3: New patch --- Documentation/usb/functionfs.rst | 36 1 file changed

[PATCH v3 3/4] usb: gadget: functionfs: Add DMABUF import interface

2024-01-08 Thread Paul Cercueil
ransfer data between the USB stack and a DMABUF object, which can be provided by a driver from a completely different subsystem, in a zero-copy fashion. Signed-off-by: Paul Cercueil --- v2: - Make ffs_dma_resv_lock() static - Add MODULE_IMPORT_NS(DMA_BUF); - The attach/detach functions are n

  1   2   3   4   5   6   7   8   9   10   >