From patchwork Tue Apr 16 11:10:01 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Lad, Prabhakar" X-Patchwork-Id: 2449071 Return-Path: X-Original-To: patchwork-davinci@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from arroyo.ext.ti.com (arroyo.ext.ti.com [192.94.94.40]) by patchwork2.kernel.org (Postfix) with ESMTP id B4295DF230 for ; Tue, 16 Apr 2013 11:14:24 +0000 (UTC) Received: from dlelxv30.itg.ti.com ([172.17.2.17]) by arroyo.ext.ti.com (8.13.7/8.13.7) with ESMTP id r3GBAQEQ031700; Tue, 16 Apr 2013 06:10:26 -0500 Received: from DLEE70.ent.ti.com (dlee70.ent.ti.com [157.170.170.113]) by dlelxv30.itg.ti.com (8.13.8/8.13.8) with ESMTP id r3GBAQ5T002042; Tue, 16 Apr 2013 06:10:26 -0500 Received: from dlelxv23.itg.ti.com (172.17.1.198) by DLEE70.ent.ti.com (157.170.170.113) with Microsoft SMTP Server id 14.2.342.3; Tue, 16 Apr 2013 06:10:25 -0500 Received: from linux.omap.com (dlelxs01.itg.ti.com [157.170.227.31]) by dlelxv23.itg.ti.com (8.13.8/8.13.8) with ESMTP id r3GBAPHH027972; Tue, 16 Apr 2013 06:10:25 -0500 Received: from linux.omap.com (localhost [127.0.0.1]) by linux.omap.com (Postfix) with ESMTP id 1E17F80627; Tue, 16 Apr 2013 06:10:25 -0500 (CDT) X-Original-To: davinci-linux-open-source@linux.davincidsp.com Delivered-To: davinci-linux-open-source@linux.davincidsp.com Received: from dflp51.itg.ti.com (dflp51.itg.ti.com [128.247.22.94]) by linux.omap.com (Postfix) with ESMTP id 99B5B80626 for ; Tue, 16 Apr 2013 06:10:23 -0500 (CDT) Received: from red.ext.ti.com (red.ext.ti.com [192.94.93.37]) by dflp51.itg.ti.com (8.13.7/8.13.8) with ESMTP id r3GBANn1017979 for ; Tue, 16 Apr 2013 06:10:23 -0500 (CDT) Received: from mail6.bemta7.messagelabs.com (mail6.bemta7.messagelabs.com [216.82.255.55]) by red.ext.ti.com (8.13.7/8.13.7) with ESMTP id r3GBAMnT023716 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 16 Apr 2013 06:10:23 -0500 Received: from [216.82.253.163:63462] by server-1.bemta-7.messagelabs.com id 80/ED-08130-E913D615; Tue, 16 Apr 2013 11:10:22 +0000 X-Env-Sender: prabhakar.csengg@gmail.com X-Msg-Ref: server-10.tower-166.messagelabs.com!1366110621!12333339!1 X-Originating-IP: [209.85.220.52] X-SpamReason: No, hits=0.0 required=7.0 tests=ML_RADAR_SPEW_LINKS_14, spamassassin: X-StarScan-Received: X-StarScan-Version: 6.8.6.1; banners=-,-,- X-VirusChecked: Checked Received: (qmail 16704 invoked from network); 16 Apr 2013 11:10:21 -0000 Received: from mail-pa0-f52.google.com (HELO mail-pa0-f52.google.com) (209.85.220.52) by server-10.tower-166.messagelabs.com with RC4-SHA encrypted SMTP; 16 Apr 2013 11:10:21 -0000 Received: by mail-pa0-f52.google.com with SMTP id fb10so287901pad.39 for ; Tue, 16 Apr 2013 04:10:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer; bh=Of7052Pwoi+63UNstcSt3er9OMtXKx3xT+wL+p9vEk0=; b=lFCxHVv6WvVKu1IR5lwpqdeMYQBIbE0osHpGg9wqtDnVpZ4zVRWyWB4o0+cym2VeZc JIZeTMffRzLwg4dCcEdg0+O+GcizLHiN3v4MHg6LwXDfwI+NxjGX5PcyBvIc3qAUap1+ bO4fqoZgHARIideF2ek7VdDt4qOkG3pT8KhEELJm8qu9Kr5KCuPjO1D/WKb/Eg9lQrwM VQqF9/mBNE7YMMy+DK6V09N+8f0oSOdOskxfVXvt2/WqUfPMqopiDMH9icliQTaSLKrU DzBc/9soesWJrGxFcT9Dy62mIfEpRHdJbMoEpbzP8TWUYveYxQWDxGKkwdUOK8KycNMy vltQ== X-Received: by 10.68.130.194 with SMTP id og2mr2585744pbb.101.1366110620933; Tue, 16 Apr 2013 04:10:20 -0700 (PDT) Received: from localhost.localdomain ([122.166.13.141]) by mx.google.com with ESMTPS id be7sm2247694pad.20.2013.04.16.04.10.15 (version=TLSv1 cipher=RC4-SHA bits=128/128); Tue, 16 Apr 2013 04:10:20 -0700 (PDT) From: Prabhakar lad To: LMML Subject: [PATCH] media: davinci: vpbe: align the buffers size to page page size boundary Date: Tue, 16 Apr 2013 16:40:01 +0530 Message-ID: <1366110601-18424-1-git-send-email-prabhakar.csengg@gmail.com> X-Mailer: git-send-email 1.7.4.1 CC: DLOS , Mauro Carvalho Chehab , LKML , Hans Verkuil , Laurent Pinchart X-BeenThere: davinci-linux-open-source@linux.davincidsp.com X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: Errors-To: davinci-linux-open-source-bounces@linux.davincidsp.com From: Lad, Prabhakar with recent commit with id 068a0df76023926af958a336a78bef60468d2033 which adds add length check for mmap, the application were failing to mmap the buffers. This patch aligns the the buffer size to page size boundary for both capture and display driver so the it pass the check. Signed-off-by: Lad, Prabhakar Cc: Laurent Pinchart Cc: Hans Verkuil Cc: Mauro Carvalho Chehab --- drivers/media/platform/davinci/vpbe_display.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/media/platform/davinci/vpbe_display.c b/drivers/media/platform/davinci/vpbe_display.c index 1802f11..ff8fe76 100644 --- a/drivers/media/platform/davinci/vpbe_display.c +++ b/drivers/media/platform/davinci/vpbe_display.c @@ -258,7 +258,7 @@ vpbe_buffer_queue_setup(struct vb2_queue *vq, const struct v4l2_format *fmt, *nbuffers = layer->numbuffers = VPBE_DEFAULT_NUM_BUFS; *nplanes = 1; - sizes[0] = layer->pix_fmt.sizeimage; + sizes[0] = PAGE_ALIGN(layer->pix_fmt.sizeimage); alloc_ctxs[0] = layer->alloc_ctx; return 0;