Other Parts Discussed in Thread: DM3730
I have an 8-bit RAW (Bayer GRBG) camera that I'm trying to connect to D0-D7 on the DM3730 Camera ISP parallel camera interface (CPI). I get an image with the correct colors, but the image is somewhat dark (even when the RAW values from the sensor are saturated to 0xFF). I'm guessing that the issue is that my 8-bit data is not being routed correctly into the 10-bit Preview module.
What is the correct way to route 8-bit RAW data to the Preview module? I have had a number of ideas:
1) I tried increasing the brightness/contrast (PRV_CNT_BRT) in the Preview module, but the images are washed out (as would be expected since it only operates on the Y component).
2) I know that I could connect the camera up to D2-D9 (and ground D0-D1), but a board re-spin isn't an option right now.
3) Have the CCDC convert the 8-bit data to 10-bit data for use by the Preview module. I know that the lane-shifter can right-shift the data to reduce data width (e.g. 12-bit to 10-bit), but it doesn't appear to offer support for left-shifting, so it appears that this is a dead end.
4) Have the Preview module convert the 8-bit data to 10-bit data. Section 6.4.7.1.5 of the TRM says, "Even if the inverse A-Law block is not enabled, but the input is still 8 bits (PRV_PCR [4] WIDTH), the data is-left shifted by 2 to make it 10-bit data." However, my impression from other reading is that the WIDTH bit only applies if the data is coming from RAM. Also, section 6.4.7.1.2 of the TRM says, "When the source of input data is the CCDC, the input data is always 10 bits wide." So it doesn't seem like this is an option either.
5) Apply a multiplier to my data instead of a left-shift. For example, it appears that PRV_WB_DGAIN defaults to 0x100 (1x), so it appears that I could set it to 0x3FF and it would essentially perform a 4x gain (equivalent of a left-shift by 2). This seems to work, but it seems like kind of a "hack." I would have thought that there would be a better solution since Table 6-35 seems to imply that the "normal" way to connect an 8-bit sensor is to D0-D7. However, this also appears to be what is described in the YUV Image Capture section here: https://gitorious.org/cm-t3530-camera-kernel/pages/Home
If anyone has any feedback on the above approaches, or other ideas that I have not considered, I would be glad to hear them. Thanks in advance!