From patchwork Tue Jul 2 10:59:22 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Seung-Woo Kim X-Patchwork-Id: 2811661 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id E00EB9F3EB for ; Tue, 2 Jul 2013 10:59:29 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 1FE5020116 for ; Tue, 2 Jul 2013 10:59:29 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 4B4CD200F1 for ; Tue, 2 Jul 2013 10:59:24 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E1BF6E61F0 for ; Tue, 2 Jul 2013 03:59:23 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mailout4.samsung.com (mailout4.samsung.com [203.254.224.34]) by gabe.freedesktop.org (Postfix) with ESMTP id 36FBCE6198 for ; Tue, 2 Jul 2013 03:59:11 -0700 (PDT) Received: from epcpsbgr5.samsung.com (u145.gpu120.samsung.co.kr [203.254.230.145]) by mailout4.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0MPB00FSA2ILSU10@mailout4.samsung.com> for dri-devel@lists.freedesktop.org; Tue, 02 Jul 2013 19:59:09 +0900 (KST) Received: from epcpsbgm1.samsung.com ( [172.20.52.116]) by epcpsbgr5.samsung.com (EPCPMTA) with SMTP id DC.B2.11618.D72B2D15; Tue, 02 Jul 2013 19:59:09 +0900 (KST) X-AuditID: cbfee691-b7fef6d000002d62-5b-51d2b27dbdab Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id 2A.01.28381.C72B2D15; Tue, 02 Jul 2013 19:59:09 +0900 (KST) Received: from localhost.localdomain ([10.90.8.56]) by mmp1.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0MPB00EK12IJA080@mmp1.samsung.com>; Tue, 02 Jul 2013 19:59:08 +0900 (KST) From: Seung-Woo Kim To: dri-devel@lists.freedesktop.org, inki.dae@samsung.com Subject: [PATCH] drm/exynos: fix pages allocation in lowlevel_buffer_allocate Date: Tue, 02 Jul 2013 19:59:22 +0900 Message-id: <1372762762-15480-1-git-send-email-sw0312.kim@samsung.com> X-Mailer: git-send-email 1.7.4.1 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrILMWRmVeSWpSXmKPExsWyRsSkRLd206VAg0fHuS16z51ksrjy9T2b xaT7E1gsXty7yGJxtukNu8WMyS/ZLPbunMzowO6x/dsDVo/73ceZPPq2rGIMYI7isklJzcks Sy3St0vgyjjxs4WlYDFHxZQX31kaGL+xdTFycEgImEjMfafbxcgJZIpJXLi3ng3EFhJYyiix dnsYTMnHv34Q4UWMEhsf+UDYzUwSV744gdhsAjoS+5f8ZgWxRQQsJR5s/c0MYjMLVEgcuvWH CcQWFvCV6Lm1FcxmEVCVaFy/kx3E5hVwk3h/9TYLxAkKEgvuvQU6gQvI/swmcerCJRaIBgGJ b5MPsUDcIyux6QAzRL2kxMEVN1gmMAouYGRYxSiaWpBcUJyUXmSqV5yYW1yal66XnJ+7iREY nKf/PZu4g/H+AetDjMlA4yYyS4km5wODO68k3tDYzMjC1MTU2Mjc0ow0YSVxXvUW60AhgfTE ktTs1NSC1KL4otKc1OJDjEwcnFINjCuKszcd/DlNMvR11Oq8yuVN7KJHDB9P3uy5ZIrnUiMp SbmE3bl3X0jzrbjOXPFPiseQ61rhBHPrE837ovnebDqxxTKvUOn/i5aV75ZNjMvgtrxQJndr u5LApt7yxINiFfMdj3GUFhWt/+jhelzN6ILeucIjgs0MEUHse900GN+82HKEX+qbvhJLcUai oRZzUXEiABLDPkNkAgAA X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrAIsWRmVeSWpSXmKPExsVy+t9jAd3aTZcCDRZ2Mln0njvJZHHl63s2 i0n3J7BYvLh3kcXibNMbdosZk1+yWezdOZnRgd1j+7cHrB73u48zefRtWcUYwBzVwGiTkZqY klqkkJqXnJ+SmZduq+QdHO8cb2pmYKhraGlhrqSQl5ibaqvk4hOg65aZA7ReSaEsMacUKBSQ WFyspG+HaUJoiJuuBUxjhK5vSBBcj5EBGkhYw5hx4mcLS8FijoopL76zNDB+Y+ti5OCQEDCR +PjXr4uRE8gUk7hwbz0biC0ksIhRYuMjHwi7mUniyhcnEJtNQEdi/5LfrCC2iIClxIOtv5lB bGaBColDt/4wgdjCAr4SPbe2gtksAqoSjet3soPYvAJuEu+v3maB2KUgseDeW7YJjNwLGBlW MYqmFiQXFCel5xrqFSfmFpfmpesl5+duYgSH/zOpHYwrGywOMQpwMCrx8CrMuxgoxJpYVlyZ e4hRgoNZSYT31JpLgUK8KYmVValF+fFFpTmpxYcYk4G2T2SWEk3OB8ZmXkm8obGJmZGlkbmh hZGxOWnCSuK8B1qtA4UE0hNLUrNTUwtSi2C2MHFwSjUw+vYuWlKcv5nnryRH3O1tl6a//spn +2jOmqY/m4qc/r58Yc06JzHPerGfoJr8ud1Xnjyo898cre2R9e0iixLbS5H9e5n/LY9s2HKm hFtB6lTD6YBbu6z21y5R6li+6HFpB4eAs6g4a/wKp/PNu+Z/VjjxZYV47NvYHCP+j/0fSnnk hfcZVdwLUmIpzkg01GIuKk4EAMB5C+XDAgAA DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected Cc: kyungmin.park@samsung.com, sw0312.kim@samsung.com, yj44.cho@samsung.com X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org Errors-To: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: YoungJun Cho 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 Signed-off-by: Kyungmin Park --- 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");