diff options
author | Joonyoung Shim <jy0922.shim@samsung.com> | 2015-08-16 14:16:49 +0900 |
---|---|---|
committer | Inki Dae <inki.dae@samsung.com> | 2015-08-16 14:17:23 +0900 |
commit | 211b8878c13fbd5f8ae8a7b68798d178cb5346b4 (patch) | |
tree | 85ac9b82f5ff2f3a29d42bfab5af09661db9a9e9 /drivers/gpu/drm/exynos | |
parent | c4130bcd6a80f29a5d0cabcef8f0341cfa812dff (diff) | |
download | talos-obmc-linux-211b8878c13fbd5f8ae8a7b68798d178cb5346b4.tar.gz talos-obmc-linux-211b8878c13fbd5f8ae8a7b68798d178cb5346b4.zip |
drm/exynos: remove function update_vm_cache_attr
The function update_vm_cache_attr can be merged in exynos_drm_gem_mmap.
Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Diffstat (limited to 'drivers/gpu/drm/exynos')
-rw-r--r-- | drivers/gpu/drm/exynos/exynos_drm_gem.c | 28 |
1 files changed, 11 insertions, 17 deletions
diff --git a/drivers/gpu/drm/exynos/exynos_drm_gem.c b/drivers/gpu/drm/exynos/exynos_drm_gem.c index a8849ed30a50..327edafd48ab 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_gem.c +++ b/drivers/gpu/drm/exynos/exynos_drm_gem.c @@ -20,22 +20,6 @@ #include "exynos_drm_buf.h" #include "exynos_drm_iommu.h" -static void update_vm_cache_attr(struct exynos_drm_gem_obj *obj, - struct vm_area_struct *vma) -{ - DRM_DEBUG_KMS("flags = 0x%x\n", obj->flags); - - /* non-cachable as default. */ - if (obj->flags & EXYNOS_BO_CACHABLE) - vma->vm_page_prot = vm_get_page_prot(vma->vm_flags); - else if (obj->flags & EXYNOS_BO_WC) - vma->vm_page_prot = - pgprot_writecombine(vm_get_page_prot(vma->vm_flags)); - else - vma->vm_page_prot = - pgprot_noncached(vm_get_page_prot(vma->vm_flags)); -} - static unsigned long roundup_gem_size(unsigned long size, unsigned int flags) { /* TODO */ @@ -576,7 +560,17 @@ int exynos_drm_gem_mmap(struct file *filp, struct vm_area_struct *vma) obj = vma->vm_private_data; exynos_gem_obj = to_exynos_gem_obj(obj); - update_vm_cache_attr(exynos_gem_obj, vma); + DRM_DEBUG_KMS("flags = 0x%x\n", exynos_gem_obj->flags); + + /* non-cachable as default. */ + if (exynos_gem_obj->flags & EXYNOS_BO_CACHABLE) + vma->vm_page_prot = vm_get_page_prot(vma->vm_flags); + else if (exynos_gem_obj->flags & EXYNOS_BO_WC) + vma->vm_page_prot = + pgprot_writecombine(vm_get_page_prot(vma->vm_flags)); + else + vma->vm_page_prot = + pgprot_noncached(vm_get_page_prot(vma->vm_flags)); ret = exynos_drm_gem_mmap_buffer(exynos_gem_obj, vma); if (ret) |