From: xhpohanka@gmail.com (Jan Pohanka)
To: linux-arm-kernel@lists.infradead.org
Subject: dma buffers for camera
Date: Wed, 24 Aug 2011 15:45:02 +0200 [thread overview]
Message-ID: <op.v0p0hctkyxxkfz@localhost.localdomain> (raw)
Hello,
could please anyone explain me a bit situation about using memory buffers
for dma for video input devices? Unfortunately I don't understand it at
all.
I want to capture images 1600x1200 from 2 mpix sensor on i.mx27 board.
I gave 8MB to mx2_camera device with dma_declare_coherent_memory.
Unfortunately it seems to be not enough. In UYVY format I need 1600x1200x2
for one picture, it is cca 3.8MB.
After some digging I noticed, that dma_alloc_coherent() is called three
times and each time with the 3.8MB demand. Once it is directly from
mx2_camera driver and two times from videobuf_dma_contig. OK, that is more
than 8MB available, but why there are so big memory demands for one
picture?
I'm using gstremer for capturing, so it probably requests several buffers
with VIDIOC_REQBUFS. Is this behaviour normal, even if there is explicitly
noted that I want only one buffer?
gst-launch \
v4l2src num-buffers=1 device=/dev/video1 ! \
video/x-raw-yuv,format=\(fourcc\)UYVY,width=$WIDTH,height=$HEIGHT ! \
jpegenc ! \
filesink location=col_image.jpg
with best regards
Jan
--
Tato zpr?va byla vytvo?ena p?evratn?m po?tovn?m klientem Opery:
http://www.opera.com/mail/
next reply other threads:[~2011-08-24 13:45 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-24 13:45 Jan Pohanka [this message]
2011-08-24 19:17 ` dma buffers for camera Guennadi Liakhovetski
2011-08-25 12:35 ` Jan Pohanka
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.v0p0hctkyxxkfz@localhost.localdomain \
--to=xhpohanka@gmail.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