Sriram,
On Sun, Feb 26, 2012 at 8:54 AM, Sriram V <[email protected]> wrote:
> Hi,
> When I take the dump of the buffer which is pointed by "DATA MEM
> PING ADDRESS". It always shows 0x55.
> Even if i write 0x00 to the address. I do notice that it quickly
> changes to 0x55.
> Under what conditions could this happen? What am i missing here.
If you're using "yavta" for capture, notice that it clears out the
buffers before queuing them in:
static int video_queue_buffer(struct device *dev, int index, enum
buffer_fill_mode fill)
{
struct v4l2_buffer buf;
int ret;
...
...
if (dev->type == V4L2_BUF_TYPE_VIDEO_OUTPUT) {
...
} else {
if (fill & BUFFER_FILL_FRAME)
memset(dev->buffers[buf.index].mem, 0x55,
dev->buffers[index].size);
if (fill & BUFFER_FILL_PADDING)
memset(dev->buffers[buf.index].mem +
dev->buffers[index].size,
0x55, dev->buffers[index].padding);
}
...
}
So, just make sure this condition is not met.
>
> I do notice that the OMAP4 ISS is tested to work with OV5640 (YUV422
> Frames) and OV5650 (Raw Data)
> When you say 422 Frames only. Do you mean 422-8Bit Mode?.
Yes. When saving YUV422 to memory, you can only use this mode AFAIK.
>
> I havent tried RAW12 which my device gives, Do i have to update only
> the Data Format Selection register
> of the ISS for RAW12?
Ok, now it makes sense.
So, if your CSI2 source is giving, you need to make sure:
CSI2_CTX_CTRL2_0.FORMAT[9:0] is:
- 0xAC: RAW12 + EXP16
or
- 0x2C: RAW12
The difference is that the EXP16 variant, will save to memory in
expansion to 2 bytes, instead of 12 bits, so it'll be byte aligned.
Can you try attached patch?
Regards,
Sergio
>
> Please advice.
>
>
> On Thu, Feb 23, 2012 at 11:24 PM, Sriram V <[email protected]> wrote:
>> Hi,
>> 1) An Hexdump of the captured file shows 0x55 at all locations.
>> Is there any buffer location i need to check.
>> 2) I have tried with "devel" branch.
>> 3) Changing the polarities doesnt help either.
>> 4) The sensor is giving out YUV422 8Bit Mode,
>> Will 0x52001074 = 0x0A00001E (UYVY Format) it bypass the ISP
>> and dump directly into memory.
>>
>> On 2/23/12, Aguirre, Sergio <[email protected]> wrote:
>>> Hi Sriram,
>>>
>>> On Thu, Feb 23, 2012 at 11:25 AM, Sriram V <[email protected]> wrote:
>>>> Hi,
>>>> 1) I am trying to get a HDMI to CSI Bridge chip working with OMAP4 ISS.
>>>> The issue is the captured frames are completely green in color.
>>>
>>> Sounds like the buffer is all zeroes, can you confirm?
>>>
>>>> 2) The Chip is configured to output VGA Color bar sequence with
>>>> YUV422-8Bit and
>>>> uses datalane 0 only.
>>>> 3) The Format on OMAP4 ISS is UYVY (Register 0x52001074 = 0x0A00001E)
>>>> I am trying to directly dump the data into memory without ISP processing.
>>>>
>>>>
>>>> Please advice.
>>>
>>> Just to be clear on your environment, which branch/commitID are you based
>>> on?
>>>
>>> Regards,
>>> Sergio
>>>
>>>>
>>>> --
>>>> Regards,
>>>> Sriram
>>>> --
>>>> To unsubscribe from this list: send the line "unsubscribe linux-media" in
>>>> the body of a message to [email protected]
>>>> More majordomo info at http://vger.kernel.org/majordomo-info.html
>>>
>>
>>
>> --
>> Regards,
>> Sriram
>
>
>
> --
> Regards,
> Sriram
diff --git a/drivers/media/video/omap4iss/iss_csi2.c b/drivers/media/video/omap4iss/iss_csi2.c
index 04985a0..0e8a069 100644
--- a/drivers/media/video/omap4iss/iss_csi2.c
+++ b/drivers/media/video/omap4iss/iss_csi2.c
@@ -106,6 +106,10 @@ static const unsigned int csi2_input_fmts[] = {
V4L2_MBUS_FMT_SGBRG8_1X8,
V4L2_MBUS_FMT_SGRBG8_1X8,
V4L2_MBUS_FMT_SRGGB8_1X8,
+ V4L2_MBUS_FMT_SBGGR12_1X12,
+ V4L2_MBUS_FMT_SGBRG12_1X12,
+ V4L2_MBUS_FMT_SGRBG12_1X12,
+ V4L2_MBUS_FMT_SRGGB12_1X12,
V4L2_MBUS_FMT_UYVY8_1X16,
V4L2_MBUS_FMT_YUYV8_1X16,
};
@@ -171,6 +175,23 @@ static const u16 __csi2_fmt_map[][2][2] = {
0,
},
},
+ /* RAW12 formats */
+ {
+ /* Output to memory */
+ {
+ /* No DPCM decompression */
+ CSI2_PIX_FMT_RAW12_EXP16,
+ /* DPCM decompression */
+ 0,
+ },
+ /* Output to both */
+ {
+ /* No DPCM decompression */
+ CSI2_PIX_FMT_RAW12_VP,
+ /* DPCM decompression */
+ 0,
+ },
+ },
/* YUV422 formats */
{
/* Output to memory */
@@ -220,9 +241,15 @@ static u16 csi2_ctx_map_format(struct iss_csi2_device *csi2)
case V4L2_MBUS_FMT_SRGGB8_1X8:
fmtidx = 2;
break;
+ case V4L2_MBUS_FMT_SBGGR12_1X12:
+ case V4L2_MBUS_FMT_SGBRG12_1X12:
+ case V4L2_MBUS_FMT_SGRBG12_1X12:
+ case V4L2_MBUS_FMT_SRGGB12_1X12:
+ fmtidx = 3;
+ break;
case V4L2_MBUS_FMT_UYVY8_1X16:
case V4L2_MBUS_FMT_YUYV8_1X16:
- fmtidx = 3;
+ fmtidx = 4;
break;
default:
WARN(1, KERN_ERR "CSI2: pixel format %08x unsupported!\n",
diff --git a/drivers/media/video/omap4iss/iss_csi2.h b/drivers/media/video/omap4iss/iss_csi2.h
index aa81971..beed331 100644
--- a/drivers/media/video/omap4iss/iss_csi2.h
+++ b/drivers/media/video/omap4iss/iss_csi2.h
@@ -32,6 +32,8 @@ enum iss_csi2_pix_formats {
CSI2_PIX_FMT_RAW8_DPCM10_EXP16 = 0x2aa,
CSI2_PIX_FMT_RAW8_DPCM10_VP = 0x32a,
CSI2_PIX_FMT_RAW8_VP = 0x12a,
+ CSI2_PIX_FMT_RAW12_EXP16 = 0xac,
+ CSI2_PIX_FMT_RAW12_VP = 0x12c,
CSI2_USERDEF_8BIT_DATA1_DPCM10_VP = 0x340,
CSI2_USERDEF_8BIT_DATA1_DPCM10 = 0x2c0,
CSI2_USERDEF_8BIT_DATA1 = 0x40,