From: Lane Brooks <lane@brooks.nu>
To: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: linux-media@vger.kernel.org
Subject: Re: OMAP3 Bridge Problems
Date: Sun, 08 Aug 2010 16:56:27 -0600 [thread overview]
Message-ID: <4C5F361B.10202@brooks.nu> (raw)
In-Reply-To: <201008090029.04455.laurent.pinchart@ideasonboard.com>
On 08/08/2010 04:29 PM, Laurent Pinchart wrote:
> Hi Lane,
>
> Thanks for the patch.
>
> On Thursday 05 August 2010 20:53:50 Lane Brooks wrote:
>
> [snip]
>
>> I was able to get YUV CCDC capture mode working with rather minimal
>> effort. Attached is a patch with the initial effort. Can you comment?
>
> Writing to the ISPCCDC_SYN_MODE register should be moved to ccdc_configure().
> Just move the switch statement there right after the
>
> format =&ccdc->formats[CCDC_PAD_SINK];
>
> line (without the ispctrl_val settings), it should be enough.
>
>> + isp_reg_writel(isp, ispctrl_val, OMAP3_ISP_IOMEM_MAIN,
>> + ISP_CTRL);
> The ISP_CTRL register should be written in isp_select_bridge_input() only. As
> you correctly mention, whether the data is in little endian or big endian
> format should come from platform data, so I think it's fine to force board
> files to set the isp->pdata->parallel.bridge field to the correct value.
Putting the bridge settings in the platform data is tricky because they
need to change depending on the selected format. For example, for my
board, when in SGRBG mode, the bridge needs disabled. When in YUV16
mode, however, I need need to select BIG/LITTLE endian depending on
whether it is YUYV or UYVY or ... I am not quite sure how to capture
that in the platform data without enumerating every supported format
code in the platform data. The current patch knows (based on the OMAP
TRM) that YUV16 mode requires the bridge to be enabled. So in the
platform data I specify the bridge state for SGBRG mode and force the
bridge to BIG endian in YUV16 mode. This leaves the sensor to switch the
phasing based on YUYV, YVYU, etc. mode. I am not sure who should be in
charge of doing byte swapping in general, but if the input and output
modes are the same, then big endian should be used to avoid a byte swap.
In other words, the mode is completely determinable based on the
formats, so perhaps I should implement it that way. If the input and
output port require a byte swap, then go little endian, otherwise go big
endian.
The reason why I put both writes to the ISPCTRL and SYN_MODE registers
where I did. Moving them to other places will require querying the
selected format code. Is that what you want as well?
Lane
next prev parent reply other threads:[~2010-08-08 22:56 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-03 15:26 OMAP3 Bridge Problems Lane Brooks
2010-08-04 20:57 ` Laurent Pinchart
2010-08-05 16:06 ` Lane Brooks
2010-08-05 18:53 ` Lane Brooks
2010-08-08 22:29 ` Laurent Pinchart
2010-08-08 22:56 ` Lane Brooks [this message]
2010-08-09 9:25 ` Laurent Pinchart
2010-08-09 13:38 ` Lane Brooks
2010-09-03 13:39 ` Laurent Pinchart
2010-08-05 19:01 ` Lane Brooks
2010-08-08 22:13 ` Laurent Pinchart
2010-08-08 22:34 ` Lane Brooks
2010-08-08 22:37 ` Laurent Pinchart
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=4C5F361B.10202@brooks.nu \
--to=lane@brooks.nu \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-media@vger.kernel.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