From patchwork Wed Jul 11 08:55:04 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Javier Martin X-Patchwork-Id: 1180981 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork1.kernel.org (Postfix) with ESMTP id B37823FC5A for ; Wed, 11 Jul 2012 09:00:43 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1SosiJ-0000iF-0b; Wed, 11 Jul 2012 08:56:03 +0000 Received: from mail-wi0-f169.google.com ([209.85.212.169]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1Soshf-0000hP-In for linux-arm-kernel@lists.infradead.org; Wed, 11 Jul 2012 08:55:26 +0000 Received: by wibhm2 with SMTP id hm2so3965146wib.0 for ; Wed, 11 Jul 2012 01:55:17 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references :x-gm-message-state; bh=D78C8awwpgfzfeyaH4mPj2BAytqqWzkG5zl78Q0wgFU=; b=AZb0DL4dNfXjMlsa4H80NGhSo/OANsMt135hUsDT21m+4dbgPsWOQWqvlW4CnNX+GZ k7rvEGB7j8ogEo1HqYImHOARUrsK9RFsHfPpn9Bl8Xz7QIblY2IGLUaAEuyXw/ikkVLk 5zhBrKzWBdxbvAoP0NkRU67zgtrH7OiJJvB5DEUQJ0qrw9QXc2f1AKsr7YCxiGfXF9+h tl5rl00u4hZf7Guxkgbd9ECLYTutZAWIXPZ9sPTsQ/Dzo9BfT16FFkhjxKojKYatsc4R ZlHA8orcaCztGwkpL5KYUsP5YAt6EICN6sL5XTJS3MUUC1D6B6hEp12Hyn69OYnAxarb h7Sw== Received: by 10.216.180.197 with SMTP id j47mr7487417wem.35.1341996917590; Wed, 11 Jul 2012 01:55:17 -0700 (PDT) Received: from piscis.vsilicon.net (96.252.106.212.dynamic.jazztel.es. [212.106.252.96]) by mx.google.com with ESMTPS id ep14sm9941926wid.0.2012.07.11.01.55.15 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 11 Jul 2012 01:55:17 -0700 (PDT) From: Javier Martin To: linux-media@vger.kernel.org Subject: [PATCH 2/2] i.MX27: Visstrim_M10: Add support for deinterlacing driver. Date: Wed, 11 Jul 2012 10:55:04 +0200 Message-Id: <1341996904-22893-3-git-send-email-javier.martin@vista-silicon.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1341996904-22893-1-git-send-email-javier.martin@vista-silicon.com> References: <1341996904-22893-1-git-send-email-javier.martin@vista-silicon.com> X-Gm-Message-State: ALoCoQlLpVIRGCQHpJguRFJXvdSjUOqnXpftBCHRMXJM5BWHYgGaVqo3FbFGtb6j58BAd8M5g0sU 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 [209.85.212.169 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: sakari.ailus@maxwell.research.nokia.com, kernel@pengutronix.de, mchehab@infradead.org, kyungmin.park@samsung.com, laurent.pinchart@ideasonboard.com, s.nawrocki@samsung.com, linux@arm.linux.org.uk, linux-arm-kernel@lists.infradead.org, Javier Martin 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: , MIME-Version: 1.0 Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Visstrim_M10 have a tvp5150 whose video output must be deinterlaced. The new mem2mem deinterlacing driver is very useful for that purpose. --- arch/arm/mach-imx/mach-imx27_visstrim_m10.c | 31 ++++++++++++++++++++++++--- 1 file changed, 28 insertions(+), 3 deletions(-) diff --git a/arch/arm/mach-imx/mach-imx27_visstrim_m10.c b/arch/arm/mach-imx/mach-imx27_visstrim_m10.c index 214e4ff..1566126 100644 --- a/arch/arm/mach-imx/mach-imx27_visstrim_m10.c +++ b/arch/arm/mach-imx/mach-imx27_visstrim_m10.c @@ -192,8 +192,8 @@ static struct soc_camera_link iclink_tvp5150 = { .bus_id = 0, .board_info = &visstrim_i2c_camera, .i2c_adapter_id = 0, - .power = visstrim_camera_power, - .reset = visstrim_camera_reset, +// .power = visstrim_camera_power, +// .reset = visstrim_camera_reset, }; static struct mx2_camera_platform_data visstrim_camera = { @@ -232,7 +232,7 @@ static void __init visstrim_camera_init(void) static void __init visstrim_reserve(void) { /* reserve 4 MiB for mx2-camera */ - mx2_camera_base = arm_memblock_steal(2 * MX2_CAMERA_BUF_SIZE, + mx2_camera_base = arm_memblock_steal(3 * MX2_CAMERA_BUF_SIZE, MX2_CAMERA_BUF_SIZE); } @@ -419,6 +419,30 @@ static void __init visstrim_coda_init(void) return; } +/* DMA deinterlace */ +static struct platform_device visstrim_deinterlace = { + .name = "m2m-deinterlace", + .id = 0, +}; + +static void __init visstrim_deinterlace_init(void) +{ + int ret = -ENOMEM; + struct platform_device *pdev = &visstrim_deinterlace; + int dma; + + ret = platform_device_register(pdev); + + dma = dma_declare_coherent_memory(&pdev->dev, + mx2_camera_base + 2 * MX2_CAMERA_BUF_SIZE, + mx2_camera_base + 2 * MX2_CAMERA_BUF_SIZE, + MX2_CAMERA_BUF_SIZE, + DMA_MEMORY_MAP | DMA_MEMORY_EXCLUSIVE); + if (!(dma & DMA_MEMORY_MAP)) + return; +} + + static void __init visstrim_m10_revision(void) { int exp_version = 0; @@ -481,6 +505,7 @@ static void __init visstrim_m10_board_init(void) platform_device_register_resndata(NULL, "soc-camera-pdrv", 0, NULL, 0, &iclink_tvp5150, sizeof(iclink_tvp5150)); gpio_led_register_device(0, &visstrim_m10_led_data); + visstrim_deinterlace_init(); visstrim_camera_init(); visstrim_coda_init(); }