Re: OMAP3 Bridge Problems

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



 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
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux