From: Agustin <gatoguan-os@yahoo.com>
To: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Cc: video4linux list <video4linux-list@redhat.com>
Subject: Re: SoC-Camera bus width, and "V4LV4L2_PIX_FMT_Y16" for "monochrome 10 bit"
Date: Mon, 15 Dec 2008 23:18:36 -0800 (PST) [thread overview]
Message-ID: <994493.36303.qm@web32107.mail.mud.yahoo.com> (raw)
In-Reply-To: <Pine.LNX.4.64.0812121500400.6411@axis700.grange>
Hi Guennadi,
According to manual, i.MX31's CSI can handle up to 16 bits wide, not just 15. I have been checking my hardware limitations and IOMUX options and 16 bits seems possible.
However, that's far from my current working status. I am using such a big frame format (~7700x970x10bits) that it requires a 16MB buffer for a single frame. I did the required mods to kernel to allow a big enough coherent DMA to be reserved, and I am trying to work with one single buffer, though I guess I will use two, sooner or later.
I have come as far to having the image as to successfully requesting a video capture from userspace through mmap, then get some message from mx3_camera that some IRQ is reserved, then select() expires (10 seconds) and the application stays "zombie" on exit.
Today I am troubleshooting this. I will see if the frame size or bus 'params' are wrong, and what is the IPU/CSI seeing in the bus, as my logic analyzer sees a pretty usable thing. Any tips?
Regards,
--
Agustin Ferrin Pozuelo
Embedded Systems Consultant
http://embedded.ferrin.org/
Tel. +34 610502587
--- El vie, 12/12/08, Guennadi Liakhovetski <g.liakhovetski@gmx.de> escribió:
De: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Asunto: Re: SoC-Camera bus width, and "V4LV4L2_PIX_FMT_Y16" for "monochrome 10 bit"
Para: "Agustin" <gatoguan-os@yahoo.com>
CC: "video4linux list" <video4linux-list@redhat.com>
Fecha: viernes, 12 diciembre, 2008 5:52
On Fri, 12 Dec 2008, Agustin wrote:
> (Changing subject)
>
> On Fri, 12/12/08, Guennadi Liakhovetski <g.liakhovetski@gmx.de>
wrote:
> > On Fri, 12 Dec 2008, Agustin wrote:
> > > Absolutely. Right now I am connecting 6 MT9P031, the monochrome
> > > type, with 12 bits ADC so I think the right format would be
'Y16'.
> >
> > Hm, actually I think it is not. As you might have seen in
> > the current soc-camera sources, we now handle two formats:
> > one from the sensor to the host controller driver, and one
> > from the host driver to the user. i.MX31 can handle 15, 10,
> > 8 and 4 bits, so, you will either have to extend your
> > 12 bits to 15, or truncate them to 10 or 8. Respectively
> > you will choose a suitable format. But - it will have to be
> > "15-bit monochrome", "10-bit monochrome", or
"8-bit
> > monochrome."
> > Currently I only see 8 and 16 bits defined in v4l, so, if
> > you use anything different you will have to define it. Yes,
> > I know I used V4L2_PIX_FMT_Y16 in mt9m001 for "monochrome
> > 10 bit" - this is wrong, as well as using
> > V4L2_PIX_FMT_SBGGR16 for "Bayer 10 bit,"
> > I will have to fix this some time.
>
> According to V4L2 API (http://v4l2spec.bytesex.org/spec/r4246.htm),
> V4L2_PIX_FMT_Y16 ('Y16 ') describes "a grey-scale image with
a depth of
> 16 bits per pixel". And it is also stated that "the actual
sampling
> precision may be lower than 16 bits, for example 10 bits per pixel".
>
> So I think V4L2_PIX_FMT_Y16 is valid for all the monochrome widths in
> i.MX31, isn't it?
Hm, ok, in case of i.MX31 it is the case - if you connect a sensor over 15
bit to it, you get 16 bit (see 44.1.1.3) - 15 _most_ significant bits of a
16-bit word will be used! This is not the case with pxa270 - it uses
_least_ significant bits, so, if you get a 10-bit monochrome format. Now
with your 12 bits - to get 16 bits out of them you will have to connect
them to high 12 bits of imx31: D11 of a sensor to D14 of imx31 ... D0 of a
sensor to D3 of imx31, then you get 16 bits too. I think, if you connect
10 bits and configure imx31 for 10 bits, you get 16 bits too, but I
haven't found anything in the datasheet about it.
So, if you connect your sensors correctly _from_ imx31 to the user you get
8 or 16 bits. But, to describe the format the sensor sends to the imx31
you have to specify 15 bits, so that your sensor works correctly also when
connected to other hosts, e.g., pxa.
> Regarding CSI bus width, I understand it is 'negotiated' through
> soc_camera_ops.query/set_bus_params(). I still don't know who makes
the
> choice here, so I am just announcing 10 bit cause is what I need at the
> moment.
The host decides. You will see soon enough whether what you announce is
right:-) Even more so after updates that I hope to push out early next
week, where flags comparison is made even more strict.
Thanks
Guennadi
---
Guennadi Liakhovetski
--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list
next prev parent reply other threads:[~2008-12-16 7:18 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <824398.40186.qm@web32104.mail.mud.yahoo.com>
2008-12-11 20:34 ` Soc-Camera architecture and nomenclature, and I2C in V4L Guennadi Liakhovetski
2008-12-12 11:46 ` Agustin
2008-12-12 12:22 ` Guennadi Liakhovetski
2008-12-12 13:57 ` SoC-Camera bus width, and "V4LV4L2_PIX_FMT_Y16" for "monochrome 10 bit" Agustin
2008-12-12 16:52 ` Guennadi Liakhovetski
2008-12-16 7:18 ` Agustin [this message]
2008-12-16 7:46 ` Guennadi Liakhovetski
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=994493.36303.qm@web32107.mail.mud.yahoo.com \
--to=gatoguan-os@yahoo.com \
--cc=g.liakhovetski@gmx.de \
--cc=video4linux-list@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.