]> xenbits.xensource.com Git - people/ssmith/netchannel2-pvops.git/commitdiff
drm: recompute vma->vm_page_prot after changing vm_flags
authorJeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Fri, 2 Oct 2009 16:49:05 +0000 (09:49 -0700)
committerJeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Fri, 2 Oct 2009 16:49:05 +0000 (09:49 -0700)
vm_get_page_prot() computes vm_page_prot depending on vm_flags, so
we need to re-call it if we change flags.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
drivers/gpu/drm/ttm/ttm_bo_vm.c

index 27b146c54fbcb4d41c137ea9fb15a4a873ee068f..9c614406a185b73df2eae5ec32bdb5144a805fd9 100644 (file)
@@ -270,6 +270,7 @@ int ttm_bo_mmap(struct file *filp, struct vm_area_struct *vma,
 
        vma->vm_private_data = bo;
        vma->vm_flags |= VM_RESERVED | VM_IO | VM_MIXEDMAP | VM_DONTEXPAND;
+       vma->vm_page_prot = vm_get_page_prot(vma->vm_flags);
        return 0;
 out_unref:
        ttm_bo_unref(&bo);
@@ -285,6 +286,7 @@ int ttm_fbdev_mmap(struct vm_area_struct *vma, struct ttm_buffer_object *bo)
        vma->vm_ops = &ttm_bo_vm_ops;
        vma->vm_private_data = ttm_bo_reference(bo);
        vma->vm_flags |= VM_RESERVED | VM_IO | VM_MIXEDMAP | VM_DONTEXPAND;
+       vma->vm_page_prot = vm_get_page_prot(vma->vm_flags);
        return 0;
 }
 EXPORT_SYMBOL(ttm_fbdev_mmap);