diff options
Diffstat (limited to 'drivers/gpu/drm/drm_gem.c')
-rw-r--r-- | drivers/gpu/drm/drm_gem.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/drivers/gpu/drm/drm_gem.c b/drivers/gpu/drm/drm_gem.c index 88d3368ffddd..4984aa89cf3d 100644 --- a/drivers/gpu/drm/drm_gem.c +++ b/drivers/gpu/drm/drm_gem.c | |||
@@ -502,10 +502,9 @@ int drm_gem_mmap(struct file *filp, struct vm_area_struct *vma) | |||
502 | struct drm_file *priv = filp->private_data; | 502 | struct drm_file *priv = filp->private_data; |
503 | struct drm_device *dev = priv->minor->dev; | 503 | struct drm_device *dev = priv->minor->dev; |
504 | struct drm_gem_mm *mm = dev->mm_private; | 504 | struct drm_gem_mm *mm = dev->mm_private; |
505 | struct drm_map *map = NULL; | 505 | struct drm_local_map *map = NULL; |
506 | struct drm_gem_object *obj; | 506 | struct drm_gem_object *obj; |
507 | struct drm_hash_item *hash; | 507 | struct drm_hash_item *hash; |
508 | unsigned long prot; | ||
509 | int ret = 0; | 508 | int ret = 0; |
510 | 509 | ||
511 | mutex_lock(&dev->struct_mutex); | 510 | mutex_lock(&dev->struct_mutex); |
@@ -538,11 +537,7 @@ int drm_gem_mmap(struct file *filp, struct vm_area_struct *vma) | |||
538 | vma->vm_ops = obj->dev->driver->gem_vm_ops; | 537 | vma->vm_ops = obj->dev->driver->gem_vm_ops; |
539 | vma->vm_private_data = map->handle; | 538 | vma->vm_private_data = map->handle; |
540 | /* FIXME: use pgprot_writecombine when available */ | 539 | /* FIXME: use pgprot_writecombine when available */ |
541 | prot = pgprot_val(vma->vm_page_prot); | 540 | vma->vm_page_prot = pgprot_writecombine(vma->vm_page_prot); |
542 | #ifdef CONFIG_X86 | ||
543 | prot |= _PAGE_CACHE_WC; | ||
544 | #endif | ||
545 | vma->vm_page_prot = __pgprot(prot); | ||
546 | 541 | ||
547 | /* Take a ref for this mapping of the object, so that the fault | 542 | /* Take a ref for this mapping of the object, so that the fault |
548 | * handler can dereference the mmap offset's pointer to the object. | 543 | * handler can dereference the mmap offset's pointer to the object. |