Thread (5 messages) 5 messages, 2 authors, 2013-11-20
DORMANTno replies

Re: [PATCH] RFC: framebuffer: provide generic get_fb_unmapped_area

From: Geert Uytterhoeven <geert@linux-m68k.org>
Date: 2013-11-20 08:41:56
Also in: linux-arm-kernel

On Mon, Nov 18, 2013 at 7:59 PM, Uwe Kleine-König
[off-list ref] wrote:
quoted
quoted
+unsigned long fb_get_unmapped_area(struct file *filp, unsigned long orig_addr,
+               unsigned long len, unsigned long pgoff, unsigned long flags)
+{
+       struct fb_info * const info = filp->private_data;
+       unsigned long screen_size = info->screen_size ?: info->fix.smem_len;
Why restrict this to screen_size? Fbtest will map the whole frame buffer memory.
For me screen_size is zero. The logic to determine the size is copied
from fb_read.
fb_read() only allows reading the visible screen, not the full frame
buffer memory.
fb_mmap() does allow mapping the full frame buffer memory (and the optional
MMIO registers, but you can't easily do that the same way on nommu, as it's
a discontiguous mapping).
So please use PAGE_ALIGN(info->fix.smem_len) as the limit.

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help