From patchwork Wed Mar 8 14:58:05 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sylvain Lemieux X-Patchwork-Id: 9611373 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 593186046A for ; Wed, 8 Mar 2017 14:59:17 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2FB182857B for ; Wed, 8 Mar 2017 14:59:17 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 24181285BE; Wed, 8 Mar 2017 14:59:17 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=0.1 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM,RCVD_IN_SORBS_WEB autolearn=no version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id D3F012857B for ; Wed, 8 Mar 2017 14:59:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=d60UDR8jyCKd/mRyDhqPAvAiULokVaRDIKOB2yNtE6o=; b=eQj V70JzUHdPCkjKzRzyUhDXlxrzqbDvsugtj65IUpj1t/EkhM5Ku+tgXPGn6uRLKsqpXks3mHE2YWLV w67mxznMnd8NnyMTvekGww7uGYGUIvaUj7yD8acotOOtt+vE9ToCfeKNteeKLeO36OsdxWXZOSc2g 8FJTJOXb6RjTRFhySpsFu5AOPMWp2/Oub8nBGUADpNrQNRIoTPRCx/HXj7f5YqwZt5TUHig6kEgyM NN23r3X4KjePnJ2o31AaAb7XroLRaCwI138kKaUqqimqVTOqDMOWUhQPddnrQhkDttwiALWJ7Htj/ iTrqb9HKkwqJlmGQS3VqQ7pylpqnYBg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1cld3b-0002bt-No; Wed, 08 Mar 2017 14:59:15 +0000 Received: from mail-it0-x241.google.com ([2607:f8b0:4001:c0b::241]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1cld3D-0002YU-7G for linux-arm-kernel@lists.infradead.org; Wed, 08 Mar 2017 14:58:52 +0000 Received: by mail-it0-x241.google.com with SMTP id r141so5649973ita.1 for ; Wed, 08 Mar 2017 06:58:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=J7cLjeZiSuqtaO/tPRcA3i+Y/Uyf58jVArow9WYWyWk=; b=chNSNxZ0lh00i5PmjuZJGHm1CrenG7u1mkd0Qbe2z+6xfyJ2gMnBIg+2WTAhlBrDEE IZlNn5zs4U6EOjJqQ2n1Rg/PQuA8M4rI1qnS5t55S6wFE7O2fCWmYJsidjJZbxlacTh+ 6vCz6BTd7JJdVYxU8gHc706XEck4TEd8KyRrA7/Wi7J0SU4LtktLMgZuPdqKvQz61lMx eNxcQLVApSJwTERbOrtghyJer3yWPNIXGUpgHqeLWms+nPi+Vz0QIIXHNerjuacnvDVP 4A3Tmrm5WzrNJD7zwkueOKjBsh21rFImyvNO1yv/ZWEaYW9qsHGxyuMqHh0/rAvqPGBW Kvrw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=J7cLjeZiSuqtaO/tPRcA3i+Y/Uyf58jVArow9WYWyWk=; b=aAgQmp8nOp4b3I5jb0qJzwP26pYXi3eVipil2ZOBXGo03qgK/AfZqZ7RFV1pyLk8Zv 77QOD7ShA59v+gWtDkC/ntqnqW/3Md+RGXrEwuE/rUJaj21Uq30DDWcBfb/KLxkydTGD 2x+kou0JOt+ywsB8oP7kDQVFk4D0wLi09d8EqPRDp+5Sk5KLtXpD3xl3cWZPmP5O+zCG hLpB7O5MAmy7ouyIq0h1wiT1V4rnM39JUHszFeenZ9uZHjaKP8n17gT+xO0DTBsyQhht KgbZEUbdP8cOc+GGT/Xu6HomGlttGjNs+50AaMoFN0OVnkZ0UEbjTX8cWOh/o2TxZJ2n T9eA== X-Gm-Message-State: AMke39lfF9kaq717bHQ3OMGHvzgw+2M2RVSdCwbEUoZCmRvzTpIhbMabrAUgbUKrXBHQlg== X-Received: by 10.36.142.2 with SMTP id h2mr14142826ite.22.1488985108721; Wed, 08 Mar 2017 06:58:28 -0800 (PST) Received: from CABRO3AP00510.localdomain ([74.51.240.241]) by smtp.gmail.com with ESMTPSA id 141sm1595552ioe.58.2017.03.08.06.58.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 08 Mar 2017 06:58:28 -0800 (PST) From: Sylvain Lemieux To: linux@armlinux.org.uk, vz@mleia.com Subject: [PATCH] video: ARM CLCD: fix dma allocation size Date: Wed, 8 Mar 2017 09:58:05 -0500 Message-Id: <20170308145805.1325-1-slemieux.tyco@gmail.com> X-Mailer: git-send-email 2.11.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170308_065851_311761_58B812EF X-CRM114-Status: GOOD ( 12.34 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-fbdev@vger.kernel.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP From: Liam Beguin This patch forces the frambuffer size to be aligned on kernel pages. During the board startup, the splash screed did appear; the "ts_test" program or our application were not able to start. The following error message was reported: error: failed to map framebuffer device to memory. LinuxFB: driver cannot connect The issue was discovered, on the LPC32xx platform, during the migration of the LCD definition from the board file to the device tree. Signed-off-by: Liam Beguin Signed-off-by: Sylvain Lemieux --- drivers/video/fbdev/amba-clcd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/video/fbdev/amba-clcd.c b/drivers/video/fbdev/amba-clcd.c index 0fab92c62828..ffc2c33c6cef 100644 --- a/drivers/video/fbdev/amba-clcd.c +++ b/drivers/video/fbdev/amba-clcd.c @@ -881,8 +881,8 @@ static int clcdfb_of_dma_setup(struct clcd_fb *fb) if (err) return err; - framesize = fb->panel->mode.xres * fb->panel->mode.yres * - fb->panel->bpp / 8; + framesize = PAGE_ALIGN(fb->panel->mode.xres * fb->panel->mode.yres * + fb->panel->bpp / 8); fb->fb.screen_base = dma_alloc_coherent(&fb->dev->dev, framesize, &dma, GFP_KERNEL); if (!fb->fb.screen_base)