From patchwork Tue Nov 17 14:31:01 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Y, Kishore" X-Patchwork-Id: 60638 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id nAHEScHg016136 for ; Tue, 17 Nov 2009 14:28:38 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752531AbZKQO23 (ORCPT ); Tue, 17 Nov 2009 09:28:29 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751267AbZKQO23 (ORCPT ); Tue, 17 Nov 2009 09:28:29 -0500 Received: from arroyo.ext.ti.com ([192.94.94.40]:38431 "EHLO arroyo.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750905AbZKQO22 convert rfc822-to-8bit (ORCPT ); Tue, 17 Nov 2009 09:28:28 -0500 Received: from dbdp20.itg.ti.com ([172.24.170.38]) by arroyo.ext.ti.com (8.13.7/8.13.7) with ESMTP id nAHESVjd029100 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 17 Nov 2009 08:28:34 -0600 Received: from dbde70.ent.ti.com (localhost [127.0.0.1]) by dbdp20.itg.ti.com (8.13.8/8.13.8) with ESMTP id nAHESUWM010803; Tue, 17 Nov 2009 19:58:31 +0530 (IST) Received: from dbde02.ent.ti.com ([172.24.170.145]) by dbde70.ent.ti.com ([172.24.170.148]) with mapi; Tue, 17 Nov 2009 19:58:30 +0530 From: "Y, Kishore" To: "linux-media@vger.kernel.org" CC: "linux-omap@vger.kernel.org" Date: Tue, 17 Nov 2009 20:01:01 +0530 Subject: [RFC] [PATCH] omap_vout: Change allocated buffer to only needed size Thread-Topic: [RFC] [PATCH] omap_vout: Change allocated buffer to only needed size Thread-Index: AcpnkpYQuLIjVlcES3yH1HcSfYRWMQ== Message-ID: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US MIME-Version: 1.0 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org diff --git a/drivers/media/video/omap/omap_vout.c b/drivers/media/video/omap/omap_vout.c index a13f65e..8064c2d 100644 --- a/drivers/media/video/omap/omap_vout.c +++ b/drivers/media/video/omap/omap_vout.c @@ -855,6 +855,8 @@ static int omap_vout_buffer_setup(struct videobuf_queue *q, unsigned int *count, /* Now allocated the V4L2 buffers */ *size = vout->buffer_size; + *size = vout->pix.width * vout->pix.height * vout->bpp; + *size = PAGE_ALIGN(*size); startindex = (vout->vid == OMAP_VIDEO1) ? video1_numbuffers : video2_numbuffers; for (i = startindex; i < *count; i++) {