linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] Use 'arm_nommu_dma_ops' to handle dma memroy if device offer consistent dma memory region
@ 2020-06-08  8:30 dillon.minfei
  2020-06-08  8:30 ` [PATCH 1/2] ARM: dts: stm32: Setup 4M bytes reserved memory for mmap dillon.minfei
                   ` (2 more replies)
  0 siblings, 3 replies; 16+ messages in thread
From: dillon.minfei @ 2020-06-08  8:30 UTC (permalink / raw)
  To: robh+dt, mcoquelin.stm32, alexandre.torgue, linux,
	vladimir.murzin, kstewart, allison, info, tglx
  Cc: devicetree, dillon min, linux-stm32, linux-arm-kernel,
	linux-kernel

From: dillon min <dillon.minfei@gmail.com>

when do mmap on /dev/fb0, we will get -6 error on cortex-m3/m4 or armv7m
platform without cache support, this is caused by following reason:

on armv7m platform, if no cache support, we will use dma direct mapping,
but, this is not support on !MMU hardware, just return '-ENXIO' error

so, add use_reserved_mem() for these armv7m hardware but no-cache support.
eg, stm32f429/stm32f469.

verified on stm32f469-disco board, mmap frambuffer to userspace.

dillon min (2):
  ARM: dts: stm32: Setup 4M bytes reserved memory for mmap
  arm-nommu: Add use_reserved_mem() to check if device support reserved
    memory

 arch/arm/boot/dts/stm32f469-disco.dts | 14 ++++++++++++++
 arch/arm/mm/dma-mapping-nommu.c       | 28 +++++++++++++++++++++++++++-
 2 files changed, 41 insertions(+), 1 deletion(-)

-- 
2.7.4


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

end of thread, other threads:[~2020-06-12  2:16 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-06-08  8:30 [PATCH 0/2] Use 'arm_nommu_dma_ops' to handle dma memroy if device offer consistent dma memory region dillon.minfei
2020-06-08  8:30 ` [PATCH 1/2] ARM: dts: stm32: Setup 4M bytes reserved memory for mmap dillon.minfei
2020-06-09 15:58   ` dillon min
2020-06-08  8:30 ` [PATCH 2/2] arm-nommu: Add use_reserved_mem() to check if device support reserved memory dillon.minfei
2020-06-09 14:08   ` Vladimir Murzin
2020-06-09 15:22     ` dillon min
2020-06-09 15:36       ` Christoph Hellwig
2020-06-09 15:43         ` Vladimir Murzin
2020-06-09 16:25           ` Vladimir Murzin
2020-06-09 17:34             ` Christoph Hellwig
2020-06-10  2:24               ` dillon min
2020-06-10  7:24     ` Christoph Hellwig
2020-06-10  8:19       ` Vladimir Murzin
2020-06-11 15:45         ` Vladimir Murzin
2020-06-12  2:15           ` dillon min
2020-06-09 15:58 ` [PATCH 0/2] Use 'arm_nommu_dma_ops' to handle dma memroy if device offer consistent dma memory region dillon min

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