[PATCH] fbmem: previous radeonfb fix limits the amount of mmap()'able VRAM to the same amount reserved for the framebuffer.
Linux Kernel Mailing List <[email protected]> Mon, 23 May 2005 11:34:29 +0000
| Newsgroups | gmane.linux.kernel.commits.2-4 |
|---|---|
| Message-ID | <[email protected]> |
ChangeSet 1.1526, 2005/05/23 08:34:29-03:00, [email protected] [PATCH] fbmem: previous radeonfb fix limits the amount of mmap()'able VRAM to the same amount reserved for the framebuffer. The patch I sent you for 2.4.29 ("radeonfb: don't try to ioreamp the entire VRAM") limits the amount of mmap()'able VRAM to the same amount reserved for the framebuffer (ie. info->mapped_vram). This is unnecessary since the problem of exhaustion of virtual address space exists only in kernelspace and userspace applications should be able to mmap() the whole VRAM. X server refuse to start because it's unable to mmap the video RAM: > (EE) FBDEV(0): mmap fbmem: Invalid argument > (EE) FBDEV(0): mapping of video memory failed the following patch fixes the problem. Signed-off-by: Luca Tettamanti <[email protected]> fbmem.c | 5 +---- 1 files changed, 1 insertion(+), 4 deletions(-) diff -Nru a/drivers/video/fbmem.c b/drivers/video/fbmem.c --- a/drivers/video/fbmem.c 2005-05-23 11:03:06 -07:00 +++ b/drivers/video/fbmem.c 2005-05-23 11:03:06 -07:00 @@ -625,10 +625,7 @@ /* frame buffer memory */ start = fix.smem_start; - if (info->mapped_vram) - len = PAGE_ALIGN((start & ~PAGE_MASK) + info->mapped_vram); - else - len = PAGE_ALIGN((start & ~PAGE_MASK) + fix.smem_len); + len = PAGE_ALIGN((start & ~PAGE_MASK) + fix.smem_len); if (off >= len) { /* memory mapped io */ off -= len;