Re: [PATCH 7/7] iio: Add a DMAengine framework based buffer

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
> 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@xxxxxxxxxx>
>> + *
>> + * 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
--
To unsubscribe from this list: send the line "unsubscribe linux-iio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux