summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/exynos/exynos_drm_g2d.c
diff options
context:
space:
mode:
authorYoungJun Cho2013-07-03 10:09:19 +0200
committerInki Dae2013-07-04 08:55:36 +0200
commitaf51a5e7068826fe5016ab38149243bacc449233 (patch)
treeb387c89a69f668218497bc3500cbaa19cfe30120 /drivers/gpu/drm/exynos/exynos_drm_g2d.c
parentdrm/exynos: add error check routine in exynos_drm_open (diff)
downloadkernel-qcow2-linux-af51a5e7068826fe5016ab38149243bacc449233.tar.gz
kernel-qcow2-linux-af51a5e7068826fe5016ab38149243bacc449233.tar.xz
kernel-qcow2-linux-af51a5e7068826fe5016ab38149243bacc449233.zip
drm/exynos: use drm_calloc_large when allocates pointer array
If the type of object is pointer array, the drm_calloc_large() is more suitable than kzalloc() for its allocation function. And uses drm_free_large() instead of kfree() also. Signed-off-by: YoungJun Cho <yj44.cho@samsung.com> Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
Diffstat (limited to 'drivers/gpu/drm/exynos/exynos_drm_g2d.c')
-rw-r--r--drivers/gpu/drm/exynos/exynos_drm_g2d.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/gpu/drm/exynos/exynos_drm_g2d.c b/drivers/gpu/drm/exynos/exynos_drm_g2d.c
index af75434ee4d7..fb19ee53ecbb 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_g2d.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_g2d.c
@@ -390,7 +390,7 @@ out:
kfree(g2d_userptr->sgt);
g2d_userptr->sgt = NULL;
- kfree(g2d_userptr->pages);
+ drm_free_large(g2d_userptr->pages);
g2d_userptr->pages = NULL;
kfree(g2d_userptr);
g2d_userptr = NULL;
@@ -463,7 +463,7 @@ static dma_addr_t *g2d_userptr_get_dma_addr(struct drm_device *drm_dev,
npages = (end - start) >> PAGE_SHIFT;
g2d_userptr->npages = npages;
- pages = kzalloc(npages * sizeof(struct page *), GFP_KERNEL);
+ pages = drm_calloc_large(npages, sizeof(struct page *));
if (!pages) {
DRM_ERROR("failed to allocate pages.\n");
kfree(g2d_userptr);
@@ -554,7 +554,7 @@ err_put_vma:
exynos_gem_put_vma(g2d_userptr->vma);
err_free_pages:
- kfree(pages);
+ drm_free_large(pages);
kfree(g2d_userptr);
pages = NULL;
g2d_userptr = NULL;