l4-hackers Digest, Vol 105, Issue 9
sasamy
sasamy at yandex.ru
Sun Jan 29 15:04:20 CET 2012
> Is there ways that it modify <linux lcd device driver> little bit as other
> linux device drivers
>
> In other words, could Apps use allocated memory in linux kernel?
>
Hi jangwoo.
For at91sam9g45 I replaced the function mmap in linux fb driver:
static int l4fb_mmap(struct fb_info *info,
struct vm_area_struct *vma)
{
unsigned long size, offset;
size = vma->vm_end - vma->vm_start;
offset = vma->vm_pgoff << PAGE_SHIFT;
if (offset + size > info->fix.smem_len)
return -EINVAL;
offset += info->screen_base;
vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot);
if (remap_pfn_range(vma, vma->vm_start, offset >> PAGE_SHIFT,
size, vma->vm_page_prot))
return -EAGAIN;
return 0;
}
..
static struct fb_ops atmel_lcdfb_ops = {
..
.fb_mmap = l4fb_mmap,
..
};
Alexander
More information about the l4-hackers
mailing list