From: javier.martin@vista-silicon.com (Javier Martin)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/2] i.MX27: Visstrim_M10: Add support for deinterlacing driver.
Date: Wed, 11 Jul 2012 10:55:04 +0200 [thread overview]
Message-ID: <1341996904-22893-3-git-send-email-javier.martin@vista-silicon.com> (raw)
In-Reply-To: <1341996904-22893-1-git-send-email-javier.martin@vista-silicon.com>
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();
}
--
1.7.9.5
prev parent reply other threads:[~2012-07-11 8:55 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-11 8:55 [PATCH 0/2] Add video deinterlacing support Javier Martin
2012-07-11 8:55 ` [PATCH 1/2] media: Add mem2mem deinterlacing driver Javier Martin
2012-07-11 9:45 ` Hans Verkuil
2012-07-11 10:02 ` javier Martin
2012-07-11 10:17 ` Hans Verkuil
2012-07-11 8:55 ` Javier Martin [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1341996904-22893-3-git-send-email-javier.martin@vista-silicon.com \
--to=javier.martin@vista-silicon.com \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox