From patchwork Wed Sep 5 09:11:23 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Javier Martin X-Patchwork-Id: 1407111 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork2.kernel.org (Postfix) with ESMTP id 275A0DF264 for ; Wed, 5 Sep 2012 09:14:33 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1T9Bdy-0004qv-0e; Wed, 05 Sep 2012 09:11:30 +0000 Received: from mail-we0-f177.google.com ([74.125.82.177]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1T9Bdt-0004qh-Gv for linux-arm-kernel@lists.infradead.org; Wed, 05 Sep 2012 09:11:26 +0000 Received: by weyr3 with SMTP id r3so265261wey.36 for ; Wed, 05 Sep 2012 02:11:23 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding:x-gm-message-state; bh=tCGtA6eVQArbRBF5WLUmJ/MbgMmZEP/qHNoVb4ujSKg=; b=MPE+xwQ90zIc74MNbXDWTBc6oU59qQ99LkBWskm38A3dIioHsZHtid2CkAzm+U3rir EXOwSU3RM8SzYauO66ioc69pJnPox/+TbgSDQnAeTjcFY9r258hx82sQh/+KEzfvqgyf 02Kzd6NF8mpgSkZ+IVG/Zqhl8ISFMnU8CY2t6mnPwH1KrowMCeFSjxvG9IisbZc2NxyT nh/sxb0YboAXYL9WwmDB3isfc2tLl+qcrIsfmzBtvyY0BbrgSRm+jO+eI3/qlBGwPYq/ CWUrMjzwCG+6LzCblI/0jb2wpyJfBPOCCZwMd0DcMZUMgy8cqMid7jmVvtsFhM9tq8FE QogA== MIME-Version: 1.0 Received: by 10.216.244.202 with SMTP id m52mr11737709wer.28.1346836283456; Wed, 05 Sep 2012 02:11:23 -0700 (PDT) Received: by 10.227.98.87 with HTTP; Wed, 5 Sep 2012 02:11:23 -0700 (PDT) In-Reply-To: <50471187.3040809@gmail.com> References: <1346763398-13536-1-git-send-email-gcembed@gmail.com> <5047013E.30508@gmail.com> <50471187.3040809@gmail.com> Date: Wed, 5 Sep 2012 11:11:23 +0200 Message-ID: Subject: Re: [PATCH] ARM : i.MX27 : split code for allocation of ressources of camera and eMMA From: javier Martin To: =?ISO-8859-1?Q?Ga=EBtan_Carlier?= X-Gm-Message-State: ALoCoQkW+R7mN6eMkSdmtqt90hwC57ZL1BVzSsmucBiDDv8cNOOB+SGdn2XuA4vot8HH86NHua55 X-Spam-Note: CRM114 invocation failed X-Spam-Score: -2.6 (--) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-2.6 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [74.125.82.177 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: linux-arm-kernel@lists.infradead.org, Dong Aisheng , Russell King , Mauro Carvalho Chehab , Sascha Hauer X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org On 5 September 2012 10:47, Gaëtan Carlier wrote: > On 09/05/2012 10:22 AM, javier Martin wrote: >> >> On 5 September 2012 09:37, Gaëtan Carlier wrote: >>> >>> Hi Javier, >>> This is because I will send a patch to add support of eMMA-PP. eMMA-PrP >>> is >>> not only used for soc-camera. It can also be used as stand-alone driver >>> and >>> now to be able to use eMMA-PrP module, IMX_HAVE_PLATFORM_MX2_CAMERA must >>> be >>> set. >> >> >> Do you mean the following stand-alone driver I submitted some time >> ago? Are you working on some improvements to it? >> >> http://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git;a=blob;f=drivers/media/video/mx2_emmaprp.c;h=5f8a6f5b98f91c3af4e1bdbd06654e7b496d8d65;hb=HEAD > > yes > >> >> This driver can be used without applying your patch. Please take a >> look at the following patch which is pending to get merged in >> linux-media tree: >> https://patchwork.kernel.org/patch/1347921/ >> >> >>> And if I follow this logic, I have to put declaration of eMMA-PP with >>> imx-fb >>> and eMMA-PP can only be enabled if IMX_HAVE_PLATFORM_IMX_FB. >>> Of course, eMMA-PrP is almost always used with soc-camera and eMMA-PP >>> with >>> LCDC (imx-fb) but eMMA can be used to do HW accelarated colorspace >>> conversion. >> >> >> Agree, there is already one driver supporting this feature. >> >>> It is not a problem for me to keep eMMA-PrP and mx2-camera together. It >>> was >>> just to have a more independant eMMA driver. >> >> >> I won't oppose to it, for me it is just aesthetic. However, you must >> do it properly without breaking existing boards such as Visstrim_M10. > > Ok, I missed your patch in mailing-list and I work with linux-next > (20120824) so I didn't know that my patch would break yours. Sorry. > >> >>> For the Visstrim_M10 board, I don't think that it is needed to set >>> IMX_HAVE_PLATFORM_MX2_EMMA because there is no reference to m2m-emmaprp >>> and >>> mx2-camera embeds handling of eMMA-PrP without using eMMA-PrP driver. >> >> >> The following patch was sent to the list in Agust the 20th and will be >> merged in the linux-media tree. This patch does reference m2m-emmaprp >> in Visstrim_M10 >> https://patchwork.kernel.org/patch/1347921/ >> >> So, please, since you have to fix the wrong chunk and have to send a >> v2 anyways I strongly encourage you to add the flag >> IMX_HAVE_PLATFORM_MX2_EMMA to Visstrim_M10. This way nothing will be >> broken no matter your patch gets merged after or before mine. > > What do you mean by "wrong chunk" ? Your patch does not apply cleanly to linux-next due to the following chunk: diff --git a/arch/arm/mach-imx/devices-imx27.h b/arch/arm/mach-imx/devices-imx27.h index 0482293..d8eb4a0 100644 >> >>> It seems that eMMA-PrP embeded in mx2camera handles more case than >>> stand-alone eMMA-PrP driver. Maybe eMMA-PrP driver needs some review to >>> handle all In/Out image formats ? >> >> >> eMMa-PrP is currently used in two drivers: >> >> 1. >> http://git.linuxtv.org/media_tree.git/blob/refs/heads/staging/for_v3.7:/drivers/media/platform/soc_camera/mx2_camera.c >> Where it is used as a substitute to a DMA that moves data between the >> CSI and RAM apart from providing more features like format conversion, >> etc... This is a soc_camera video capture driver. >> >> 2. >> http://git.linuxtv.org/media_tree.git/blob/refs/heads/staging/for_v3.7:/drivers/media/platform/mx2_emmaprp.c >> This is a stand-alone mem2mem v4l2 driver that can get YUYV 422 in the >> input and transform it to YUV 420. Of course, the driver can be >> extended to support more kinds of conversions. >> >> Regards. >> > Regards, > Gaëtan. --- a/arch/arm/mach-imx/devices-imx27.h +++ b/arch/arm/mach-imx/devices-imx27.h @@ -54,8 +54,10 @@ extern const struct imx_imx_uart_1irq_data imx27_imx_uart_data[]; extern const struct imx_mx2_camera_data imx27_mx2_camera_data; #define imx27_add_mx2_camera(pdata) \ imx_add_mx2_camera(&imx27_mx2_camera_data, pdata) + +extern const struct imx_mx2_emma_data imx27_mx2_emmaprp_data; #define imx27_add_mx2_emmaprp() \ - imx_add_mx2_emmaprp(&imx27_mx2_camera_data) + imx_add_mx2_emmaprp(&imx27_mx2_emmaprp_data)