diff --git a/drivers/video/msm/gpu/kgsl/kgsl.c b/drivers/video/msm/gpu/kgsl/kgsl.c index 2e1bdc0f..a8319f05 100644 --- a/drivers/video/msm/gpu/kgsl/kgsl.c +++ b/drivers/video/msm/gpu/kgsl/kgsl.c @@ -1029,52 +1029,10 @@ static long kgsl_ioctl(struct file *filep, unsigned int cmd, unsigned long arg) return result; } -static int kgsl_mmap(struct file *file, struct vm_area_struct *vma) -{ - int result; - struct kgsl_memdesc *memdesc = NULL; - unsigned long vma_size = vma->vm_end - vma->vm_start; - unsigned long vma_offset = vma->vm_pgoff << PAGE_SHIFT; - struct kgsl_device *device = NULL; - - mutex_lock(&kgsl_driver.mutex); - - device = &kgsl_driver.yamato_device; - - /*allow yamato memstore to be mapped read only */ - if (vma_offset == device->memstore.physaddr) { - if (vma->vm_flags & VM_WRITE) { - result = -EPERM; - goto done; - } - memdesc = &device->memstore; - } - - if (memdesc->size != vma_size) { - KGSL_MEM_ERR("file %p bad size %ld, should be %d\n", - file, vma_size, memdesc->size); - result = -EINVAL; - goto done; - } - vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot); - - result = remap_pfn_range(vma, vma->vm_start, vma->vm_pgoff, - vma_size, vma->vm_page_prot); - if (result != 0) { - KGSL_MEM_ERR("remap_pfn_range returned %d\n", - result); - goto done; - } -done: - mutex_unlock(&kgsl_driver.mutex); - return result; -} - static struct file_operations kgsl_fops = { .owner = THIS_MODULE, .release = kgsl_release, .open = kgsl_open, - .mmap = kgsl_mmap, .unlocked_ioctl = kgsl_ioctl, };