Using MT9P031 digital sensor
I'm trying to use the MT9P031 digital sensor with the Media Controller Framework. media-ctl tells me that the sensor is set to capture using SGRBG12 2592x1944
Questions:
* What pixel format in ffmpeg does this correspond to?
* Can I zoom/crop with this driver using the MCF? If so, how?
Thanks for any help
Signature · 4 lines
------------------------------------------------------------ Gary Thomas | Consulting for the MLB Associates | Embedded world ------------------------------------------------------------
Hi Gary,
Quoted 6 lines · On Tuesday 01 November 2011 19:52:49 Gary Thomas wrote:
I'm trying to use the MT9P031 digital sensor with the Media Controller Framework. media-ctl tells me that the sensor is set to capture using SGRBG12 2592x1944
Questions:
* What pixel format in ffmpeg does this correspond to?
I don't know if ffmpeg supports Bayer formats. The corresponding fourcc in V4L2 is BA12.
If your sensor is hooked up to the OMAP3 ISP, you can then configure the pipeline to include the preview engine and the resizer, and capture YUV data at the resizer output.
Quoted 1 line
* Can I zoom/crop with this driver using the MCF? If so, how?
That depends on what host/bridge you use. The OMAP3 ISP has scaling capabilities (controller by the crop rectangle at the resizer input and the format at the resizer output), others might not.
Signature · 3 lines
Regards, Laurent Pinchart
Quoted 7 lines · Laurent Pinchart
Hi Gary,
Quoted 4 lines · On Tuesday 01 November 2011 19:52:49 Gary Thomas wrote:
I'm trying to use the MT9P031 digital sensor with the Media Controller Framework. media-ctl tells me that the sensor is set to capture using SGRBG12 2592x1944
Quoted 5 lines
Quoted 2 lines
Questions:
* What pixel format in ffmpeg does this correspond to?I don't know if ffmpeg supports Bayer formats. The corresponding fourcc in V4L2 is BA12.
ffmpeg doesn't seem to support these formats
Quoted 4 lines
If your sensor is hooked up to the OMAP3 ISP, you can then configure the pipeline to include the preview engine and the resizer, and capture YUV data at the resizer output.
I am using the OMAP3 ISP, but it's a bit unclear to me how to set up the pipeline using media-ctl (I looked for documentation on this tool, but came up dry - is there any?)
Do you have an example of how to configure this using the OMAP3 ISP?
Quoted 6 lines
Quoted 2 lines
* Can I zoom/crop with this driver using the MCF? If so, how?
That depends on what host/bridge you use. The OMAP3 ISP has scaling capabilities (controller by the crop rectangle at the resizer input and the format at the resizer output), others might not.
Thanks
Signature · 4 lines
------------------------------------------------------------ Gary Thomas | Consulting for the MLB Associates | Embedded world ------------------------------------------------------------
Quoted 19 lines · Gary Thomas
Quoted 9 lines · Laurent Pinchart
Hi Gary,
Quoted 5 lines · On Tuesday 01 November 2011 19:52:49 Gary Thomas wrote:
I'm trying to use the MT9P031 digital sensor with the Media Controller Framework. media-ctl tells me that the sensor is set to capture using SGRBG12 2592x1944
Quoted 5 lines
Quoted 2 lines
Questions:
* What pixel format in ffmpeg does this correspond to?I don't know if ffmpeg supports Bayer formats. The corresponding fourcc in V4L2 is BA12.
ffmpeg doesn't seem to support these formats
Quoted 1 line
Quoted 7 lines
Quoted 4 lines
If your sensor is hooked up to the OMAP3 ISP, you can then configure the pipeline to include the preview engine and the resizer, and capture YUV data
at the resizer output.I am using the OMAP3 ISP, but it's a bit unclear to me how to set up the pipeline
Hi Gary,
I'm also using another sensor mtv9034 with OMAP3 ISP, so maybe I can help you.
Quoted 5 lines
using media-ctl (I looked for documentation on this tool, but came up dry - is there any?)
Do you have an example of how to configure this using the OMAP3 ISP?
This is how I configure the pipeline to connect the CCDC with the Previewer and Resizer:
./media-ctl -l '"mt9v032 3-005c":0->"OMAP3 ISP CCDC":0[1]' ./media-ctl -l '"OMAP3 ISP CCDC":2->"OMAP3 ISP preview":0[1]' ./media-ctl -l '"OMAP3 ISP preview":1->"OMAP3 ISP resizer":0[1]' ./media-ctl -l '"OMAP3 ISP resizer":1->"OMAP3 ISP resizer output":0[1]' ./media-ctl -f '"mt9v032 3-005c":0[SGRBG10 752x480]'
./media-ctl -f '"OMAP3 ISP CCDC":0 [SGRBG10 752x480]' ./media-ctl -f '"OMAP3 ISP CCDC":1 [SGRBG10 752x480]' ./media-ctl -f '"OMAP3 ISP preview":0 [SGRBG10 752x479]' ./media-ctl -f '"OMAP3 ISP resizer":0 [YUYV 734x471]' ./media-ctl -f '"OMAP3 ISP resizer":1 [YUYV 640x480]'
Hope it helps,
Signature · 3 lines
Javier Martínez Canillas (+34) 682 39 81 69 Barcelona, Spain
Hi Javier,
Quoted 25 lines · On Tuesday 08 November 2011 13:30:08 Javier Martinez Canillas wrote:
Quoted 12 lines · Gary Thomas
Quoted 10 lines · Laurent Pinchart
Quoted 6 lines · On Tuesday 01 November 2011 19:52:49 Gary Thomas wrote:
I'm trying to use the MT9P031 digital sensor with the Media Controller Framework. media-ctl tells me that the sensor is set to capture using SGRBG12 2592x1944
Questions:
* What pixel format in ffmpeg does this correspond to?I don't know if ffmpeg supports Bayer formats. The corresponding fourcc in V4L2 is BA12.
Quoted 8 lines
ffmpeg doesn't seem to support these formats
Quoted 3 lines
If your sensor is hooked up to the OMAP3 ISP, you can then configure the pipeline to include the preview engine and the resizer, and capture YUV data at the resizer output.
I am using the OMAP3 ISP, but it's a bit unclear to me how to set up the pipeline
I'm also using another sensor mtv9034 with OMAP3 ISP, so maybe I can help you.
Quoted 7 lines
Quoted 4 lines
using media-ctl (I looked for documentation on this tool, but came up dry
- is there any?)Do you have an example of how to configure this using the OMAP3 ISP?
This is how I configure the pipeline to connect the CCDC with the Previewer and Resizer:
Thanks for the instructions. I would add that you should start with
media-ctl -r
to reset all links to the disabled state. This will make sure the below link setup commands start with a consistent device state.
Quoted 12 lines
./media-ctl -l '"mt9v032 3-005c":0->"OMAP3 ISP CCDC":0[1]' ./media-ctl -l '"OMAP3 ISP CCDC":2->"OMAP3 ISP preview":0[1]' ./media-ctl -l '"OMAP3 ISP preview":1->"OMAP3 ISP resizer":0[1]' ./media-ctl -l '"OMAP3 ISP resizer":1->"OMAP3 ISP resizer output":0[1]' ./media-ctl -f '"mt9v032 3-005c":0[SGRBG10 752x480]'
./media-ctl -f '"OMAP3 ISP CCDC":0 [SGRBG10 752x480]' ./media-ctl -f '"OMAP3 ISP CCDC":1 [SGRBG10 752x480]' ./media-ctl -f '"OMAP3 ISP preview":0 [SGRBG10 752x479]' ./media-ctl -f '"OMAP3 ISP resizer":0 [YUYV 734x471]' ./media-ctl -f '"OMAP3 ISP resizer":1 [YUYV 640x480]'Hope it helps,
Signature · 3 lines
Regards, Laurent Pinchart
Quoted 46 lines · Javier Martinez Canillas
Quoted 19 lines · Gary Thomas
Quoted 9 lines · Laurent Pinchart
Hi Gary,
Quoted 5 lines · On Tuesday 01 November 2011 19:52:49 Gary Thomas wrote:
I'm trying to use the MT9P031 digital sensor with the Media Controller Framework. media-ctl tells me that the sensor is set to capture using SGRBG12 2592x1944
Quoted 5 lines
Quoted 2 lines
Questions:
* What pixel format in ffmpeg does this correspond to?I don't know if ffmpeg supports Bayer formats. The corresponding fourcc in V4L2 is BA12.
ffmpeg doesn't seem to support these formats
Quoted 1 line
Quoted 7 lines
Quoted 4 lines
If your sensor is hooked up to the OMAP3 ISP, you can then configure the pipeline to include the preview engine and the resizer, and capture YUV data
at the resizer output.I am using the OMAP3 ISP, but it's a bit unclear to me how to set up the pipeline
Hi Gary,
I'm also using another sensor mtv9034 with OMAP3 ISP, so maybe I can help you.
Quoted 5 lines
using media-ctl (I looked for documentation on this tool, but came up dry - is there any?)
Do you have an example of how to configure this using the OMAP3 ISP?
This is how I configure the pipeline to connect the CCDC with the Previewer and Resizer:
./media-ctl -l '"mt9v032 3-005c":0->"OMAP3 ISP CCDC":0[1]' ./media-ctl -l '"OMAP3 ISP CCDC":2->"OMAP3 ISP preview":0[1]' ./media-ctl -l '"OMAP3 ISP preview":1->"OMAP3 ISP resizer":0[1]' ./media-ctl -l '"OMAP3 ISP resizer":1->"OMAP3 ISP resizer output":0[1]' ./media-ctl -f '"mt9v032 3-005c":0[SGRBG10 752x480]'
Quoted 8 lines
./media-ctl -f '"OMAP3 ISP CCDC":0 [SGRBG10 752x480]' ./media-ctl -f '"OMAP3 ISP CCDC":1 [SGRBG10 752x480]' ./media-ctl -f '"OMAP3 ISP preview":0 [SGRBG10 752x479]' ./media-ctl -f '"OMAP3 ISP resizer":0 [YUYV 734x471]' ./media-ctl -f '"OMAP3 ISP resizer":1 [YUYV 640x480]'Hope it helps,
Thanks, I'll give this a try.
I assume that your sensor is probably larger than 752x480 (the mt9p031 is 2592x1944 raw) and that setting the smaller frame size enables some scaling and/or cropping in the driver?
Signature · 4 lines
------------------------------------------------------------ Gary Thomas | Consulting for the MLB Associates | Embedded world ------------------------------------------------------------
Hi Gary,
Quoted 48 lines · On Tuesday 08 November 2011 13:52:25 Gary Thomas wrote:
Quoted 47 lines · Javier Martinez Canillas
Quoted 14 lines · Gary Thomas
Quoted 10 lines · Laurent Pinchart
Quoted 6 lines · On Tuesday 01 November 2011 19:52:49 Gary Thomas wrote:
I'm trying to use the MT9P031 digital sensor with the Media Controller Framework. media-ctl tells me that the sensor is set to capture using SGRBG12 2592x1944
Questions:
* What pixel format in ffmpeg does this correspond to?I don't know if ffmpeg supports Bayer formats. The corresponding fourcc in V4L2 is BA12.
ffmpeg doesn't seem to support these formats
Quoted 7 lines
Quoted 4 lines
If your sensor is hooked up to the OMAP3 ISP, you can then configure the pipeline to include the preview engine and the resizer, and capture YUV data
at the resizer output.I am using the OMAP3 ISP, but it's a bit unclear to me how to set up the pipeline
Hi Gary,
I'm also using another sensor mtv9034 with OMAP3 ISP, so maybe I can help you.
Quoted 4 lines
using media-ctl (I looked for documentation on this tool, but came up dry - is there any?)
Do you have an example of how to configure this using the OMAP3 ISP?
This is how I configure the pipeline to connect the CCDC with the Previewer and Resizer:
./media-ctl -l '"mt9v032 3-005c":0->"OMAP3 ISP CCDC":0[1]' ./media-ctl -l '"OMAP3 ISP CCDC":2->"OMAP3 ISP preview":0[1]' ./media-ctl -l '"OMAP3 ISP preview":1->"OMAP3 ISP resizer":0[1]' ./media-ctl -l '"OMAP3 ISP resizer":1->"OMAP3 ISP resizer output":0[1]' ./media-ctl -f '"mt9v032 3-005c":0[SGRBG10 752x480]'
./media-ctl -f '"OMAP3 ISP CCDC":0 [SGRBG10 752x480]' ./media-ctl -f '"OMAP3 ISP CCDC":1 [SGRBG10 752x480]' ./media-ctl -f '"OMAP3 ISP preview":0 [SGRBG10 752x479]' ./media-ctl -f '"OMAP3 ISP resizer":0 [YUYV 734x471]' ./media-ctl -f '"OMAP3 ISP resizer":1 [YUYV 640x480]'
Quoted 7 lines
Quoted 1 line
Hope it helps,
Thanks, I'll give this a try.
I assume that your sensor is probably larger than 752x480 (the mt9p031 is 2592x1944 raw) and that setting the smaller frame size enables some scaling and/or cropping in the driver?
The mt9v034 is a wide VGA 752x480 sensor if I'm not mistaken. You should modify the resolutions in the above commands according to your sensor. Note that the CCDC crops online line when outputting data to the preview engine, and that the preview engine crops 18 columsn and 8 lines. You can then scale the image by modifying the resizer output size.
Signature · 3 lines
Regards, Laurent Pinchart
Quoted 59 lines · Laurent Pinchart
Hi Gary,
Quoted 48 lines · On Tuesday 08 November 2011 13:52:25 Gary Thomas wrote:
Quoted 47 lines · Javier Martinez Canillas
Quoted 14 lines · Gary Thomas
Quoted 10 lines · Laurent Pinchart
Quoted 6 lines · On Tuesday 01 November 2011 19:52:49 Gary Thomas wrote:
I'm trying to use the MT9P031 digital sensor with the Media Controller Framework. media-ctl tells me that the sensor is set to capture using SGRBG12 2592x1944
Questions:
* What pixel format in ffmpeg does this correspond to?I don't know if ffmpeg supports Bayer formats. The corresponding fourcc in V4L2 is BA12.
ffmpeg doesn't seem to support these formats
Quoted 7 lines
Quoted 4 lines
If your sensor is hooked up to the OMAP3 ISP, you can then configure the pipeline to include the preview engine and the resizer, and capture YUV data
at the resizer output.I am using the OMAP3 ISP, but it's a bit unclear to me how to set up the pipeline
Hi Gary,
I'm also using another sensor mtv9034 with OMAP3 ISP, so maybe I can help you.
Quoted 4 lines
using media-ctl (I looked for documentation on this tool, but came up dry - is there any?)
Do you have an example of how to configure this using the OMAP3 ISP?
This is how I configure the pipeline to connect the CCDC with the Previewer and Resizer:
./media-ctl -l '"mt9v032 3-005c":0->"OMAP3 ISP CCDC":0[1]' ./media-ctl -l '"OMAP3 ISP CCDC":2->"OMAP3 ISP preview":0[1]' ./media-ctl -l '"OMAP3 ISP preview":1->"OMAP3 ISP resizer":0[1]' ./media-ctl -l '"OMAP3 ISP resizer":1->"OMAP3 ISP resizer output":0[1]' ./media-ctl -f '"mt9v032 3-005c":0[SGRBG10 752x480]'
./media-ctl -f '"OMAP3 ISP CCDC":0 [SGRBG10 752x480]' ./media-ctl -f '"OMAP3 ISP CCDC":1 [SGRBG10 752x480]' ./media-ctl -f '"OMAP3 ISP preview":0 [SGRBG10 752x479]' ./media-ctl -f '"OMAP3 ISP resizer":0 [YUYV 734x471]' ./media-ctl -f '"OMAP3 ISP resizer":1 [YUYV 640x480]'Quoted 7 lines
Quoted 1 line
Hope it helps,
Thanks, I'll give this a try.
I assume that your sensor is probably larger than 752x480 (the mt9p031 is 2592x1944 raw) and that setting the smaller frame size enables some scaling and/or cropping in the driver?
Quoted 5 lines
The mt9v034 is a wide VGA 752x480 sensor if I'm not mistaken. You should modify the resolutions in the above commands according to your sensor. Note that the CCDC crops online line when outputting data to the preview engine, and that the preview engine crops 18 columsn and 8 lines. You can then scale the image by modifying the resizer output size.
Thanks. After much trial and error (and some kernel printks to understand what parameters were failing), I came up with this sequence:
media-ctl -r
media-ctl -l '"mt9p031 3-005d":0->"OMAP3 ISP CCDC":0[1]' media-ctl -l '"OMAP3 ISP CCDC":2->"OMAP3 ISP preview":0[1]' media-ctl -l '"OMAP3 ISP preview":1->"OMAP3 ISP resizer":0[1]' media-ctl -l '"OMAP3 ISP resizer":1->"OMAP3 ISP resizer output":0[1]' media-ctl -f '"mt9p031 3-005d":0[SGRBG12 2592x1944]'
media-ctl -f '"OMAP3 ISP CCDC":0 [SGRBG12 2592x1944]' media-ctl -f '"OMAP3 ISP CCDC":1 [SGRBG12 2592x1944]' media-ctl -f '"OMAP3 ISP preview":0 [SGRBG12 2592x1943]' media-ctl -f '"OMAP3 ISP resizer":0 [YUYV 2574x1935]' media-ctl -f '"OMAP3 ISP resizer":1 [YUYV 642x483]'
When I tried to grab though, I got this:
# yavta --capture=4 -f YUYV -s 642x483 -F /dev/video6 Device /dev/video6 opened. Device `OMAP3 ISP resizer output' on `media' is a video capture device. Video format set: YUYV (56595559) 642x483 buffer size 633696 Video format: YUYV (56595559) 642x483 buffer size 633696 8 buffers requested. length: 633696 offset: 0 Buffer 0 mapped at address 0x4028c000. length: 633696 offset: 634880 Buffer 1 mapped at address 0x403d0000. length: 633696 offset: 1269760 Buffer 2 mapped at address 0x404b3000. length: 633696 offset: 1904640 Buffer 3 mapped at address 0x4062b000. length: 633696 offset: 2539520 Buffer 4 mapped at address 0x406d6000. length: 633696 offset: 3174400 Buffer 5 mapped at address 0x40821000. length: 633696 offset: 3809280 Buffer 6 mapped at address 0x4097c000. length: 633696 offset: 4444160 Buffer 7 mapped at address 0x40adf000.
Unable to handle kernel NULL pointer dereference at virtual address 00000018 pgd = c0004000 [00000018] *pgd=00000000 Internal error: Oops: 17 [#1] Modules linked in: sdmak lpm_omap3530 dsplinkk cmemk ipv6 CPU: 0 Not tainted (3.0.0 #3) PC is at ccdc_hs_vs_isr+0x28/0x40 LR is at 0x0 pc : [<c0251ae0>] lr : [<00000000>] psr: 60000193
sp : c0433e70 ip : 00000000 fp : 00000001
r10: 00000001 r9 : c0470524 r8 : 00000001
r7 : 00000080 r6 : 00000000 r5 : 00000000 r4 : cee45b88 r3 : 00000004 r2 : 00000000 r1 : 00000000 r0 : cee45c28
Flags: nZCv IRQs off FIQs on Mode SVC_32 ISA ARM Segment kernel
Control: 10c5387d Table: 8e4d8019 DAC: 00000015
Process swapper (pid: 0, stack limit = 0xc04322f0)
Stack: (0xc0433e70 to 0xc0434000)
3e60: 00000004 00000000 00000000 00000000
3e80: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 3ea0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 3ec0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 3ee0: 00000000 00000000 00000000 00000000 80000000 cee45b88 80000000 c0252d88 3f00: cee40000 80000000 00000000 00000080 00000001 c024a424 cee2ff80 00000018 3f20: c04476e8 c0089bd8 c04476e8 ced051c0 00004c00 c04476e8 00000000 c0468d44 3f40: c0437154 80004059 413fc082 00000000 00000000 c0089d40 c04476e8 c008b7f4 3f60: 00000018 c00896c4 0000019a c0033060 60000013 ffffffff fa200000 c003caf4 3f80: 00000001 c0446be0 0039acad 60000013 c0432000 c043715c c0468d44 c0437154 3fa0: 80004059 413fc082 00000000 00000000 00000000 c0433fc8 c003dfec c003dff0 3fc0: 60000013 ffffffff c043415c c0029e24 c0682980 c0008a04 c0008488 00000a7d 3fe0: 80000100 c0029e24 10c53c7d c0434080 c0029e20 8000803c 00000000 00000000 [<c0251ae0>] (ccdc_hs_vs_isr+0x28/0x40) from [<c0252d88>] (omap3isp_ccdc_isr+0x2c4/0x2d8) [<c0252d88>] (omap3isp_ccdc_isr+0x2c4/0x2d8) from [<c024a424>] (isp_isr+0x19c/0x230) [<c024a424>] (isp_isr+0x19c/0x230) from [<c0089bd8>] (handle_irq_event_percpu+0x30/0x170) [<c0089bd8>] (handle_irq_event_percpu+0x30/0x170) from [<c0089d40>] (handle_irq_event+0x28/0x38) [<c0089d40>] (handle_irq_event+0x28/0x38) from [<c008b7f4>] (handle_level_irq+0xac/0xd4) [<c008b7f4>] (handle_level_irq+0xac/0xd4) from [<c00896c4>] (generic_handle_irq+0x30/0x44) [<c00896c4>] (generic_handle_irq+0x30/0x44) from [<c0033060>] (asm_do_IRQ+0x60/0x84) [<c0033060>] (asm_do_IRQ+0x60/0x84) from [<c003caf4>] (__irq_svc+0x34/0x80)
Exception stack(0xc0433f80 to 0xc0433fc8)
3f80: 00000001 c0446be0 0039acad 60000013 c0432000 c043715c c0468d44 c0437154 3fa0: 80004059 413fc082 00000000 00000000 00000000 c0433fc8 c003dfec c003dff0 3fc0: 60000013 ffffffff
[<c003caf4>] (__irq_svc+0x34/0x80) from [<c003dff0>] (cpu_idle+0x4c/0x88) [<c003dff0>] (cpu_idle+0x4c/0x88) from [<c0008a04>] (start_kernel+0x26c/0x2c0) [<c0008a04>] (start_kernel+0x26c/0x2c0) from [<8000803c>] (0x8000803c)
Code: ebfce5a2 e3a03004 e58d3000 e28400a0 (e5953018) ---[ end trace bd263f5099189d04 ]---
Any ideas of where to look?
Signature · 4 lines
------------------------------------------------------------ Gary Thomas | Consulting for the MLB Associates | Embedded world ------------------------------------------------------------
Quoted 150 lines · Gary Thomas
Quoted 59 lines · Laurent Pinchart
Hi Gary,
Quoted 48 lines · On Tuesday 08 November 2011 13:52:25 Gary Thomas wrote:
Quoted 47 lines · Javier Martinez Canillas
Quoted 14 lines · Gary Thomas
Quoted 10 lines · Laurent Pinchart
Quoted 6 lines · On Tuesday 01 November 2011 19:52:49 Gary Thomas wrote:
I'm trying to use the MT9P031 digital sensor with the Media Controller Framework. media-ctl tells me that the sensor is set to capture using SGRBG12 2592x1944
Questions:
* What pixel format in ffmpeg does this correspond to?I don't know if ffmpeg supports Bayer formats. The corresponding fourcc in V4L2 is BA12.
ffmpeg doesn't seem to support these formats
Quoted 7 lines
Quoted 4 lines
If your sensor is hooked up to the OMAP3 ISP, you can then configure the pipeline to include the preview engine and the resizer, and capture YUV data
at the resizer output.I am using the OMAP3 ISP, but it's a bit unclear to me how to set up the pipeline
Hi Gary,
I'm also using another sensor mtv9034 with OMAP3 ISP, so maybe I can help you.
Quoted 4 lines
using media-ctl (I looked for documentation on this tool, but came up dry - is there any?)
Do you have an example of how to configure this using the OMAP3 ISP?
This is how I configure the pipeline to connect the CCDC with the Previewer and Resizer:
./media-ctl -l '"mt9v032 3-005c":0->"OMAP3 ISP CCDC":0[1]' ./media-ctl -l '"OMAP3 ISP CCDC":2->"OMAP3 ISP preview":0[1]' ./media-ctl -l '"OMAP3 ISP preview":1->"OMAP3 ISP resizer":0[1]' ./media-ctl -l '"OMAP3 ISP resizer":1->"OMAP3 ISP resizer output":0[1]' ./media-ctl -f '"mt9v032 3-005c":0[SGRBG10 752x480]' ./media-ctl -f '"OMAP3 ISP CCDC":0 [SGRBG10 752x480]' ./media-ctl -f '"OMAP3 ISP CCDC":1 [SGRBG10 752x480]' ./media-ctl -f '"OMAP3 ISP preview":0 [SGRBG10 752x479]' ./media-ctl -f '"OMAP3 ISP resizer":0 [YUYV 734x471]' ./media-ctl -f '"OMAP3 ISP resizer":1 [YUYV 640x480]'
Quoted 7 lines
Quoted 1 line
Hope it helps,
Thanks, I'll give this a try.
I assume that your sensor is probably larger than 752x480 (the mt9p031 is 2592x1944 raw) and that setting the smaller frame size enables some scaling and/or cropping in the driver?
Quoted 5 lines
The mt9v034 is a wide VGA 752x480 sensor if I'm not mistaken. You should modify the resolutions in the above commands according to your sensor. Note that the CCDC crops online line when outputting data to the preview engine, and that the preview engine crops 18 columsn and 8 lines. You can then scale the image by modifying the resizer output size.
Thanks. After much trial and error (and some kernel printks to understand what parameters were failing), I came up with this sequence:
media-ctl -r
media-ctl -l '"mt9p031 3-005d":0->"OMAP3 ISP CCDC":0[1]' media-ctl -l '"OMAP3 ISP CCDC":2->"OMAP3 ISP preview":0[1]' media-ctl -l '"OMAP3 ISP preview":1->"OMAP3 ISP resizer":0[1]' media-ctl -l '"OMAP3 ISP resizer":1->"OMAP3 ISP resizer output":0[1]' media-ctl -f '"mt9p031 3-005d":0[SGRBG12 2592x1944]' media-ctl -f '"OMAP3 ISP CCDC":0 [SGRBG12 2592x1944]' media-ctl -f '"OMAP3 ISP CCDC":1 [SGRBG12 2592x1944]' media-ctl -f '"OMAP3 ISP preview":0 [SGRBG12 2592x1943]' media-ctl -f '"OMAP3 ISP resizer":0 [YUYV 2574x1935]' media-ctl -f '"OMAP3 ISP resizer":1 [YUYV 642x483]'When I tried to grab though, I got this:
# yavta --capture=4 -f YUYV -s 642x483 -F /dev/video6 Device /dev/video6 opened. Device `OMAP3 ISP resizer output' on `media' is a video capture device. Video format set: YUYV (56595559) 642x483 buffer size 633696 Video format: YUYV (56595559) 642x483 buffer size 633696 8 buffers requested. length: 633696 offset: 0 Buffer 0 mapped at address 0x4028c000. length: 633696 offset: 634880 Buffer 1 mapped at address 0x403d0000. length: 633696 offset: 1269760 Buffer 2 mapped at address 0x404b3000. length: 633696 offset: 1904640 Buffer 3 mapped at address 0x4062b000. length: 633696 offset: 2539520 Buffer 4 mapped at address 0x406d6000. length: 633696 offset: 3174400 Buffer 5 mapped at address 0x40821000. length: 633696 offset: 3809280 Buffer 6 mapped at address 0x4097c000. length: 633696 offset: 4444160 Buffer 7 mapped at address 0x40adf000.Unable to handle kernel NULL pointer dereference at virtual address 00000018 pgd = c0004000 [00000018] *pgd=00000000 Internal error: Oops: 17 [#1] Modules linked in: sdmak lpm_omap3530 dsplinkk cmemk ipv6 CPU: 0 Not tainted (3.0.0 #3) PC is at ccdc_hs_vs_isr+0x28/0x40 LR is at 0x0 pc : [<c0251ae0>] lr : [<00000000>] psr: 60000193sp :
c0433e70ip : 00000000 fp : 00000001
r10: 00000001 r9 :c0470524r8 : 00000001
r7 : 00000080 r6 : 00000000 r5 : 00000000 r4 :cee45b88r3 : 00000004 r2 : 00000000 r1 : 00000000 r0 :cee45c28
Flags: nZCv IRQs off FIQs on ModeSVC_32ISA ARM Segment kernel
Control:10c5387dTable:8e4d8019DAC: 00000015 Process swapper (pid: 0, stack limit =0xc04322f0)Stack: (0xc0433e70 to 0xc0434000)3e60: 00000004 00000000 00000000 00000000
3e80: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 3ea0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 3ec0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 3ee0: 00000000 00000000 00000000 00000000 80000000cee45b8880000000c0252d883f00:cee4000080000000 00000000 00000080 00000001c024a424cee2ff8000000018 3f20:c04476e8c0089bd8c04476e8ced051c000004c00c04476e800000000c0468d443f40:c043715480004059413fc08200000000 00000000c0089d40c04476e8c008b7f43f60: 00000018c00896c40000019ac003306060000013 fffffffffa200000c003caf43f80: 00000001c0446be00039acad60000013c0432000c043715cc0468d44c04371543fa0: 80004059413fc08200000000 00000000 00000000c0433fc8c003dfecc003dff03fc0: 60000013 ffffffffc043415cc0029e24c0682980c0008a04c000848800000a7d3fe0: 80000100c0029e2410c53c7dc0434080c0029e208000803c00000000 00000000 [<c0251ae0>] (ccdc_hs_vs_isr+0x28/0x40) from [<c0252d88>] (omap3isp_ccdc_isr+0x2c4/0x2d8) [<c0252d88>] (omap3isp_ccdc_isr+0x2c4/0x2d8) from [<c024a424>] (isp_isr+0x19c/0x230) [<c024a424>] (isp_isr+0x19c/0x230) from [<c0089bd8>] (handle_irq_event_percpu+0x30/0x170) [<c0089bd8>] (handle_irq_event_percpu+0x30/0x170) from [<c0089d40>] (handle_irq_event+0x28/0x38) [<c0089d40>] (handle_irq_event+0x28/0x38) from [<c008b7f4>] (handle_level_irq+0xac/0xd4) [<c008b7f4>] (handle_level_irq+0xac/0xd4) from [<c00896c4>] (generic_handle_irq+0x30/0x44) [<c00896c4>] (generic_handle_irq+0x30/0x44) from [<c0033060>] (asm_do_IRQ+0x60/0x84) [<c0033060>] (asm_do_IRQ+0x60/0x84) from [<c003caf4>] (__irq_svc+0x34/0x80)Exception stack(0xc0433f80 to 0xc0433fc8)3f80: 00000001
c0446be00039acad60000013c0432000c043715cc0468d44c04371543fa0: 80004059413fc08200000000 00000000 00000000c0433fc8c003dfecc003dff03fc0: 60000013 ffffffff
[<c003caf4>] (__irq_svc+0x34/0x80) from [<c003dff0>] (cpu_idle+0x4c/0x88) [<c003dff0>] (cpu_idle+0x4c/0x88) from [<c0008a04>] (start_kernel+0x26c/0x2c0) [<c0008a04>] (start_kernel+0x26c/0x2c0) from [<8000803c>] (0x8000803c)
Quoted 5 lines
Code: ebfce5a2 e3a03004 e58d3000 e28400a0 (e5953018) ---[ end trace bd263f5099189d04 ]---Any ideas of where to look?
Note: I was able to grab the raw SGRBG12 data using yavta, I only get the failure when I run it through the CCDC->previewer->resizer
Signature · 4 lines
------------------------------------------------------------ Gary Thomas | Consulting for the MLB Associates | Embedded world ------------------------------------------------------------
Hi Gary,
Quoted 103 lines · On Tuesday 08 November 2011 14:38:55 Gary Thomas wrote:
Quoted 57 lines · Laurent Pinchart
Quoted 48 lines · On Tuesday 08 November 2011 13:52:25 Gary Thomas wrote:
Quoted 47 lines · Javier Martinez Canillas
Quoted 14 lines · Gary Thomas
Quoted 10 lines · Laurent Pinchart
Quoted 6 lines · On Tuesday 01 November 2011 19:52:49 Gary Thomas wrote:
I'm trying to use the MT9P031 digital sensor with the Media Controller Framework. media-ctl tells me that the sensor is set to capture using SGRBG12 2592x1944
Questions:
* What pixel format in ffmpeg does this correspond to?I don't know if ffmpeg supports Bayer formats. The corresponding fourcc in V4L2 is BA12.
ffmpeg doesn't seem to support these formats
Quoted 7 lines
Quoted 4 lines
If your sensor is hooked up to the OMAP3 ISP, you can then configure the pipeline to include the preview engine and the resizer, and capture YUV data
at the resizer output.I am using the OMAP3 ISP, but it's a bit unclear to me how to set up the pipeline
Hi Gary,
I'm also using another sensor mtv9034 with OMAP3 ISP, so maybe I can help you.
Quoted 4 lines
using media-ctl (I looked for documentation on this tool, but came up dry - is there any?)
Do you have an example of how to configure this using the OMAP3 ISP?
This is how I configure the pipeline to connect the CCDC with the Previewer and Resizer:
./media-ctl -l '"mt9v032 3-005c":0->"OMAP3 ISP CCDC":0[1]' ./media-ctl -l '"OMAP3 ISP CCDC":2->"OMAP3 ISP preview":0[1]' ./media-ctl -l '"OMAP3 ISP preview":1->"OMAP3 ISP resizer":0[1]' ./media-ctl -l '"OMAP3 ISP resizer":1->"OMAP3 ISP resizer output":0[1]' ./media-ctl -f '"mt9v032 3-005c":0[SGRBG10 752x480]'
./media-ctl -f '"OMAP3 ISP CCDC":0 [SGRBG10 752x480]' ./media-ctl -f '"OMAP3 ISP CCDC":1 [SGRBG10 752x480]' ./media-ctl -f '"OMAP3 ISP preview":0 [SGRBG10 752x479]' ./media-ctl -f '"OMAP3 ISP resizer":0 [YUYV 734x471]' ./media-ctl -f '"OMAP3 ISP resizer":1 [YUYV 640x480]'Quoted 7 lines
Quoted 1 line
Hope it helps,
Thanks, I'll give this a try.
I assume that your sensor is probably larger than 752x480 (the mt9p031 is 2592x1944 raw) and that setting the smaller frame size enables some scaling and/or cropping in the driver?
Quoted 5 lines
The mt9v034 is a wide VGA 752x480 sensor if I'm not mistaken. You should modify the resolutions in the above commands according to your sensor. Note that the CCDC crops online line when outputting data to the preview engine, and that the preview engine crops 18 columsn and 8 lines. You can then scale the image by modifying the resizer output size.
Thanks. After much trial and error (and some kernel printks to understand what parameters were failing), I came up with this sequence:
media-ctl -r media-ctl -l '"mt9p031 3-005d":0->"OMAP3 ISP CCDC":0[1]' media-ctl -l '"OMAP3 ISP CCDC":2->"OMAP3 ISP preview":0[1]' media-ctl -l '"OMAP3 ISP preview":1->"OMAP3 ISP resizer":0[1]' media-ctl -l '"OMAP3 ISP resizer":1->"OMAP3 ISP resizer output":0[1]' media-ctl -f '"mt9p031 3-005d":0[SGRBG12 2592x1944]' media-ctl -f '"OMAP3 ISP CCDC":0 [SGRBG12 2592x1944]' media-ctl -f '"OMAP3 ISP CCDC":1 [SGRBG12 2592x1944]' media-ctl -f '"OMAP3 ISP preview":0 [SGRBG12 2592x1943]' media-ctl -f '"OMAP3 ISP resizer":0 [YUYV 2574x1935]' media-ctl -f '"OMAP3 ISP resizer":1 [YUYV 642x483]'When I tried to grab though, I got this:
# yavta --capture=4 -f YUYV -s 642x483 -F /dev/video6 Device /dev/video6 opened. Device `OMAP3 ISP resizer output' on `media' is a video capture device. Video format set: YUYV (56595559) 642x483 buffer size 633696 Video format: YUYV (56595559) 642x483 buffer size 633696 8 buffers requested. length: 633696 offset: 0 Buffer 0 mapped at address 0x4028c000. length: 633696 offset: 634880 Buffer 1 mapped at address 0x403d0000. length: 633696 offset: 1269760 Buffer 2 mapped at address 0x404b3000. length: 633696 offset: 1904640 Buffer 3 mapped at address 0x4062b000. length: 633696 offset: 2539520 Buffer 4 mapped at address 0x406d6000. length: 633696 offset: 3174400 Buffer 5 mapped at address 0x40821000. length: 633696 offset: 3809280 Buffer 6 mapped at address 0x4097c000. length: 633696 offset: 4444160 Buffer 7 mapped at address 0x40adf000.
Quoted 2 lines
Unable to handle kernel NULL pointer dereference at virtual address00000018
Ouch :-(
Could you please verify that arch/arm/mach-omap2/board-overo.c includes the following code, and that CONFIG_OMAP_MUX is enabled ?
@@ -497,6 +558,23 @@ static const struct usbhs_omap_board_data usbhs_bdata __initconst = {
#ifdef CONFIG_OMAP_MUX
static struct omap_board_mux board_mux[] __initdata = {
+ /*
+ * Camera + * + * The level shifters used on the Caspa camera module have a 4k output + * impedance. Combined with the 100uA pull-up resistors in the OMAP3, + * this raises the ground level to 400mV. Adding crosstalk between the + * pixel clock and the HS/VS signals on the flat cable (a ground line in + * between would have been nice), logic 0 levels can raise up to 650mV. + * This exceeds the camera input pins VIL maximum voltage. + * + * To work around the issue, disable pull-ups on the PCLK, HS and VS + * signals. + */ + OMAP3_MUX(CAM_PCLK, OMAP_MUX_MODE0 | OMAP_PIN_INPUT), + OMAP3_MUX(CAM_HS, OMAP_MUX_MODE0 | OMAP_PIN_INPUT), + OMAP3_MUX(CAM_VS, OMAP_MUX_MODE0 | OMAP_PIN_INPUT),
+
{ .reg_offset = OMAP_MUX_TERMINATOR },
};
#endif
Quoted 55 lines
pgd =
c0004000
[00000018] *pgd=00000000Internal error: Oops: 17 [#1] Modules linked in: sdmak lpm_omap3530 dsplinkk cmemk ipv6 CPU: 0 Not tainted (3.0.0 #3) PC is at ccdc_hs_vs_isr+0x28/0x40 LR is at 0x0 pc : [<c0251ae0>] lr : [<00000000>] psr: 60000193sp :
c0433e70ip : 00000000 fp : 00000001
r10: 00000001 r9 :c0470524r8 : 00000001
r7 : 00000080 r6 : 00000000 r5 : 00000000 r4 :cee45b88r3 : 00000004 r2 : 00000000 r1 : 00000000 r0 :cee45c28
Flags: nZCv IRQs off FIQs on ModeSVC_32ISA ARM Segment kernel
Control:10c5387dTable:8e4d8019DAC: 00000015
Process swapper (pid: 0, stack limit =0xc04322f0)Stack: (0xc0433e70 to 0xc0434000)3e60: 00000004 00000000 00000000
00000000 3e80: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 3ea0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 3ec0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 3ee0: 00000000 00000000 00000000 00000000 80000000cee45b8880000000c0252d883f00:cee4000080000000 00000000 00000080 00000001c024a424cee2ff8000000018 3f20:c04476e8c0089bd8c04476e8ced051c000004c00c04476e800000000c0468d443f40:c043715480004059413fc08200000000 00000000c0089d40c04476e8c008b7f43f60: 00000018c00896c40000019ac003306060000013 fffffffffa200000c003caf43f80: 00000001c0446be00039acad60000013c0432000c043715cc0468d44c04371543fa0: 80004059413fc08200000000 00000000 00000000c0433fc8c003dfecc003dff03fc0: 60000013 ffffffffc043415cc0029e24c0682980c0008a04c000848800000a7d3fe0: 80000100c0029e2410c53c7dc0434080c0029e208000803c00000000 00000000 [<c0251ae0>] (ccdc_hs_vs_isr+0x28/0x40) from [<c0252d88>] (omap3isp_ccdc_isr+0x2c4/0x2d8) [<c0252d88>] (omap3isp_ccdc_isr+0x2c4/0x2d8) from [<c024a424>] (isp_isr+0x19c/0x230) [<c024a424>] (isp_isr+0x19c/0x230) from [<c0089bd8>] (handle_irq_event_percpu+0x30/0x170) [<c0089bd8>] (handle_irq_event_percpu+0x30/0x170) from [<c0089d40>] (handle_irq_event+0x28/0x38) [<c0089d40>] (handle_irq_event+0x28/0x38) from [<c008b7f4>] (handle_level_irq+0xac/0xd4) [<c008b7f4>] (handle_level_irq+0xac/0xd4) from [<c00896c4>] (generic_handle_irq+0x30/0x44) [<c00896c4>] (generic_handle_irq+0x30/0x44) from [<c0033060>] (asm_do_IRQ+0x60/0x84) [<c0033060>] (asm_do_IRQ+0x60/0x84) from [<c003caf4>] (__irq_svc+0x34/0x80) Exception stack(0xc0433f80 to0xc0433fc8)
3f80: 00000001c0446be00039acad60000013c0432000c043715cc0468d44c04371543fa0: 80004059413fc08200000000 00000000 00000000c0433fc8c003dfecc003dff03fc0: 60000013 ffffffff
[<c003caf4>] (__irq_svc+0x34/0x80) from [<c003dff0>] (cpu_idle+0x4c/0x88) [<c003dff0>] (cpu_idle+0x4c/0x88) from [<c0008a04>] (start_kernel+0x26c/0x2c0) [<c0008a04>] (start_kernel+0x26c/0x2c0) from [<8000803c>] (0x8000803c) Code:ebfce5a2e3a03004e58d3000e28400a0(e5953018)---[ end trace bd263f5099189d04 ]---Any ideas of where to look?
Signature · 3 lines
Regards, Laurent Pinchart
Quoted 106 lines · Laurent Pinchart
Hi Gary,
Quoted 103 lines · On Tuesday 08 November 2011 14:38:55 Gary Thomas wrote:
Quoted 57 lines · Laurent Pinchart
Quoted 48 lines · On Tuesday 08 November 2011 13:52:25 Gary Thomas wrote:
Quoted 47 lines · Javier Martinez Canillas
Quoted 14 lines · Gary Thomas
Quoted 10 lines · Laurent Pinchart
Quoted 6 lines · On Tuesday 01 November 2011 19:52:49 Gary Thomas wrote:
I'm trying to use the MT9P031 digital sensor with the Media Controller Framework. media-ctl tells me that the sensor is set to capture using SGRBG12 2592x1944
Questions:
* What pixel format in ffmpeg does this correspond to?I don't know if ffmpeg supports Bayer formats. The corresponding fourcc in V4L2 is BA12.
ffmpeg doesn't seem to support these formats
Quoted 7 lines
Quoted 4 lines
If your sensor is hooked up to the OMAP3 ISP, you can then configure the pipeline to include the preview engine and the resizer, and capture YUV data
at the resizer output.I am using the OMAP3 ISP, but it's a bit unclear to me how to set up the pipeline
Hi Gary,
I'm also using another sensor mtv9034 with OMAP3 ISP, so maybe I can help you.
Quoted 4 lines
using media-ctl (I looked for documentation on this tool, but came up dry - is there any?)
Do you have an example of how to configure this using the OMAP3 ISP?
This is how I configure the pipeline to connect the CCDC with the Previewer and Resizer:
./media-ctl -l '"mt9v032 3-005c":0->"OMAP3 ISP CCDC":0[1]' ./media-ctl -l '"OMAP3 ISP CCDC":2->"OMAP3 ISP preview":0[1]' ./media-ctl -l '"OMAP3 ISP preview":1->"OMAP3 ISP resizer":0[1]' ./media-ctl -l '"OMAP3 ISP resizer":1->"OMAP3 ISP resizer output":0[1]' ./media-ctl -f '"mt9v032 3-005c":0[SGRBG10 752x480]'
./media-ctl -f '"OMAP3 ISP CCDC":0 [SGRBG10 752x480]' ./media-ctl -f '"OMAP3 ISP CCDC":1 [SGRBG10 752x480]' ./media-ctl -f '"OMAP3 ISP preview":0 [SGRBG10 752x479]' ./media-ctl -f '"OMAP3 ISP resizer":0 [YUYV 734x471]' ./media-ctl -f '"OMAP3 ISP resizer":1 [YUYV 640x480]'Quoted 7 lines
Quoted 1 line
Hope it helps,
Thanks, I'll give this a try.
I assume that your sensor is probably larger than 752x480 (the mt9p031 is 2592x1944 raw) and that setting the smaller frame size enables some scaling and/or cropping in the driver?
Quoted 5 lines
The mt9v034 is a wide VGA 752x480 sensor if I'm not mistaken. You should modify the resolutions in the above commands according to your sensor. Note that the CCDC crops online line when outputting data to the preview engine, and that the preview engine crops 18 columsn and 8 lines. You can then scale the image by modifying the resizer output size.
Thanks. After much trial and error (and some kernel printks to understand what parameters were failing), I came up with this sequence:
media-ctl -r media-ctl -l '"mt9p031 3-005d":0->"OMAP3 ISP CCDC":0[1]' media-ctl -l '"OMAP3 ISP CCDC":2->"OMAP3 ISP preview":0[1]' media-ctl -l '"OMAP3 ISP preview":1->"OMAP3 ISP resizer":0[1]' media-ctl -l '"OMAP3 ISP resizer":1->"OMAP3 ISP resizer output":0[1]' media-ctl -f '"mt9p031 3-005d":0[SGRBG12 2592x1944]' media-ctl -f '"OMAP3 ISP CCDC":0 [SGRBG12 2592x1944]' media-ctl -f '"OMAP3 ISP CCDC":1 [SGRBG12 2592x1944]' media-ctl -f '"OMAP3 ISP preview":0 [SGRBG12 2592x1943]' media-ctl -f '"OMAP3 ISP resizer":0 [YUYV 2574x1935]' media-ctl -f '"OMAP3 ISP resizer":1 [YUYV 642x483]'When I tried to grab though, I got this:
# yavta --capture=4 -f YUYV -s 642x483 -F /dev/video6 Device /dev/video6 opened. Device `OMAP3 ISP resizer output' on `media' is a video capture device. Video format set: YUYV (56595559) 642x483 buffer size 633696 Video format: YUYV (56595559) 642x483 buffer size 633696 8 buffers requested. length: 633696 offset: 0 Buffer 0 mapped at address 0x4028c000. length: 633696 offset: 634880 Buffer 1 mapped at address 0x403d0000. length: 633696 offset: 1269760 Buffer 2 mapped at address 0x404b3000. length: 633696 offset: 1904640 Buffer 3 mapped at address 0x4062b000. length: 633696 offset: 2539520 Buffer 4 mapped at address 0x406d6000. length: 633696 offset: 3174400 Buffer 5 mapped at address 0x40821000. length: 633696 offset: 3809280 Buffer 6 mapped at address 0x4097c000. length: 633696 offset: 4444160 Buffer 7 mapped at address 0x40adf000.
Quoted 7 lines
Quoted 2 lines
Unable to handle kernel NULL pointer dereference at virtual address00000018
Ouch :-(
Could you please verify that
arch/arm/mach-omap2/board-overo.cincludes the following code, and thatCONFIG_OMAP_MUXis enabled ?
I'm not using an Overo board - rather one of our own internal designs. I have verified that the pull up/down on those pins is disabled.
The failure is coming from this code in ispccdc.c
static void ccdc_hs_vs_isr(struct isp_ccdc_device *ccdc)
{
struct isp_pipeline *pipe =
to_isp_pipeline(&ccdc->video_out.video.entity);The value of pipe is NULL which leads to the failure.
Questions:
* I assume that getting HS/VS interrupts is correct in this mode?
* Why is the statement not written (as all others are)
struct isp_pipeline *pipe = to_isp_pipeline(&ccdc->subdev.entity);
I tried this change and the kernel doesn't crash.
I've found that I can get raw frames out of CCDC, but I don't get anything at all when the output continues through the preview and/or resize nodes.
Ideas?
Signature · 4 lines
------------------------------------------------------------ Gary Thomas | Consulting for the MLB Associates | Embedded world ------------------------------------------------------------
Hi Gary,
Quoted 110 lines · On Wednesday 09 November 2011 12:01:34 Gary Thomas wrote:
Quoted 109 lines · Laurent Pinchart
Quoted 107 lines · On Tuesday 08 November 2011 14:38:55 Gary Thomas wrote:
Quoted 57 lines · Laurent Pinchart
Quoted 48 lines · On Tuesday 08 November 2011 13:52:25 Gary Thomas wrote:
Quoted 47 lines · Javier Martinez Canillas
Quoted 14 lines · Gary Thomas
Quoted 10 lines · Laurent Pinchart
Quoted 6 lines · On Tuesday 01 November 2011 19:52:49 Gary Thomas wrote:
I'm trying to use the MT9P031 digital sensor with the Media Controller Framework. media-ctl tells me that the sensor is set to capture using SGRBG12 2592x1944
Questions:
* What pixel format in ffmpeg does this correspond to?I don't know if ffmpeg supports Bayer formats. The corresponding fourcc in V4L2 is BA12.
ffmpeg doesn't seem to support these formats
Quoted 7 lines
Quoted 4 lines
If your sensor is hooked up to the OMAP3 ISP, you can then configure the pipeline to include the preview engine and the resizer, and capture YUV data
at the resizer output.I am using the OMAP3 ISP, but it's a bit unclear to me how to set up the pipeline
Hi Gary,
I'm also using another sensor mtv9034 with OMAP3 ISP, so maybe I can help you.
Quoted 4 lines
using media-ctl (I looked for documentation on this tool, but came up dry - is there any?)
Do you have an example of how to configure this using the OMAP3 ISP?
This is how I configure the pipeline to connect the CCDC with the Previewer and Resizer:
./media-ctl -l '"mt9v032 3-005c":0->"OMAP3 ISP CCDC":0[1]' ./media-ctl -l '"OMAP3 ISP CCDC":2->"OMAP3 ISP preview":0[1]' ./media-ctl -l '"OMAP3 ISP preview":1->"OMAP3 ISP resizer":0[1]' ./media-ctl -l '"OMAP3 ISP resizer":1->"OMAP3 ISP resizer output":0[1]' ./media-ctl -f '"mt9v032 3-005c":0[SGRBG10 752x480]'
./media-ctl -f '"OMAP3 ISP CCDC":0 [SGRBG10 752x480]' ./media-ctl -f '"OMAP3 ISP CCDC":1 [SGRBG10 752x480]' ./media-ctl -f '"OMAP3 ISP preview":0 [SGRBG10 752x479]' ./media-ctl -f '"OMAP3 ISP resizer":0 [YUYV 734x471]' ./media-ctl -f '"OMAP3 ISP resizer":1 [YUYV 640x480]'Quoted 7 lines
Quoted 1 line
Hope it helps,
Thanks, I'll give this a try.
I assume that your sensor is probably larger than 752x480 (the mt9p031 is 2592x1944 raw) and that setting the smaller frame size enables some scaling and/or cropping in the driver?
Quoted 6 lines
The mt9v034 is a wide VGA 752x480 sensor if I'm not mistaken. You should modify the resolutions in the above commands according to your sensor. Note that the CCDC crops online line when outputting data to the preview engine, and that the preview engine crops 18 columsn and 8 lines. You can then scale the image by modifying the resizer output size.
Thanks. After much trial and error (and some kernel printks to
understand what parameters were failing), I came up with this sequence:
media-ctl -r media-ctl -l '"mt9p031 3-005d":0->"OMAP3 ISP CCDC":0[1]' media-ctl -l '"OMAP3 ISP CCDC":2->"OMAP3 ISP preview":0[1]' media-ctl -l '"OMAP3 ISP preview":1->"OMAP3 ISP resizer":0[1]' media-ctl -l '"OMAP3 ISP resizer":1->"OMAP3 ISP resizer output":0[1]' media-ctl -f '"mt9p031 3-005d":0[SGRBG12 2592x1944]' media-ctl -f '"OMAP3 ISP CCDC":0 [SGRBG12 2592x1944]' media-ctl -f '"OMAP3 ISP CCDC":1 [SGRBG12 2592x1944]' media-ctl -f '"OMAP3 ISP preview":0 [SGRBG12 2592x1943]' media-ctl -f '"OMAP3 ISP resizer":0 [YUYV 2574x1935]' media-ctl -f '"OMAP3 ISP resizer":1 [YUYV 642x483]'When I tried to grab though, I got this:
# yavta --capture=4 -f YUYV -s 642x483 -F /dev/video6 Device /dev/video6 opened. Device `OMAP3 ISP resizer output' on `media' is a video capture device. Video format set: YUYV (56595559) 642x483 buffer size 633696 Video format: YUYV (56595559) 642x483 buffer size 633696 8 buffers requested. length: 633696 offset: 0 Buffer 0 mapped at address 0x4028c000. length: 633696 offset: 634880 Buffer 1 mapped at address 0x403d0000. length: 633696 offset: 1269760 Buffer 2 mapped at address 0x404b3000. length: 633696 offset: 1904640 Buffer 3 mapped at address 0x4062b000. length: 633696 offset: 2539520 Buffer 4 mapped at address 0x406d6000. length: 633696 offset: 3174400 Buffer 5 mapped at address 0x40821000. length: 633696 offset: 3809280 Buffer 6 mapped at address 0x4097c000. length: 633696 offset: 4444160 Buffer 7 mapped at address 0x40adf000.Unable to handle kernel NULL pointer dereference at virtual address00000018
Quoted 6 lines
Quoted 4 lines
Ouch :-(
Could you please verify that
arch/arm/mach-omap2/board-overo.cincludes the following code, and thatCONFIG_OMAP_MUXis enabled ?I'm not using an Overo board - rather one of our own internal designs.
My bad, sorry.
Quoted 12 lines
I have verified that the pull up/down on those pins is disabled.
The failure is coming from this code in
ispccdc.c
static voidccdc_hs_vs_isr(struct isp_ccdc_device *ccdc){ struct isp_pipeline *pipe = to_isp_pipeline(&ccdc->video_out.video.entity);The value of pipe is NULL which leads to the failure.
Questions:
* I assume that getting HS/VS interrupts is correct in this mode?
* Why is the statement not written (as all others are)
Quoted 7 lines
struct isp_pipeline *pipe = to_isp_pipeline(&ccdc->subdev.entity);I tried this change and the kernel doesn't crash.
I've found that I can get raw frames out of CCDC, but I don't get anything at all when the output continues through the preview and/or resize nodes.
Ideas?
I'm really puzzled, this should have been caught much earlier :-)
Your analysis makes sense. Would you like to submit a patch yourself ? If not I can do it.
Signature · 3 lines
Regards, Laurent Pinchart
Quoted 140 lines · Laurent Pinchart
Hi Gary,
Quoted 110 lines · On Wednesday 09 November 2011 12:01:34 Gary Thomas wrote:
Quoted 109 lines · Laurent Pinchart
Quoted 107 lines · On Tuesday 08 November 2011 14:38:55 Gary Thomas wrote:
Quoted 57 lines · Laurent Pinchart
Quoted 48 lines · On Tuesday 08 November 2011 13:52:25 Gary Thomas wrote:
Quoted 47 lines · Javier Martinez Canillas
Quoted 14 lines · Gary Thomas
Quoted 10 lines · Laurent Pinchart
Quoted 6 lines · On Tuesday 01 November 2011 19:52:49 Gary Thomas wrote:
I'm trying to use the MT9P031 digital sensor with the Media Controller Framework. media-ctl tells me that the sensor is set to capture using SGRBG12 2592x1944
Questions:
* What pixel format in ffmpeg does this correspond to?I don't know if ffmpeg supports Bayer formats. The corresponding fourcc in V4L2 is BA12.
ffmpeg doesn't seem to support these formats
Quoted 7 lines
Quoted 4 lines
If your sensor is hooked up to the OMAP3 ISP, you can then configure the pipeline to include the preview engine and the resizer, and capture YUV data
at the resizer output.I am using the OMAP3 ISP, but it's a bit unclear to me how to set up the pipeline
Hi Gary,
I'm also using another sensor mtv9034 with OMAP3 ISP, so maybe I can help you.
Quoted 4 lines
using media-ctl (I looked for documentation on this tool, but came up dry - is there any?)
Do you have an example of how to configure this using the OMAP3 ISP?
This is how I configure the pipeline to connect the CCDC with the Previewer and Resizer:
./media-ctl -l '"mt9v032 3-005c":0->"OMAP3 ISP CCDC":0[1]' ./media-ctl -l '"OMAP3 ISP CCDC":2->"OMAP3 ISP preview":0[1]' ./media-ctl -l '"OMAP3 ISP preview":1->"OMAP3 ISP resizer":0[1]' ./media-ctl -l '"OMAP3 ISP resizer":1->"OMAP3 ISP resizer output":0[1]' ./media-ctl -f '"mt9v032 3-005c":0[SGRBG10 752x480]'
./media-ctl -f '"OMAP3 ISP CCDC":0 [SGRBG10 752x480]' ./media-ctl -f '"OMAP3 ISP CCDC":1 [SGRBG10 752x480]' ./media-ctl -f '"OMAP3 ISP preview":0 [SGRBG10 752x479]' ./media-ctl -f '"OMAP3 ISP resizer":0 [YUYV 734x471]' ./media-ctl -f '"OMAP3 ISP resizer":1 [YUYV 640x480]'Quoted 7 lines
Quoted 1 line
Hope it helps,
Thanks, I'll give this a try.
I assume that your sensor is probably larger than 752x480 (the mt9p031 is 2592x1944 raw) and that setting the smaller frame size enables some scaling and/or cropping in the driver?
Quoted 6 lines
The mt9v034 is a wide VGA 752x480 sensor if I'm not mistaken. You should modify the resolutions in the above commands according to your sensor. Note that the CCDC crops online line when outputting data to the preview engine, and that the preview engine crops 18 columsn and 8 lines. You can then scale the image by modifying the resizer output size.
Thanks. After much trial and error (and some kernel printks to
understand what parameters were failing), I came up with this sequence:
media-ctl -r media-ctl -l '"mt9p031 3-005d":0->"OMAP3 ISP CCDC":0[1]' media-ctl -l '"OMAP3 ISP CCDC":2->"OMAP3 ISP preview":0[1]' media-ctl -l '"OMAP3 ISP preview":1->"OMAP3 ISP resizer":0[1]' media-ctl -l '"OMAP3 ISP resizer":1->"OMAP3 ISP resizer output":0[1]' media-ctl -f '"mt9p031 3-005d":0[SGRBG12 2592x1944]' media-ctl -f '"OMAP3 ISP CCDC":0 [SGRBG12 2592x1944]' media-ctl -f '"OMAP3 ISP CCDC":1 [SGRBG12 2592x1944]' media-ctl -f '"OMAP3 ISP preview":0 [SGRBG12 2592x1943]' media-ctl -f '"OMAP3 ISP resizer":0 [YUYV 2574x1935]' media-ctl -f '"OMAP3 ISP resizer":1 [YUYV 642x483]'When I tried to grab though, I got this:
# yavta --capture=4 -f YUYV -s 642x483 -F /dev/video6 Device /dev/video6 opened. Device `OMAP3 ISP resizer output' on `media' is a video capture device. Video format set: YUYV (56595559) 642x483 buffer size 633696 Video format: YUYV (56595559) 642x483 buffer size 633696 8 buffers requested. length: 633696 offset: 0 Buffer 0 mapped at address 0x4028c000. length: 633696 offset: 634880 Buffer 1 mapped at address 0x403d0000. length: 633696 offset: 1269760 Buffer 2 mapped at address 0x404b3000. length: 633696 offset: 1904640 Buffer 3 mapped at address 0x4062b000. length: 633696 offset: 2539520 Buffer 4 mapped at address 0x406d6000. length: 633696 offset: 3174400 Buffer 5 mapped at address 0x40821000. length: 633696 offset: 3809280 Buffer 6 mapped at address 0x4097c000. length: 633696 offset: 4444160 Buffer 7 mapped at address 0x40adf000.Unable to handle kernel NULL pointer dereference at virtual address00000018
Quoted 6 lines
Quoted 4 lines
Ouch :-(
Could you please verify that
arch/arm/mach-omap2/board-overo.cincludes the following code, and thatCONFIG_OMAP_MUXis enabled ?I'm not using an Overo board - rather one of our own internal designs.
My bad, sorry.
Quoted 18 lines
I have verified that the pull up/down on those pins is disabled.
The failure is coming from this code in
ispccdc.c
static voidccdc_hs_vs_isr(struct isp_ccdc_device *ccdc){
structisp_pipeline*pipe =
to_isp_pipeline(&ccdc->video_out.video.entity);
The value of pipe is NULL which leads to the failure.Questions:
* I assume that getting HS/VS interrupts is correct in this mode?
* Why is the statement not written (as all others are)struct isp_pipeline *pipe = to_isp_pipeline(&ccdc->subdev.entity); I tried this change and the kernel doesn't crash.I've found that I can get raw frames out of CCDC, but I don't get anything at all when the output continues through the preview and/or resize nodes.
Quoted 6 lines
Quoted 1 line
Ideas?
I'm really puzzled, this should have been caught much earlier :-)
Your analysis makes sense. Would you like to submit a patch yourself ? If not I can do it.
Sure, I can submit a patch. I would like to figure out why it's not working first.
Any ideas how I can debug this? I can't seem to get anything past the CCDC, e.g. into the preview or resize units. Is there some way to trace packets/data through the various stages? Any ideas what might cause it to stall?
Signature · 4 lines
------------------------------------------------------------ Gary Thomas | Consulting for the MLB Associates | Embedded world ------------------------------------------------------------
Hi Gary,
Quoted 150 lines · On Wednesday 09 November 2011 17:24:26 Gary Thomas wrote:
Quoted 149 lines · Laurent Pinchart
Quoted 112 lines · On Wednesday 09 November 2011 12:01:34 Gary Thomas wrote:
Quoted 111 lines · Laurent Pinchart
Quoted 109 lines · On Tuesday 08 November 2011 14:38:55 Gary Thomas wrote:
Quoted 58 lines · Laurent Pinchart
Quoted 49 lines · On Tuesday 08 November 2011 13:52:25 Gary Thomas wrote:
Quoted 48 lines · Javier Martinez Canillas
Quoted 14 lines · Gary Thomas
Quoted 10 lines · Laurent Pinchart
Quoted 6 lines · On Tuesday 01 November 2011 19:52:49 Gary Thomas wrote:
I'm trying to use the MT9P031 digital sensor with the Media Controller Framework. media-ctl tells me that the sensor is set to capture using SGRBG12 2592x1944
Questions:
* What pixel format in ffmpeg does this correspond to?I don't know if ffmpeg supports Bayer formats. The corresponding fourcc in V4L2 is BA12.
ffmpeg doesn't seem to support these formats
Quoted 7 lines
Quoted 4 lines
If your sensor is hooked up to the OMAP3 ISP, you can then configure the pipeline to include the preview engine and the resizer, and capture YUV data
at the resizer output.I am using the OMAP3 ISP, but it's a bit unclear to me how to set up the pipeline
Hi Gary,
I'm also using another sensor mtv9034 with OMAP3 ISP, so maybe I can help you.
Quoted 5 lines
using media-ctl (I looked for documentation on this tool, but came up dry - is there any?)
Do you have an example of how to configure this using the OMAP3 ISP?
This is how I configure the pipeline to connect the CCDC with the Previewer and Resizer:
./media-ctl -l '"mt9v032 3-005c":0->"OMAP3 ISP CCDC":0[1]' ./media-ctl -l '"OMAP3 ISP CCDC":2->"OMAP3 ISP preview":0[1]' ./media-ctl -l '"OMAP3 ISP preview":1->"OMAP3 ISP resizer":0[1]' ./media-ctl -l '"OMAP3 ISP resizer":1->"OMAP3 ISP resizer output":0[1]' ./media-ctl -f '"mt9v032 3-005c":0[SGRBG10 752x480]'
./media-ctl -f '"OMAP3 ISP CCDC":0 [SGRBG10 752x480]' ./media-ctl -f '"OMAP3 ISP CCDC":1 [SGRBG10 752x480]' ./media-ctl -f '"OMAP3 ISP preview":0 [SGRBG10 752x479]' ./media-ctl -f '"OMAP3 ISP resizer":0 [YUYV 734x471]' ./media-ctl -f '"OMAP3 ISP resizer":1 [YUYV 640x480]'Quoted 7 lines
Quoted 1 line
Hope it helps,
Thanks, I'll give this a try.
I assume that your sensor is probably larger than 752x480 (the mt9p031 is 2592x1944 raw) and that setting the smaller frame size enables some scaling and/or cropping in the driver?
Quoted 6 lines
The mt9v034 is a wide VGA 752x480 sensor if I'm not mistaken. You should modify the resolutions in the above commands according to your sensor. Note that the CCDC crops online line when outputting data to the preview engine, and that the preview engine crops 18 columsn and 8 lines. You can then scale the image by modifying the resizer output size.
Thanks. After much trial and error (and some kernel printks to
understand what parameters were failing), I came up with this sequence:
media-ctl -r media-ctl -l '"mt9p031 3-005d":0->"OMAP3 ISP CCDC":0[1]' media-ctl -l '"OMAP3 ISP CCDC":2->"OMAP3 ISP preview":0[1]' media-ctl -l '"OMAP3 ISP preview":1->"OMAP3 ISP resizer":0[1]' media-ctl -l '"OMAP3 ISP resizer":1->"OMAP3 ISP resizer output":0[1]' media-ctl -f '"mt9p031 3-005d":0[SGRBG12 2592x1944]' media-ctl -f '"OMAP3 ISP CCDC":0 [SGRBG12 2592x1944]' media-ctl -f '"OMAP3 ISP CCDC":1 [SGRBG12 2592x1944]' media-ctl -f '"OMAP3 ISP preview":0 [SGRBG12 2592x1943]' media-ctl -f '"OMAP3 ISP resizer":0 [YUYV 2574x1935]' media-ctl -f '"OMAP3 ISP resizer":1 [YUYV 642x483]'When I tried to grab though, I got this:
# yavta --capture=4 -f YUYV -s 642x483 -F /dev/video6 Device /dev/video6 opened. Device `OMAP3 ISP resizer output' on `media' is a video capture device. Video format set: YUYV (56595559) 642x483 buffer size 633696 Video format: YUYV (56595559) 642x483 buffer size 633696 8 buffers requested. length: 633696 offset: 0 Buffer 0 mapped at address 0x4028c000. length: 633696 offset: 634880 Buffer 1 mapped at address 0x403d0000. length: 633696 offset: 1269760 Buffer 2 mapped at address 0x404b3000. length: 633696 offset: 1904640 Buffer 3 mapped at address 0x4062b000. length: 633696 offset: 2539520 Buffer 4 mapped at address 0x406d6000. length: 633696 offset: 3174400 Buffer 5 mapped at address 0x40821000. length: 633696 offset: 3809280 Buffer 6 mapped at address 0x4097c000. length: 633696 offset: 4444160 Buffer 7 mapped at address 0x40adf000.Unable to handle kernel NULL pointer dereference at virtual address00000018
Quoted 6 lines
Quoted 4 lines
Ouch :-(
Could you please verify that
arch/arm/mach-omap2/board-overo.cincludes the following code, and thatCONFIG_OMAP_MUXis enabled ?I'm not using an Overo board - rather one of our own internal designs.
My bad, sorry.
Quoted 26 lines
I have verified that the pull up/down on those pins is disabled.
The failure is coming from this code in
ispccdc.cstatic void
ccdc_hs_vs_isr(struct isp_ccdc_device *ccdc){struct
isp_pipeline*pipe =
to_isp_pipeline(&ccdc->video_out.video.entity);The value of pipe is NULL which leads to the failure.
Questions:
* I assume that getting HS/VS interrupts is correct in this mode?
* Why is the statement not written (as all others are)struct isp_pipeline *pipe = to_isp_pipeline(&ccdc->subdev.entity); I tried this change and the kernel doesn't crash.I've found that I can get raw frames out of CCDC, but I don't get anything at all when the output continues through the preview and/or resize nodes.
Ideas?
Quoted 7 lines
Quoted 4 lines
I'm really puzzled, this should have been caught much earlier :-)
Your analysis makes sense. Would you like to submit a patch yourself ? If not I can do it.
Sure, I can submit a patch. I would like to figure out why it's not working first.
Oops, I've overlooked that, sorry.
Quoted 4 lines
Any ideas how I can debug this? I can't seem to get anything past the CCDC, e.g. into the preview or resize units. Is there some way to trace packets/data through the various stages? Any ideas what might cause it to stall?
How have you configured your pipeline ? Can you try tracing the preview engine and/or resizer interrupts ?
Signature · 3 lines
Regards, Laurent Pinchart
Quoted 163 lines · Laurent Pinchart
Hi Gary,
Quoted 150 lines · On Wednesday 09 November 2011 17:24:26 Gary Thomas wrote:
Quoted 149 lines · Laurent Pinchart
Quoted 112 lines · On Wednesday 09 November 2011 12:01:34 Gary Thomas wrote:
Quoted 111 lines · Laurent Pinchart
Quoted 109 lines · On Tuesday 08 November 2011 14:38:55 Gary Thomas wrote:
Quoted 58 lines · Laurent Pinchart
Quoted 49 lines · On Tuesday 08 November 2011 13:52:25 Gary Thomas wrote:
Quoted 48 lines · Javier Martinez Canillas
Quoted 14 lines · Gary Thomas
Quoted 10 lines · Laurent Pinchart
Quoted 6 lines · On Tuesday 01 November 2011 19:52:49 Gary Thomas wrote:
I'm trying to use the MT9P031 digital sensor with the Media Controller Framework. media-ctl tells me that the sensor is set to capture using SGRBG12 2592x1944
Questions:
* What pixel format in ffmpeg does this correspond to?I don't know if ffmpeg supports Bayer formats. The corresponding fourcc in V4L2 is BA12.
ffmpeg doesn't seem to support these formats
Quoted 7 lines
Quoted 4 lines
If your sensor is hooked up to the OMAP3 ISP, you can then configure the pipeline to include the preview engine and the resizer, and capture YUV data
at the resizer output.I am using the OMAP3 ISP, but it's a bit unclear to me how to set up the pipeline
Hi Gary,
I'm also using another sensor mtv9034 with OMAP3 ISP, so maybe I can help you.
Quoted 5 lines
using media-ctl (I looked for documentation on this tool, but came up dry - is there any?)
Do you have an example of how to configure this using the OMAP3 ISP?
This is how I configure the pipeline to connect the CCDC with the Previewer and Resizer:
./media-ctl -l '"mt9v032 3-005c":0->"OMAP3 ISP CCDC":0[1]' ./media-ctl -l '"OMAP3 ISP CCDC":2->"OMAP3 ISP preview":0[1]' ./media-ctl -l '"OMAP3 ISP preview":1->"OMAP3 ISP resizer":0[1]' ./media-ctl -l '"OMAP3 ISP resizer":1->"OMAP3 ISP resizer output":0[1]' ./media-ctl -f '"mt9v032 3-005c":0[SGRBG10 752x480]'
./media-ctl -f '"OMAP3 ISP CCDC":0 [SGRBG10 752x480]' ./media-ctl -f '"OMAP3 ISP CCDC":1 [SGRBG10 752x480]' ./media-ctl -f '"OMAP3 ISP preview":0 [SGRBG10 752x479]' ./media-ctl -f '"OMAP3 ISP resizer":0 [YUYV 734x471]' ./media-ctl -f '"OMAP3 ISP resizer":1 [YUYV 640x480]'Quoted 7 lines
Quoted 1 line
Hope it helps,
Thanks, I'll give this a try.
I assume that your sensor is probably larger than 752x480 (the mt9p031 is 2592x1944 raw) and that setting the smaller frame size enables some scaling and/or cropping in the driver?
Quoted 6 lines
The mt9v034 is a wide VGA 752x480 sensor if I'm not mistaken. You should modify the resolutions in the above commands according to your sensor. Note that the CCDC crops online line when outputting data to the preview engine, and that the preview engine crops 18 columsn and 8 lines. You can then scale the image by modifying the resizer output size.
Thanks. After much trial and error (and some kernel printks to
understand what parameters were failing), I came up with this sequence:
media-ctl -r media-ctl -l '"mt9p031 3-005d":0->"OMAP3 ISP CCDC":0[1]' media-ctl -l '"OMAP3 ISP CCDC":2->"OMAP3 ISP preview":0[1]' media-ctl -l '"OMAP3 ISP preview":1->"OMAP3 ISP resizer":0[1]' media-ctl -l '"OMAP3 ISP resizer":1->"OMAP3 ISP resizer output":0[1]' media-ctl -f '"mt9p031 3-005d":0[SGRBG12 2592x1944]' media-ctl -f '"OMAP3 ISP CCDC":0 [SGRBG12 2592x1944]' media-ctl -f '"OMAP3 ISP CCDC":1 [SGRBG12 2592x1944]' media-ctl -f '"OMAP3 ISP preview":0 [SGRBG12 2592x1943]' media-ctl -f '"OMAP3 ISP resizer":0 [YUYV 2574x1935]' media-ctl -f '"OMAP3 ISP resizer":1 [YUYV 642x483]'When I tried to grab though, I got this:
# yavta --capture=4 -f YUYV -s 642x483 -F /dev/video6 Device /dev/video6 opened. Device `OMAP3 ISP resizer output' on `media' is a video capture device. Video format set: YUYV (56595559) 642x483 buffer size 633696 Video format: YUYV (56595559) 642x483 buffer size 633696 8 buffers requested. length: 633696 offset: 0 Buffer 0 mapped at address 0x4028c000. length: 633696 offset: 634880 Buffer 1 mapped at address 0x403d0000. length: 633696 offset: 1269760 Buffer 2 mapped at address 0x404b3000. length: 633696 offset: 1904640 Buffer 3 mapped at address 0x4062b000. length: 633696 offset: 2539520 Buffer 4 mapped at address 0x406d6000. length: 633696 offset: 3174400 Buffer 5 mapped at address 0x40821000. length: 633696 offset: 3809280 Buffer 6 mapped at address 0x4097c000. length: 633696 offset: 4444160 Buffer 7 mapped at address 0x40adf000.Unable to handle kernel NULL pointer dereference at virtual address00000018
Quoted 6 lines
Quoted 4 lines
Ouch :-(
Could you please verify that
arch/arm/mach-omap2/board-overo.cincludes the following code, and thatCONFIG_OMAP_MUXis enabled ?I'm not using an Overo board - rather one of our own internal designs.
My bad, sorry.
Quoted 26 lines
I have verified that the pull up/down on those pins is disabled.
The failure is coming from this code in
ispccdc.cstatic void
ccdc_hs_vs_isr(struct isp_ccdc_device *ccdc){struct
isp_pipeline*pipe =
to_isp_pipeline(&ccdc->video_out.video.entity);The value of pipe is NULL which leads to the failure.
Questions:
* I assume that getting HS/VS interrupts is correct in this mode?
* Why is the statement not written (as all others are)struct isp_pipeline *pipe = to_isp_pipeline(&ccdc->subdev.entity); I tried this change and the kernel doesn't crash.I've found that I can get raw frames out of CCDC, but I don't get anything at all when the output continues through the preview and/or resize nodes.
Ideas?
Quoted 7 lines
Quoted 4 lines
I'm really puzzled, this should have been caught much earlier :-)
Your analysis makes sense. Would you like to submit a patch yourself ? If not I can do it.
Sure, I can submit a patch. I would like to figure out why it's not working first.
Oops, I've overlooked that, sorry.
Quoted 7 lines
Quoted 4 lines
Any ideas how I can debug this? I can't seem to get anything past the CCDC, e.g. into the preview or resize units. Is there some way to trace packets/data through the various stages? Any ideas what might cause it to stall?
How have you configured your pipeline ? Can you try tracing the preview engine and/or resizer interrupts ?
Here's my pipeline:
media-ctl -r
media-ctl -l '"mt9p031 3-005d":0->"OMAP3 ISP CCDC":0[1]' media-ctl -l '"OMAP3 ISP CCDC":2->"OMAP3 ISP preview":0[1]' media-ctl -l '"OMAP3 ISP preview":1->"OMAP3 ISP resizer":0[1]' media-ctl -l '"OMAP3 ISP resizer":1->"OMAP3 ISP resizer output":0[1]' media-ctl -f '"mt9p031 3-005d":0[SGRBG12 2592x1944]'
media-ctl -f '"OMAP3 ISP CCDC":0 [SGRBG10 2592x1944]' media-ctl -f '"OMAP3 ISP CCDC":1 [SGRBG10 2592x1944]' media-ctl -f '"OMAP3 ISP preview":0 [SGRBG10 2592x1943]' media-ctl -f '"OMAP3 ISP resizer":0 [YUYV 2574x1935]' media-ctl -f '"OMAP3 ISP resizer":1 [YUYV 642x483]'
The full media-ctl dump is at http://www.mlbassoc.com/misc/pipeline.out
When I try to grab from /dev/video6 (output node of resizer), I see only previewer interrupts, no resizer interrrupts. I added a simple printk at each of the previewer/resizer *_isr functions, and I only ever see this one:
omap3isp_preview_isr_frame_sync.1373
Can you give me an overview of what events/interrupts should occur so I can try to trace through the ISP to see where it is failing?
Thanks
Signature · 4 lines
------------------------------------------------------------ Gary Thomas | Consulting for the MLB Associates | Embedded world ------------------------------------------------------------
Hi Gary,
Quoted 72 lines · On Monday 14 November 2011 12:42:54 Gary Thomas wrote:
Quoted 71 lines · Laurent Pinchart
Quoted 70 lines · On Wednesday 09 November 2011 17:24:26 Gary Thomas wrote:
Quoted 69 lines · Laurent Pinchart
Quoted 68 lines · On Wednesday 09 November 2011 12:01:34 Gary Thomas wrote:
Quoted 67 lines · Laurent Pinchart
Quoted 66 lines · On Tuesday 08 November 2011 14:38:55 Gary Thomas wrote:
Quoted 64 lines · Laurent Pinchart
Quoted 49 lines · On Tuesday 08 November 2011 13:52:25 Gary Thomas wrote:
Quoted 48 lines · Javier Martinez Canillas
Quoted 14 lines · Gary Thomas
Quoted 10 lines · Laurent Pinchart
Quoted 6 lines · On Tuesday 01 November 2011 19:52:49 Gary Thomas wrote:
I'm trying to use the MT9P031 digital sensor with the Media
Controller Framework. media-ctl tells me that the sensor is
set to capture using SGRBG12 2592x1944Questions:
* What pixel format in ffmpeg does this correspond to?I don't know if ffmpeg supports Bayer formats. The corresponding fourcc in V4L2 is BA12.
ffmpeg doesn't seem to support these formats
Quoted 7 lines
Quoted 4 lines
If your sensor is hooked up to the OMAP3 ISP, you can then configure the pipeline to include the preview engine and the resizer, and capture YUV data
at the resizer output.I am using the OMAP3 ISP, but it's a bit unclear to me how to set up the pipeline
Hi Gary,
I'm also using another sensor mtv9034 with OMAP3 ISP, so maybe I can help you.
Quoted 5 lines
using media-ctl (I looked for documentation on this tool, but came up dry - is there any?)
Do you have an example of how to configure this using the OMAP3 ISP?
This is how I configure the pipeline to connect the CCDC with the Previewer and Resizer:
./media-ctl -l '"mt9v032 3-005c":0->"OMAP3 ISP CCDC":0[1]' ./media-ctl -l '"OMAP3 ISP CCDC":2->"OMAP3 ISP preview":0[1]' ./media-ctl -l '"OMAP3 ISP preview":1->"OMAP3 ISP resizer":0[1]' ./media-ctl -l '"OMAP3 ISP resizer":1->"OMAP3 ISP resizer output":0[1]' ./media-ctl -f '"mt9v032 3-005c":0[SGRBG10 752x480]' ./media-ctl -f '"OMAP3 ISP CCDC":0 [SGRBG10 752x480]'
./media-ctl -f '"OMAP3 ISP CCDC":1 [SGRBG10 752x480]' ./media-ctl -f '"OMAP3 ISP preview":0 [SGRBG10 752x479]' ./media-ctl -f '"OMAP3 ISP resizer":0 [YUYV 734x471]' ./media-ctl -f '"OMAP3 ISP resizer":1 [YUYV 640x480]'Quoted 7 lines
Quoted 1 line
Hope it helps,
Thanks, I'll give this a try.
I assume that your sensor is probably larger than 752x480 (the mt9p031 is 2592x1944 raw) and that setting the smaller frame size enables some scaling and/or cropping in the driver?
The mt9v034 is a wide VGA 752x480 sensor if I'm not mistaken. You should modify the resolutions in the above commands according to your sensor. Note that the CCDC crops online line when outputting data to the preview engine, and that the preview engine crops 18 columsn and 8 lines. You can then scale the image by modifying the resizer output size.
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Thanks. After much trial and error (and some kernel printks to
understand what parameters were failing), I came up with this
sequence:
Quoted 109 lines
Quoted 87 lines
Quoted 77 lines
Quoted 77 lines
Quoted 41 lines
Quoted 41 lines
Quoted 40 lines
media-ctl -r media-ctl -l '"mt9p031 3-005d":0->"OMAP3 ISP CCDC":0[1]' media-ctl -l '"OMAP3 ISP CCDC":2->"OMAP3 ISP preview":0[1]' media-ctl -l '"OMAP3 ISP preview":1->"OMAP3 ISP resizer":0[1]' media-ctl -l '"OMAP3 ISP resizer":1->"OMAP3 ISP resizer output":0[1]' media-ctl -f '"mt9p031 3-005d":0[SGRBG12 2592x1944]' media-ctl -f '"OMAP3 ISP CCDC":0 [SGRBG12 2592x1944]' media-ctl -f '"OMAP3 ISP CCDC":1 [SGRBG12 2592x1944]' media-ctl -f '"OMAP3 ISP preview":0 [SGRBG12 2592x1943]' media-ctl -f '"OMAP3 ISP resizer":0 [YUYV 2574x1935]' media-ctl -f '"OMAP3 ISP resizer":1 [YUYV 642x483]'When I tried to grab though, I got this:
# yavta --capture=4 -f YUYV -s 642x483 -F /dev/video6 Device /dev/video6 opened. Device `OMAP3 ISP resizer output' on `media' is a video capture device. Video format set: YUYV (56595559) 642x483 buffer size 633696 Video format: YUYV (56595559) 642x483 buffer size 633696 8 buffers requested. length: 633696 offset: 0 Buffer 0 mapped at address 0x4028c000. length: 633696 offset: 634880 Buffer 1 mapped at address 0x403d0000. length: 633696 offset: 1269760 Buffer 2 mapped at address 0x404b3000. length: 633696 offset: 1904640 Buffer 3 mapped at address 0x4062b000. length: 633696 offset: 2539520 Buffer 4 mapped at address 0x406d6000. length: 633696 offset: 3174400 Buffer 5 mapped at address 0x40821000. length: 633696 offset: 3809280 Buffer 6 mapped at address 0x4097c000. length: 633696 offset: 4444160 Buffer 7 mapped at address 0x40adf000.Unable to handle kernel NULL pointer dereference at virtual address00000018
Quoted 6 lines
Quoted 4 lines
Ouch :-(
Could you please verify that
arch/arm/mach-omap2/board-overo.cincludes the following code, and thatCONFIG_OMAP_MUXis enabled ?I'm not using an Overo board - rather one of our own internal designs.
My bad, sorry.
Quoted 26 lines
I have verified that the pull up/down on those pins is disabled.
The failure is coming from this code in
ispccdc.cstatic void
ccdc_hs_vs_isr(struct isp_ccdc_device *ccdc){struct
isp_pipeline*pipe =
to_isp_pipeline(&ccdc->video_out.video.entity);The value of pipe is NULL which leads to the failure.
Questions:
* I assume that getting HS/VS interrupts is correct in this mode?
* Why is the statement not written (as all others are)struct isp_pipeline *pipe = to_isp_pipeline(&ccdc->subdev.entity); I tried this change and the kernel doesn't crash.I've found that I can get raw frames out of CCDC, but I don't get anything at all when the output continues through the preview and/or resize nodes.
Ideas?
Quoted 7 lines
Quoted 4 lines
I'm really puzzled, this should have been caught much earlier :-)
Your analysis makes sense. Would you like to submit a patch yourself ? If not I can do it.
Sure, I can submit a patch. I would like to figure out why it's not working first.
Oops, I've overlooked that, sorry.
Quoted 7 lines
Quoted 4 lines
Any ideas how I can debug this? I can't seem to get anything past the CCDC, e.g. into the preview or resize units. Is there some way to trace packets/data through the various stages? Any ideas what might cause it to stall?
How have you configured your pipeline ? Can you try tracing the preview engine and/or resizer interrupts ?
Here's my pipeline:
media-ctl -r media-ctl -l '"mt9p031 3-005d":0->"OMAP3 ISP CCDC":0[1]' media-ctl -l '"OMAP3 ISP CCDC":2->"OMAP3 ISP preview":0[1]' media-ctl -l '"OMAP3 ISP preview":1->"OMAP3 ISP resizer":0[1]' media-ctl -l '"OMAP3 ISP resizer":1->"OMAP3 ISP resizer output":0[1]' media-ctl -f '"mt9p031 3-005d":0[SGRBG12 2592x1944]' media-ctl -f '"OMAP3 ISP CCDC":0 [SGRBG10 2592x1944]' media-ctl -f '"OMAP3 ISP CCDC":1 [SGRBG10 2592x1944]' media-ctl -f '"OMAP3 ISP preview":0 [SGRBG10 2592x1943]' media-ctl -f '"OMAP3 ISP resizer":0 [YUYV 2574x1935]' media-ctl -f '"OMAP3 ISP resizer":1 [YUYV 642x483]'The full media-ctl dump is at http://www.mlbassoc.com/misc/pipeline.out
Quoted 8 lines
When I try to grab from
/dev/video6(output node of resizer), I see only previewer interrupts, no resizer interrrupts. I added a simple printk at each of the previewer/resizer*_isrfunctions, and I only ever see this one:omap3isp_preview_isr_frame_sync.1373Can you give me an overview of what events/interrupts should occur so I can try to trace through the ISP to see where it is failing?
The CCDC generates VD0, VD1 and HS/VS interrupts regardless of whether it processes video or not, as long as it receives a video stream at its input. The preview engine and resizer will only generate an interrupt after writing an image to memory. With your above configuration VD0, VD1, HS/VS and resizer interrupts should be generated.
Your pipeline configuration looks correct, except that the downscaling factor is slightly larger than 4. Could you try to setup the resizer to output a 2574x1935 image instead of 642x483 ? If that works, try to downscale to 660x496. If that works as well, the driver should be fixed to disallow resolutions that won't work.
Signature · 3 lines
Regards, Laurent Pinchart
Quoted 203 lines · Laurent Pinchart
Hi Gary,
Quoted 72 lines · On Monday 14 November 2011 12:42:54 Gary Thomas wrote:
Quoted 71 lines · Laurent Pinchart
Quoted 70 lines · On Wednesday 09 November 2011 17:24:26 Gary Thomas wrote:
Quoted 69 lines · Laurent Pinchart
Quoted 68 lines · On Wednesday 09 November 2011 12:01:34 Gary Thomas wrote:
Quoted 67 lines · Laurent Pinchart
Quoted 66 lines · On Tuesday 08 November 2011 14:38:55 Gary Thomas wrote:
Quoted 64 lines · Laurent Pinchart
Quoted 49 lines · On Tuesday 08 November 2011 13:52:25 Gary Thomas wrote:
Quoted 48 lines · Javier Martinez Canillas
Quoted 14 lines · Gary Thomas
Quoted 10 lines · Laurent Pinchart
On Tuesday 01 November 2011 19:52:49 Gary Thomas wrote:
I'm trying to use the MT9P031 digital sensor with the Media
Controller Framework. media-ctl tells me that the sensor is
set to capture using SGRBG12 2592x1944Questions:
* What pixel format in ffmpeg does this correspond to?I don't know if ffmpeg supports Bayer formats. The
corresponding fourcc in V4L2 is BA12.ffmpeg doesn't seem to support these formats
Quoted 7 lines
Quoted 4 lines
If your sensor is hooked up to the OMAP3 ISP, you can then
configure the pipeline to include the preview engine and the
resizer, and capture YUV data
at the resizer output.I am using the OMAP3 ISP, but it's a bit unclear to me how to set up the pipeline
Hi Gary,
I'm also using another sensor mtv9034 with OMAP3 ISP, so maybe I can help you.
Quoted 5 lines
using media-ctl (I looked for documentation on this tool, but came up dry - is there any?)
Do you have an example of how to configure this using the OMAP3 ISP?
This is how I configure the pipeline to connect the CCDC with the Previewer and Resizer:
./media-ctl -l '"mt9v032 3-005c":0->"OMAP3 ISP CCDC":0[1]' ./media-ctl -l '"OMAP3 ISP CCDC":2->"OMAP3 ISP preview":0[1]' ./media-ctl -l '"OMAP3 ISP preview":1->"OMAP3 ISP resizer":0[1]' ./media-ctl -l '"OMAP3 ISP resizer":1->"OMAP3 ISP resizer output":0[1]' ./media-ctl -f '"mt9v032 3-005c":0[SGRBG10 752x480]' ./media-ctl -f '"OMAP3 ISP CCDC":0 [SGRBG10 752x480]'
./media-ctl -f '"OMAP3 ISP CCDC":1 [SGRBG10 752x480]' ./media-ctl -f '"OMAP3 ISP preview":0 [SGRBG10 752x479]' ./media-ctl -f '"OMAP3 ISP resizer":0 [YUYV 734x471]' ./media-ctl -f '"OMAP3 ISP resizer":1 [YUYV 640x480]'Quoted 7 lines
Quoted 1 line
Hope it helps,
Thanks, I'll give this a try.
I assume that your sensor is probably larger than 752x480 (the mt9p031 is 2592x1944 raw) and that setting the smaller frame size enables some scaling and/or cropping in the driver?
The mt9v034 is a wide VGA 752x480 sensor if I'm not mistaken. You should modify the resolutions in the above commands according to your sensor. Note that the CCDC crops online line when outputting data to the preview engine, and that the preview engine crops 18 columsn and 8 lines. You can then scale the image by modifying the resizer output size.
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Thanks. After much trial and error (and some kernel printks to
understand what parameters were failing), I came up with this
sequence:
Quoted 109 lines
Quoted 87 lines
Quoted 77 lines
Quoted 77 lines
Quoted 41 lines
Quoted 41 lines
Quoted 40 lines
media-ctl -r media-ctl -l '"mt9p031 3-005d":0->"OMAP3 ISP CCDC":0[1]' media-ctl -l '"OMAP3 ISP CCDC":2->"OMAP3 ISP preview":0[1]' media-ctl -l '"OMAP3 ISP preview":1->"OMAP3 ISP resizer":0[1]' media-ctl -l '"OMAP3 ISP resizer":1->"OMAP3 ISP resizer output":0[1]' media-ctl -f '"mt9p031 3-005d":0[SGRBG12 2592x1944]' media-ctl -f '"OMAP3 ISP CCDC":0 [SGRBG12 2592x1944]' media-ctl -f '"OMAP3 ISP CCDC":1 [SGRBG12 2592x1944]' media-ctl -f '"OMAP3 ISP preview":0 [SGRBG12 2592x1943]' media-ctl -f '"OMAP3 ISP resizer":0 [YUYV 2574x1935]' media-ctl -f '"OMAP3 ISP resizer":1 [YUYV 642x483]'When I tried to grab though, I got this:
# yavta --capture=4 -f YUYV -s 642x483 -F /dev/video6 Device /dev/video6 opened. Device `OMAP3 ISP resizer output' on `media' is a video capture device. Video format set: YUYV (56595559) 642x483 buffer size 633696 Video format: YUYV (56595559) 642x483 buffer size 633696 8 buffers requested. length: 633696 offset: 0 Buffer 0 mapped at address 0x4028c000. length: 633696 offset: 634880 Buffer 1 mapped at address 0x403d0000. length: 633696 offset: 1269760 Buffer 2 mapped at address 0x404b3000. length: 633696 offset: 1904640 Buffer 3 mapped at address 0x4062b000. length: 633696 offset: 2539520 Buffer 4 mapped at address 0x406d6000. length: 633696 offset: 3174400 Buffer 5 mapped at address 0x40821000. length: 633696 offset: 3809280 Buffer 6 mapped at address 0x4097c000. length: 633696 offset: 4444160 Buffer 7 mapped at address 0x40adf000.Unable to handle kernel NULL pointer dereference at virtual address00000018
Quoted 6 lines
Quoted 4 lines
Ouch :-(
Could you please verify that
arch/arm/mach-omap2/board-overo.cincludes the following code, and thatCONFIG_OMAP_MUXis enabled ?I'm not using an Overo board - rather one of our own internal designs.
My bad, sorry.
Quoted 26 lines
I have verified that the pull up/down on those pins is disabled.
The failure is coming from this code in
ispccdc.cstatic void
ccdc_hs_vs_isr(struct isp_ccdc_device *ccdc){struct
isp_pipeline*pipe =
to_isp_pipeline(&ccdc->video_out.video.entity);The value of pipe is NULL which leads to the failure.
Questions:
* I assume that getting HS/VS interrupts is correct in this mode?
* Why is the statement not written (as all others are)struct isp_pipeline *pipe = to_isp_pipeline(&ccdc->subdev.entity); I tried this change and the kernel doesn't crash.I've found that I can get raw frames out of CCDC, but I don't get anything at all when the output continues through the preview and/or resize nodes.
Ideas?
Quoted 7 lines
Quoted 4 lines
I'm really puzzled, this should have been caught much earlier :-)
Your analysis makes sense. Would you like to submit a patch yourself ? If not I can do it.
Sure, I can submit a patch. I would like to figure out why it's not working first.
Oops, I've overlooked that, sorry.
Quoted 7 lines
Quoted 4 lines
Any ideas how I can debug this? I can't seem to get anything past the CCDC, e.g. into the preview or resize units. Is there some way to trace packets/data through the various stages? Any ideas what might cause it to stall?
How have you configured your pipeline ? Can you try tracing the preview engine and/or resizer interrupts ?
Here's my pipeline:
media-ctl -r media-ctl -l '"mt9p031 3-005d":0->"OMAP3 ISP CCDC":0[1]' media-ctl -l '"OMAP3 ISP CCDC":2->"OMAP3 ISP preview":0[1]' media-ctl -l '"OMAP3 ISP preview":1->"OMAP3 ISP resizer":0[1]' media-ctl -l '"OMAP3 ISP resizer":1->"OMAP3 ISP resizer output":0[1]' media-ctl -f '"mt9p031 3-005d":0[SGRBG12 2592x1944]' media-ctl -f '"OMAP3 ISP CCDC":0 [SGRBG10 2592x1944]' media-ctl -f '"OMAP3 ISP CCDC":1 [SGRBG10 2592x1944]' media-ctl -f '"OMAP3 ISP preview":0 [SGRBG10 2592x1943]' media-ctl -f '"OMAP3 ISP resizer":0 [YUYV 2574x1935]' media-ctl -f '"OMAP3 ISP resizer":1 [YUYV 642x483]'The full media-ctl dump is at http://www.mlbassoc.com/misc/pipeline.out
Quoted 8 lines
When I try to grab from
/dev/video6(output node of resizer), I see only previewer interrupts, no resizer interrrupts. I added a simple printk at each of the previewer/resizer*_isrfunctions, and I only ever see this one:omap3isp_preview_isr_frame_sync.1373Can you give me an overview of what events/interrupts should occur so I can try to trace through the ISP to see where it is failing?
The CCDC generates VD0, VD1 and HS/VS interrupts regardless of whether it processes video or not, as long as it receives a video stream at its input. The preview engine and resizer will only generate an interrupt after writing an image to memory. With your above configuration VD0, VD1, HS/VS and resizer interrupts should be generated.
Quoted 6 lines
Your pipeline configuration looks correct, except that the downscaling factor is slightly larger than 4. Could you try to setup the resizer to output a 2574x1935 image instead of 642x483 ? If that works, try to downscale to 660x496. If that works as well, the driver should be fixed to disallow resolutions that won't work.
No change. I also tried using only the previewer like this:
media-ctl -r
media-ctl -l '"mt9p031 3-005d":0->"OMAP3 ISP CCDC":0[1]' media-ctl -l '"OMAP3 ISP CCDC":2->"OMAP3 ISP preview":0[1]' media-ctl -l '"OMAP3 ISP preview":1->"OMAP3 ISP preview output":0[1]' media-ctl -f '"mt9p031 3-005d":0[SGRBG12 2592x1944]'
media-ctl -f '"OMAP3 ISP CCDC":0 [SGRBG12 2592x1944]' media-ctl -f '"OMAP3 ISP CCDC":1 [SGRBG10 2592x1944]' media-ctl -f '"OMAP3 ISP preview":0 [SGRBG10 2592x1943]' media-ctl -f '"OMAP3 ISP preview":1 [YUYV 2574x1935]'
yavta --capture=4 -f YUYV -s 2574x1935 -F /dev/video4
I still only get the frame sync interrupts in the previewer, no buffer interrupts, hence no data flowing to my application. What else can I look at?
Thanks for your time
Signature · 4 lines
------------------------------------------------------------ Gary Thomas | Consulting for the MLB Associates | Embedded world ------------------------------------------------------------
Hi Gary,
Quoted 226 lines · On Wednesday 16 November 2011 13:03:11 Gary Thomas wrote:
Quoted 206 lines · Laurent Pinchart
Quoted 73 lines · On Monday 14 November 2011 12:42:54 Gary Thomas wrote:
Quoted 72 lines · Laurent Pinchart
Quoted 71 lines · On Wednesday 09 November 2011 17:24:26 Gary Thomas wrote:
Quoted 70 lines · Laurent Pinchart
Quoted 69 lines · On Wednesday 09 November 2011 12:01:34 Gary Thomas wrote:
Quoted 68 lines · Laurent Pinchart
Quoted 67 lines · On Tuesday 08 November 2011 14:38:55 Gary Thomas wrote:
Quoted 65 lines · Laurent Pinchart
Quoted 50 lines · On Tuesday 08 November 2011 13:52:25 Gary Thomas wrote:
Quoted 49 lines · Javier Martinez Canillas
Quoted 21 lines · Gary Thomas
On 2011-11-04 04:37, Laurent Pinchart wrote:
On Tuesday 01 November 2011 19:52:49 Gary Thomas wrote:
I'm trying to use the MT9P031 digital sensor with the Media
Controller Framework. media-ctl tells me that the sensor is
set to capture using SGRBG12 2592x1944Questions:
* What pixel format in ffmpeg does this correspond to?I don't know if ffmpeg supports Bayer formats. The
corresponding fourcc in V4L2 is BA12.ffmpeg doesn't seem to support these formats
If your sensor is hooked up to the OMAP3 ISP, you can then
configure the pipeline to include the preview engine and the
resizer, and capture YUV data
at the resizer output.I am using the OMAP3 ISP, but it's a bit unclear to me how to
set up the pipelineHi Gary,
I'm also using another sensor mtv9034 with OMAP3 ISP, so maybe I can help you.
Quoted 5 lines
using media-ctl (I looked for documentation on this tool, but
came up dry - is there any?)Do you have an example of how to configure this using the
OMAP3 ISP?This is how I configure the pipeline to connect the CCDC with the Previewer and Resizer:
./media-ctl -l '"mt9v032 3-005c":0->"OMAP3 ISP CCDC":0[1]' ./media-ctl -l '"OMAP3 ISP CCDC":2->"OMAP3 ISP preview":0[1]' ./media-ctl -l '"OMAP3 ISP preview":1->"OMAP3 ISP resizer":0[1]' ./media-ctl -l '"OMAP3 ISP resizer":1->"OMAP3 ISP resizer output":0[1]' ./media-ctl -f '"mt9v032 3-005c":0[SGRBG10 752x480]' ./media-ctl -f '"OMAP3 ISP CCDC":0 [SGRBG10 752x480]' ./media-ctl -f '"OMAP3 ISP CCDC":1 [SGRBG10 752x480]' ./media-ctl -f '"OMAP3 ISP preview":0 [SGRBG10 752x479]' ./media-ctl -f '"OMAP3 ISP resizer":0 [YUYV 734x471]' ./media-ctl -f '"OMAP3 ISP resizer":1 [YUYV 640x480]'
Quoted 7 lines
Quoted 1 line
Hope it helps,
Thanks, I'll give this a try.
I assume that your sensor is probably larger than 752x480 (the mt9p031 is 2592x1944 raw) and that setting the smaller frame size enables some scaling and/or cropping in the driver?
The mt9v034 is a wide VGA 752x480 sensor if I'm not mistaken. You should modify the resolutions in the above commands according to your sensor. Note that the CCDC crops online line when outputting data to the preview engine, and that the preview engine crops 18 columsn and 8 lines. You can then scale the image by modifying the resizer output size.
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Thanks. After much trial and error (and some kernel printks to
understand what parameters were failing), I came up with this
sequence:
Quoted 115 lines
Quoted 88 lines
Quoted 78 lines
Quoted 78 lines
Quoted 41 lines
Quoted 41 lines
Quoted 40 lines
media-ctl -r media-ctl -l '"mt9p031 3-005d":0->"OMAP3 ISP CCDC":0[1]' media-ctl -l '"OMAP3 ISP CCDC":2->"OMAP3 ISP preview":0[1]' media-ctl -l '"OMAP3 ISP preview":1->"OMAP3 ISP resizer":0[1]' media-ctl -l '"OMAP3 ISP resizer":1->"OMAP3 ISP resizer output":0[1]' media-ctl -f '"mt9p031 3-005d":0[SGRBG12 2592x1944]' media-ctl -f '"OMAP3 ISP CCDC":0 [SGRBG12 2592x1944]' media-ctl -f '"OMAP3 ISP CCDC":1 [SGRBG12 2592x1944]' media-ctl -f '"OMAP3 ISP preview":0 [SGRBG12 2592x1943]' media-ctl -f '"OMAP3 ISP resizer":0 [YUYV 2574x1935]' media-ctl -f '"OMAP3 ISP resizer":1 [YUYV 642x483]'When I tried to grab though, I got this:
# yavta --capture=4 -f YUYV -s 642x483 -F /dev/video6 Device /dev/video6 opened. Device `OMAP3 ISP resizer output' on `media' is a video capture device. Video format set: YUYV (56595559) 642x483 buffer size 633696 Video format: YUYV (56595559) 642x483 buffer size 633696 8 buffers requested. length: 633696 offset: 0 Buffer 0 mapped at address 0x4028c000. length: 633696 offset: 634880 Buffer 1 mapped at address 0x403d0000. length: 633696 offset: 1269760 Buffer 2 mapped at address 0x404b3000. length: 633696 offset: 1904640 Buffer 3 mapped at address 0x4062b000. length: 633696 offset: 2539520 Buffer 4 mapped at address 0x406d6000. length: 633696 offset: 3174400 Buffer 5 mapped at address 0x40821000. length: 633696 offset: 3809280 Buffer 6 mapped at address 0x4097c000. length: 633696 offset: 4444160 Buffer 7 mapped at address 0x40adf000.Unable to handle kernel NULL pointer dereference at virtualaddress 00000018
Quoted 7 lines
Quoted 4 lines
Ouch :-(
Could you please verify that
arch/arm/mach-omap2/board-overo.cincludes the following code, and thatCONFIG_OMAP_MUXis enabled ?I'm not using an Overo board - rather one of our own internal designs.
My bad, sorry.
Quoted 26 lines
I have verified that the pull up/down on those pins is disabled.
The failure is coming from this code in
ispccdc.cstatic void
ccdc_hs_vs_isr(struct isp_ccdc_device *ccdc){struct
isp_pipeline*pipe =
to_isp_pipeline(&ccdc->video_out.video.entity);The value of pipe is NULL which leads to the failure.
Questions:
* I assume that getting HS/VS interrupts is correct in this mode?
* Why is the statement not written (as all others are)struct isp_pipeline *pipe = to_isp_pipeline(&ccdc->subdev.entity); I tried this change and the kernel doesn't crash.I've found that I can get raw frames out of CCDC, but I don't get anything at all when the output continues through the preview and/or resize nodes.
Ideas?
Quoted 7 lines
Quoted 4 lines
I'm really puzzled, this should have been caught much earlier :-)
Your analysis makes sense. Would you like to submit a patch yourself ? If not I can do it.
Sure, I can submit a patch. I would like to figure out why it's not working first.
Oops, I've overlooked that, sorry.
Quoted 7 lines
Quoted 4 lines
Any ideas how I can debug this? I can't seem to get anything past the CCDC, e.g. into the preview or resize units. Is there some way to trace packets/data through the various stages? Any ideas what might cause it to stall?
How have you configured your pipeline ? Can you try tracing the preview engine and/or resizer interrupts ?
Here's my pipeline:
media-ctl -r media-ctl -l '"mt9p031 3-005d":0->"OMAP3 ISP CCDC":0[1]' media-ctl -l '"OMAP3 ISP CCDC":2->"OMAP3 ISP preview":0[1]' media-ctl -l '"OMAP3 ISP preview":1->"OMAP3 ISP resizer":0[1]' media-ctl -l '"OMAP3 ISP resizer":1->"OMAP3 ISP resizer output":0[1]' media-ctl -f '"mt9p031 3-005d":0[SGRBG12 2592x1944]' media-ctl -f '"OMAP3 ISP CCDC":0 [SGRBG10 2592x1944]' media-ctl -f '"OMAP3 ISP CCDC":1 [SGRBG10 2592x1944]' media-ctl -f '"OMAP3 ISP preview":0 [SGRBG10 2592x1943]' media-ctl -f '"OMAP3 ISP resizer":0 [YUYV 2574x1935]' media-ctl -f '"OMAP3 ISP resizer":1 [YUYV 642x483]'The full media-ctl dump is at http://www.mlbassoc.com/misc/pipeline.out
When I try to grab from
/dev/video6(output node of resizer), I see only previewer interrupts, no resizer interrrupts. I added a simple printk at each of the previewer/resizer*_isrfunctions, and I onlyQuoted 5 lines
ever see this one:
omap3isp_preview_isr_frame_sync.1373Can you give me an overview of what events/interrupts should occur so I can try to trace through the ISP to see where it is failing?
The CCDC generates VD0, VD1 and HS/VS interrupts regardless of whether it processes video or not, as long as it receives a video stream at its input. The preview engine and resizer will only generate an interrupt after writing an image to memory. With your above configuration VD0, VD1, HS/VS and resizer interrupts should be generated.
Quoted 5 lines
Your pipeline configuration looks correct, except that the downscaling factor is slightly larger than 4. Could you try to setup the resizer to output a 2574x1935 image instead of 642x483 ? If that works, try to downscale to 660x496. If that works as well, the driver should be fixed to disallow resolutions that won't work.
No change. I also tried using only the previewer like this:
media-ctl -r media-ctl -l '"mt9p031 3-005d":0->"OMAP3 ISP CCDC":0[1]' media-ctl -l '"OMAP3 ISP CCDC":2->"OMAP3 ISP preview":0[1]' media-ctl -l '"OMAP3 ISP preview":1->"OMAP3 ISP preview output":0[1]' media-ctl -f '"mt9p031 3-005d":0[SGRBG12 2592x1944]' media-ctl -f '"OMAP3 ISP CCDC":0 [SGRBG12 2592x1944]' media-ctl -f '"OMAP3 ISP CCDC":1 [SGRBG10 2592x1944]' media-ctl -f '"OMAP3 ISP preview":0 [SGRBG10 2592x1943]' media-ctl -f '"OMAP3 ISP preview":1 [YUYV 2574x1935]' yavta --capture=4 -f YUYV -s 2574x1935 -F /dev/video4
Quoted 3 lines
I still only get the frame sync interrupts in the previewer, no buffer interrupts, hence no data flowing to my application. What else can I look at?
Do you get VD0 and VD1 interrupts ?
Signature · 3 lines
Regards, Laurent Pinchart
Quoted 227 lines · Laurent Pinchart
Hi Gary,
Quoted 224 lines · On Wednesday 16 November 2011 13:03:11 Gary Thomas wrote:
Quoted 206 lines · Laurent Pinchart
Quoted 73 lines · On Monday 14 November 2011 12:42:54 Gary Thomas wrote:
Quoted 72 lines · Laurent Pinchart
Quoted 71 lines · On Wednesday 09 November 2011 17:24:26 Gary Thomas wrote:
Quoted 70 lines · Laurent Pinchart
Quoted 69 lines · On Wednesday 09 November 2011 12:01:34 Gary Thomas wrote:
Quoted 68 lines · Laurent Pinchart
Quoted 67 lines · On Tuesday 08 November 2011 14:38:55 Gary Thomas wrote:
Quoted 65 lines · Laurent Pinchart
Quoted 50 lines · On Tuesday 08 November 2011 13:52:25 Gary Thomas wrote:
Quoted 49 lines · Javier Martinez Canillas
On Tue, Nov 8, 2011 at 1:20 PM, Gary Thomas wrote:
On 2011-11-04 04:37, Laurent Pinchart wrote:
On Tuesday 01 November 2011 19:52:49 Gary Thomas wrote:
I'm trying to use the MT9P031 digital sensor with the Media
Controller Framework. media-ctl tells me that the sensor is
set to capture using SGRBG12 2592x1944Questions:
* What pixel format in ffmpeg does this correspond to?I don't know if ffmpeg supports Bayer formats. The
corresponding fourcc in V4L2 is BA12.ffmpeg doesn't seem to support these formats
If your sensor is hooked up to the OMAP3 ISP, you can then
configure the pipeline to include the preview engine and the
resizer, and capture YUV data
at the resizer output.I am using the OMAP3 ISP, but it's a bit unclear to me how to
set up the pipelineHi Gary,
I'm also using another sensor mtv9034 with OMAP3 ISP, so maybe
I can help you.using media-ctl (I looked for documentation on this tool, but
came up dry - is there any?)Do you have an example of how to configure this using the
OMAP3 ISP?This is how I configure the pipeline to connect the CCDC with
the Previewer and Resizer:./media-ctl -l '"mt9v032 3-005c":0->"OMAP3 ISP CCDC":0[1]'
./media-ctl -l '"OMAP3 ISP CCDC":2->"OMAP3 ISP preview":0[1]'
./media-ctl -l '"OMAP3 ISP preview":1->"OMAP3 ISP
resizer":0[1]' ./media-ctl -l '"OMAP3 ISP resizer":1->"OMAP3
ISP resizer output":0[1]' ./media-ctl -f '"mt9v032
3-005c":0[SGRBG10 752x480]' ./media-ctl -f '"OMAP3 ISP
CCDC":0 [SGRBG10 752x480]' ./media-ctl -f '"OMAP3 ISP CCDC":1
[SGRBG10 752x480]' ./media-ctl -f '"OMAP3 ISP preview":0
[SGRBG10 752x479]' ./media-ctl -f '"OMAP3 ISP resizer":0
[YUYV 734x471]' ./media-ctl -f '"OMAP3 ISP resizer":1 [YUYV
640x480]'Quoted 7 lines
Quoted 1 line
Hope it helps,
Thanks, I'll give this a try.
I assume that your sensor is probably larger than 752x480 (the mt9p031 is 2592x1944 raw) and that setting the smaller frame size enables some scaling and/or cropping in the driver?
The mt9v034 is a wide VGA 752x480 sensor if I'm not mistaken. You should modify the resolutions in the above commands according to your sensor. Note that the CCDC crops online line when outputting data to the preview engine, and that the preview engine crops 18 columsn and 8 lines. You can then scale the image by modifying the resizer output size.
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Thanks. After much trial and error (and some kernel printks to
understand what parameters were failing), I came up with this
sequence:
Quoted 115 lines
Quoted 88 lines
Quoted 78 lines
Quoted 78 lines
Quoted 41 lines
Quoted 41 lines
Quoted 40 lines
media-ctl -r media-ctl -l '"mt9p031 3-005d":0->"OMAP3 ISP CCDC":0[1]' media-ctl -l '"OMAP3 ISP CCDC":2->"OMAP3 ISP preview":0[1]' media-ctl -l '"OMAP3 ISP preview":1->"OMAP3 ISP resizer":0[1]' media-ctl -l '"OMAP3 ISP resizer":1->"OMAP3 ISP resizer output":0[1]' media-ctl -f '"mt9p031 3-005d":0[SGRBG12 2592x1944]' media-ctl -f '"OMAP3 ISP CCDC":0 [SGRBG12 2592x1944]' media-ctl -f '"OMAP3 ISP CCDC":1 [SGRBG12 2592x1944]' media-ctl -f '"OMAP3 ISP preview":0 [SGRBG12 2592x1943]' media-ctl -f '"OMAP3 ISP resizer":0 [YUYV 2574x1935]' media-ctl -f '"OMAP3 ISP resizer":1 [YUYV 642x483]'When I tried to grab though, I got this:
# yavta --capture=4 -f YUYV -s 642x483 -F /dev/video6 Device /dev/video6 opened. Device `OMAP3 ISP resizer output' on `media' is a video capture device. Video format set: YUYV (56595559) 642x483 buffer size 633696 Video format: YUYV (56595559) 642x483 buffer size 633696 8 buffers requested. length: 633696 offset: 0 Buffer 0 mapped at address 0x4028c000. length: 633696 offset: 634880 Buffer 1 mapped at address 0x403d0000. length: 633696 offset: 1269760 Buffer 2 mapped at address 0x404b3000. length: 633696 offset: 1904640 Buffer 3 mapped at address 0x4062b000. length: 633696 offset: 2539520 Buffer 4 mapped at address 0x406d6000. length: 633696 offset: 3174400 Buffer 5 mapped at address 0x40821000. length: 633696 offset: 3809280 Buffer 6 mapped at address 0x4097c000. length: 633696 offset: 4444160 Buffer 7 mapped at address 0x40adf000.Unable to handle kernel NULL pointer dereference at virtualaddress 00000018
Quoted 7 lines
Quoted 4 lines
Ouch :-(
Could you please verify that
arch/arm/mach-omap2/board-overo.cincludes the following code, and thatCONFIG_OMAP_MUXis enabled ?I'm not using an Overo board - rather one of our own internal designs.
My bad, sorry.
Quoted 26 lines
I have verified that the pull up/down on those pins is disabled.
The failure is coming from this code in
ispccdc.cstatic void
ccdc_hs_vs_isr(struct isp_ccdc_device *ccdc){struct
isp_pipeline*pipe =
to_isp_pipeline(&ccdc->video_out.video.entity);The value of pipe is NULL which leads to the failure.
Questions:
* I assume that getting HS/VS interrupts is correct in this mode?
* Why is the statement not written (as all others are)struct isp_pipeline *pipe = to_isp_pipeline(&ccdc->subdev.entity); I tried this change and the kernel doesn't crash.I've found that I can get raw frames out of CCDC, but I don't get anything at all when the output continues through the preview and/or resize nodes.
Ideas?
Quoted 7 lines
Quoted 4 lines
I'm really puzzled, this should have been caught much earlier :-)
Your analysis makes sense. Would you like to submit a patch yourself ? If not I can do it.
Sure, I can submit a patch. I would like to figure out why it's not working first.
Oops, I've overlooked that, sorry.
Quoted 7 lines
Quoted 4 lines
Any ideas how I can debug this? I can't seem to get anything past the CCDC, e.g. into the preview or resize units. Is there some way to trace packets/data through the various stages? Any ideas what might cause it to stall?
How have you configured your pipeline ? Can you try tracing the preview engine and/or resizer interrupts ?
Here's my pipeline:
media-ctl -r media-ctl -l '"mt9p031 3-005d":0->"OMAP3 ISP CCDC":0[1]' media-ctl -l '"OMAP3 ISP CCDC":2->"OMAP3 ISP preview":0[1]' media-ctl -l '"OMAP3 ISP preview":1->"OMAP3 ISP resizer":0[1]' media-ctl -l '"OMAP3 ISP resizer":1->"OMAP3 ISP resizer output":0[1]' media-ctl -f '"mt9p031 3-005d":0[SGRBG12 2592x1944]' media-ctl -f '"OMAP3 ISP CCDC":0 [SGRBG10 2592x1944]' media-ctl -f '"OMAP3 ISP CCDC":1 [SGRBG10 2592x1944]' media-ctl -f '"OMAP3 ISP preview":0 [SGRBG10 2592x1943]' media-ctl -f '"OMAP3 ISP resizer":0 [YUYV 2574x1935]' media-ctl -f '"OMAP3 ISP resizer":1 [YUYV 642x483]'The full media-ctl dump is at http://www.mlbassoc.com/misc/pipeline.out
When I try to grab from
/dev/video6(output node of resizer), I see only previewer interrupts, no resizer interrrupts. I added a simple printk at each of the previewer/resizer*_isrfunctions, and I onlyQuoted 5 lines
ever see this one:
omap3isp_preview_isr_frame_sync.1373Can you give me an overview of what events/interrupts should occur so I can try to trace through the ISP to see where it is failing?
The CCDC generates VD0, VD1 and HS/VS interrupts regardless of whether it processes video or not, as long as it receives a video stream at its input. The preview engine and resizer will only generate an interrupt after writing an image to memory. With your above configuration VD0, VD1, HS/VS and resizer interrupts should be generated.
Quoted 5 lines
Your pipeline configuration looks correct, except that the downscaling factor is slightly larger than 4. Could you try to setup the resizer to output a 2574x1935 image instead of 642x483 ? If that works, try to downscale to 660x496. If that works as well, the driver should be fixed to disallow resolutions that won't work.
No change. I also tried using only the previewer like this:
media-ctl -r media-ctl -l '"mt9p031 3-005d":0->"OMAP3 ISP CCDC":0[1]' media-ctl -l '"OMAP3 ISP CCDC":2->"OMAP3 ISP preview":0[1]' media-ctl -l '"OMAP3 ISP preview":1->"OMAP3 ISP preview output":0[1]' media-ctl -f '"mt9p031 3-005d":0[SGRBG12 2592x1944]' media-ctl -f '"OMAP3 ISP CCDC":0 [SGRBG12 2592x1944]' media-ctl -f '"OMAP3 ISP CCDC":1 [SGRBG10 2592x1944]' media-ctl -f '"OMAP3 ISP preview":0 [SGRBG10 2592x1943]' media-ctl -f '"OMAP3 ISP preview":1 [YUYV 2574x1935]'
Quoted 7 lines
Quoted 5 lines
yavta --capture=4 -f YUYV -s 2574x1935 -F /dev/video4I still only get the frame sync interrupts in the previewer, no buffer interrupts, hence no data flowing to my application. What else can I look at?
Do you get VD0 and VD1 interrupts ?
Yes, the CCDC is working correctly, but nothing moves through the previewer. Here's a trace of the interrupt sequence I get, repeated over and over. These are printed as __FUNCTION__.__LINE__
--- ccdc_vd0_isr.1615
--- ccdc_hs_vs_isr.1482
--- ccdc_vd1_isr.1664
--- omap3isp_preview_isr_frame_sync.1373
What's the best tree to try this against? 3.2-rc2 doesn't have the BT656 stuff in it yet, so I've been still using my older tree (3.0.0 + drivers/media from your tree)
Thanks
Signature · 4 lines
------------------------------------------------------------ Gary Thomas | Consulting for the MLB Associates | Embedded world ------------------------------------------------------------
Hi Gary,
Quoted 249 lines · On Friday 25 November 2011 12:50:25 Gary Thomas wrote:
Quoted 232 lines · Laurent Pinchart
Quoted 231 lines · On Wednesday 16 November 2011 13:03:11 Gary Thomas wrote:
Quoted 213 lines · Laurent Pinchart
Quoted 73 lines · On Monday 14 November 2011 12:42:54 Gary Thomas wrote:
Quoted 72 lines · Laurent Pinchart
Quoted 71 lines · On Wednesday 09 November 2011 17:24:26 Gary Thomas wrote:
Quoted 70 lines · Laurent Pinchart
Quoted 69 lines · On Wednesday 09 November 2011 12:01:34 Gary Thomas wrote:
Quoted 68 lines · Laurent Pinchart
Quoted 67 lines · On Tuesday 08 November 2011 14:38:55 Gary Thomas wrote:
Quoted 65 lines · Laurent Pinchart
Quoted 57 lines · On Tuesday 08 November 2011 13:52:25 Gary Thomas wrote:
On 2011-11-08 05:30, Javier Martinez Canillas wrote:
On Tue, Nov 8, 2011 at 1:20 PM, Gary Thomas wrote:
On 2011-11-04 04:37, Laurent Pinchart wrote:
On Tuesday 01 November 2011 19:52:49 Gary Thomas wrote:
I'm trying to use the MT9P031 digital sensor with the
Media Controller Framework. media-ctl tells me that the
sensor is set to capture using SGRBG12 2592x1944Questions:
* What pixel format in ffmpeg does this correspond to?I don't know if ffmpeg supports Bayer formats. The
corresponding fourcc in V4L2 is BA12.ffmpeg doesn't seem to support these formats
If your sensor is hooked up to the OMAP3 ISP, you can then
configure the pipeline to include the preview engine and
the resizer, and capture YUV data
at the resizer output.I am using the OMAP3 ISP, but it's a bit unclear to me how
to set up the pipelineHi Gary,
I'm also using another sensor mtv9034 with OMAP3 ISP, so
maybe I can help you.using media-ctl (I looked for documentation on this tool,
but came up dry - is there any?)Do you have an example of how to configure this using the
OMAP3 ISP?This is how I configure the pipeline to connect the CCDC with
the Previewer and Resizer:./media-ctl -l '"mt9v032 3-005c":0->"OMAP3 ISP CCDC":0[1]'
./media-ctl -l '"OMAP3 ISP CCDC":2->"OMAP3 ISP preview":0[1]'
./media-ctl -l '"OMAP3 ISP preview":1->"OMAP3 ISP
resizer":0[1]' ./media-ctl -l '"OMAP3 ISP resizer":1->"OMAP3
ISP resizer output":0[1]' ./media-ctl -f '"mt9v032
3-005c":0[SGRBG10 752x480]' ./media-ctl -f '"OMAP3 ISP
CCDC":0 [SGRBG10 752x480]' ./media-ctl -f '"OMAP3 ISP
CCDC":1 [SGRBG10 752x480]' ./media-ctl -f '"OMAP3 ISP
preview":0 [SGRBG10 752x479]' ./media-ctl -f '"OMAP3 ISP
resizer":0 [YUYV 734x471]' ./media-ctl -f '"OMAP3 ISP
resizer":1 [YUYV 640x480]'Hope it helps,
Thanks, I'll give this a try.
I assume that your sensor is probably larger than 752x480 (the
mt9p031 is 2592x1944 raw) and that setting the smaller frame
size enables some scaling and/or cropping in the driver?The mt9v034 is a wide VGA 752x480 sensor if I'm not mistaken. You should modify the resolutions in the above commands according to your sensor. Note that the CCDC crops online line when outputting data to the preview engine, and that the preview engine crops 18 columsn and 8 lines. You can then scale the image by modifying the resizer output size.
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Thanks. After much trial and error (and some kernel printks to
understand what parameters were failing), I came up with this
sequence:
Quoted 121 lines
Quoted 92 lines
Quoted 82 lines
Quoted 82 lines
Quoted 43 lines
Quoted 43 lines
Quoted 42 lines
media-ctl -r media-ctl -l '"mt9p031 3-005d":0->"OMAP3 ISP CCDC":0[1]' media-ctl -l '"OMAP3 ISP CCDC":2->"OMAP3 ISP preview":0[1]' media-ctl -l '"OMAP3 ISP preview":1->"OMAP3 ISP resizer":0[1]' media-ctl -l '"OMAP3 ISP resizer":1->"OMAP3 ISP resizer output":0[1]' media-ctl -f '"mt9p031 3-005d":0[SGRBG12 2592x1944]' media-ctl -f '"OMAP3 ISP CCDC":0 [SGRBG12 2592x1944]' media-ctl -f '"OMAP3 ISP CCDC":1 [SGRBG12 2592x1944]' media-ctl -f '"OMAP3 ISP preview":0 [SGRBG12 2592x1943]' media-ctl -f '"OMAP3 ISP resizer":0 [YUYV 2574x1935]' media-ctl -f '"OMAP3 ISP resizer":1 [YUYV 642x483]'When I tried to grab though, I got this:
# yavta --capture=4 -f YUYV -s 642x483 -F /dev/video6 Device /dev/video6 opened. Device `OMAP3 ISP resizer output' on `media' is a video capture device. Video format set: YUYV (56595559) 642x483 buffer size 633696 Video format: YUYV (56595559) 642x483 buffer size 633696 8 buffers requested. length: 633696 offset: 0 Buffer 0 mapped at address 0x4028c000. length: 633696 offset: 634880 Buffer 1 mapped at address 0x403d0000. length: 633696 offset: 1269760 Buffer 2 mapped at address 0x404b3000. length: 633696 offset: 1904640 Buffer 3 mapped at address 0x4062b000. length: 633696 offset: 2539520 Buffer 4 mapped at address 0x406d6000. length: 633696 offset: 3174400 Buffer 5 mapped at address 0x40821000. length: 633696 offset: 3809280 Buffer 6 mapped at address 0x4097c000. length: 633696 offset: 4444160 Buffer 7 mapped at address 0x40adf000.Unable to handle kernel NULL pointer dereference at virtualaddress 00000018
Quoted 8 lines
Quoted 5 lines
Ouch :-(
Could you please verify that
arch/arm/mach-omap2/board-overo.cincludes the following code, and thatCONFIG_OMAP_MUXis enabled ?I'm not using an Overo board - rather one of our own internal designs.
My bad, sorry.
Quoted 27 lines
I have verified that the pull up/down on those pins is disabled.
The failure is coming from this code in
ispccdc.cstatic void
ccdc_hs_vs_isr(struct isp_ccdc_device *ccdc){struct
isp_pipeline*pipe =
to_isp_pipeline(&ccdc->video_out.video.entity);The value of pipe is NULL which leads to the failure.
Questions:
* I assume that getting HS/VS interrupts is correct in this mode?
* Why is the statement not written (as all others are)struct
isp_pipeline*pipe =
to_isp_pipeline(&ccdc->subdev.entity);I tried this change and the kernel doesn't crash.
I've found that I can get raw frames out of CCDC, but I don't get anything at all when the output continues through the preview and/or resize nodes.
Ideas?
Quoted 7 lines
Quoted 4 lines
I'm really puzzled, this should have been caught much earlier :-)
Your analysis makes sense. Would you like to submit a patch yourself ? If not I can do it.
Sure, I can submit a patch. I would like to figure out why it's not working first.
Oops, I've overlooked that, sorry.
Quoted 7 lines
Quoted 4 lines
Any ideas how I can debug this? I can't seem to get anything past the CCDC, e.g. into the preview or resize units. Is there some way to trace packets/data through the various stages? Any ideas what might cause it to stall?
How have you configured your pipeline ? Can you try tracing the preview engine and/or resizer interrupts ?
Here's my pipeline:
media-ctl -r media-ctl -l '"mt9p031 3-005d":0->"OMAP3 ISP CCDC":0[1]' media-ctl -l '"OMAP3 ISP CCDC":2->"OMAP3 ISP preview":0[1]' media-ctl -l '"OMAP3 ISP preview":1->"OMAP3 ISP resizer":0[1]' media-ctl -l '"OMAP3 ISP resizer":1->"OMAP3 ISP resizer output":0[1]' media-ctl -f '"mt9p031 3-005d":0[SGRBG12 2592x1944]' media-ctl -f '"OMAP3 ISP CCDC":0 [SGRBG10 2592x1944]' media-ctl -f '"OMAP3 ISP CCDC":1 [SGRBG10 2592x1944]' media-ctl -f '"OMAP3 ISP preview":0 [SGRBG10 2592x1943]' media-ctl -f '"OMAP3 ISP resizer":0 [YUYV 2574x1935]' media-ctl -f '"OMAP3 ISP resizer":1 [YUYV 642x483]'The full media-ctl dump is at
http://www.mlbassoc.com/misc/pipeline.outWhen I try to grab from
/dev/video6(output node of resizer), I see only previewer interrupts, no resizer interrrupts. I added a simple printk at each of the previewer/resizer*_isrfunctions, and I onlyQuoted 5 lines
ever see this one:
omap3isp_preview_isr_frame_sync.1373Can you give me an overview of what events/interrupts should occur so I can try to trace through the ISP to see where it is failing?
The CCDC generates VD0, VD1 and HS/VS interrupts regardless of whether it processes video or not, as long as it receives a video stream at its input. The preview engine and resizer will only generate an interrupt after writing an image to memory. With your above configuration VD0, VD1, HS/VS and resizer interrupts should be generated.
Quoted 5 lines
Your pipeline configuration looks correct, except that the downscaling factor is slightly larger than 4. Could you try to setup the resizer to output a 2574x1935 image instead of 642x483 ? If that works, try to downscale to 660x496. If that works as well, the driver should be fixed to disallow resolutions that won't work.
No change. I also tried using only the previewer like this:
media-ctl -r media-ctl -l '"mt9p031 3-005d":0->"OMAP3 ISP CCDC":0[1]' media-ctl -l '"OMAP3 ISP CCDC":2->"OMAP3 ISP preview":0[1]' media-ctl -l '"OMAP3 ISP preview":1->"OMAP3 ISP preview output":0[1]' media-ctl -f '"mt9p031 3-005d":0[SGRBG12 2592x1944]' media-ctl -f '"OMAP3 ISP CCDC":0 [SGRBG12 2592x1944]' media-ctl -f '"OMAP3 ISP CCDC":1 [SGRBG10 2592x1944]' media-ctl -f '"OMAP3 ISP preview":0 [SGRBG10 2592x1943]' media-ctl -f '"OMAP3 ISP preview":1 [YUYV 2574x1935]'Quoted 7 lines
Quoted 5 lines
yavta --capture=4 -f YUYV -s 2574x1935 -F /dev/video4I still only get the frame sync interrupts in the previewer, no buffer interrupts, hence no data flowing to my application. What else can I look at?
Do you get VD0 and VD1 interrupts ?
Yes, the CCDC is working correctly, but nothing moves through the previewer. Here's a trace of the interrupt sequence I get, repeated over and over. These are printed as __FUNCTION__.__LINE__
--- ccdc_vd0_isr.1615
--- ccdc_hs_vs_isr.1482
--- ccdc_vd1_isr.1664
--- omap3isp_preview_isr_frame_sync.1373
Quoted 3 lines
What's the best tree to try this against? 3.2-rc2 doesn't have the BT656 stuff in it yet, so I've been still using my older tree (3.0.0 +
drivers/mediafrom your tree)
I thought you were using an MT9P031 ? That doesn't require BT656 support.
Signature · 3 lines
Regards, Laurent Pinchart
Quoted 252 lines · Laurent Pinchart
Hi Gary,
Quoted 249 lines · On Friday 25 November 2011 12:50:25 Gary Thomas wrote:
Quoted 232 lines · Laurent Pinchart
Quoted 231 lines · On Wednesday 16 November 2011 13:03:11 Gary Thomas wrote:
Quoted 213 lines · Laurent Pinchart
Quoted 73 lines · On Monday 14 November 2011 12:42:54 Gary Thomas wrote:
Quoted 72 lines · Laurent Pinchart
Quoted 71 lines · On Wednesday 09 November 2011 17:24:26 Gary Thomas wrote:
Quoted 70 lines · Laurent Pinchart
Quoted 69 lines · On Wednesday 09 November 2011 12:01:34 Gary Thomas wrote:
Quoted 68 lines · Laurent Pinchart
Quoted 67 lines · On Tuesday 08 November 2011 14:38:55 Gary Thomas wrote:
Quoted 65 lines · Laurent Pinchart
On Tuesday 08 November 2011 13:52:25 Gary Thomas wrote:
On 2011-11-08 05:30, Javier Martinez Canillas wrote:
On Tue, Nov 8, 2011 at 1:20 PM, Gary Thomas wrote:
On 2011-11-04 04:37, Laurent Pinchart wrote:
On Tuesday 01 November 2011 19:52:49 Gary Thomas wrote:
I'm trying to use the MT9P031 digital sensor with the
Media Controller Framework. media-ctl tells me that the
sensor is set to capture using SGRBG12 2592x1944Questions:
* What pixel format in ffmpeg does this correspond to?I don't know if ffmpeg supports Bayer formats. The
corresponding fourcc in V4L2 is BA12.ffmpeg doesn't seem to support these formats
If your sensor is hooked up to the OMAP3 ISP, you can then
configure the pipeline to include the preview engine and
the resizer, and capture YUV data
at the resizer output.I am using the OMAP3 ISP, but it's a bit unclear to me how
to set up the pipelineHi Gary,
I'm also using another sensor mtv9034 with OMAP3 ISP, so
maybe I can help you.using media-ctl (I looked for documentation on this tool,
but came up dry - is there any?)Do you have an example of how to configure this using the
OMAP3 ISP?This is how I configure the pipeline to connect the CCDC with
the Previewer and Resizer:./media-ctl -l '"mt9v032 3-005c":0->"OMAP3 ISP CCDC":0[1]'
./media-ctl -l '"OMAP3 ISP CCDC":2->"OMAP3 ISP preview":0[1]'
./media-ctl -l '"OMAP3 ISP preview":1->"OMAP3 ISP
resizer":0[1]' ./media-ctl -l '"OMAP3 ISP resizer":1->"OMAP3
ISP resizer output":0[1]' ./media-ctl -f '"mt9v032
3-005c":0[SGRBG10 752x480]' ./media-ctl -f '"OMAP3 ISP
CCDC":0 [SGRBG10 752x480]' ./media-ctl -f '"OMAP3 ISP
CCDC":1 [SGRBG10 752x480]' ./media-ctl -f '"OMAP3 ISP
preview":0 [SGRBG10 752x479]' ./media-ctl -f '"OMAP3 ISP
resizer":0 [YUYV 734x471]' ./media-ctl -f '"OMAP3 ISP
resizer":1 [YUYV 640x480]'Hope it helps,
Thanks, I'll give this a try.
I assume that your sensor is probably larger than 752x480 (the
mt9p031 is 2592x1944 raw) and that setting the smaller frame
size enables some scaling and/or cropping in the driver?The mt9v034 is a wide VGA 752x480 sensor if I'm not mistaken.
You should modify the resolutions in the above commands
according to your sensor. Note that the CCDC crops online line
when outputting data to the preview engine, and that the
preview engine crops 18 columsn and 8 lines. You can then
scale the image by modifying the resizer output size.Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Thanks. After much trial and error (and some kernel printks to
understand what parameters were failing), I came up with this
sequence:
Quoted 121 lines
Quoted 92 lines
Quoted 82 lines
Quoted 82 lines
Quoted 43 lines
Quoted 43 lines
Quoted 42 lines
media-ctl -r media-ctl -l '"mt9p031 3-005d":0->"OMAP3 ISP CCDC":0[1]' media-ctl -l '"OMAP3 ISP CCDC":2->"OMAP3 ISP preview":0[1]' media-ctl -l '"OMAP3 ISP preview":1->"OMAP3 ISP resizer":0[1]' media-ctl -l '"OMAP3 ISP resizer":1->"OMAP3 ISP resizer output":0[1]' media-ctl -f '"mt9p031 3-005d":0[SGRBG12 2592x1944]' media-ctl -f '"OMAP3 ISP CCDC":0 [SGRBG12 2592x1944]' media-ctl -f '"OMAP3 ISP CCDC":1 [SGRBG12 2592x1944]' media-ctl -f '"OMAP3 ISP preview":0 [SGRBG12 2592x1943]' media-ctl -f '"OMAP3 ISP resizer":0 [YUYV 2574x1935]' media-ctl -f '"OMAP3 ISP resizer":1 [YUYV 642x483]'When I tried to grab though, I got this:
# yavta --capture=4 -f YUYV -s 642x483 -F /dev/video6 Device /dev/video6 opened. Device `OMAP3 ISP resizer output' on `media' is a video capture device. Video format set: YUYV (56595559) 642x483 buffer size 633696 Video format: YUYV (56595559) 642x483 buffer size 633696 8 buffers requested. length: 633696 offset: 0 Buffer 0 mapped at address 0x4028c000. length: 633696 offset: 634880 Buffer 1 mapped at address 0x403d0000. length: 633696 offset: 1269760 Buffer 2 mapped at address 0x404b3000. length: 633696 offset: 1904640 Buffer 3 mapped at address 0x4062b000. length: 633696 offset: 2539520 Buffer 4 mapped at address 0x406d6000. length: 633696 offset: 3174400 Buffer 5 mapped at address 0x40821000. length: 633696 offset: 3809280 Buffer 6 mapped at address 0x4097c000. length: 633696 offset: 4444160 Buffer 7 mapped at address 0x40adf000.Unable to handle kernel NULL pointer dereference at virtualaddress 00000018
Quoted 8 lines
Quoted 5 lines
Ouch :-(
Could you please verify that
arch/arm/mach-omap2/board-overo.cincludes the following code, and thatCONFIG_OMAP_MUXis enabled ?I'm not using an Overo board - rather one of our own internal designs.
My bad, sorry.
Quoted 27 lines
I have verified that the pull up/down on those pins is disabled.
The failure is coming from this code in
ispccdc.cstatic void
ccdc_hs_vs_isr(struct isp_ccdc_device *ccdc){struct
isp_pipeline*pipe =
to_isp_pipeline(&ccdc->video_out.video.entity);The value of pipe is NULL which leads to the failure.
Questions:
* I assume that getting HS/VS interrupts is correct in this mode?
* Why is the statement not written (as all others are)struct
isp_pipeline*pipe =
to_isp_pipeline(&ccdc->subdev.entity);I tried this change and the kernel doesn't crash.
I've found that I can get raw frames out of CCDC, but I don't get anything at all when the output continues through the preview and/or resize nodes.
Ideas?
Quoted 7 lines
Quoted 4 lines
I'm really puzzled, this should have been caught much earlier :-)
Your analysis makes sense. Would you like to submit a patch yourself ? If not I can do it.
Sure, I can submit a patch. I would like to figure out why it's not working first.
Oops, I've overlooked that, sorry.
Quoted 7 lines
Quoted 4 lines
Any ideas how I can debug this? I can't seem to get anything past the CCDC, e.g. into the preview or resize units. Is there some way to trace packets/data through the various stages? Any ideas what might cause it to stall?
How have you configured your pipeline ? Can you try tracing the preview engine and/or resizer interrupts ?
Here's my pipeline:
media-ctl -r media-ctl -l '"mt9p031 3-005d":0->"OMAP3 ISP CCDC":0[1]' media-ctl -l '"OMAP3 ISP CCDC":2->"OMAP3 ISP preview":0[1]' media-ctl -l '"OMAP3 ISP preview":1->"OMAP3 ISP resizer":0[1]' media-ctl -l '"OMAP3 ISP resizer":1->"OMAP3 ISP resizer output":0[1]' media-ctl -f '"mt9p031 3-005d":0[SGRBG12 2592x1944]' media-ctl -f '"OMAP3 ISP CCDC":0 [SGRBG10 2592x1944]' media-ctl -f '"OMAP3 ISP CCDC":1 [SGRBG10 2592x1944]' media-ctl -f '"OMAP3 ISP preview":0 [SGRBG10 2592x1943]' media-ctl -f '"OMAP3 ISP resizer":0 [YUYV 2574x1935]' media-ctl -f '"OMAP3 ISP resizer":1 [YUYV 642x483]'The full media-ctl dump is at
http://www.mlbassoc.com/misc/pipeline.outWhen I try to grab from
/dev/video6(output node of resizer), I see only previewer interrupts, no resizer interrrupts. I added a simple printk at each of the previewer/resizer*_isrfunctions, and I onlyQuoted 5 lines
ever see this one:
omap3isp_preview_isr_frame_sync.1373Can you give me an overview of what events/interrupts should occur so I can try to trace through the ISP to see where it is failing?
The CCDC generates VD0, VD1 and HS/VS interrupts regardless of whether it processes video or not, as long as it receives a video stream at its input. The preview engine and resizer will only generate an interrupt after writing an image to memory. With your above configuration VD0, VD1, HS/VS and resizer interrupts should be generated.
Quoted 5 lines
Your pipeline configuration looks correct, except that the downscaling factor is slightly larger than 4. Could you try to setup the resizer to output a 2574x1935 image instead of 642x483 ? If that works, try to downscale to 660x496. If that works as well, the driver should be fixed to disallow resolutions that won't work.
No change. I also tried using only the previewer like this:
media-ctl -r media-ctl -l '"mt9p031 3-005d":0->"OMAP3 ISP CCDC":0[1]' media-ctl -l '"OMAP3 ISP CCDC":2->"OMAP3 ISP preview":0[1]' media-ctl -l '"OMAP3 ISP preview":1->"OMAP3 ISP preview output":0[1]' media-ctl -f '"mt9p031 3-005d":0[SGRBG12 2592x1944]' media-ctl -f '"OMAP3 ISP CCDC":0 [SGRBG12 2592x1944]' media-ctl -f '"OMAP3 ISP CCDC":1 [SGRBG10 2592x1944]' media-ctl -f '"OMAP3 ISP preview":0 [SGRBG10 2592x1943]' media-ctl -f '"OMAP3 ISP preview":1 [YUYV 2574x1935]'Quoted 7 lines
Quoted 5 lines
yavta --capture=4 -f YUYV -s 2574x1935 -F /dev/video4I still only get the frame sync interrupts in the previewer, no buffer interrupts, hence no data flowing to my application. What else can I look at?
Do you get VD0 and VD1 interrupts ?
Yes, the CCDC is working correctly, but nothing moves through the previewer. Here's a trace of the interrupt sequence I get, repeated over and over. These are printed as __FUNCTION__.__LINE__
--- ccdc_vd0_isr.1615
--- ccdc_hs_vs_isr.1482
--- ccdc_vd1_isr.1664
--- omap3isp_preview_isr_frame_sync.1373
Quoted 6 lines
Quoted 3 lines
What's the best tree to try this against? 3.2-rc2 doesn't have the BT656 stuff in it yet, so I've been still using my older tree (3.0.0 +
drivers/mediafrom your tree)I thought you were using an MT9P031 ? That doesn't require BT656 support.
True, but I have one board that supports either sensor and I want to stay with one source tree.
Signature · 4 lines
------------------------------------------------------------ Gary Thomas | Consulting for the MLB Associates | Embedded world ------------------------------------------------------------
Hi Gary,
Quoted 6 lines · On Monday 28 November 2011 13:42:47 Gary Thomas wrote:
Quoted 5 lines · Laurent Pinchart
Quoted 4 lines · On Friday 25 November 2011 12:50:25 Gary Thomas wrote:
Quoted 3 lines · Laurent Pinchart
Quoted 2 lines · On Wednesday 16 November 2011 13:03:11 Gary Thomas wrote:
Quoted 1 line · Laurent Pinchart
On Monday 14 November 2011 12:42:54 Gary Thomas wrote:
[snip]
Quoted 69 lines
Quoted 69 lines
Quoted 69 lines
Quoted 53 lines
Quoted 53 lines
Quoted 35 lines
Quoted 21 lines
Here's my pipeline:
media-ctl -r media-ctl -l '"mt9p031 3-005d":0->"OMAP3 ISP CCDC":0[1]' media-ctl -l '"OMAP3 ISP CCDC":2->"OMAP3 ISP preview":0[1]' media-ctl -l '"OMAP3 ISP preview":1->"OMAP3 ISP resizer":0[1]' media-ctl -l '"OMAP3 ISP resizer":1->"OMAP3 ISP resizer output":0[1]' media-ctl -f '"mt9p031 3-005d":0[SGRBG12 2592x1944]' media-ctl -f '"OMAP3 ISP CCDC":0 [SGRBG10 2592x1944]' media-ctl -f '"OMAP3 ISP CCDC":1 [SGRBG10 2592x1944]' media-ctl -f '"OMAP3 ISP preview":0 [SGRBG10 2592x1943]' media-ctl -f '"OMAP3 ISP resizer":0 [YUYV 2574x1935]' media-ctl -f '"OMAP3 ISP resizer":1 [YUYV 642x483]'The full media-ctl dump is at
http://www.mlbassoc.com/misc/pipeline.outWhen I try to grab from
/dev/video6(output node of resizer), I see only previewer interrupts, no resizer interrrupts. I added a simple printk at each of the previewer/resizer*_isrfunctions, and I onlyQuoted 5 lines
ever see this one:
omap3isp_preview_isr_frame_sync.1373Can you give me an overview of what events/interrupts should occur so I can try to trace through the ISP to see where it is failing?
The CCDC generates VD0, VD1 and HS/VS interrupts regardless of whether it processes video or not, as long as it receives a video stream at its input. The preview engine and resizer will only generate an interrupt after writing an image to memory. With your above
configuration VD0, VD1, HS/VS and resizer interrupts should be generated.Quoted 5 lines
Your pipeline configuration looks correct, except that the downscaling factor is slightly larger than 4. Could you try to setup the resizer to output a 2574x1935 image instead of 642x483 ? If that works, try to downscale to 660x496. If that works as well, the driver should be fixed to disallow resolutions that won't work.
No change. I also tried using only the previewer like this:
media-ctl -r media-ctl -l '"mt9p031 3-005d":0->"OMAP3 ISP CCDC":0[1]' media-ctl -l '"OMAP3 ISP CCDC":2->"OMAP3 ISP preview":0[1]' media-ctl -l '"OMAP3 ISP preview":1->"OMAP3 ISP preview output":0[1]' media-ctl -f '"mt9p031 3-005d":0[SGRBG12 2592x1944]' media-ctl -f '"OMAP3 ISP CCDC":0 [SGRBG12 2592x1944]' media-ctl -f '"OMAP3 ISP CCDC":1 [SGRBG10 2592x1944]' media-ctl -f '"OMAP3 ISP preview":0 [SGRBG10 2592x1943]' media-ctl -f '"OMAP3 ISP preview":1 [YUYV 2574x1935]'Quoted 7 lines
Quoted 5 lines
yavta --capture=4 -f YUYV -s 2574x1935 -F /dev/video4I still only get the frame sync interrupts in the previewer, no buffer interrupts, hence no data flowing to my application. What else can I look at?
Do you get VD0 and VD1 interrupts ?
Yes, the CCDC is working correctly, but nothing moves through the previewer. Here's a trace of the interrupt sequence I get, repeated over and over. These are printed as __FUNCTION__.__LINE__
--- ccdc_vd0_isr.1615
--- ccdc_hs_vs_isr.1482
--- ccdc_vd1_isr.1664
--- omap3isp_preview_isr_frame_sync.1373
Quoted 8 lines
Quoted 5 lines
Quoted 3 lines
What's the best tree to try this against? 3.2-rc2 doesn't have the BT656 stuff in it yet, so I've been still using my older tree (3.0.0 +
drivers/mediafrom your tree)I thought you were using an MT9P031 ? That doesn't require BT656 support.
True, but I have one board that supports either sensor and I want to stay with one source tree.
Sure, but let's start with a non-BT656 tree to rule out issues caused by BT656 patches. Could you please try mainline v3.1 ?
Signature · 3 lines
Regards, Laurent Pinchart
Quoted 85 lines · Laurent Pinchart
Hi Gary,
Quoted 6 lines · On Monday 28 November 2011 13:42:47 Gary Thomas wrote:
Quoted 5 lines · Laurent Pinchart
Quoted 4 lines · On Friday 25 November 2011 12:50:25 Gary Thomas wrote:
Quoted 3 lines · Laurent Pinchart
Quoted 2 lines · On Wednesday 16 November 2011 13:03:11 Gary Thomas wrote:
Quoted 1 line · Laurent Pinchart
On Monday 14 November 2011 12:42:54 Gary Thomas wrote:
[snip]
Quoted 73 lines
Quoted 73 lines
Quoted 72 lines
Quoted 53 lines
Quoted 53 lines
Quoted 35 lines
Quoted 21 lines
Here's my pipeline:
media-ctl -r media-ctl -l '"mt9p031 3-005d":0->"OMAP3 ISP CCDC":0[1]' media-ctl -l '"OMAP3 ISP CCDC":2->"OMAP3 ISP preview":0[1]' media-ctl -l '"OMAP3 ISP preview":1->"OMAP3 ISP resizer":0[1]' media-ctl -l '"OMAP3 ISP resizer":1->"OMAP3 ISP resizer output":0[1]' media-ctl -f '"mt9p031 3-005d":0[SGRBG12 2592x1944]' media-ctl -f '"OMAP3 ISP CCDC":0 [SGRBG10 2592x1944]' media-ctl -f '"OMAP3 ISP CCDC":1 [SGRBG10 2592x1944]' media-ctl -f '"OMAP3 ISP preview":0 [SGRBG10 2592x1943]' media-ctl -f '"OMAP3 ISP resizer":0 [YUYV 2574x1935]' media-ctl -f '"OMAP3 ISP resizer":1 [YUYV 642x483]'The full media-ctl dump is at
http://www.mlbassoc.com/misc/pipeline.outWhen I try to grab from
/dev/video6(output node of resizer), I see only previewer interrupts, no resizer interrrupts. I added a simple printk at each of the previewer/resizer*_isrfunctions, and I onlyQuoted 5 lines
ever see this one:
omap3isp_preview_isr_frame_sync.1373Can you give me an overview of what events/interrupts should occur so I can try to trace through the ISP to see where it is failing?
The CCDC generates VD0, VD1 and HS/VS interrupts regardless of whether it processes video or not, as long as it receives a video stream at its input. The preview engine and resizer will only generate an interrupt after writing an image to memory. With your above
configuration VD0, VD1, HS/VS and resizer interrupts should be generated.Quoted 5 lines
Your pipeline configuration looks correct, except that the downscaling factor is slightly larger than 4. Could you try to setup the resizer to output a 2574x1935 image instead of 642x483 ? If that works, try to downscale to 660x496. If that works as well, the driver should be fixed to disallow resolutions that won't work.
No change. I also tried using only the previewer like this:
media-ctl -r media-ctl -l '"mt9p031 3-005d":0->"OMAP3 ISP CCDC":0[1]' media-ctl -l '"OMAP3 ISP CCDC":2->"OMAP3 ISP preview":0[1]' media-ctl -l '"OMAP3 ISP preview":1->"OMAP3 ISP preview output":0[1]' media-ctl -f '"mt9p031 3-005d":0[SGRBG12 2592x1944]' media-ctl -f '"OMAP3 ISP CCDC":0 [SGRBG12 2592x1944]' media-ctl -f '"OMAP3 ISP CCDC":1 [SGRBG10 2592x1944]' media-ctl -f '"OMAP3 ISP preview":0 [SGRBG10 2592x1943]' media-ctl -f '"OMAP3 ISP preview":1 [YUYV 2574x1935]'Quoted 7 lines
Quoted 5 lines
yavta --capture=4 -f YUYV -s 2574x1935 -F /dev/video4I still only get the frame sync interrupts in the previewer, no buffer interrupts, hence no data flowing to my application. What else can I look at?
Do you get VD0 and VD1 interrupts ?
Yes, the CCDC is working correctly, but nothing moves through the previewer. Here's a trace of the interrupt sequence I get, repeated over and over. These are printed as __FUNCTION__.__LINE__
--- ccdc_vd0_isr.1615
--- ccdc_hs_vs_isr.1482
--- ccdc_vd1_isr.1664
--- omap3isp_preview_isr_frame_sync.1373What's the best tree to try this against? 3.2-rc2 doesn't have the BT656 stuff in it yet, so I've been still using my older tree (3.0.0 +
drivers/mediafrom your tree)
Quoted 7 lines
Quoted 4 lines
Quoted 1 line
I thought you were using an MT9P031 ? That doesn't require BT656 support.
True, but I have one board that supports either sensor and I want to stay with one source tree.
Sure, but let's start with a non-BT656 tree to rule out issues caused by BT656 patches. Could you please try mainline v3.1 ?
OK, I'll give that a try & get back to you.
Thanks
Signature · 4 lines
------------------------------------------------------------ Gary Thomas | Consulting for the MLB Associates | Embedded world ------------------------------------------------------------
Quoted 85 lines · Laurent Pinchart
Hi Gary,
Quoted 6 lines · On Monday 28 November 2011 13:42:47 Gary Thomas wrote:
Quoted 5 lines · Laurent Pinchart
Quoted 4 lines · On Friday 25 November 2011 12:50:25 Gary Thomas wrote:
Quoted 3 lines · Laurent Pinchart
Quoted 2 lines · On Wednesday 16 November 2011 13:03:11 Gary Thomas wrote:
Quoted 1 line · Laurent Pinchart
On Monday 14 November 2011 12:42:54 Gary Thomas wrote:
[snip]
Quoted 73 lines
Quoted 73 lines
Quoted 72 lines
Quoted 53 lines
Quoted 53 lines
Quoted 35 lines
Quoted 21 lines
Here's my pipeline:
media-ctl -r media-ctl -l '"mt9p031 3-005d":0->"OMAP3 ISP CCDC":0[1]' media-ctl -l '"OMAP3 ISP CCDC":2->"OMAP3 ISP preview":0[1]' media-ctl -l '"OMAP3 ISP preview":1->"OMAP3 ISP resizer":0[1]' media-ctl -l '"OMAP3 ISP resizer":1->"OMAP3 ISP resizer output":0[1]' media-ctl -f '"mt9p031 3-005d":0[SGRBG12 2592x1944]' media-ctl -f '"OMAP3 ISP CCDC":0 [SGRBG10 2592x1944]' media-ctl -f '"OMAP3 ISP CCDC":1 [SGRBG10 2592x1944]' media-ctl -f '"OMAP3 ISP preview":0 [SGRBG10 2592x1943]' media-ctl -f '"OMAP3 ISP resizer":0 [YUYV 2574x1935]' media-ctl -f '"OMAP3 ISP resizer":1 [YUYV 642x483]'The full media-ctl dump is at
http://www.mlbassoc.com/misc/pipeline.outWhen I try to grab from
/dev/video6(output node of resizer), I see only previewer interrupts, no resizer interrrupts. I added a simple printk at each of the previewer/resizer*_isrfunctions, and I onlyQuoted 5 lines
ever see this one:
omap3isp_preview_isr_frame_sync.1373Can you give me an overview of what events/interrupts should occur so I can try to trace through the ISP to see where it is failing?
The CCDC generates VD0, VD1 and HS/VS interrupts regardless of whether it processes video or not, as long as it receives a video stream at its input. The preview engine and resizer will only generate an interrupt after writing an image to memory. With your above
configuration VD0, VD1, HS/VS and resizer interrupts should be generated.Quoted 5 lines
Your pipeline configuration looks correct, except that the downscaling factor is slightly larger than 4. Could you try to setup the resizer to output a 2574x1935 image instead of 642x483 ? If that works, try to downscale to 660x496. If that works as well, the driver should be fixed to disallow resolutions that won't work.
No change. I also tried using only the previewer like this:
media-ctl -r media-ctl -l '"mt9p031 3-005d":0->"OMAP3 ISP CCDC":0[1]' media-ctl -l '"OMAP3 ISP CCDC":2->"OMAP3 ISP preview":0[1]' media-ctl -l '"OMAP3 ISP preview":1->"OMAP3 ISP preview output":0[1]' media-ctl -f '"mt9p031 3-005d":0[SGRBG12 2592x1944]' media-ctl -f '"OMAP3 ISP CCDC":0 [SGRBG12 2592x1944]' media-ctl -f '"OMAP3 ISP CCDC":1 [SGRBG10 2592x1944]' media-ctl -f '"OMAP3 ISP preview":0 [SGRBG10 2592x1943]' media-ctl -f '"OMAP3 ISP preview":1 [YUYV 2574x1935]'Quoted 7 lines
Quoted 5 lines
yavta --capture=4 -f YUYV -s 2574x1935 -F /dev/video4I still only get the frame sync interrupts in the previewer, no buffer interrupts, hence no data flowing to my application. What else can I look at?
Do you get VD0 and VD1 interrupts ?
Yes, the CCDC is working correctly, but nothing moves through the previewer. Here's a trace of the interrupt sequence I get, repeated over and over. These are printed as __FUNCTION__.__LINE__
--- ccdc_vd0_isr.1615
--- ccdc_hs_vs_isr.1482
--- ccdc_vd1_isr.1664
--- omap3isp_preview_isr_frame_sync.1373What's the best tree to try this against? 3.2-rc2 doesn't have the BT656 stuff in it yet, so I've been still using my older tree (3.0.0 +
drivers/mediafrom your tree)
Quoted 7 lines
Quoted 4 lines
Quoted 1 line
I thought you were using an MT9P031 ? That doesn't require BT656 support.
True, but I have one board that supports either sensor and I want to stay with one source tree.
Sure, but let's start with a non-BT656 tree to rule out issues caused by BT656 patches. Could you please try mainline v3.1 ?
This sort of works(*), but I'm still having issues (at least I can move frames!) When I configure the pipeline like this:
media-ctl -r
media-ctl -l '"mt9p031 3-005d":0->"OMAP3 ISP CCDC":0[1]' media-ctl -l '"OMAP3 ISP CCDC":2->"OMAP3 ISP preview":0[1]' media-ctl -l '"OMAP3 ISP preview":1->"OMAP3 ISP resizer":0[1]' media-ctl -l '"OMAP3 ISP resizer":1->"OMAP3 ISP resizer output":0[1]' media-ctl -f '"mt9p031 3-005d":0[SGRBG12 2592x1944]'
media-ctl -f '"OMAP3 ISP CCDC":0 [SGRBG12 2592x1944]' media-ctl -f '"OMAP3 ISP CCDC":1 [SGRBG10 2592x1944]' media-ctl -f '"OMAP3 ISP preview":0 [SGRBG10 2592x1943]' media-ctl -f '"OMAP3 ISP resizer":0 [YUYV 2574x1935]' media-ctl -f '"OMAP3 ISP resizer":1 [YUYV 660x496]'
the resulting frames are 666624 bytes each instead of 654720
When I tried to grab from the previewer, the frames were 9969120 instead of 9961380
Any ideas what resolution is actually being moved through?
(*) to build on v3.1, I had to manually add the mt9p031 driver and fix a compile error in drivers/media/video/omap/omap_vout.c
Thanks
Signature · 4 lines
------------------------------------------------------------ Gary Thomas | Consulting for the MLB Associates | Embedded world ------------------------------------------------------------
Hi Gary,
Quoted 107 lines · On Wednesday 30 November 2011 15:13:18 Gary Thomas wrote:
Quoted 84 lines · Laurent Pinchart
Quoted 6 lines · On Monday 28 November 2011 13:42:47 Gary Thomas wrote:
Quoted 5 lines · Laurent Pinchart
Quoted 4 lines · On Friday 25 November 2011 12:50:25 Gary Thomas wrote:
Quoted 3 lines · Laurent Pinchart
Quoted 2 lines · On Wednesday 16 November 2011 13:03:11 Gary Thomas wrote:
Quoted 1 line · Laurent Pinchart
On Monday 14 November 2011 12:42:54 Gary Thomas wrote:
[snip]
Quoted 75 lines
Quoted 75 lines
Quoted 74 lines
Quoted 55 lines
Quoted 55 lines
Quoted 36 lines
Quoted 22 lines
Here's my pipeline:
media-ctl -r media-ctl -l '"mt9p031 3-005d":0->"OMAP3 ISP CCDC":0[1]' media-ctl -l '"OMAP3 ISP CCDC":2->"OMAP3 ISP preview":0[1]' media-ctl -l '"OMAP3 ISP preview":1->"OMAP3 ISP resizer":0[1]' media-ctl -l '"OMAP3 ISP resizer":1->"OMAP3 ISP resizer output":0[1]' media-ctl -f '"mt9p031 3-005d":0[SGRBG12 2592x1944]' media-ctl -f '"OMAP3 ISP CCDC":0 [SGRBG10 2592x1944]' media-ctl -f '"OMAP3 ISP CCDC":1 [SGRBG10 2592x1944]' media-ctl -f '"OMAP3 ISP preview":0 [SGRBG10 2592x1943]' media-ctl -f '"OMAP3 ISP resizer":0 [YUYV 2574x1935]' media-ctl -f '"OMAP3 ISP resizer":1 [YUYV 642x483]'The full media-ctl dump is at
http://www.mlbassoc.com/misc/pipeline.outWhen I try to grab from
/dev/video6(output node of resizer), I see only previewer interrupts, no resizer interrrupts. I added a simple printk at each of the previewer/resizer*_isrfunctions, and I onlyQuoted 5 lines
ever see this one:
omap3isp_preview_isr_frame_sync.1373Can you give me an overview of what events/interrupts should occur so I can try to trace through the ISP to see where it is failing?
The CCDC generates VD0, VD1 and HS/VS interrupts regardless of whether it processes video or not, as long as it receives a video stream at its input. The preview engine and resizer will only generate an interrupt after writing an image to memory. With your above
configuration VD0, VD1, HS/VS and resizer interrupts should be generated.Quoted 6 lines
Your pipeline configuration looks correct, except that the downscaling factor is slightly larger than 4. Could you try to setup the resizer to output a 2574x1935 image instead of 642x483 ? If that works, try to downscale to 660x496. If that works as well, the driver should be fixed to disallow resolutions that won't work.
No change. I also tried using only the previewer like this:
media-ctl -r media-ctl -l '"mt9p031 3-005d":0->"OMAP3 ISP CCDC":0[1]' media-ctl -l '"OMAP3 ISP CCDC":2->"OMAP3 ISP preview":0[1]' media-ctl -l '"OMAP3 ISP preview":1->"OMAP3 ISP preview output":0[1]' media-ctl -f '"mt9p031 3-005d":0[SGRBG12 2592x1944]' media-ctl -f '"OMAP3 ISP CCDC":0 [SGRBG12 2592x1944]' media-ctl -f '"OMAP3 ISP CCDC":1 [SGRBG10 2592x1944]' media-ctl -f '"OMAP3 ISP preview":0 [SGRBG10 2592x1943]' media-ctl -f '"OMAP3 ISP preview":1 [YUYV 2574x1935]'Quoted 7 lines
Quoted 5 lines
yavta --capture=4 -f YUYV -s 2574x1935 -F /dev/video4I still only get the frame sync interrupts in the previewer, no buffer interrupts, hence no data flowing to my application. What else can I look at?
Do you get VD0 and VD1 interrupts ?
Yes, the CCDC is working correctly, but nothing moves through the previewer. Here's a trace of the interrupt sequence I get, repeated over and over. These are printed as __FUNCTION__.__LINE__ --- ccdc_vd0_isr.1615
--- ccdc_hs_vs_isr.1482
--- ccdc_vd1_isr.1664
--- omap3isp_preview_isr_frame_sync.1373What's the best tree to try this against? 3.2-rc2 doesn't have the BT656 stuff in it yet, so I've been still using my older tree (3.0.0 +
drivers/mediafrom your tree)Quoted 8 lines
Quoted 5 lines
Quoted 2 lines
I thought you were using an MT9P031 ? That doesn't require BT656 support.
True, but I have one board that supports either sensor and I want to stay with one source tree.
Sure, but let's start with a non-BT656 tree to rule out issues caused by BT656 patches. Could you please try mainline v3.1 ?
This sort of
works(*), but I'm still having issues (at least I can move frames!) When I configure the pipeline like this:media-ctl -r media-ctl -l '"mt9p031 3-005d":0->"OMAP3 ISP CCDC":0[1]' media-ctl -l '"OMAP3 ISP CCDC":2->"OMAP3 ISP preview":0[1]' media-ctl -l '"OMAP3 ISP preview":1->"OMAP3 ISP resizer":0[1]' media-ctl -l '"OMAP3 ISP resizer":1->"OMAP3 ISP resizer output":0[1]' media-ctl -f '"mt9p031 3-005d":0[SGRBG12 2592x1944]' media-ctl -f '"OMAP3 ISP CCDC":0 [SGRBG12 2592x1944]' media-ctl -f '"OMAP3 ISP CCDC":1 [SGRBG10 2592x1944]' media-ctl -f '"OMAP3 ISP preview":0 [SGRBG10 2592x1943]' media-ctl -f '"OMAP3 ISP resizer":0 [YUYV 2574x1935]' media-ctl -f '"OMAP3 ISP resizer":1 [YUYV 660x496]'
Quoted 6 lines
the resulting frames are 666624 bytes each instead of 654720
When I tried to grab from the previewer, the frames were 9969120 instead of 9961380
Any ideas what resolution is actually being moved through?
Because the OMAP3 ISP has alignment requirements. Both the preview engine and the resizer output line lenghts must be multiple of 32 bytes. The driver adds padding at end of lines when the output width isn't a multiple of 16 pixels.
So this means that your original problem comes from the BT656 patches.
Quoted 2 lines
(*) to build on v3.1, I had to manually add the mt9p031 driver and fix a compile error in
drivers/media/video/omap/omap_vout.c
I'm surprised that omap_vout doesn't compile on v3.1. What was the error ?
Signature · 3 lines
Regards, Laurent Pinchart
Quoted 146 lines
-----Original Message-----
From: [email protected] [mailto:linux-media- [email protected]] On Behalf Of Laurent Pinchart
Sent: Wednesday, November 30, 2011 8:01 PM
To: Gary Thomas
Cc: Javier Martinez Canillas; Linux Media Mailing List
Subject: Re: Using MT9P031 digital sensorHi Gary,
Quoted 6 lines · On Wednesday 30 November 2011 15:13:18 Gary Thomas wrote:
Quoted 5 lines · Laurent Pinchart
Quoted 4 lines · On Monday 28 November 2011 13:42:47 Gary Thomas wrote:
Quoted 3 lines · Laurent Pinchart
Quoted 2 lines · On Friday 25 November 2011 12:50:25 Gary Thomas wrote:
Quoted 1 line · Laurent Pinchart
On Wednesday 16 November 2011 13:03:11 Gary Thomas wrote:
Quoted 8 lines
Quoted 8 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines · Laurent Pinchart
Quoted 1 line · On Monday 14 November 2011 12:42:54 Gary Thomas wrote:
[snip]
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Here's my pipeline:
media-ctl -r media-ctl -l '"mt9p031 3-005d":0->"OMAP3 ISP CCDC":0[1]' media-ctl -l '"OMAP3 ISP CCDC":2->"OMAP3 ISPpreview":0[1]'
Quoted 8 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
media-ctl -l '"OMAP3 ISP preview":1->"OMAP3 ISP resizer":0[1]' media-ctl -l '"OMAP3 ISP resizer":1-"OMAP3
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
ISP resizer output":0[1]' media-ctl -f '"mt9p031 3-005d":0[SGRBG12 2592x1944]' media-ctl -f '"OMAP3 ISP CCDC":0 [SGRBG10 2592x1944]' media-ctl -f '"OMAP3 ISP CCDC":1 [SGRBG10 2592x1944]' media-ctl -f '"OMAP3 ISP preview":0 [SGRBG102592x1943]'
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
media-ctl -f '"OMAP3 ISP resizer":0 [YUYV 2574x1935]' media-ctl -f '"OMAP3 ISP resizer":1 [YUYV 642x483]'The full media-ctl dump is at
http://www.mlbassoc.com/misc/pipeline.outWhen I try to grab from
/dev/video6(output node of resizer), I see only previewer interrupts, no resizer interrrupts. I addeda
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
simple printk at each of the previewer/resizer
*_isrfunctions, and I onlyever see this one:
omap3isp_preview_isr_frame_sync.1373Can you give me an overview of what events/interrupts should
occur
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
so I can try to trace through the ISP to see where it is
failing?
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
The CCDC generates VD0, VD1 and HS/VS interrupts regardless of whether it processes video or not, as long as it receives a
video
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
stream at its input. The preview engine and resizer will only generate an interrupt after writing an image to memory. With
your
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
above
configuration VD0, VD1, HS/VS and resizer interrupts should be generated.Your pipeline configuration looks correct, except that the downscaling factor is slightly larger than 4. Could you try to setup the resizer to output a 2574x1935 image instead of
642x483 ?
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
If that works, try to downscale to 660x496. If that works as
well,
Quoted 31 lines
Quoted 31 lines
Quoted 31 lines
Quoted 31 lines
Quoted 31 lines
Quoted 15 lines
Quoted 15 lines
Quoted 2 lines
the driver should be fixed to disallow resolutions that won't work.
No change. I also tried using only the previewer like this:
media-ctl -r media-ctl -l '"mt9p031 3-005d":0->"OMAP3 ISP CCDC":0[1]' media-ctl -l '"OMAP3 ISP CCDC":2->"OMAP3 ISP preview":0[1]' media-ctl -l '"OMAP3 ISP preview":1->"OMAP3 ISP preview output":0[1]' media-ctl -f '"mt9p031 3-005d":0[SGRBG12 2592x1944]' media-ctl -f '"OMAP3 ISP CCDC":0 [SGRBG12 2592x1944]' media-ctl -f '"OMAP3 ISP CCDC":1 [SGRBG10 2592x1944]' media-ctl -f '"OMAP3 ISP preview":0 [SGRBG10 2592x1943]' media-ctl -f '"OMAP3 ISP preview":1 [YUYV 2574x1935]'Quoted 7 lines
Quoted 5 lines
yavta --capture=4 -f YUYV -s 2574x1935 -F /dev/video4I still only get the frame sync interrupts in the previewer, no buffer interrupts, hence no data flowing to my application. What else can I look at?
Do you get VD0 and VD1 interrupts ?
Yes, the CCDC is working correctly, but nothing moves through the previewer. Here's a trace of the interrupt sequence I get, repeated over and over. These are printed as __FUNCTION__.__LINE__ --- ccdc_vd0_isr.1615
--- ccdc_hs_vs_isr.1482
--- ccdc_vd1_isr.1664
--- omap3isp_preview_isr_frame_sync.1373Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
What's the best tree to try this against? 3.2-rc2 doesn't have the BT656 stuff in it yet, so I've been still using my older tree
(3.0.0 +
Quoted 9 lines
Quoted 9 lines
Quoted 7 lines
Quoted 4 lines
Quoted 1 line
drivers/mediafrom your tree)I thought you were using an MT9P031 ? That doesn't require BT656 support.
True, but I have one board that supports either sensor and I want to stay with one source tree.
Sure, but let's start with a non-BT656 tree to rule out issues caused
by
Quoted 15 lines
Quoted 1 line
BT656 patches. Could you please try mainline v3.1 ?
This sort of
works(*), but I'm still having issues (at least I can move frames!) When I configure the pipeline like this:media-ctl -r media-ctl -l '"mt9p031 3-005d":0->"OMAP3 ISP CCDC":0[1]' media-ctl -l '"OMAP3 ISP CCDC":2->"OMAP3 ISP preview":0[1]' media-ctl -l '"OMAP3 ISP preview":1->"OMAP3 ISP resizer":0[1]' media-ctl -l '"OMAP3 ISP resizer":1->"OMAP3 ISP resizer output":0[1]' media-ctl -f '"mt9p031 3-005d":0[SGRBG12 2592x1944]' media-ctl -f '"OMAP3 ISP CCDC":0 [SGRBG12 2592x1944]' media-ctl -f '"OMAP3 ISP CCDC":1 [SGRBG10 2592x1944]' media-ctl -f '"OMAP3 ISP preview":0 [SGRBG10 2592x1943]' media-ctl -f '"OMAP3 ISP resizer":0 [YUYV 2574x1935]' media-ctl -f '"OMAP3 ISP resizer":1 [YUYV 660x496]'Quoted 3 lines
the resulting frames are 666624 bytes each instead of 654720
When I tried to grab from the previewer, the frames were 9969120 instead
of
Quoted 3 lines
9961380
Any ideas what resolution is actually being moved through?
Because the OMAP3 ISP has alignment requirements. Both the preview engine and
the resizer output line lenghts must be multiple of 32 bytes. The driver adds
padding at end of lines when the output width isn't a multiple of 16 pixels.
Quoted 7 lines
So this means that your original problem comes from the BT656 patches.
Quoted 2 lines
(*) to build on v3.1, I had to manually add the mt9p031 driver and fix a compile error in
drivers/media/video/omap/omap_vout.cI'm surprised that
omap_voutdoesn't compile on v3.1. What was the error ?
Do you have below patch in your kernel baseline -
commit 5ebbf72dc51bd3b481aa91fea37a7157da5fc548
Author: archit taneja <[email protected]> Date: Fri Aug 5 04:19:21 2011 -0300
[media] OMAP_VOUT: Fix build break caused by update_mode removal in DSS2
Thanks,
Vaibhav
Quoted 8 lines
--
Regards,Laurent Pinchart
--
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
Quoted 112 lines · Laurent Pinchart
Hi Gary,
Quoted 109 lines · On Wednesday 30 November 2011 15:13:18 Gary Thomas wrote:
Quoted 84 lines · Laurent Pinchart
Quoted 6 lines · On Monday 28 November 2011 13:42:47 Gary Thomas wrote:
Quoted 5 lines · Laurent Pinchart
Quoted 4 lines · On Friday 25 November 2011 12:50:25 Gary Thomas wrote:
Quoted 3 lines · Laurent Pinchart
Quoted 2 lines · On Wednesday 16 November 2011 13:03:11 Gary Thomas wrote:
Quoted 1 line · Laurent Pinchart
On Monday 14 November 2011 12:42:54 Gary Thomas wrote:
[snip]
Quoted 75 lines
Quoted 75 lines
Quoted 74 lines
Quoted 55 lines
Quoted 55 lines
Quoted 36 lines
Quoted 22 lines
Here's my pipeline:
media-ctl -r media-ctl -l '"mt9p031 3-005d":0->"OMAP3 ISP CCDC":0[1]' media-ctl -l '"OMAP3 ISP CCDC":2->"OMAP3 ISP preview":0[1]' media-ctl -l '"OMAP3 ISP preview":1->"OMAP3 ISP resizer":0[1]' media-ctl -l '"OMAP3 ISP resizer":1->"OMAP3 ISP resizer output":0[1]' media-ctl -f '"mt9p031 3-005d":0[SGRBG12 2592x1944]' media-ctl -f '"OMAP3 ISP CCDC":0 [SGRBG10 2592x1944]' media-ctl -f '"OMAP3 ISP CCDC":1 [SGRBG10 2592x1944]' media-ctl -f '"OMAP3 ISP preview":0 [SGRBG10 2592x1943]' media-ctl -f '"OMAP3 ISP resizer":0 [YUYV 2574x1935]' media-ctl -f '"OMAP3 ISP resizer":1 [YUYV 642x483]'The full media-ctl dump is at
http://www.mlbassoc.com/misc/pipeline.outWhen I try to grab from
/dev/video6(output node of resizer), I see only previewer interrupts, no resizer interrrupts. I added a simple printk at each of the previewer/resizer*_isrfunctions, and I onlyQuoted 5 lines
ever see this one:
omap3isp_preview_isr_frame_sync.1373Can you give me an overview of what events/interrupts should occur so I can try to trace through the ISP to see where it is failing?
The CCDC generates VD0, VD1 and HS/VS interrupts regardless of whether it processes video or not, as long as it receives a video stream at its input. The preview engine and resizer will only generate an interrupt after writing an image to memory. With your above
configuration VD0, VD1, HS/VS and resizer interrupts should be generated.Quoted 6 lines
Your pipeline configuration looks correct, except that the downscaling factor is slightly larger than 4. Could you try to setup the resizer to output a 2574x1935 image instead of 642x483 ? If that works, try to downscale to 660x496. If that works as well, the driver should be fixed to disallow resolutions that won't work.
No change. I also tried using only the previewer like this:
media-ctl -r media-ctl -l '"mt9p031 3-005d":0->"OMAP3 ISP CCDC":0[1]' media-ctl -l '"OMAP3 ISP CCDC":2->"OMAP3 ISP preview":0[1]' media-ctl -l '"OMAP3 ISP preview":1->"OMAP3 ISP preview output":0[1]' media-ctl -f '"mt9p031 3-005d":0[SGRBG12 2592x1944]' media-ctl -f '"OMAP3 ISP CCDC":0 [SGRBG12 2592x1944]' media-ctl -f '"OMAP3 ISP CCDC":1 [SGRBG10 2592x1944]' media-ctl -f '"OMAP3 ISP preview":0 [SGRBG10 2592x1943]' media-ctl -f '"OMAP3 ISP preview":1 [YUYV 2574x1935]'Quoted 7 lines
Quoted 5 lines
yavta --capture=4 -f YUYV -s 2574x1935 -F /dev/video4I still only get the frame sync interrupts in the previewer, no buffer interrupts, hence no data flowing to my application. What else can I look at?
Do you get VD0 and VD1 interrupts ?
Yes, the CCDC is working correctly, but nothing moves through the previewer. Here's a trace of the interrupt sequence I get, repeated over and over. These are printed as __FUNCTION__.__LINE__ --- ccdc_vd0_isr.1615
--- ccdc_hs_vs_isr.1482
--- ccdc_vd1_isr.1664
--- omap3isp_preview_isr_frame_sync.1373What's the best tree to try this against? 3.2-rc2 doesn't have the BT656 stuff in it yet, so I've been still using my older tree (3.0.0 +
drivers/mediafrom your tree)Quoted 8 lines
Quoted 5 lines
Quoted 2 lines
I thought you were using an MT9P031 ? That doesn't require BT656 support.
True, but I have one board that supports either sensor and I want to stay with one source tree.
Sure, but let's start with a non-BT656 tree to rule out issues caused by BT656 patches. Could you please try mainline v3.1 ?
This sort of
works(*), but I'm still having issues (at least I can move frames!) When I configure the pipeline like this:media-ctl -r media-ctl -l '"mt9p031 3-005d":0->"OMAP3 ISP CCDC":0[1]' media-ctl -l '"OMAP3 ISP CCDC":2->"OMAP3 ISP preview":0[1]' media-ctl -l '"OMAP3 ISP preview":1->"OMAP3 ISP resizer":0[1]' media-ctl -l '"OMAP3 ISP resizer":1->"OMAP3 ISP resizer output":0[1]' media-ctl -f '"mt9p031 3-005d":0[SGRBG12 2592x1944]' media-ctl -f '"OMAP3 ISP CCDC":0 [SGRBG12 2592x1944]' media-ctl -f '"OMAP3 ISP CCDC":1 [SGRBG10 2592x1944]' media-ctl -f '"OMAP3 ISP preview":0 [SGRBG10 2592x1943]' media-ctl -f '"OMAP3 ISP resizer":0 [YUYV 2574x1935]' media-ctl -f '"OMAP3 ISP resizer":1 [YUYV 660x496]'the resulting frames are 666624 bytes each instead of 654720
Quoted 8 lines
Quoted 4 lines
When I tried to grab from the previewer, the frames were 9969120 instead of 9961380
Any ideas what resolution is actually being moved through?
Because the OMAP3 ISP has alignment requirements. Both the preview engine and the resizer output line lenghts must be multiple of 32 bytes. The driver adds padding at end of lines when the output width isn't a multiple of 16 pixels.
Any guess which resolution(s) I should change and to what?
Quoted 2 lines
So this means that your original problem comes from the BT656 patches.
Yes, it does look that way. Now that I have something that moves data, I can compare how the ISP is setup between the two versions and come up with a fix.
Quoted 5 lines
Quoted 3 lines
(*) to build on v3.1, I had to manually add the mt9p031 driver and fix a compile error in
drivers/media/video/omap/omap_vout.cI'm surprised that
omap_voutdoesn't compile on v3.1. What was the error ?
The old 'kzalloc' isn't defined. I fixed it like this:
$ git diff v3.1 drivers/media/video/omap/omap_vout.c
drivers/media/video/omap/omap_vout.c +1 -0
@@ -38,6 +38,7 @@#include <linux/irq.h> #include <linux/videodev2.h> #include <linux/dma-mapping.h> +#include <linux/slab.h> #include <media/videobuf-dma-contig.h> #include <media/v4l2-device.h>
Signature · 4 lines
------------------------------------------------------------ Gary Thomas | Consulting for the MLB Associates | Embedded world ------------------------------------------------------------
Quoted 116 lines · Gary Thomas
Quoted 115 lines · Laurent Pinchart
Hi Gary,
Quoted 112 lines · On Wednesday 30 November 2011 15:13:18 Gary Thomas wrote:
Quoted 84 lines · Laurent Pinchart
Quoted 6 lines · On Monday 28 November 2011 13:42:47 Gary Thomas wrote:
Quoted 5 lines · Laurent Pinchart
Quoted 4 lines · On Friday 25 November 2011 12:50:25 Gary Thomas wrote:
Quoted 3 lines · Laurent Pinchart
Quoted 2 lines · On Wednesday 16 November 2011 13:03:11 Gary Thomas wrote:
Quoted 1 line · Laurent Pinchart
On Monday 14 November 2011 12:42:54 Gary Thomas wrote:
[snip]
Quoted 75 lines
Quoted 75 lines
Quoted 74 lines
Quoted 55 lines
Quoted 55 lines
Quoted 36 lines
Quoted 22 lines
Here's my pipeline:
media-ctl -r
media-ctl -l '"mt9p031 3-005d":0->"OMAP3 ISP CCDC":0[1]' media-ctl -l '"OMAP3 ISP CCDC":2->"OMAP3 ISP preview":0[1]' media-ctl -l '"OMAP3 ISP preview":1->"OMAP3 ISP resizer":0[1]' media-ctl -l '"OMAP3 ISP resizer":1->"OMAP3 ISP resizer output":0[1]' media-ctl -f '"mt9p031 3-005d":0[SGRBG12 2592x1944]' media-ctl -f '"OMAP3 ISP CCDC":0 [SGRBG10 2592x1944]'
media-ctl -f '"OMAP3 ISP CCDC":1 [SGRBG10 2592x1944]' media-ctl -f '"OMAP3 ISP preview":0 [SGRBG10 2592x1943]' media-ctl -f '"OMAP3 ISP resizer":0 [YUYV 2574x1935]' media-ctl -f '"OMAP3 ISP resizer":1 [YUYV 642x483]'The full media-ctl dump is at
http://www.mlbassoc.com/misc/pipeline.outWhen I try to grab from
/dev/video6(output node of resizer), I see only previewer interrupts, no resizer interrrupts. I added a simple printk at each of the previewer/resizer*_isrfunctions, and I onlyQuoted 5 lines
ever see this one:
omap3isp_preview_isr_frame_sync.1373Can you give me an overview of what events/interrupts should occur so I can try to trace through the ISP to see where it is failing?
The CCDC generates VD0, VD1 and HS/VS interrupts regardless of whether it processes video or not, as long as it receives a video stream at its input. The preview engine and resizer will only generate an interrupt after writing an image to memory. With your above
configuration VD0, VD1, HS/VS and resizer interrupts should be generated.Quoted 6 lines
Your pipeline configuration looks correct, except that the downscaling factor is slightly larger than 4. Could you try to setup the resizer to output a 2574x1935 image instead of 642x483 ? If that works, try to downscale to 660x496. If that works as well, the driver should be fixed to disallow resolutions that won't work.
No change. I also tried using only the previewer like this:
media-ctl -r
media-ctl -l '"mt9p031 3-005d":0->"OMAP3 ISP CCDC":0[1]' media-ctl -l '"OMAP3 ISP CCDC":2->"OMAP3 ISP preview":0[1]' media-ctl -l '"OMAP3 ISP preview":1->"OMAP3 ISP preview output":0[1]' media-ctl -f '"mt9p031 3-005d":0[SGRBG12 2592x1944]' media-ctl -f '"OMAP3 ISP CCDC":0 [SGRBG12 2592x1944]'
media-ctl -f '"OMAP3 ISP CCDC":1 [SGRBG10 2592x1944]' media-ctl -f '"OMAP3 ISP preview":0 [SGRBG10 2592x1943]' media-ctl -f '"OMAP3 ISP preview":1 [YUYV 2574x1935]'Quoted 7 lines
Quoted 5 lines
yavta --capture=4 -f YUYV -s 2574x1935 -F
/dev/video4I still only get the frame sync interrupts in the previewer, no buffer interrupts, hence no data flowing to my application. What else can I look at?
Do you get VD0 and VD1 interrupts ?
Yes, the CCDC is working correctly, but nothing moves through the previewer. Here's a trace of the interrupt sequence I get, repeated over and over. These are printed as __FUNCTION__.__LINE__ --- ccdc_vd0_isr.1615
--- ccdc_hs_vs_isr.1482
--- ccdc_vd1_isr.1664
--- omap3isp_preview_isr_frame_sync.1373What's the best tree to try this against? 3.2-rc2 doesn't have the BT656 stuff in it yet, so I've been still using my older tree (3.0.0 +
drivers/mediafrom your tree)Quoted 8 lines
Quoted 5 lines
Quoted 2 lines
I thought you were using an MT9P031 ? That doesn't require BT656 support.
True, but I have one board that supports either sensor and I want to stay with one source tree.
Sure, but let's start with a non-BT656 tree to rule out issues caused by BT656 patches. Could you please try mainline v3.1 ?
This sort of
works(*), but I'm still having issues (at least I can move frames!) When I configure the pipeline like this:
media-ctl -r
media-ctl -l '"mt9p031 3-005d":0->"OMAP3 ISP CCDC":0[1]' media-ctl -l '"OMAP3 ISP CCDC":2->"OMAP3 ISP preview":0[1]' media-ctl -l '"OMAP3 ISP preview":1->"OMAP3 ISP resizer":0[1]' media-ctl -l '"OMAP3 ISP resizer":1->"OMAP3 ISP resizer output":0[1]' media-ctl -f '"mt9p031 3-005d":0[SGRBG12 2592x1944]' media-ctl -f '"OMAP3 ISP CCDC":0 [SGRBG12 2592x1944]' media-ctl -f '"OMAP3 ISP CCDC":1 [SGRBG10 2592x1944]' media-ctl -f '"OMAP3 ISP preview":0 [SGRBG10 2592x1943]' media-ctl -f '"OMAP3 ISP resizer":0 [YUYV 2574x1935]' media-ctl -f '"OMAP3 ISP resizer":1 [YUYV 660x496]'
the resulting frames are 666624 bytes each instead of 654720When I tried to grab from the previewer, the frames were 9969120 instead of 9961380
Quoted 7 lines
Quoted 5 lines
Quoted 1 line
Any ideas what resolution is actually being moved through?
Because the OMAP3 ISP has alignment requirements. Both the preview engine and the resizer output line lenghts must be multiple of 32 bytes. The driver adds padding at end of lines when the output width isn't a multiple of 16 pixels.
Any guess which resolution(s) I should change and to what?
I changed the resizer output to be 672x496 and was able to capture video using ffmpeg.
I don't know what to expect with this sensor (I've never seen it in use before), but the image seems to have color balance issues - it's awash in a green hue. It may be the poor lighting in my office... I did try the 9 test patterns which I was able to select via
# v4l2-ctl -d /dev/v4l-subdev8 --set-ctrl=test_pattern=N and these looked OK. You can see them at http://www.mlbassoc.com/misc/mt9p031_images/
Quoted 7 lines
Quoted 3 lines
So this means that your original problem comes from the BT656 patches.
Yes, it does look that way. Now that I have something that moves data, I can compare how the ISP is setup between the two versions and come up with a fix.
This is next on my plate, but it may take a while to figure it out.
Is there some recent tree which will have this digital (mt9p031) part working that also has the BT656 support in it? I'd like to try that rather than spending time figuring out why an older tree isn't working.
Thanks
Signature · 4 lines
------------------------------------------------------------ Gary Thomas | Consulting for the MLB Associates | Embedded world ------------------------------------------------------------
Hi Gary,
Quoted 3 lines · On Wednesday 30 November 2011 18:00:55 Gary Thomas wrote:
Quoted 2 lines · Gary Thomas
Quoted 1 line · Laurent Pinchart
On Wednesday 30 November 2011 15:13:18 Gary Thomas wrote:
[snip]
Quoted 30 lines
Quoted 18 lines
Quoted 18 lines
Quoted 18 lines
This sort of
works(*), but I'm still having issues (at least I can move frames!) When I configure the pipeline like this:
media-ctl -r
media-ctl -l '"mt9p031 3-005d":0->"OMAP3 ISP CCDC":0[1]' media-ctl -l '"OMAP3 ISP CCDC":2->"OMAP3 ISP preview":0[1]' media-ctl -l '"OMAP3 ISP preview":1->"OMAP3 ISP resizer":0[1]' media-ctl -l '"OMAP3 ISP resizer":1->"OMAP3 ISP resizer output":0[1]' media-ctl -f '"mt9p031 3-005d":0[SGRBG12 2592x1944]' media-ctl -f '"OMAP3 ISP CCDC":0 [SGRBG12 2592x1944]' media-ctl -f '"OMAP3 ISP CCDC":1 [SGRBG10 2592x1944]' media-ctl -f '"OMAP3 ISP preview":0 [SGRBG10 2592x1943]' media-ctl -f '"OMAP3 ISP resizer":0 [YUYV 2574x1935]' media-ctl -f '"OMAP3 ISP resizer":1 [YUYV 660x496]'
the resulting frames are 666624 bytes each instead of 654720When I tried to grab from the previewer, the frames were 9969120 instead of 9961380
Quoted 8 lines
Quoted 6 lines
Quoted 1 line
Any ideas what resolution is actually being moved through?
Because the OMAP3 ISP has alignment requirements. Both the preview engine and the resizer output line lenghts must be multiple of 32 bytes. The driver adds padding at end of lines when the output width isn't a multiple of 16 pixels.
Any guess which resolution(s) I should change and to what?
I changed the resizer output to be 672x496 and was able to capture video using ffmpeg.
Quoted 7 lines
I don't know what to expect with this sensor (I've never seen it in use before), but the image seems to have color balance issues - it's awash in a green hue. It may be the poor lighting in my office... I did try the 9 test patterns which I was able to select via
# v4l2-ctl -d /dev/v4l-subdev8 --set-ctrl=test_pattern=N and these looked OK. You can see them at http://www.mlbassoc.com/misc/mt9p031_images/
Neither the sensor nor the OMAP3 ISP implement automatic white balance. The ISP preview engine can be used to modify the white balance, and the statistics engine can be used to extract data useful to compute the white balance parameters, but linking the two needs to be performed in userspace.
Quoted 11 lines
Quoted 5 lines
Quoted 1 line
So this means that your original problem comes from the BT656 patches.
Yes, it does look that way. Now that I have something that moves data, I can compare how the ISP is setup between the two versions and come up with a fix.
This is next on my plate, but it may take a while to figure it out.
Is there some recent tree which will have this digital (mt9p031) part working that also has the BT656 support in it? I'd like to try that rather than spending time figuring out why an older tree isn't working.
No, I haven't had time to create one, sorry. It shouldn't be difficult to rebase the BT656 patches on top of the latest OMAP3 ISP and MT9P031 code.
Signature · 3 lines
Regards, Laurent Pinchart
Hi Gary,
Quoted 119 lines · On Wednesday 30 November 2011 15:57:30 Gary Thomas wrote:
Quoted 118 lines · Laurent Pinchart
Quoted 117 lines · On Wednesday 30 November 2011 15:13:18 Gary Thomas wrote:
Quoted 87 lines · Laurent Pinchart
Quoted 6 lines · On Monday 28 November 2011 13:42:47 Gary Thomas wrote:
Quoted 5 lines · Laurent Pinchart
Quoted 4 lines · On Friday 25 November 2011 12:50:25 Gary Thomas wrote:
Quoted 3 lines · Laurent Pinchart
Quoted 2 lines · On Wednesday 16 November 2011 13:03:11 Gary Thomas wrote:
Quoted 1 line · Laurent Pinchart
On Monday 14 November 2011 12:42:54 Gary Thomas wrote:
[snip]
Quoted 78 lines
Quoted 78 lines
Quoted 77 lines
Quoted 58 lines
Quoted 58 lines
Quoted 39 lines
Quoted 24 lines
Here's my pipeline:
media-ctl -r media-ctl -l '"mt9p031 3-005d":0->"OMAP3 ISP CCDC":0[1]' media-ctl -l '"OMAP3 ISP CCDC":2->"OMAP3 ISP preview":0[1]' media-ctl -l '"OMAP3 ISP preview":1->"OMAP3 ISP resizer":0[1]' media-ctl -l '"OMAP3 ISP resizer":1->"OMAP3 ISP resizer output":0[1]' media-ctl -f '"mt9p031 3-005d":0[SGRBG12 2592x1944]' media-ctl -f '"OMAP3 ISP CCDC":0 [SGRBG10 2592x1944]' media-ctl -f '"OMAP3 ISP CCDC":1 [SGRBG10 2592x1944]' media-ctl -f '"OMAP3 ISP preview":0 [SGRBG10 2592x1943]' media-ctl -f '"OMAP3 ISP resizer":0 [YUYV 2574x1935]' media-ctl -f '"OMAP3 ISP resizer":1 [YUYV 642x483]'The full media-ctl dump is at
http://www.mlbassoc.com/misc/pipeline.outWhen I try to grab from
/dev/video6(output node of resizer), I see only previewer interrupts, no resizer interrrupts. I added a simple printk at each of the previewer/resizer*_isrfunctions, and I onlyQuoted 6 lines
ever see this one:
omap3isp_preview_isr_frame_sync.1373Can you give me an overview of what events/interrupts should occur so I can try to trace through the ISP to see where it is failing?
The CCDC generates VD0, VD1 and HS/VS interrupts regardless of whether it processes video or not, as long as it receives a video stream at its input. The preview engine and resizer will only generate an interrupt after writing an image to memory. With your above
configuration VD0, VD1, HS/VS and resizer interrupts should be generated.Quoted 6 lines
Your pipeline configuration looks correct, except that the downscaling factor is slightly larger than 4. Could you try to setup the resizer to output a 2574x1935 image instead of 642x483 ? If that works, try to downscale to 660x496. If that works as well, the driver should be fixed to disallow resolutions that won't work.
No change. I also tried using only the previewer like this:
media-ctl -r media-ctl -l '"mt9p031 3-005d":0->"OMAP3 ISP CCDC":0[1]' media-ctl -l '"OMAP3 ISP CCDC":2->"OMAP3 ISP preview":0[1]' media-ctl -l '"OMAP3 ISP preview":1->"OMAP3 ISP preview output":0[1]' media-ctl -f '"mt9p031 3-005d":0[SGRBG12 2592x1944]' media-ctl -f '"OMAP3 ISP CCDC":0 [SGRBG12 2592x1944]' media-ctl -f '"OMAP3 ISP CCDC":1 [SGRBG10 2592x1944]' media-ctl -f '"OMAP3 ISP preview":0 [SGRBG10 2592x1943]' media-ctl -f '"OMAP3 ISP preview":1 [YUYV 2574x1935]'Quoted 7 lines
Quoted 5 lines
yavta --capture=4 -f YUYV -s 2574x1935 -F /dev/video4I still only get the frame sync interrupts in the previewer, no buffer interrupts, hence no data flowing to my application. What else can I look at?
Do you get VD0 and VD1 interrupts ?
Yes, the CCDC is working correctly, but nothing moves through the previewer. Here's a trace of the interrupt sequence I get, repeated over and over. These are printed as __FUNCTION__.__LINE__ --- ccdc_vd0_isr.1615
--- ccdc_hs_vs_isr.1482
--- ccdc_vd1_isr.1664
--- omap3isp_preview_isr_frame_sync.1373What's the best tree to try this against? 3.2-rc2 doesn't have the BT656 stuff in it yet, so I've been still using my older tree (3.0.0
+drivers/mediafrom your tree)Quoted 8 lines
Quoted 5 lines
Quoted 2 lines
I thought you were using an MT9P031 ? That doesn't require BT656 support.
True, but I have one board that supports either sensor and I want to stay with one source tree.
Sure, but let's start with a non-BT656 tree to rule out issues caused by BT656 patches. Could you please try mainline v3.1 ?
This sort of
works(*), but I'm still having issues (at least I can moveframes!) When I configure the pipeline like this:
media-ctl -r media-ctl -l '"mt9p031 3-005d":0->"OMAP3 ISP CCDC":0[1]' media-ctl -l '"OMAP3 ISP CCDC":2->"OMAP3 ISP preview":0[1]' media-ctl -l '"OMAP3 ISP preview":1->"OMAP3 ISP resizer":0[1]' media-ctl -l '"OMAP3 ISP resizer":1->"OMAP3 ISP resizer output":0[1]' media-ctl -f '"mt9p031 3-005d":0[SGRBG12 2592x1944]' media-ctl -f '"OMAP3 ISP CCDC":0 [SGRBG12 2592x1944]' media-ctl -f '"OMAP3 ISP CCDC":1 [SGRBG10 2592x1944]' media-ctl -f '"OMAP3 ISP preview":0 [SGRBG10 2592x1943]' media-ctl -f '"OMAP3 ISP resizer":0 [YUYV 2574x1935]' media-ctl -f '"OMAP3 ISP resizer":1 [YUYV 660x496]'the resulting frames are 666624 bytes each instead of 654720
When I tried to grab from the previewer, the frames were 9969120 instead of 9961380
Quoted 8 lines
Quoted 6 lines
Quoted 1 line
Any ideas what resolution is actually being moved through?
Because the OMAP3 ISP has alignment requirements. Both the preview engine and the resizer output line lenghts must be multiple of 32 bytes. The driver adds padding at end of lines when the output width isn't a multiple of 16 pixels.
Any guess which resolution(s) I should change and to what?
You don't have to change any resolution. The driver reports the line length through the bytesperline field in response to G_FMT/TRY_FMT/S_FMT, you can use the value to find out whether there's padding at the end of lines. Alternatively, if you want frames with no line padding, you will need to set the width to a multiple of 16 on the source pad connected to the video node you capture video from.
Quoted 20 lines
Quoted 1 line
So this means that your original problem comes from the BT656 patches.
Yes, it does look that way. Now that I have something that moves data, I can compare how the ISP is setup between the two versions and come up with a fix.
Quoted 5 lines
Quoted 2 lines
(*) to build on v3.1, I had to manually add the mt9p031 driver and fix a compile error in
drivers/media/video/omap/omap_vout.cI'm surprised that
omap_voutdoesn't compile on v3.1. What was the error ?The old 'kzalloc' isn't defined. I fixed it like this:
$ git diff v3.1 drivers/media/video/omap/omap_vout.c(quoted diff) +0
-0
b/drivers/media/video/omap/omap_vout.cindex b3a5ecd..3422da0 100644
drivers/media/video/omap/omap_vout.c line 44
Quoted 7 lines
drivers/media/video/omap/omap_vout.c +1
-0@@ -38,6 +38,7 @@#include <linux/irq.h> #include <linux/videodev2.h> #include <linux/dma-mapping.h> +#include <linux/slab.h> #include <media/videobuf-dma-contig.h> #include <media/v4l2-device.h>
Could you submit a patch to the linux-media mailing list (CC'ing Vaibhav) ? I can do it if that's more convenient for you.
Signature · 3 lines
Regards, Laurent Pinchart