All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/exynos: fix pages allocation in lowlevel_buffer_allocate
@ 2013-07-02 10:59 Seung-Woo Kim
  2013-07-02 11:36 ` Ville Syrjälä
  0 siblings, 1 reply; 8+ messages in thread
From: Seung-Woo Kim @ 2013-07-02 10:59 UTC (permalink / raw)
  To: dri-devel, inki.dae; +Cc: kyungmin.park, sw0312.kim, yj44.cho

From: YoungJun Cho <yj44.cho@samsung.com>

When drm iommu is not supported, buf->pages has to be allocated
and assigned to phys_to_page() result, which type is struct page *.
So it is sufficient to allocate buf->pages with multiple struct
page pointer size.

Signed-off-by: YoungJun Cho <yj44.cho@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
---
 drivers/gpu/drm/exynos/exynos_drm_buf.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/exynos/exynos_drm_buf.c b/drivers/gpu/drm/exynos/exynos_drm_buf.c
index 22865ba..3200622 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,
 		dma_addr_t start_addr;
 		unsigned int i = 0;
 
-		buf->pages = kzalloc(sizeof(struct page) * nr_pages,
+		buf->pages = kzalloc(sizeof(struct page *) * nr_pages,
 					GFP_KERNEL);
 		if (!buf->pages) {
 			DRM_ERROR("failed to allocate pages.\n");
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2013-07-03  8:09 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-02 10:59 [PATCH] drm/exynos: fix pages allocation in lowlevel_buffer_allocate Seung-Woo Kim
2013-07-02 11:36 ` Ville Syrjälä
2013-07-02 12:23   ` YoungJun Cho
2013-07-02 12:41     ` Inki Dae
2013-07-03  0:07       ` YoungJun Cho
2013-07-03  8:09       ` [PATCH 1/3] drm/exynos: use drm_calloc_large when allocates pointer array Seung-Woo Kim
2013-07-03  8:09         ` [PATCH v2 2/3] drm/exynos: fix pages allocation size in lowlevel_buffer_allocate Seung-Woo Kim
2013-07-03  8:09         ` [PATCH 3/3] drm/exynos: remove duplicated error routine and unnecessary assign Seung-Woo Kim

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.