Merged mga branch with trunk
[platform/upstream/libdrm.git] / linux / vm.c
index 85470ac..389f2fa 100644 (file)
@@ -250,9 +250,10 @@ int drm_mmap(struct file *filp, struct vm_area_struct *vma)
        switch (map->type) {
        case _DRM_FRAME_BUFFER:
        case _DRM_REGISTERS:
+       case _DRM_AGP:
                if (VM_OFFSET(vma) >= __pa(high_memory)) {
 #if defined(__i386__)
-                       if (boot_cpu_data.x86 > 3) {
+                       if (boot_cpu_data.x86 > 3 && map->type != _DRM_AGP) {
                                pgprot_val(vma->vm_page_prot) |= _PAGE_PCD;
                                pgprot_val(vma->vm_page_prot) &= ~_PAGE_PWT;
                        }