From: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
To: Jan Pohanka <xhpohanka@gmail.com>
Cc: linux-media@vger.kernel.org, s.hauer@pengutronix.de
Subject: Re: mx2_camera driver on mx27ipcam: dma_alloc_coherent size failed
Date: Fri, 29 Jul 2011 11:23:12 +0200 [thread overview]
Message-ID: <20110729092311.GY16561@pengutronix.de> (raw)
In-Reply-To: <op.vzdhx5ucyxxkfz@localhost.localdomain>
Hi Jan,
On Fri, Jul 29, 2011 at 10:59:55AM +0200, Jan Pohanka wrote:
> thank you for answer. You are right I give no memory to camera
> device in mach-imx27ipcam.c. I have tried to do it in same way as it
> is in mach-pcm037.c but no success. Here is my init function
>
> static int __init mx27ipcam_camera_init(void) {
> int dma, ret = -ENOMEM;
> struct platform_device *pdev;
>
> printk("MX2 camera initialization.\n");
>
> pdev = imx27_add_mx2_camera(&mx27ipcam_camera);
>
> if (IS_ERR(pdev)) {
> printk("pdev error\n");
> return PTR_ERR(pdev);
> }
>
> dma = dma_declare_coherent_memory(&pdev->dev,
> mx2_camera_base, mx2_camera_base,
> MX2_CAMERA_BUF_SIZE,
> DMA_MEMORY_MAP | DMA_MEMORY_EXCLUSIVE);
> if (!(dma & DMA_MEMORY_MAP))
> goto err;
>
>
> ret = platform_device_add(pdev);
> if (ret) {
> printk("platform_device_add error\n");
>
> err:
> platform_device_put(pdev);
> }
>
> return ret;
> }
and you also have a reserve callback? See commit
90026c8c823bff54172eab33a5e7fcecfd3df635 for all details.
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-König |
Industrial Linux Solutions | http://www.pengutronix.de/ |
next prev parent reply other threads:[~2011-07-29 9:23 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-29 7:31 mx2_camera driver on mx27ipcam: dma_alloc_coherent size failed Jan Pohanka
2011-07-29 7:51 ` Uwe Kleine-König
2011-07-29 8:59 ` Jan Pohanka
2011-07-29 9:23 ` Uwe Kleine-König [this message]
2011-07-29 10:14 ` Jan Pohanka
2011-07-29 11:57 ` Uwe Kleine-König
2011-08-01 6:58 ` Jan Pohanka
2011-08-04 13:11 ` Jan Pohanka
2011-08-04 13:25 ` Uwe Kleine-König
2011-08-05 7:21 ` Jan Pohanka
2011-08-05 7:28 ` Uwe Kleine-König
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=20110729092311.GY16561@pengutronix.de \
--to=u.kleine-koenig@pengutronix.de \
--cc=linux-media@vger.kernel.org \
--cc=s.hauer@pengutronix.de \
--cc=xhpohanka@gmail.com \
/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