This patch makes mmapping the simple-framebuffer device work on a no-MMU
ARM target. The code is mostly taken from
arch/blackfin/kernel/sys_bfin.c.
Signed-off-by: Uwe Kleine-König <redacted>
---
Hello,
note this is only tested on this no-MMU machine and I don't know enough
about framebuffers and mm to decide if this patch is sane. Also I'm
a bit unsure about the size check, I just believed Geert that
PAGE_ALIGN(info->fix.smem_len) is the right value to check against.
Best regards
Uwe
drivers/video/fbmem.c | 20 +++++++++++++++++---
1 file changed, 17 insertions(+), 3 deletions(-)
On Mon, Feb 03, 2014 at 06:14:44PM +0100, Uwe Kleine-König wrote:
This patch makes mmapping the simple-framebuffer device work on a no-MMU
ARM target. The code is mostly taken from
arch/blackfin/kernel/sys_bfin.c.
Signed-off-by: Uwe Kleine-König <redacted>
---
Hello,
note this is only tested on this no-MMU machine and I don't know enough
about framebuffers and mm to decide if this patch is sane. Also I'm
a bit unsure about the size check, I just believed Geert that
PAGE_ALIGN(info->fix.smem_len) is the right value to check against.
Do you still have this patch on your radar?
Best regards
Uwe
From: Tomi Valkeinen <hidden> Date: 2014-03-17 11:23:39
Hi,
On 03/02/14 19:14, Uwe Kleine-König wrote:
This patch makes mmapping the simple-framebuffer device work on a no-MMU
ARM target. The code is mostly taken from
arch/blackfin/kernel/sys_bfin.c.
Signed-off-by: Uwe Kleine-König <redacted>
---
Hello,
note this is only tested on this no-MMU machine and I don't know enough
about framebuffers and mm to decide if this patch is sane. Also I'm
a bit unsure about the size check, I just believed Geert that
PAGE_ALIGN(info->fix.smem_len) is the right value to check against.
I don't know enough about mm to say much here, and the text above make
me feel a bit uneasy. I'd be happy if this would get a few
acks/reviewed-bys/tested-bys...
So what does this patch actually do? If I read things correctly,
currently .get_unmapped_area is null, except for sparc and blackfin. But
userspace's mmap() calls that, right? Is there a default implementation
somewhere? Why is that different for no-MMU case?
Tomi
From: David Herrmann <hidden> Date: 2014-03-17 12:15:04
Hi
On Mon, Feb 3, 2014 at 6:14 PM, Uwe Kleine-König
[off-list ref] wrote:
quoted hunk
This patch makes mmapping the simple-framebuffer device work on a no-MMU
ARM target. The code is mostly taken from
arch/blackfin/kernel/sys_bfin.c.
Signed-off-by: Uwe Kleine-König <redacted>
---
Hello,
note this is only tested on this no-MMU machine and I don't know enough
about framebuffers and mm to decide if this patch is sane. Also I'm
a bit unsure about the size check, I just believed Geert that
PAGE_ALIGN(info->fix.smem_len) is the right value to check against.
Best regards
Uwe
drivers/video/fbmem.c | 20 +++++++++++++++++---
1 file changed, 17 insertions(+), 3 deletions(-)
Doesn't this break mmu systems? x86 for instance has no
get_fb_unmapped_area(), therefore f_ops->get_unmapped_area() is NULL
and thus falls back to the generic handler of the task (see
mm/mmap.c). If you replace this with your handler, _every_ mmap() call
with be treated as MAP_FIXED with "info->screen_base + pgoff" as
address. This might work in test-cases on the first mmap() call, but
any further call will fail.
Thanks
David
1.8.5.2
--
To unsubscribe from this list: send the line "unsubscribe linux-fbdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html