Linux Media Controller development
 help / color / mirror / Atom feed
From: "Jan Pohanka" <xhpohanka@gmail.com>
To: linux-media@vger.kernel.org
Cc: s.hauer@pengutronix.de
Subject: mx2_camera driver on mx27ipcam: dma_alloc_coherent size  failed
Date: Fri, 29 Jul 2011 09:31:28 +0200	[thread overview]
Message-ID: <op.vzdduqnuyxxkfz@localhost.localdomain> (raw)

Dear all,

I'm playing with imx27ipcam reference design and I would like to use more  
recent (or actual) kernel than the one in BSP (2.6.19). I had no problems  
with running 2.6.39 version from mainline, and now I want to get some  
signal from CMOS chip. As there is no driver for mt9d131 yet I modified  
the mt9m111 driver to communicate wit it.
Driver gets correctly initialized

mx2-camera mx2-camera.0: initialising
mx2-camera mx2-camera.0: Camera clock frequency: 6250000
mx2-camera mx2-camera.0: Using EMMA
camera 0-0: Probing 0-0
mx27ipcam_camera_power: 1
mx27ipcam_camera_reset
mx2-camera mx2-camera.0: Camera driver attached to camera 0
mt9m111 0-0048: read  reg.000 -> 1519
mt9m111 0-0048: Detected a MT9D131 chip ID 1519
camera 0-0: Found 8 supported formats.
mx2-camera mx2-camera.0: Camera driver detached from camera 0
mx27ipcam_camera_power: 0
mx2-camera mx2-camera.0: MX2 Camera (CSI) driver probed, clock frequency:  
6250000

For example this command should capture several frames
ffmpeg -s qvga -r 30 -t 2 -pix_fmt yuyv422 -f video4linux2 -i /dev/video0  
temp_vid.h263

however there is some problems with dma_contig allocation
mx2-camera mx2-camera.0: dma_alloc_coherent size 155648 failed
[video4linux2 @ 0xfa8c50]mmap: Cannot allocate memory
/dev/video0: Input/output error

...
camera 0-0: mmap called, vma=0xc397fd30
camera 0-0: vma start=0x4014c000, size=155648, ret=0
camera 0-0: mmap called, vma=0xc397fcd8
camera 0-0: vma start=0x40ee8000, size=155648, ret=0
camera 0-0: mmap called, vma=0xc397fc80
camera 0-0: vma start=0x40fa4000, size=155648, ret=0
camera 0-0: mmap called, vma=0xc397fc28
camera 0-0: vma start=0x4109a000, size=155648, ret=0
camera 0-0: mmap called, vma=0xc397fbd0
camera 0-0: vma start=0x41124000, size=155648, ret=0
camera 0-0: mmap called, vma=0xc397fb78
camera 0-0: vma start=0x4118a000, size=155648, ret=0
camera 0-0: mmap called, vma=0xc397fb20
camera 0-0: vma start=0x41241000, size=155648, ret=0
camera 0-0: mmap called, vma=0xc397fac8
camera 0-0: vma start=0x41277000, size=155648, ret=0
camera 0-0: mmap called, vma=0xc397fa70
camera 0-0: vma start=0x412c3000, size=155648, ret=0
camera 0-0: mmap called, vma=0xc397fa18
camera 0-0: vma start=0x41377000, size=155648, ret=0
camera 0-0: mmap called, vma=0xc397f9c0
camera 0-0: vma start=0x41416000, size=155648, ret=0
camera 0-0: mmap called, vma=0xc397f968
camera 0-0: vma start=0x4147f000, size=155648, ret=0
camera 0-0: mmap called, vma=0xc397f910
camera 0-0: vma start=0x414a5000, size=155648, ret=0
camera 0-0: mmap called, vma=0xc397f8b8
camera 0-0: vma start=0x41542000, size=155648, ret=0
camera 0-0: mmap called, vma=0xc397f860
camera 0-0: vma start=0x415ba000, size=155648, ret=0
camera 0-0: mmap called, vma=0xc397f808
mx2-camera mx2-camera.0: dma_alloc_coherent size 155648 failed
camera 0-0: vma start=0x41667000, size=155648, ret=-12
mx2-camera mx2-camera.0: Camera driver detached from camera 0
mx27ipcam_camera_power: 0
camera 0-0: camera device close


It seems like there is no dma buffer initialized for mx2_camera driver.
Could please anyone give me some hint how to deal with it?

regards
Jan

-- 
Tato zpráva byla vytvořena převratným poštovním klientem Opery:  
http://www.opera.com/mail/

             reply	other threads:[~2011-07-29  7:31 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-29  7:31 Jan Pohanka [this message]
2011-07-29  7:51 ` mx2_camera driver on mx27ipcam: dma_alloc_coherent size failed Uwe Kleine-König
2011-07-29  8:59   ` Jan Pohanka
2011-07-29  9:23     ` Uwe Kleine-König
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=op.vzdduqnuyxxkfz@localhost.localdomain \
    --to=xhpohanka@gmail.com \
    --cc=linux-media@vger.kernel.org \
    --cc=s.hauer@pengutronix.de \
    /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