summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/drm_vm.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/drm_vm.c')
-rw-r--r--drivers/gpu/drm/drm_vm.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/drivers/gpu/drm/drm_vm.c b/drivers/gpu/drm/drm_vm.c
index 43e7825d3717..1575694ccaca 100644
--- a/drivers/gpu/drm/drm_vm.c
+++ b/drivers/gpu/drm/drm_vm.c
@@ -49,13 +49,10 @@ static pgprot_t drm_io_prot(struct drm_local_map *map,
pgprot_t tmp = vm_get_page_prot(vma->vm_flags);
#if defined(__i386__) || defined(__x86_64__)
- if (map->type != _DRM_AGP) {
- if (map->type == _DRM_FRAME_BUFFER ||
- map->flags & _DRM_WRITE_COMBINING)
- tmp = pgprot_writecombine(tmp);
- else
- tmp = pgprot_noncached(tmp);
- }
+ if (map->type == _DRM_REGISTERS && !(map->flags & _DRM_WRITE_COMBINING))
+ tmp = pgprot_noncached(tmp);
+ else
+ tmp = pgprot_writecombine(tmp);
#elif defined(__powerpc__)
pgprot_val(tmp) |= _PAGE_NO_CACHE;
if (map->type == _DRM_REGISTERS)