lkml.org 
[lkml]   [2020]   [Jun]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Subject[PATCH 0/2] Use 'arm_nommu_dma_ops' to handle dma memroy if device offer consistent dma memory region
Date
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

\
 
 \ /
  Last update: 2020-06-08 10:31    [W:0.109 / U:0.224 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site