From 7164bb4393cef668d3da281fa1c599a6673ea768 Mon Sep 17 00:00:00 2001 From: Konrad Rzeszutek Wilk Date: Thu, 3 Dec 2009 10:31:56 -0500 Subject: fb-defio: If FBINFO_VIRTFB is defined, do not set VM_IO flag. Most users (except sh_mobile_lcdcfb.c) get their framebuffer from vmalloc. Setting VM_IO is not necessary as the memory obtained from vmalloc is System RAM type and is not susceptible to PCI memory constraints. Signed-off-by: Konrad Rzeszutek Wilk Signed-off-by: Jeremy Fitzhardinge Acked-by: Jaya Kumar --- drivers/video/fb_defio.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'drivers/video') diff --git a/drivers/video/fb_defio.c b/drivers/video/fb_defio.c index 0a7a667..875d019 100644 --- a/drivers/video/fb_defio.c +++ b/drivers/video/fb_defio.c @@ -144,7 +144,9 @@ static const struct address_space_operations fb_deferred_io_aops = { static int fb_deferred_io_mmap(struct fb_info *info, struct vm_area_struct *vma) { vma->vm_ops = &fb_deferred_io_vm_ops; - vma->vm_flags |= ( VM_IO | VM_RESERVED | VM_DONTEXPAND ); + vma->vm_flags |= ( VM_RESERVED | VM_DONTEXPAND ); + if (!(info->flags & FBINFO_VIRTFB)) + vma->vm_flags |= VM_IO; vma->vm_private_data = info; return 0; } -- cgit v1.1