diff options
author | YoungJun Cho <yj44.cho@samsung.com> | 2013-07-03 04:09:20 -0400 |
---|---|---|
committer | Inki Dae <inki.dae@samsung.com> | 2013-07-04 02:55:37 -0400 |
commit | 42ac99a72041a3515bd2b205adb9a239b49c6741 (patch) | |
tree | 0eb393d239fb8f914b583e40c2716c8217b341eb | |
parent | af51a5e7068826fe5016ab38149243bacc449233 (diff) |
drm/exynos: fix pages allocation size in lowlevel_buffer_allocate
When IOMMU is not supported, buf->pages has to be allocated to
assign the result of phys_to_page() which return type is struct
page *. So it is sufficient to allocate buf->pages with the size
of multiple struct page pointers.
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>
-rw-r--r-- | drivers/gpu/drm/exynos/exynos_drm_buf.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/exynos/exynos_drm_buf.c b/drivers/gpu/drm/exynos/exynos_drm_buf.c index 245c9ae187a1..518b6d8e062b 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_buf.c +++ b/drivers/gpu/drm/exynos/exynos_drm_buf.c | |||
@@ -57,7 +57,7 @@ static int lowlevel_buffer_allocate(struct drm_device *dev, | |||
57 | dma_addr_t start_addr; | 57 | dma_addr_t start_addr; |
58 | unsigned int i = 0; | 58 | unsigned int i = 0; |
59 | 59 | ||
60 | buf->pages = drm_calloc_large(nr_pages, sizeof(struct page)); | 60 | buf->pages = drm_calloc_large(nr_pages, sizeof(struct page *)); |
61 | if (!buf->pages) { | 61 | if (!buf->pages) { |
62 | DRM_ERROR("failed to allocate pages.\n"); | 62 | DRM_ERROR("failed to allocate pages.\n"); |
63 | return -ENOMEM; | 63 | return -ENOMEM; |