linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Lars-Peter Clausen <lars@metafoo.de>
To: Jonathan Cameron <jic23@kernel.org>,
	Hartmut Knaack <knaack.h@gmx.de>,
	Peter Meerwald <pmeerw@pmeerw.net>
Cc: Octavian Purdila <octavian.purdila@intel.com>, linux-iio@vger.kernel.org
Subject: Re: [PATCH 7/7] iio: Add a DMAengine framework based buffer
Date: Sun, 04 Oct 2015 19:27:28 +0200	[thread overview]
Message-ID: <56116180.1010303@metafoo.de> (raw)
In-Reply-To: <56114EDA.70505@kernel.org>

On 10/04/2015 06:07 PM, Jonathan Cameron wrote:
> On 02/10/15 15:45, Lars-Peter Clausen wrote:
>> Add a generic fully device independent DMA buffer implementation that uses
>> the DMAegnine framework to perform the DMA transfers. This can be used by
>> converter drivers that whish to provide a DMA buffer for converters that
>> are connected to a DMA core that implements the DMAengine API.
>>
>> Apart from allocating the buffer using iio_dmaengine_buffer_alloc() and
>> freeing it using iio_dmaengine_buffer_free() no additional converter driver
>> specific code is required when using this DMA buffer implementation.
>>
>> Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
> Clearly you have a FIXME in the code. Is this something we want to wait
> for or is the race short enough we can ignore it for now?


Yeah, that's a problem with the DMAengine API in general. All users, e.g.
ALSA, V4L, suffer from this problem. It needs to be fixed but it's not
critical. The race can happen, but it is really hard to trigger and also
depends a bit on the DMAengine driver implementation. I've not yet seen it
in the wild.

The note is a reminder to fix this once the proper API becomes available


>> diff --git a/include/linux/iio/buffer-dmaengine.h b/include/linux/iio/buffer-dmaengine.h
>> new file mode 100644
>> index 0000000..ac0ca55
>> --- /dev/null
>> +++ b/include/linux/iio/buffer-dmaengine.h
>> @@ -0,0 +1,18 @@
>> +/*
>> + * Copyright 2014-2015 Analog Devices Inc.
>> + *  Author: Lars-Peter Clausen <lars@metafoo.de>
>> + *
>> + * Licensed under the GPL-2 or later.
>> + */
>> +
>> +#ifndef __IIO_DMAENGINE_H__
>> +#define __IIO_DMAENGINE_H__
>> +
>> +struct iio_buffer;
>> +struct devive;
> That seems unlikely to be right :)
> device?

Yes

      reply	other threads:[~2015-10-04 17:27 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-02 14:45 [PATCH 0/7] iio: Add DMA buffer support Lars-Peter Clausen
2015-10-02 14:45 ` [PATCH 1/7] iio: Set device watermark based on watermark of all attached buffers Lars-Peter Clausen
2015-10-02 14:45 ` [PATCH 2/7] iio:iio_buffer_init(): Only set watermark if not already set Lars-Peter Clausen
2015-10-02 14:45 ` [PATCH 3/7] iio: Add support for indicating fixed watermarks Lars-Peter Clausen
2015-10-02 14:45 ` [PATCH 4/7] iio: Add buffer enable/disable callbacks Lars-Peter Clausen
2015-10-02 14:45 ` [PATCH 5/7] iio: Add generic DMA buffer infrastructure Lars-Peter Clausen
2015-10-04 15:34   ` Jonathan Cameron
2015-10-04 17:30     ` Lars-Peter Clausen
2015-10-02 14:45 ` [PATCH 6/7] staging:iio:dummy: Add DMA buffer support Lars-Peter Clausen
2015-10-04 15:57   ` Jonathan Cameron
2015-10-04 17:23     ` Lars-Peter Clausen
2015-10-02 14:45 ` [PATCH 7/7] iio: Add a DMAengine framework based buffer Lars-Peter Clausen
2015-10-04 16:07   ` Jonathan Cameron
2015-10-04 17:27     ` Lars-Peter Clausen [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=56116180.1010303@metafoo.de \
    --to=lars@metafoo.de \
    --cc=jic23@kernel.org \
    --cc=knaack.h@gmx.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=octavian.purdila@intel.com \
    --cc=pmeerw@pmeerw.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).