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: 2449061 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 0B467DF230 for ; Tue, 16 Apr 2013 11:10:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756775Ab3DPLKW (ORCPT ); Tue, 16 Apr 2013 07:10:22 -0400 Received: from mail-pa0-f41.google.com ([209.85.220.41]:36100 "EHLO mail-pa0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753414Ab3DPLKV (ORCPT ); Tue, 16 Apr 2013 07:10:21 -0400 Received: by mail-pa0-f41.google.com with SMTP id kx1so290526pab.0 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 Cc: Mauro Carvalho Chehab , DLOS , LKML , "Lad, Prabhakar" , Laurent Pinchart , Hans Verkuil 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 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org 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;