From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753760Ab1HYXHZ (ORCPT ); Thu, 25 Aug 2011 19:07:25 -0400 Received: from moutng.kundenserver.de ([212.227.126.187]:59722 "EHLO moutng.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752594Ab1HYXHX (ORCPT ); Thu, 25 Aug 2011 19:07:23 -0400 Date: Fri, 26 Aug 2011 01:07:17 +0200 (CEST) From: Guennadi Liakhovetski X-X-Sender: lyakh@axis700.grange To: Laurent Pinchart cc: Linux Media Mailing List , Hans Verkuil , Pawel Osciak , Sakari Ailus , Mauro Carvalho Chehab , Marek Szyprowski , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Vinod Koul , Dan Williams , Sascha Hauer Subject: Re: [PATCH 2/2] V4L: mx3-camera: prepare to support multi-size buffers In-Reply-To: <201108251857.16865.laurent.pinchart@ideasonboard.com> Message-ID: References: <1314211292-10414-1-git-send-email-g.liakhovetski@gmx.de> <201108251857.16865.laurent.pinchart@ideasonboard.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Provags-ID: V02:K0:/iNubrBRxIJafwu5N+jZYyBlZ6Cz2WMXWOGgNbj8Ozr hRBPB14aZ4Yij/UeNtRZDBI8ZgrkLLagb4kAO8OEaLtw6ba0bq UxTYUwkYDj5Nc/bjvEBV/QM3X0jDCwhhDChPDZyIfooyCPx7pW KnkK1BX+ttCfJY34MPexIy8Q8qv0R3Hen+aEiBPooLa2i01AvQ pADzU5fODDxzvPGwfsX+Ch/S3APDU+9jxP+X/HSc0I= Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 25 Aug 2011, Laurent Pinchart wrote: > Hi Guennadi, > > On Thursday 25 August 2011 18:46:03 Guennadi Liakhovetski wrote: > > Prepare the mx3_camera friver to support the new VIDIOC_CREATE_BUFS and > > VIDIOC_PREPARE_BUF ioctl()s. The .queue_setup() vb2 operation must be > > able to handle buffer sizes, provided by the caller, and the > > .buf_prepare() operation must not use the currently configured frame > > format for its operation, which makes it superfluous for this driver. > > Its functionality is moved into .buf_queue(). > > You're moving the ichan->dma_chan.device->device_prep_slave_sg() call from > .buf_prepare() to .buf_queue(). Is that call cheap ? Otherwise it would be > better to keep the .buf_prepare() callback. But only if (buf->state == CSI_BUF_NEEDS_INIT), i.e., only on the first invocation. In any case, look at idmac_prep_slave_sg() - it is cheap. To do this in .buf_prepare I'd have to store the frame format from the .queue_setup() with a list of indices, to which it applies, and then use it in .buf_prepare()... Thanks Guennadi --- Guennadi Liakhovetski, Ph.D. Freelance Open-Source Software Developer http://www.open-technology.de/