From: Benjamin Herrenschmidt Date: Sun, 20 Apr 2008 00:26:25 +0000 (+1000) Subject: drm: Fix mismerge of non-coherent DMA patch X-Git-Tag: v2.6.26-rc1~1048^2~6 X-Git-Url: http://www.pilppa.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=5ff64611333fd282793ff8997e02138aa2f6aab9;p=linux-2.6-omap-h63xx.git drm: Fix mismerge of non-coherent DMA patch The patch for supporting non coherent PCI DMA in the DRM was mismerged causing the page protection to be updated for the wrong type of mapping. Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Dave Airlie --- diff --git a/drivers/char/drm/drm_vm.c b/drivers/char/drm/drm_vm.c index 945df72a51a..b20c1e950d3 100644 --- a/drivers/char/drm/drm_vm.c +++ b/drivers/char/drm/drm_vm.c @@ -640,12 +640,12 @@ static int drm_mmap_locked(struct file *filp, struct vm_area_struct *vma) /* Don't let this area swap. Change when DRM_KERNEL advisory is supported. */ vma->vm_flags |= VM_RESERVED; - vma->vm_page_prot = drm_dma_prot(map->type, vma); break; case _DRM_SCATTER_GATHER: vma->vm_ops = &drm_vm_sg_ops; vma->vm_private_data = (void *)map; vma->vm_flags |= VM_RESERVED; + vma->vm_page_prot = drm_dma_prot(map->type, vma); break; default: return -EINVAL; /* This should never happen. */