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: 9611707 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 45E2A602B4 for ; Wed, 8 Mar 2017 17:00:48 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 35EF3285EE for ; Wed, 8 Mar 2017 17:00:48 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2AD5D2860E; Wed, 8 Mar 2017 17:00:48 +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=-4.3 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,FREEMAIL_FROM,RCVD_IN_DNSWL_HI,RCVD_IN_SORBS_SPAM, RCVD_IN_SORBS_WEB,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EF2362860D for ; Wed, 8 Mar 2017 17:00:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754044AbdCHQ7y (ORCPT ); Wed, 8 Mar 2017 11:59:54 -0500 Received: from mail-it0-f67.google.com ([209.85.214.67]:34156 "EHLO mail-it0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751394AbdCHQ7E (ORCPT ); Wed, 8 Mar 2017 11:59:04 -0500 Received: by mail-it0-f67.google.com with SMTP id r141so6377775ita.1 for ; Wed, 08 Mar 2017 08:57:42 -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=Gf6N9Po3vzzNTi/4KMKFnkftgyIM48r505mxeTSmymq/eP2ee+8ns0XYdIhyoZJ9Y+ tEUswPCBG170miullPSAI+KA33fC/qcEOtYgkXabwkiAbEQh4d7RpwBRyD9nhOCxidRV aCe8s5GTLNModJTmGKK8ikPQFF077B4VEdqT4yCvacet5DfrdclxhLAYC2pl7NFFU9J/ rlyFkFix6dK7X+a3YumjM2YY9g5Y78aID6WtGaAEgVbBPg1gtoQBvnCyrCOZnze5MAiN lz3ZePqKgoau+/MsMdIILAlNXFuaM6vmtQDpqvDG7mROOSPJJvUtOSn8Csaydjw3RScv U8uw== X-Gm-Message-State: AMke39koSDh1a5XWGrPfycYgizs13Cyft/kAAVEoKw5QewcYHqaoZYJp5vb0JB0/fQmgIg== 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 Cc: linux-fbdev@vger.kernel.org, linux-arm-kernel@lists.infradead.org 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 Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.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)