linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Non-coherent (streaming) contig-dma?
@ 2016-04-04 12:53 Krzysztof Hałasa
  2016-04-06 12:08 ` Sakari Ailus
  0 siblings, 1 reply; 3+ messages in thread
From: Krzysztof Hałasa @ 2016-04-04 12:53 UTC (permalink / raw)
  To: linux-media

Hi,

I know certain approaches had been tried to allow use of streaming DMA
(dma_map_single() etc. - i.e., not coherent) in the media drivers, is
there something which can be used at this point (for MMAP method)?

Coherent buffers on many systems are very slow (uncacheable), should
i simply add/replace the necessary calls in dma-contig?

Any other options?

Is there any potential problem there?
-- 
Krzysztof Halasa

Industrial Research Institute for Automation and Measurements PIAP
Al. Jerozolimskie 202, 02-486 Warsaw, Poland

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Non-coherent (streaming) contig-dma?
  2016-04-04 12:53 Non-coherent (streaming) contig-dma? Krzysztof Hałasa
@ 2016-04-06 12:08 ` Sakari Ailus
  2016-04-19 10:10   ` Krzysztof Hałasa
  0 siblings, 1 reply; 3+ messages in thread
From: Sakari Ailus @ 2016-04-06 12:08 UTC (permalink / raw)
  To: Krzysztof Hałasa; +Cc: linux-media

On Mon, Apr 04, 2016 at 02:53:29PM +0200, Krzysztof Hałasa wrote:
> Hi,
> 
> I know certain approaches had been tried to allow use of streaming DMA
> (dma_map_single() etc. - i.e., not coherent) in the media drivers, is
> there something which can be used at this point (for MMAP method)?
> 
> Coherent buffers on many systems are very slow (uncacheable), should
> i simply add/replace the necessary calls in dma-contig?
> 
> Any other options?
> 
> Is there any potential problem there?

I don't think there's a really good solution to the problem in upstream.

For what it's worth, the USERPTR buffers are allocated non-coherent, and the
cache is flushed when that's needed.

I have a patchset that makes it driver-selectable whether to request
coherent or non-coherent memory. I haven't had time to work on that for a
while, unfortunately, that work stalled in fixing a few drivers that access
the buffers using the CPU as well when they really should not do that.

I sent the set here under the subject "[RFC RESEND 00/11] vb2: Handle user
cache hints, allow drivers to choose cache coherency" last September.

If you don't need to access the buffers using the CPU, you could avoid
flushing the cache as well, but it requires patches from that set as well.

-- 
Kind regards,

Sakari Ailus
e-mail: sakari.ailus@iki.fi	XMPP: sailus@retiisi.org.uk

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Non-coherent (streaming) contig-dma?
  2016-04-06 12:08 ` Sakari Ailus
@ 2016-04-19 10:10   ` Krzysztof Hałasa
  0 siblings, 0 replies; 3+ messages in thread
From: Krzysztof Hałasa @ 2016-04-19 10:10 UTC (permalink / raw)
  To: Sakari Ailus; +Cc: linux-media

Sakari Ailus <sakari.ailus@iki.fi> writes:

> I sent the set here under the subject "[RFC RESEND 00/11] vb2: Handle user
> cache hints, allow drivers to choose cache coherency" last September.

Thanks, I will look at this.
Unfortunately, I need CPU access to the buffers, it's just that coherent
RAM is way too slow on ARM.
-- 
Krzysztof Halasa

Industrial Research Institute for Automation and Measurements PIAP
Al. Jerozolimskie 202, 02-486 Warsaw, Poland

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-04-19 10:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-04 12:53 Non-coherent (streaming) contig-dma? Krzysztof Hałasa
2016-04-06 12:08 ` Sakari Ailus
2016-04-19 10:10   ` Krzysztof Hałasa

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).