public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
* omap3isp: BT.656 support
@ 2011-10-18 13:33 Boris Todorov
  2011-10-18 14:07 ` Gary Thomas
                   ` (2 more replies)
  0 siblings, 3 replies; 24+ messages in thread
From: Boris Todorov @ 2011-10-18 13:33 UTC (permalink / raw)
  To: linux-media

Hi

I'm trying to run OMAP + TVP5151 in BT656 mode.

I'm using omap3isp-omap3isp-yuv (git.linuxtv.org/pinchartl/media.git).
Plus the following patches:

TVP5151:
https://github.com/ebutera/meta-igep/tree/testing-v2/recipes-kernel/linux/linux-3.0+3.1rc/tvp5150

The latest RFC patches for BT656 support:

Enrico Butera (2):
  omap3isp: ispvideo: export isp_video_mbus_to_pix
  omap3isp: ispccdc: configure CCDC registers and add BT656 support

Javier Martinez Canillas (1):
  omap3isp: ccdc: Add interlaced field mode to platform data


I'm able to configure with media-ctl:

media-ctl -v -r -l '"tvp5150 3-005c":0->"OMAP3 ISP CCDC":0[1], "OMAP3
ISP CCDC":1->"OMAP3 ISP CCDC output":0[1]'
media-ctl -v --set-format '"tvp5150 3-005c":0 [UYVY2X8 720x525]'
media-ctl -v --set-format '"OMAP3 ISP CCDC":0 [UYVY2X8 720x525]'
media-ctl -v --set-format '"OMAP3 ISP CCDC":1 [UYVY2X8 720x525]'

But
./yavta -f UYVY -s 720x525 -n 4 --capture=4 -F /dev/video4

sleeps after
...
Buffer 1 mapped at address 0x4021d000.
length: 756000 offset: 1515520
Buffer 2 mapped at address 0x402d6000.
length: 756000 offset: 2273280
Buffer 3 mapped at address 0x4038f000.

Anyone with the same issue??? This happens with every other v4l test app I used.
I can see data from TVP5151 but there are no interrupts in ISP.

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: omap3isp: BT.656 support
  2011-10-18 13:33 omap3isp: BT.656 support Boris Todorov
@ 2011-10-18 14:07 ` Gary Thomas
  2011-10-18 14:28   ` Boris Todorov
  2011-10-18 16:31 ` Enrico
  2011-10-19 16:26 ` Stefan Herbrechtsmeier
  2 siblings, 1 reply; 24+ messages in thread
From: Gary Thomas @ 2011-10-18 14:07 UTC (permalink / raw)
  To: Boris Todorov; +Cc: linux-media

On 2011-10-18 07:33, Boris Todorov wrote:
> Hi
>
> I'm trying to run OMAP + TVP5151 in BT656 mode.
>
> I'm using omap3isp-omap3isp-yuv (git.linuxtv.org/pinchartl/media.git).
> Plus the following patches:
>
> TVP5151:
> https://github.com/ebutera/meta-igep/tree/testing-v2/recipes-kernel/linux/linux-3.0+3.1rc/tvp5150
>
> The latest RFC patches for BT656 support:
>
> Enrico Butera (2):
>    omap3isp: ispvideo: export isp_video_mbus_to_pix
>    omap3isp: ispccdc: configure CCDC registers and add BT656 support
>
> Javier Martinez Canillas (1):
>    omap3isp: ccdc: Add interlaced field mode to platform data
>
>
> I'm able to configure with media-ctl:
>
> media-ctl -v -r -l '"tvp5150 3-005c":0->"OMAP3 ISP CCDC":0[1], "OMAP3
> ISP CCDC":1->"OMAP3 ISP CCDC output":0[1]'
> media-ctl -v --set-format '"tvp5150 3-005c":0 [UYVY2X8 720x525]'
> media-ctl -v --set-format '"OMAP3 ISP CCDC":0 [UYVY2X8 720x525]'
> media-ctl -v --set-format '"OMAP3 ISP CCDC":1 [UYVY2X8 720x525]'
>
> But
> ./yavta -f UYVY -s 720x525 -n 4 --capture=4 -F /dev/video4
>
> sleeps after
> ...
> Buffer 1 mapped at address 0x4021d000.
> length: 756000 offset: 1515520
> Buffer 2 mapped at address 0x402d6000.
> length: 756000 offset: 2273280
> Buffer 3 mapped at address 0x4038f000.
>
> Anyone with the same issue??? This happens with every other v4l test app I used.
> I can see data from TVP5151 but there are no interrupts in ISP.

Why are you using /dev/video4?  The CCDC output is on /dev/video2

-- 
------------------------------------------------------------
Gary Thomas                 |  Consulting for the
MLB Associates              |    Embedded world
------------------------------------------------------------

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: omap3isp: BT.656 support
  2011-10-18 14:07 ` Gary Thomas
@ 2011-10-18 14:28   ` Boris Todorov
  2011-10-18 14:49     ` Gary Thomas
  0 siblings, 1 reply; 24+ messages in thread
From: Boris Todorov @ 2011-10-18 14:28 UTC (permalink / raw)
  To: Gary Thomas; +Cc: linux-media

I'm using different board.

According "media-ctl -p":

- entity 5: OMAP3 ISP CCDC (3 pads, 9 links)
            type V4L2 subdev subtype Unknown
            device node name /dev/v4l-subdev2
        pad0: Input [UYVY2X8 720x525]
                <- 'OMAP3 ISP CCP2':pad1 []
                <- 'OMAP3 ISP CSI2a':pad1 []
                <- 'tvp5150 3-005c':pad0 [ACTIVE]
        pad1: Output [UYVY2X8 720x525]
                -> 'OMAP3 ISP CCDC output':pad0 [ACTIVE]
                -> 'OMAP3 ISP resizer':pad0 []
        pad2: Output [UYVY2X8 720x524]
                -> 'OMAP3 ISP preview':pad0 []
                -> 'OMAP3 ISP AEWB':pad0 [IMMUTABLE,ACTIVE]
                -> 'OMAP3 ISP AF':pad0 [IMMUTABLE,ACTIVE]
                -> 'OMAP3 ISP histogram':pad0 [IMMUTABLE,ACTIVE]

- entity 6: OMAP3 ISP CCDC output (1 pad, 1 link)
            type Node subtype V4L
            device node name /dev/video4
        pad0: Input
                <- 'OMAP3 ISP CCDC':pad1 [ACTIVE]


Should be /dev/video4...


On Tue, Oct 18, 2011 at 5:07 PM, Gary Thomas <gary@mlbassoc.com> wrote:
> On 2011-10-18 07:33, Boris Todorov wrote:
>>
>> Hi
>>
>> I'm trying to run OMAP + TVP5151 in BT656 mode.
>>
>> I'm using omap3isp-omap3isp-yuv (git.linuxtv.org/pinchartl/media.git).
>> Plus the following patches:
>>
>> TVP5151:
>>
>> https://github.com/ebutera/meta-igep/tree/testing-v2/recipes-kernel/linux/linux-3.0+3.1rc/tvp5150
>>
>> The latest RFC patches for BT656 support:
>>
>> Enrico Butera (2):
>>   omap3isp: ispvideo: export isp_video_mbus_to_pix
>>   omap3isp: ispccdc: configure CCDC registers and add BT656 support
>>
>> Javier Martinez Canillas (1):
>>   omap3isp: ccdc: Add interlaced field mode to platform data
>>
>>
>> I'm able to configure with media-ctl:
>>
>> media-ctl -v -r -l '"tvp5150 3-005c":0->"OMAP3 ISP CCDC":0[1], "OMAP3
>> ISP CCDC":1->"OMAP3 ISP CCDC output":0[1]'
>> media-ctl -v --set-format '"tvp5150 3-005c":0 [UYVY2X8 720x525]'
>> media-ctl -v --set-format '"OMAP3 ISP CCDC":0 [UYVY2X8 720x525]'
>> media-ctl -v --set-format '"OMAP3 ISP CCDC":1 [UYVY2X8 720x525]'
>>
>> But
>> ./yavta -f UYVY -s 720x525 -n 4 --capture=4 -F /dev/video4
>>
>> sleeps after
>> ...
>> Buffer 1 mapped at address 0x4021d000.
>> length: 756000 offset: 1515520
>> Buffer 2 mapped at address 0x402d6000.
>> length: 756000 offset: 2273280
>> Buffer 3 mapped at address 0x4038f000.
>>
>> Anyone with the same issue??? This happens with every other v4l test app I
>> used.
>> I can see data from TVP5151 but there are no interrupts in ISP.
>
> Why are you using /dev/video4?  The CCDC output is on /dev/video2
>
> --
> ------------------------------------------------------------
> Gary Thomas                 |  Consulting for the
> MLB Associates              |    Embedded world
> ------------------------------------------------------------
>

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: omap3isp: BT.656 support
  2011-10-18 14:28   ` Boris Todorov
@ 2011-10-18 14:49     ` Gary Thomas
  2011-10-18 15:10       ` Boris Todorov
  0 siblings, 1 reply; 24+ messages in thread
From: Gary Thomas @ 2011-10-18 14:49 UTC (permalink / raw)
  To: Boris Todorov; +Cc: linux-media

On 2011-10-18 08:28, Boris Todorov wrote:
> I'm using different board.

What board?  I would think the architecture of the OMAP3 ISP would
not change, based on the board?

> According "media-ctl -p":
>
> - entity 5: OMAP3 ISP CCDC (3 pads, 9 links)
>              type V4L2 subdev subtype Unknown
>              device node name /dev/v4l-subdev2
>          pad0: Input [UYVY2X8 720x525]
>                  <- 'OMAP3 ISP CCP2':pad1 []
>                  <- 'OMAP3 ISP CSI2a':pad1 []
>                  <- 'tvp5150 3-005c':pad0 [ACTIVE]
>          pad1: Output [UYVY2X8 720x525]
>                  ->  'OMAP3 ISP CCDC output':pad0 [ACTIVE]
>                  ->  'OMAP3 ISP resizer':pad0 []
>          pad2: Output [UYVY2X8 720x524]
>                  ->  'OMAP3 ISP preview':pad0 []
>                  ->  'OMAP3 ISP AEWB':pad0 [IMMUTABLE,ACTIVE]
>                  ->  'OMAP3 ISP AF':pad0 [IMMUTABLE,ACTIVE]
>                  ->  'OMAP3 ISP histogram':pad0 [IMMUTABLE,ACTIVE]
>
> - entity 6: OMAP3 ISP CCDC output (1 pad, 1 link)
>              type Node subtype V4L
>              device node name /dev/video4
>          pad0: Input
>                  <- 'OMAP3 ISP CCDC':pad1 [ACTIVE]
>
>
> Should be /dev/video4...

Could you send your pipeline setup and full output of 'media-ctl -p'?

>
>
> On Tue, Oct 18, 2011 at 5:07 PM, Gary Thomas<gary@mlbassoc.com>  wrote:
>> On 2011-10-18 07:33, Boris Todorov wrote:
>>>
>>> Hi
>>>
>>> I'm trying to run OMAP + TVP5151 in BT656 mode.
>>>
>>> I'm using omap3isp-omap3isp-yuv (git.linuxtv.org/pinchartl/media.git).
>>> Plus the following patches:
>>>
>>> TVP5151:
>>>
>>> https://github.com/ebutera/meta-igep/tree/testing-v2/recipes-kernel/linux/linux-3.0+3.1rc/tvp5150
>>>
>>> The latest RFC patches for BT656 support:
>>>
>>> Enrico Butera (2):
>>>    omap3isp: ispvideo: export isp_video_mbus_to_pix
>>>    omap3isp: ispccdc: configure CCDC registers and add BT656 support
>>>
>>> Javier Martinez Canillas (1):
>>>    omap3isp: ccdc: Add interlaced field mode to platform data
>>>
>>>
>>> I'm able to configure with media-ctl:
>>>
>>> media-ctl -v -r -l '"tvp5150 3-005c":0->"OMAP3 ISP CCDC":0[1], "OMAP3
>>> ISP CCDC":1->"OMAP3 ISP CCDC output":0[1]'
>>> media-ctl -v --set-format '"tvp5150 3-005c":0 [UYVY2X8 720x525]'
>>> media-ctl -v --set-format '"OMAP3 ISP CCDC":0 [UYVY2X8 720x525]'
>>> media-ctl -v --set-format '"OMAP3 ISP CCDC":1 [UYVY2X8 720x525]'
>>>
>>> But
>>> ./yavta -f UYVY -s 720x525 -n 4 --capture=4 -F /dev/video4
>>>
>>> sleeps after
>>> ...
>>> Buffer 1 mapped at address 0x4021d000.
>>> length: 756000 offset: 1515520
>>> Buffer 2 mapped at address 0x402d6000.
>>> length: 756000 offset: 2273280
>>> Buffer 3 mapped at address 0x4038f000.
>>>
>>> Anyone with the same issue??? This happens with every other v4l test app I
>>> used.
>>> I can see data from TVP5151 but there are no interrupts in ISP.
>>
>> Why are you using /dev/video4?  The CCDC output is on /dev/video2
>>
>> --
>> ------------------------------------------------------------
>> Gary Thomas                 |  Consulting for the
>> MLB Associates              |    Embedded world
>> ------------------------------------------------------------
>>

-- 
------------------------------------------------------------
Gary Thomas                 |  Consulting for the
MLB Associates              |    Embedded world
------------------------------------------------------------

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: omap3isp: BT.656 support
  2011-10-18 14:49     ` Gary Thomas
@ 2011-10-18 15:10       ` Boris Todorov
  2011-10-18 15:24         ` Gary Thomas
  0 siblings, 1 reply; 24+ messages in thread
From: Boris Todorov @ 2011-10-18 15:10 UTC (permalink / raw)
  To: Gary Thomas; +Cc: linux-media

On Tue, Oct 18, 2011 at 5:49 PM, Gary Thomas <gary@mlbassoc.com> wrote:
> On 2011-10-18 08:28, Boris Todorov wrote:
>>
>> I'm using different board.
>
> What board?  I would think the architecture of the OMAP3 ISP would
> not change, based on the board?

It's a custom board with omap3630. ISP is not changed.
When I disable OMAP2_VOUT from defconfig "CCD output" is /dev/video2.
But result is the same - yavta sleeps at VIDIOC_DQBUF ioctl

>
>> According "media-ctl -p":
>>
>> - entity 5: OMAP3 ISP CCDC (3 pads, 9 links)
>>             type V4L2 subdev subtype Unknown
>>             device node name /dev/v4l-subdev2
>>         pad0: Input [UYVY2X8 720x525]
>>                 <- 'OMAP3 ISP CCP2':pad1 []
>>                 <- 'OMAP3 ISP CSI2a':pad1 []
>>                 <- 'tvp5150 3-005c':pad0 [ACTIVE]
>>         pad1: Output [UYVY2X8 720x525]
>>                 ->  'OMAP3 ISP CCDC output':pad0 [ACTIVE]
>>                 ->  'OMAP3 ISP resizer':pad0 []
>>         pad2: Output [UYVY2X8 720x524]
>>                 ->  'OMAP3 ISP preview':pad0 []
>>                 ->  'OMAP3 ISP AEWB':pad0 [IMMUTABLE,ACTIVE]
>>                 ->  'OMAP3 ISP AF':pad0 [IMMUTABLE,ACTIVE]
>>                 ->  'OMAP3 ISP histogram':pad0 [IMMUTABLE,ACTIVE]
>>
>> - entity 6: OMAP3 ISP CCDC output (1 pad, 1 link)
>>             type Node subtype V4L
>>             device node name /dev/video4
>>         pad0: Input
>>                 <- 'OMAP3 ISP CCDC':pad1 [ACTIVE]
>>
>>
>> Should be /dev/video4...
>
> Could you send your pipeline setup and full output of 'media-ctl -p'?

Pipeline setup is:

$ media-ctl -v -r -l '"tvp5150 3-005c":0->"OMAP3 ISP CCDC":0[1],
"OMAP3 ISP CCDC":1->"OMAP3 ISP CCDC output":0[1]'
$ media-ctl -v --set-format '"tvp5150 3-005c":0 [UYVY2X8 720x525]'
$ media-ctl -v --set-format '"OMAP3 ISP CCDC":0 [UYVY2X8 720x525]'
$ media-ctl -v --set-format '"OMAP3 ISP CCDC":1 [UYVY2X8 720x525]'

media-ctl output (with /dev/video4):

$ media-ctl -p
Opening media device /dev/media0
Enumerating entities
Found 16 entities
Enumerating pads and links
Device topology
- entity 1: OMAP3 ISP CCP2 (2 pads, 2 links)
            type V4L2 subdev subtype Unknown
            device node name /dev/v4l-subdev0
        pad0: Input [SGRBG10 4096x4096]
                <- 'OMAP3 ISP CCP2 input':pad0 []
        pad1: Output [SGRBG10 4096x4096]
                -> 'OMAP3 ISP CCDC':pad0 []

- entity 2: OMAP3 ISP CCP2 input (1 pad, 1 link)
            type Node subtype V4L
            device node name /dev/video0
        pad0: Output
                -> 'OMAP3 ISP CCP2':pad0 []

- entity 3: OMAP3 ISP CSI2a (2 pads, 2 links)
            type V4L2 subdev subtype Unknown
            device node name /dev/v4l-subdev1
        pad0: Input [SGRBG10 4096x4096]
        pad1: Output [SGRBG10 4096x4096]
                -> 'OMAP3 ISP CSI2a output':pad0 []
                -> 'OMAP3 ISP CCDC':pad0 []

- entity 4: OMAP3 ISP CSI2a output (1 pad, 1 link)
            type Node subtype V4L
            device node name /dev/video3
        pad0: Input
                <- 'OMAP3 ISP CSI2a':pad1 []

- entity 5: OMAP3 ISP CCDC (3 pads, 9 links)
            type V4L2 subdev subtype Unknown
            device node name /dev/v4l-subdev2
        pad0: Input [UYVY2X8 720x525]
                <- 'OMAP3 ISP CCP2':pad1 []
                <- 'OMAP3 ISP CSI2a':pad1 []
                <- 'tvp5150 3-005c':pad0 [ACTIVE]
        pad1: Output [UYVY2X8 720x525]
                -> 'OMAP3 ISP CCDC output':pad0 [ACTIVE]
                -> 'OMAP3 ISP resizer':pad0 []
        pad2: Output [UYVY2X8 720x524]
                -> 'OMAP3 ISP preview':pad0 []
                -> 'OMAP3 ISP AEWB':pad0 [IMMUTABLE,ACTIVE]
                -> 'OMAP3 ISP AF':pad0 [IMMUTABLE,ACTIVE]
                -> 'OMAP3 ISP histogram':pad0 [IMMUTABLE,ACTIVE]

- entity 6: OMAP3 ISP CCDC output (1 pad, 1 link)
            type Node subtype V4L
            device node name /dev/video4
        pad0: Input
                <- 'OMAP3 ISP CCDC':pad1 [ACTIVE]

- entity 7: OMAP3 ISP preview (2 pads, 4 links)
            type V4L2 subdev subtype Unknown
            device node name /dev/v4l-subdev3
        pad0: Input [SGRBG10 4096x4096]
                <- 'OMAP3 ISP CCDC':pad2 []
                <- 'OMAP3 ISP preview input':pad0 []
        pad1: Output [YUYV 4082x4088]
                -> 'OMAP3 ISP preview output':pad0 []
                -> 'OMAP3 ISP resizer':pad0 []

- entity 8: OMAP3 ISP preview input (1 pad, 1 link)
            type Node subtype V4L
            device node name /dev/video5
        pad0: Output
                -> 'OMAP3 ISP preview':pad0 []

- entity 9: OMAP3 ISP preview output (1 pad, 1 link)
            type Node subtype V4L
            device node name /dev/video6
        pad0: Input
                <- 'OMAP3 ISP preview':pad1 []

- entity 10: OMAP3 ISP resizer (2 pads, 4 links)
             type V4L2 subdev subtype Unknown
             device node name /dev/v4l-subdev4
        pad0: Input [YUYV 4095x4095 (4,6)/4086x4082]
                <- 'OMAP3 ISP CCDC':pad1 []
                <- 'OMAP3 ISP preview':pad1 []
                <- 'OMAP3 ISP resizer input':pad0 []
        pad1: Output [YUYV 4096x4095]
                -> 'OMAP3 ISP resizer output':pad0 []

- entity 11: OMAP3 ISP resizer input (1 pad, 1 link)
             type Node subtype V4L
             device node name /dev/video7
        pad0: Output
                -> 'OMAP3 ISP resizer':pad0 []

- entity 12: OMAP3 ISP resizer output (1 pad, 1 link)
             type Node subtype V4L
             device node name /dev/video8
        pad0: Input
                <- 'OMAP3 ISP resizer':pad1 []

- entity 13: OMAP3 ISP AEWB (1 pad, 1 link)
             type V4L2 subdev subtype Unknown
             device node name /dev/v4l-subdev5
        pad0: Input
                <- 'OMAP3 ISP CCDC':pad2 [IMMUTABLE,ACTIVE]

- entity 14: OMAP3 ISP AF (1 pad, 1 link)
             type V4L2 subdev subtype Unknown
             device node name /dev/v4l-subdev6
        pad0: Input
                <- 'OMAP3 ISP CCDC':pad2 [IMMUTABLE,ACTIVE]

- entity 15: OMAP3 ISP histogram (1 pad, 1 link)
             type V4L2 subdev subtype Unknown
             device node name /dev/v4l-subdev7
        pad0: Input
                <- 'OMAP3 ISP CCDC':pad2 [IMMUTABLE,ACTIVE]

- entity 16: tvp5150 3-005c (1 pad, 1 link)
             type V4L2 subdev subtype Unknown
             device node name /dev/v4l-subdev8
        pad0: Output [UYVY2X8 720x525]
                -> 'OMAP3 ISP CCDC':pad0 [ACTIVE]

>
>>
>>
>> On Tue, Oct 18, 2011 at 5:07 PM, Gary Thomas<gary@mlbassoc.com>  wrote:
>>>
>>> On 2011-10-18 07:33, Boris Todorov wrote:
>>>>
>>>> Hi
>>>>
>>>> I'm trying to run OMAP + TVP5151 in BT656 mode.
>>>>
>>>> I'm using omap3isp-omap3isp-yuv (git.linuxtv.org/pinchartl/media.git).
>>>> Plus the following patches:
>>>>
>>>> TVP5151:
>>>>
>>>>
>>>> https://github.com/ebutera/meta-igep/tree/testing-v2/recipes-kernel/linux/linux-3.0+3.1rc/tvp5150
>>>>
>>>> The latest RFC patches for BT656 support:
>>>>
>>>> Enrico Butera (2):
>>>>   omap3isp: ispvideo: export isp_video_mbus_to_pix
>>>>   omap3isp: ispccdc: configure CCDC registers and add BT656 support
>>>>
>>>> Javier Martinez Canillas (1):
>>>>   omap3isp: ccdc: Add interlaced field mode to platform data
>>>>
>>>>
>>>> I'm able to configure with media-ctl:
>>>>
>>>> media-ctl -v -r -l '"tvp5150 3-005c":0->"OMAP3 ISP CCDC":0[1], "OMAP3
>>>> ISP CCDC":1->"OMAP3 ISP CCDC output":0[1]'
>>>> media-ctl -v --set-format '"tvp5150 3-005c":0 [UYVY2X8 720x525]'
>>>> media-ctl -v --set-format '"OMAP3 ISP CCDC":0 [UYVY2X8 720x525]'
>>>> media-ctl -v --set-format '"OMAP3 ISP CCDC":1 [UYVY2X8 720x525]'
>>>>
>>>> But
>>>> ./yavta -f UYVY -s 720x525 -n 4 --capture=4 -F /dev/video4
>>>>
>>>> sleeps after
>>>> ...
>>>> Buffer 1 mapped at address 0x4021d000.
>>>> length: 756000 offset: 1515520
>>>> Buffer 2 mapped at address 0x402d6000.
>>>> length: 756000 offset: 2273280
>>>> Buffer 3 mapped at address 0x4038f000.
>>>>
>>>> Anyone with the same issue??? This happens with every other v4l test app
>>>> I
>>>> used.
>>>> I can see data from TVP5151 but there are no interrupts in ISP.
>>>
>>> Why are you using /dev/video4?  The CCDC output is on /dev/video2
>>>
>>> --
>>> ------------------------------------------------------------
>>> Gary Thomas                 |  Consulting for the
>>> MLB Associates              |    Embedded world
>>> ------------------------------------------------------------
>>>
>
> --
> ------------------------------------------------------------
> Gary Thomas                 |  Consulting for the
> MLB Associates              |    Embedded world
> ------------------------------------------------------------
>

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: omap3isp: BT.656 support
  2011-10-18 15:10       ` Boris Todorov
@ 2011-10-18 15:24         ` Gary Thomas
  2011-10-18 15:53           ` Boris Todorov
  0 siblings, 1 reply; 24+ messages in thread
From: Gary Thomas @ 2011-10-18 15:24 UTC (permalink / raw)
  To: Boris Todorov; +Cc: linux-media

On 2011-10-18 09:10, Boris Todorov wrote:
> On Tue, Oct 18, 2011 at 5:49 PM, Gary Thomas<gary@mlbassoc.com>  wrote:
>> On 2011-10-18 08:28, Boris Todorov wrote:
>>>
>>> I'm using different board.
>>
>> What board?  I would think the architecture of the OMAP3 ISP would
>> not change, based on the board?
>
> It's a custom board with omap3630. ISP is not changed.
> When I disable OMAP2_VOUT from defconfig "CCD output" is /dev/video2.

I see, I have that option turned off.

> But result is the same - yavta sleeps at VIDIOC_DQBUF ioctl

How are you configuring the TVP5150?  In particular these settings at boot time:

static struct isp_v4l2_subdevs_group my_camera_subdevs[] = {
	{
		.subdevs = tvp5150_camera_subdevs,
		.interface = ISP_INTERFACE_PARALLEL,
		.bus = {
				.parallel = {
					.data_lane_shift = 0,
					.clk_pol = 1,
                                         .bt656 = 1,
                                         .fldmode = 1,
				}
		},
	},
	{ },
};

This is how you tell the ISP to run in BT656 mode.  Without it, it will run
using the HS/VS/FID signals (and also in my experience does not work properly)

>>
>>> According "media-ctl -p":
>>>
>>> - entity 5: OMAP3 ISP CCDC (3 pads, 9 links)
>>>              type V4L2 subdev subtype Unknown
>>>              device node name /dev/v4l-subdev2
>>>          pad0: Input [UYVY2X8 720x525]
>>>                  <- 'OMAP3 ISP CCP2':pad1 []
>>>                  <- 'OMAP3 ISP CSI2a':pad1 []
>>>                  <- 'tvp5150 3-005c':pad0 [ACTIVE]
>>>          pad1: Output [UYVY2X8 720x525]
>>>                  ->    'OMAP3 ISP CCDC output':pad0 [ACTIVE]
>>>                  ->    'OMAP3 ISP resizer':pad0 []
>>>          pad2: Output [UYVY2X8 720x524]
>>>                  ->    'OMAP3 ISP preview':pad0 []
>>>                  ->    'OMAP3 ISP AEWB':pad0 [IMMUTABLE,ACTIVE]
>>>                  ->    'OMAP3 ISP AF':pad0 [IMMUTABLE,ACTIVE]
>>>                  ->    'OMAP3 ISP histogram':pad0 [IMMUTABLE,ACTIVE]
>>>
>>> - entity 6: OMAP3 ISP CCDC output (1 pad, 1 link)
>>>              type Node subtype V4L
>>>              device node name /dev/video4
>>>          pad0: Input
>>>                  <- 'OMAP3 ISP CCDC':pad1 [ACTIVE]
>>>
>>>
>>> Should be /dev/video4...
>>
>> Could you send your pipeline setup and full output of 'media-ctl -p'?
>
> Pipeline setup is:
>
> $ media-ctl -v -r -l '"tvp5150 3-005c":0->"OMAP3 ISP CCDC":0[1],
> "OMAP3 ISP CCDC":1->"OMAP3 ISP CCDC output":0[1]'
> $ media-ctl -v --set-format '"tvp5150 3-005c":0 [UYVY2X8 720x525]'
> $ media-ctl -v --set-format '"OMAP3 ISP CCDC":0 [UYVY2X8 720x525]'
> $ media-ctl -v --set-format '"OMAP3 ISP CCDC":1 [UYVY2X8 720x525]'
>
> media-ctl output (with /dev/video4):
>
> $ media-ctl -p
> Opening media device /dev/media0
> Enumerating entities
> Found 16 entities
> Enumerating pads and links
> Device topology
> - entity 1: OMAP3 ISP CCP2 (2 pads, 2 links)
>              type V4L2 subdev subtype Unknown
>              device node name /dev/v4l-subdev0
>          pad0: Input [SGRBG10 4096x4096]
>                  <- 'OMAP3 ISP CCP2 input':pad0 []
>          pad1: Output [SGRBG10 4096x4096]
>                  ->  'OMAP3 ISP CCDC':pad0 []
>
> - entity 2: OMAP3 ISP CCP2 input (1 pad, 1 link)
>              type Node subtype V4L
>              device node name /dev/video0
>          pad0: Output
>                  ->  'OMAP3 ISP CCP2':pad0 []
>
> - entity 3: OMAP3 ISP CSI2a (2 pads, 2 links)
>              type V4L2 subdev subtype Unknown
>              device node name /dev/v4l-subdev1
>          pad0: Input [SGRBG10 4096x4096]
>          pad1: Output [SGRBG10 4096x4096]
>                  ->  'OMAP3 ISP CSI2a output':pad0 []
>                  ->  'OMAP3 ISP CCDC':pad0 []
>
> - entity 4: OMAP3 ISP CSI2a output (1 pad, 1 link)
>              type Node subtype V4L
>              device node name /dev/video3
>          pad0: Input
>                  <- 'OMAP3 ISP CSI2a':pad1 []
>
> - entity 5: OMAP3 ISP CCDC (3 pads, 9 links)
>              type V4L2 subdev subtype Unknown
>              device node name /dev/v4l-subdev2
>          pad0: Input [UYVY2X8 720x525]
>                  <- 'OMAP3 ISP CCP2':pad1 []
>                  <- 'OMAP3 ISP CSI2a':pad1 []
>                  <- 'tvp5150 3-005c':pad0 [ACTIVE]
>          pad1: Output [UYVY2X8 720x525]
>                  ->  'OMAP3 ISP CCDC output':pad0 [ACTIVE]
>                  ->  'OMAP3 ISP resizer':pad0 []
>          pad2: Output [UYVY2X8 720x524]
>                  ->  'OMAP3 ISP preview':pad0 []
>                  ->  'OMAP3 ISP AEWB':pad0 [IMMUTABLE,ACTIVE]
>                  ->  'OMAP3 ISP AF':pad0 [IMMUTABLE,ACTIVE]
>                  ->  'OMAP3 ISP histogram':pad0 [IMMUTABLE,ACTIVE]
>
> - entity 6: OMAP3 ISP CCDC output (1 pad, 1 link)
>              type Node subtype V4L
>              device node name /dev/video4
>          pad0: Input
>                  <- 'OMAP3 ISP CCDC':pad1 [ACTIVE]
>
> - entity 7: OMAP3 ISP preview (2 pads, 4 links)
>              type V4L2 subdev subtype Unknown
>              device node name /dev/v4l-subdev3
>          pad0: Input [SGRBG10 4096x4096]
>                  <- 'OMAP3 ISP CCDC':pad2 []
>                  <- 'OMAP3 ISP preview input':pad0 []
>          pad1: Output [YUYV 4082x4088]
>                  ->  'OMAP3 ISP preview output':pad0 []
>                  ->  'OMAP3 ISP resizer':pad0 []
>
> - entity 8: OMAP3 ISP preview input (1 pad, 1 link)
>              type Node subtype V4L
>              device node name /dev/video5
>          pad0: Output
>                  ->  'OMAP3 ISP preview':pad0 []
>
> - entity 9: OMAP3 ISP preview output (1 pad, 1 link)
>              type Node subtype V4L
>              device node name /dev/video6
>          pad0: Input
>                  <- 'OMAP3 ISP preview':pad1 []
>
> - entity 10: OMAP3 ISP resizer (2 pads, 4 links)
>               type V4L2 subdev subtype Unknown
>               device node name /dev/v4l-subdev4
>          pad0: Input [YUYV 4095x4095 (4,6)/4086x4082]
>                  <- 'OMAP3 ISP CCDC':pad1 []
>                  <- 'OMAP3 ISP preview':pad1 []
>                  <- 'OMAP3 ISP resizer input':pad0 []
>          pad1: Output [YUYV 4096x4095]
>                  ->  'OMAP3 ISP resizer output':pad0 []
>
> - entity 11: OMAP3 ISP resizer input (1 pad, 1 link)
>               type Node subtype V4L
>               device node name /dev/video7
>          pad0: Output
>                  ->  'OMAP3 ISP resizer':pad0 []
>
> - entity 12: OMAP3 ISP resizer output (1 pad, 1 link)
>               type Node subtype V4L
>               device node name /dev/video8
>          pad0: Input
>                  <- 'OMAP3 ISP resizer':pad1 []
>
> - entity 13: OMAP3 ISP AEWB (1 pad, 1 link)
>               type V4L2 subdev subtype Unknown
>               device node name /dev/v4l-subdev5
>          pad0: Input
>                  <- 'OMAP3 ISP CCDC':pad2 [IMMUTABLE,ACTIVE]
>
> - entity 14: OMAP3 ISP AF (1 pad, 1 link)
>               type V4L2 subdev subtype Unknown
>               device node name /dev/v4l-subdev6
>          pad0: Input
>                  <- 'OMAP3 ISP CCDC':pad2 [IMMUTABLE,ACTIVE]
>
> - entity 15: OMAP3 ISP histogram (1 pad, 1 link)
>               type V4L2 subdev subtype Unknown
>               device node name /dev/v4l-subdev7
>          pad0: Input
>                  <- 'OMAP3 ISP CCDC':pad2 [IMMUTABLE,ACTIVE]
>
> - entity 16: tvp5150 3-005c (1 pad, 1 link)
>               type V4L2 subdev subtype Unknown
>               device node name /dev/v4l-subdev8
>          pad0: Output [UYVY2X8 720x525]
>                  ->  'OMAP3 ISP CCDC':pad0 [ACTIVE]
>
>>
>>>
>>>
>>> On Tue, Oct 18, 2011 at 5:07 PM, Gary Thomas<gary@mlbassoc.com>    wrote:
>>>>
>>>> On 2011-10-18 07:33, Boris Todorov wrote:
>>>>>
>>>>> Hi
>>>>>
>>>>> I'm trying to run OMAP + TVP5151 in BT656 mode.
>>>>>
>>>>> I'm using omap3isp-omap3isp-yuv (git.linuxtv.org/pinchartl/media.git).
>>>>> Plus the following patches:
>>>>>
>>>>> TVP5151:
>>>>>
>>>>>
>>>>> https://github.com/ebutera/meta-igep/tree/testing-v2/recipes-kernel/linux/linux-3.0+3.1rc/tvp5150
>>>>>
>>>>> The latest RFC patches for BT656 support:
>>>>>
>>>>> Enrico Butera (2):
>>>>>    omap3isp: ispvideo: export isp_video_mbus_to_pix
>>>>>    omap3isp: ispccdc: configure CCDC registers and add BT656 support
>>>>>
>>>>> Javier Martinez Canillas (1):
>>>>>    omap3isp: ccdc: Add interlaced field mode to platform data
>>>>>
>>>>>
>>>>> I'm able to configure with media-ctl:
>>>>>
>>>>> media-ctl -v -r -l '"tvp5150 3-005c":0->"OMAP3 ISP CCDC":0[1], "OMAP3
>>>>> ISP CCDC":1->"OMAP3 ISP CCDC output":0[1]'
>>>>> media-ctl -v --set-format '"tvp5150 3-005c":0 [UYVY2X8 720x525]'
>>>>> media-ctl -v --set-format '"OMAP3 ISP CCDC":0 [UYVY2X8 720x525]'
>>>>> media-ctl -v --set-format '"OMAP3 ISP CCDC":1 [UYVY2X8 720x525]'
>>>>>
>>>>> But
>>>>> ./yavta -f UYVY -s 720x525 -n 4 --capture=4 -F /dev/video4
>>>>>
>>>>> sleeps after
>>>>> ...
>>>>> Buffer 1 mapped at address 0x4021d000.
>>>>> length: 756000 offset: 1515520
>>>>> Buffer 2 mapped at address 0x402d6000.
>>>>> length: 756000 offset: 2273280
>>>>> Buffer 3 mapped at address 0x4038f000.
>>>>>
>>>>> Anyone with the same issue??? This happens with every other v4l test app
>>>>> I
>>>>> used.
>>>>> I can see data from TVP5151 but there are no interrupts in ISP.
>>>>
>>>> Why are you using /dev/video4?  The CCDC output is on /dev/video2
>>>>
>>>> --
>>>> ------------------------------------------------------------
>>>> Gary Thomas                 |  Consulting for the
>>>> MLB Associates              |    Embedded world
>>>> ------------------------------------------------------------
>>>>
>>
>> --
>> ------------------------------------------------------------
>> Gary Thomas                 |  Consulting for the
>> MLB Associates              |    Embedded world
>> ------------------------------------------------------------
>>

-- 
------------------------------------------------------------
Gary Thomas                 |  Consulting for the
MLB Associates              |    Embedded world
------------------------------------------------------------

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: omap3isp: BT.656 support
  2011-10-18 15:24         ` Gary Thomas
@ 2011-10-18 15:53           ` Boris Todorov
  2011-10-18 16:04             ` Gary Thomas
  0 siblings, 1 reply; 24+ messages in thread
From: Boris Todorov @ 2011-10-18 15:53 UTC (permalink / raw)
  To: Gary Thomas; +Cc: linux-media

On Tue, Oct 18, 2011 at 6:24 PM, Gary Thomas <gary@mlbassoc.com> wrote:
> On 2011-10-18 09:10, Boris Todorov wrote:
>>
>> On Tue, Oct 18, 2011 at 5:49 PM, Gary Thomas<gary@mlbassoc.com>  wrote:
>>>
>>> On 2011-10-18 08:28, Boris Todorov wrote:
>>>>
>>>> I'm using different board.
>>>
>>> What board?  I would think the architecture of the OMAP3 ISP would
>>> not change, based on the board?
>>
>> It's a custom board with omap3630. ISP is not changed.
>> When I disable OMAP2_VOUT from defconfig "CCD output" is /dev/video2.
>
> I see, I have that option turned off.
>
>> But result is the same - yavta sleeps at VIDIOC_DQBUF ioctl
>
> How are you configuring the TVP5150?  In particular these settings at boot
> time:
>
> static struct isp_v4l2_subdevs_group my_camera_subdevs[] = {
>        {
>                .subdevs = tvp5150_camera_subdevs,
>                .interface = ISP_INTERFACE_PARALLEL,
>                .bus = {
>                                .parallel = {
>                                        .data_lane_shift = 0,
>                                        .clk_pol = 1,
>                                        .bt656 = 1,
>                                        .fldmode = 1,
>                                }
>                },
>        },
>        { },
> };

My settings are:
 				.data_lane_shift        = 0,
				.clk_pol                = 0,
				.hs_pol                 = 0,
				.vs_pol                 = 0,
				.fldmode                = 1,
				.bt656               = 1,

I tried yours but same result.
Why did you chose clk_pol=1?

>
> This is how you tell the ISP to run in BT656 mode.  Without it, it will run
> using the HS/VS/FID signals (and also in my experience does not work
> properly)
>
>>>
>>>> According "media-ctl -p":
>>>>
>>>> - entity 5: OMAP3 ISP CCDC (3 pads, 9 links)
>>>>             type V4L2 subdev subtype Unknown
>>>>             device node name /dev/v4l-subdev2
>>>>         pad0: Input [UYVY2X8 720x525]
>>>>                 <- 'OMAP3 ISP CCP2':pad1 []
>>>>                 <- 'OMAP3 ISP CSI2a':pad1 []
>>>>                 <- 'tvp5150 3-005c':pad0 [ACTIVE]
>>>>         pad1: Output [UYVY2X8 720x525]
>>>>                 ->    'OMAP3 ISP CCDC output':pad0 [ACTIVE]
>>>>                 ->    'OMAP3 ISP resizer':pad0 []
>>>>         pad2: Output [UYVY2X8 720x524]
>>>>                 ->    'OMAP3 ISP preview':pad0 []
>>>>                 ->    'OMAP3 ISP AEWB':pad0 [IMMUTABLE,ACTIVE]
>>>>                 ->    'OMAP3 ISP AF':pad0 [IMMUTABLE,ACTIVE]
>>>>                 ->    'OMAP3 ISP histogram':pad0 [IMMUTABLE,ACTIVE]
>>>>
>>>> - entity 6: OMAP3 ISP CCDC output (1 pad, 1 link)
>>>>             type Node subtype V4L
>>>>             device node name /dev/video4
>>>>         pad0: Input
>>>>                 <- 'OMAP3 ISP CCDC':pad1 [ACTIVE]
>>>>
>>>>
>>>> Should be /dev/video4...
>>>
>>> Could you send your pipeline setup and full output of 'media-ctl -p'?
>>
>> Pipeline setup is:
>>
>> $ media-ctl -v -r -l '"tvp5150 3-005c":0->"OMAP3 ISP CCDC":0[1],
>> "OMAP3 ISP CCDC":1->"OMAP3 ISP CCDC output":0[1]'
>> $ media-ctl -v --set-format '"tvp5150 3-005c":0 [UYVY2X8 720x525]'
>> $ media-ctl -v --set-format '"OMAP3 ISP CCDC":0 [UYVY2X8 720x525]'
>> $ media-ctl -v --set-format '"OMAP3 ISP CCDC":1 [UYVY2X8 720x525]'
>>
>> media-ctl output (with /dev/video4):
>>
>> $ media-ctl -p
>> Opening media device /dev/media0
>> Enumerating entities
>> Found 16 entities
>> Enumerating pads and links
>> Device topology
>> - entity 1: OMAP3 ISP CCP2 (2 pads, 2 links)
>>             type V4L2 subdev subtype Unknown
>>             device node name /dev/v4l-subdev0
>>         pad0: Input [SGRBG10 4096x4096]
>>                 <- 'OMAP3 ISP CCP2 input':pad0 []
>>         pad1: Output [SGRBG10 4096x4096]
>>                 ->  'OMAP3 ISP CCDC':pad0 []
>>
>> - entity 2: OMAP3 ISP CCP2 input (1 pad, 1 link)
>>             type Node subtype V4L
>>             device node name /dev/video0
>>         pad0: Output
>>                 ->  'OMAP3 ISP CCP2':pad0 []
>>
>> - entity 3: OMAP3 ISP CSI2a (2 pads, 2 links)
>>             type V4L2 subdev subtype Unknown
>>             device node name /dev/v4l-subdev1
>>         pad0: Input [SGRBG10 4096x4096]
>>         pad1: Output [SGRBG10 4096x4096]
>>                 ->  'OMAP3 ISP CSI2a output':pad0 []
>>                 ->  'OMAP3 ISP CCDC':pad0 []
>>
>> - entity 4: OMAP3 ISP CSI2a output (1 pad, 1 link)
>>             type Node subtype V4L
>>             device node name /dev/video3
>>         pad0: Input
>>                 <- 'OMAP3 ISP CSI2a':pad1 []
>>
>> - entity 5: OMAP3 ISP CCDC (3 pads, 9 links)
>>             type V4L2 subdev subtype Unknown
>>             device node name /dev/v4l-subdev2
>>         pad0: Input [UYVY2X8 720x525]
>>                 <- 'OMAP3 ISP CCP2':pad1 []
>>                 <- 'OMAP3 ISP CSI2a':pad1 []
>>                 <- 'tvp5150 3-005c':pad0 [ACTIVE]
>>         pad1: Output [UYVY2X8 720x525]
>>                 ->  'OMAP3 ISP CCDC output':pad0 [ACTIVE]
>>                 ->  'OMAP3 ISP resizer':pad0 []
>>         pad2: Output [UYVY2X8 720x524]
>>                 ->  'OMAP3 ISP preview':pad0 []
>>                 ->  'OMAP3 ISP AEWB':pad0 [IMMUTABLE,ACTIVE]
>>                 ->  'OMAP3 ISP AF':pad0 [IMMUTABLE,ACTIVE]
>>                 ->  'OMAP3 ISP histogram':pad0 [IMMUTABLE,ACTIVE]
>>
>> - entity 6: OMAP3 ISP CCDC output (1 pad, 1 link)
>>             type Node subtype V4L
>>             device node name /dev/video4
>>         pad0: Input
>>                 <- 'OMAP3 ISP CCDC':pad1 [ACTIVE]
>>
>> - entity 7: OMAP3 ISP preview (2 pads, 4 links)
>>             type V4L2 subdev subtype Unknown
>>             device node name /dev/v4l-subdev3
>>         pad0: Input [SGRBG10 4096x4096]
>>                 <- 'OMAP3 ISP CCDC':pad2 []
>>                 <- 'OMAP3 ISP preview input':pad0 []
>>         pad1: Output [YUYV 4082x4088]
>>                 ->  'OMAP3 ISP preview output':pad0 []
>>                 ->  'OMAP3 ISP resizer':pad0 []
>>
>> - entity 8: OMAP3 ISP preview input (1 pad, 1 link)
>>             type Node subtype V4L
>>             device node name /dev/video5
>>         pad0: Output
>>                 ->  'OMAP3 ISP preview':pad0 []
>>
>> - entity 9: OMAP3 ISP preview output (1 pad, 1 link)
>>             type Node subtype V4L
>>             device node name /dev/video6
>>         pad0: Input
>>                 <- 'OMAP3 ISP preview':pad1 []
>>
>> - entity 10: OMAP3 ISP resizer (2 pads, 4 links)
>>              type V4L2 subdev subtype Unknown
>>              device node name /dev/v4l-subdev4
>>         pad0: Input [YUYV 4095x4095 (4,6)/4086x4082]
>>                 <- 'OMAP3 ISP CCDC':pad1 []
>>                 <- 'OMAP3 ISP preview':pad1 []
>>                 <- 'OMAP3 ISP resizer input':pad0 []
>>         pad1: Output [YUYV 4096x4095]
>>                 ->  'OMAP3 ISP resizer output':pad0 []
>>
>> - entity 11: OMAP3 ISP resizer input (1 pad, 1 link)
>>              type Node subtype V4L
>>              device node name /dev/video7
>>         pad0: Output
>>                 ->  'OMAP3 ISP resizer':pad0 []
>>
>> - entity 12: OMAP3 ISP resizer output (1 pad, 1 link)
>>              type Node subtype V4L
>>              device node name /dev/video8
>>         pad0: Input
>>                 <- 'OMAP3 ISP resizer':pad1 []
>>
>> - entity 13: OMAP3 ISP AEWB (1 pad, 1 link)
>>              type V4L2 subdev subtype Unknown
>>              device node name /dev/v4l-subdev5
>>         pad0: Input
>>                 <- 'OMAP3 ISP CCDC':pad2 [IMMUTABLE,ACTIVE]
>>
>> - entity 14: OMAP3 ISP AF (1 pad, 1 link)
>>              type V4L2 subdev subtype Unknown
>>              device node name /dev/v4l-subdev6
>>         pad0: Input
>>                 <- 'OMAP3 ISP CCDC':pad2 [IMMUTABLE,ACTIVE]
>>
>> - entity 15: OMAP3 ISP histogram (1 pad, 1 link)
>>              type V4L2 subdev subtype Unknown
>>              device node name /dev/v4l-subdev7
>>         pad0: Input
>>                 <- 'OMAP3 ISP CCDC':pad2 [IMMUTABLE,ACTIVE]
>>
>> - entity 16: tvp5150 3-005c (1 pad, 1 link)
>>              type V4L2 subdev subtype Unknown
>>              device node name /dev/v4l-subdev8
>>         pad0: Output [UYVY2X8 720x525]
>>                 ->  'OMAP3 ISP CCDC':pad0 [ACTIVE]
>>
>>>
>>>>
>>>>
>>>> On Tue, Oct 18, 2011 at 5:07 PM, Gary Thomas<gary@mlbassoc.com>
>>>>  wrote:
>>>>>
>>>>> On 2011-10-18 07:33, Boris Todorov wrote:
>>>>>>
>>>>>> Hi
>>>>>>
>>>>>> I'm trying to run OMAP + TVP5151 in BT656 mode.
>>>>>>
>>>>>> I'm using omap3isp-omap3isp-yuv (git.linuxtv.org/pinchartl/media.git).
>>>>>> Plus the following patches:
>>>>>>
>>>>>> TVP5151:
>>>>>>
>>>>>>
>>>>>>
>>>>>> https://github.com/ebutera/meta-igep/tree/testing-v2/recipes-kernel/linux/linux-3.0+3.1rc/tvp5150
>>>>>>
>>>>>> The latest RFC patches for BT656 support:
>>>>>>
>>>>>> Enrico Butera (2):
>>>>>>   omap3isp: ispvideo: export isp_video_mbus_to_pix
>>>>>>   omap3isp: ispccdc: configure CCDC registers and add BT656 support
>>>>>>
>>>>>> Javier Martinez Canillas (1):
>>>>>>   omap3isp: ccdc: Add interlaced field mode to platform data
>>>>>>
>>>>>>
>>>>>> I'm able to configure with media-ctl:
>>>>>>
>>>>>> media-ctl -v -r -l '"tvp5150 3-005c":0->"OMAP3 ISP CCDC":0[1], "OMAP3
>>>>>> ISP CCDC":1->"OMAP3 ISP CCDC output":0[1]'
>>>>>> media-ctl -v --set-format '"tvp5150 3-005c":0 [UYVY2X8 720x525]'
>>>>>> media-ctl -v --set-format '"OMAP3 ISP CCDC":0 [UYVY2X8 720x525]'
>>>>>> media-ctl -v --set-format '"OMAP3 ISP CCDC":1 [UYVY2X8 720x525]'
>>>>>>
>>>>>> But
>>>>>> ./yavta -f UYVY -s 720x525 -n 4 --capture=4 -F /dev/video4
>>>>>>
>>>>>> sleeps after
>>>>>> ...
>>>>>> Buffer 1 mapped at address 0x4021d000.
>>>>>> length: 756000 offset: 1515520
>>>>>> Buffer 2 mapped at address 0x402d6000.
>>>>>> length: 756000 offset: 2273280
>>>>>> Buffer 3 mapped at address 0x4038f000.
>>>>>>
>>>>>> Anyone with the same issue??? This happens with every other v4l test
>>>>>> app
>>>>>> I
>>>>>> used.
>>>>>> I can see data from TVP5151 but there are no interrupts in ISP.
>>>>>
>>>>> Why are you using /dev/video4?  The CCDC output is on /dev/video2
>>>>>
>>>>> --
>>>>> ------------------------------------------------------------
>>>>> Gary Thomas                 |  Consulting for the
>>>>> MLB Associates              |    Embedded world
>>>>> ------------------------------------------------------------
>>>>>
>>>
>>> --
>>> ------------------------------------------------------------
>>> Gary Thomas                 |  Consulting for the
>>> MLB Associates              |    Embedded world
>>> ------------------------------------------------------------
>>>
>
> --
> ------------------------------------------------------------
> Gary Thomas                 |  Consulting for the
> MLB Associates              |    Embedded world
> ------------------------------------------------------------
>

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: omap3isp: BT.656 support
  2011-10-18 15:53           ` Boris Todorov
@ 2011-10-18 16:04             ` Gary Thomas
  2011-10-18 16:14               ` Boris Todorov
  0 siblings, 1 reply; 24+ messages in thread
From: Gary Thomas @ 2011-10-18 16:04 UTC (permalink / raw)
  To: Boris Todorov; +Cc: linux-media

On 2011-10-18 09:53, Boris Todorov wrote:
> On Tue, Oct 18, 2011 at 6:24 PM, Gary Thomas<gary@mlbassoc.com>  wrote:
>> On 2011-10-18 09:10, Boris Todorov wrote:
>>>
>>> On Tue, Oct 18, 2011 at 5:49 PM, Gary Thomas<gary@mlbassoc.com>    wrote:
>>>>
>>>> On 2011-10-18 08:28, Boris Todorov wrote:
>>>>>
>>>>> I'm using different board.
>>>>
>>>> What board?  I would think the architecture of the OMAP3 ISP would
>>>> not change, based on the board?
>>>
>>> It's a custom board with omap3630. ISP is not changed.
>>> When I disable OMAP2_VOUT from defconfig "CCD output" is /dev/video2.
>>
>> I see, I have that option turned off.
>>
>>> But result is the same - yavta sleeps at VIDIOC_DQBUF ioctl
>>
>> How are you configuring the TVP5150?  In particular these settings at boot
>> time:
>>
>> static struct isp_v4l2_subdevs_group my_camera_subdevs[] = {
>>         {
>>                 .subdevs = tvp5150_camera_subdevs,
>>                 .interface = ISP_INTERFACE_PARALLEL,
>>                 .bus = {
>>                                 .parallel = {
>>                                         .data_lane_shift = 0,
>>                                         .clk_pol = 1,
>>                                         .bt656 = 1,
>>                                         .fldmode = 1,
>>                                 }
>>                 },
>>         },
>>         { },
>> };
>
> My settings are:
>   				.data_lane_shift        = 0,
> 				.clk_pol                = 0,
> 				.hs_pol                 = 0,
> 				.vs_pol                 = 0,
> 				.fldmode                = 1,
> 				.bt656               = 1,
>
> I tried yours but same result.
> Why did you chose clk_pol=1?

I just copied the settings from the BeagleBoard

Have you had this working before (earlier kernel, etc)?

>
>>
>> This is how you tell the ISP to run in BT656 mode.  Without it, it will run
>> using the HS/VS/FID signals (and also in my experience does not work
>> properly)
>>
>>>>
>>>>> According "media-ctl -p":
>>>>>
>>>>> - entity 5: OMAP3 ISP CCDC (3 pads, 9 links)
>>>>>              type V4L2 subdev subtype Unknown
>>>>>              device node name /dev/v4l-subdev2
>>>>>          pad0: Input [UYVY2X8 720x525]
>>>>>                  <- 'OMAP3 ISP CCP2':pad1 []
>>>>>                  <- 'OMAP3 ISP CSI2a':pad1 []
>>>>>                  <- 'tvp5150 3-005c':pad0 [ACTIVE]
>>>>>          pad1: Output [UYVY2X8 720x525]
>>>>>                  ->      'OMAP3 ISP CCDC output':pad0 [ACTIVE]
>>>>>                  ->      'OMAP3 ISP resizer':pad0 []
>>>>>          pad2: Output [UYVY2X8 720x524]
>>>>>                  ->      'OMAP3 ISP preview':pad0 []
>>>>>                  ->      'OMAP3 ISP AEWB':pad0 [IMMUTABLE,ACTIVE]
>>>>>                  ->      'OMAP3 ISP AF':pad0 [IMMUTABLE,ACTIVE]
>>>>>                  ->      'OMAP3 ISP histogram':pad0 [IMMUTABLE,ACTIVE]
>>>>>
>>>>> - entity 6: OMAP3 ISP CCDC output (1 pad, 1 link)
>>>>>              type Node subtype V4L
>>>>>              device node name /dev/video4
>>>>>          pad0: Input
>>>>>                  <- 'OMAP3 ISP CCDC':pad1 [ACTIVE]
>>>>>
>>>>>
>>>>> Should be /dev/video4...
>>>>
>>>> Could you send your pipeline setup and full output of 'media-ctl -p'?
>>>
>>> Pipeline setup is:
>>>
>>> $ media-ctl -v -r -l '"tvp5150 3-005c":0->"OMAP3 ISP CCDC":0[1],
>>> "OMAP3 ISP CCDC":1->"OMAP3 ISP CCDC output":0[1]'
>>> $ media-ctl -v --set-format '"tvp5150 3-005c":0 [UYVY2X8 720x525]'
>>> $ media-ctl -v --set-format '"OMAP3 ISP CCDC":0 [UYVY2X8 720x525]'
>>> $ media-ctl -v --set-format '"OMAP3 ISP CCDC":1 [UYVY2X8 720x525]'
>>>
>>> media-ctl output (with /dev/video4):
>>>
>>> $ media-ctl -p
>>> Opening media device /dev/media0
>>> Enumerating entities
>>> Found 16 entities
>>> Enumerating pads and links
>>> Device topology
>>> - entity 1: OMAP3 ISP CCP2 (2 pads, 2 links)
>>>              type V4L2 subdev subtype Unknown
>>>              device node name /dev/v4l-subdev0
>>>          pad0: Input [SGRBG10 4096x4096]
>>>                  <- 'OMAP3 ISP CCP2 input':pad0 []
>>>          pad1: Output [SGRBG10 4096x4096]
>>>                  ->    'OMAP3 ISP CCDC':pad0 []
>>>
>>> - entity 2: OMAP3 ISP CCP2 input (1 pad, 1 link)
>>>              type Node subtype V4L
>>>              device node name /dev/video0
>>>          pad0: Output
>>>                  ->    'OMAP3 ISP CCP2':pad0 []
>>>
>>> - entity 3: OMAP3 ISP CSI2a (2 pads, 2 links)
>>>              type V4L2 subdev subtype Unknown
>>>              device node name /dev/v4l-subdev1
>>>          pad0: Input [SGRBG10 4096x4096]
>>>          pad1: Output [SGRBG10 4096x4096]
>>>                  ->    'OMAP3 ISP CSI2a output':pad0 []
>>>                  ->    'OMAP3 ISP CCDC':pad0 []
>>>
>>> - entity 4: OMAP3 ISP CSI2a output (1 pad, 1 link)
>>>              type Node subtype V4L
>>>              device node name /dev/video3
>>>          pad0: Input
>>>                  <- 'OMAP3 ISP CSI2a':pad1 []
>>>
>>> - entity 5: OMAP3 ISP CCDC (3 pads, 9 links)
>>>              type V4L2 subdev subtype Unknown
>>>              device node name /dev/v4l-subdev2
>>>          pad0: Input [UYVY2X8 720x525]
>>>                  <- 'OMAP3 ISP CCP2':pad1 []
>>>                  <- 'OMAP3 ISP CSI2a':pad1 []
>>>                  <- 'tvp5150 3-005c':pad0 [ACTIVE]
>>>          pad1: Output [UYVY2X8 720x525]
>>>                  ->    'OMAP3 ISP CCDC output':pad0 [ACTIVE]
>>>                  ->    'OMAP3 ISP resizer':pad0 []
>>>          pad2: Output [UYVY2X8 720x524]
>>>                  ->    'OMAP3 ISP preview':pad0 []
>>>                  ->    'OMAP3 ISP AEWB':pad0 [IMMUTABLE,ACTIVE]
>>>                  ->    'OMAP3 ISP AF':pad0 [IMMUTABLE,ACTIVE]
>>>                  ->    'OMAP3 ISP histogram':pad0 [IMMUTABLE,ACTIVE]
>>>
>>> - entity 6: OMAP3 ISP CCDC output (1 pad, 1 link)
>>>              type Node subtype V4L
>>>              device node name /dev/video4
>>>          pad0: Input
>>>                  <- 'OMAP3 ISP CCDC':pad1 [ACTIVE]
>>>
>>> - entity 7: OMAP3 ISP preview (2 pads, 4 links)
>>>              type V4L2 subdev subtype Unknown
>>>              device node name /dev/v4l-subdev3
>>>          pad0: Input [SGRBG10 4096x4096]
>>>                  <- 'OMAP3 ISP CCDC':pad2 []
>>>                  <- 'OMAP3 ISP preview input':pad0 []
>>>          pad1: Output [YUYV 4082x4088]
>>>                  ->    'OMAP3 ISP preview output':pad0 []
>>>                  ->    'OMAP3 ISP resizer':pad0 []
>>>
>>> - entity 8: OMAP3 ISP preview input (1 pad, 1 link)
>>>              type Node subtype V4L
>>>              device node name /dev/video5
>>>          pad0: Output
>>>                  ->    'OMAP3 ISP preview':pad0 []
>>>
>>> - entity 9: OMAP3 ISP preview output (1 pad, 1 link)
>>>              type Node subtype V4L
>>>              device node name /dev/video6
>>>          pad0: Input
>>>                  <- 'OMAP3 ISP preview':pad1 []
>>>
>>> - entity 10: OMAP3 ISP resizer (2 pads, 4 links)
>>>               type V4L2 subdev subtype Unknown
>>>               device node name /dev/v4l-subdev4
>>>          pad0: Input [YUYV 4095x4095 (4,6)/4086x4082]
>>>                  <- 'OMAP3 ISP CCDC':pad1 []
>>>                  <- 'OMAP3 ISP preview':pad1 []
>>>                  <- 'OMAP3 ISP resizer input':pad0 []
>>>          pad1: Output [YUYV 4096x4095]
>>>                  ->    'OMAP3 ISP resizer output':pad0 []
>>>
>>> - entity 11: OMAP3 ISP resizer input (1 pad, 1 link)
>>>               type Node subtype V4L
>>>               device node name /dev/video7
>>>          pad0: Output
>>>                  ->    'OMAP3 ISP resizer':pad0 []
>>>
>>> - entity 12: OMAP3 ISP resizer output (1 pad, 1 link)
>>>               type Node subtype V4L
>>>               device node name /dev/video8
>>>          pad0: Input
>>>                  <- 'OMAP3 ISP resizer':pad1 []
>>>
>>> - entity 13: OMAP3 ISP AEWB (1 pad, 1 link)
>>>               type V4L2 subdev subtype Unknown
>>>               device node name /dev/v4l-subdev5
>>>          pad0: Input
>>>                  <- 'OMAP3 ISP CCDC':pad2 [IMMUTABLE,ACTIVE]
>>>
>>> - entity 14: OMAP3 ISP AF (1 pad, 1 link)
>>>               type V4L2 subdev subtype Unknown
>>>               device node name /dev/v4l-subdev6
>>>          pad0: Input
>>>                  <- 'OMAP3 ISP CCDC':pad2 [IMMUTABLE,ACTIVE]
>>>
>>> - entity 15: OMAP3 ISP histogram (1 pad, 1 link)
>>>               type V4L2 subdev subtype Unknown
>>>               device node name /dev/v4l-subdev7
>>>          pad0: Input
>>>                  <- 'OMAP3 ISP CCDC':pad2 [IMMUTABLE,ACTIVE]
>>>
>>> - entity 16: tvp5150 3-005c (1 pad, 1 link)
>>>               type V4L2 subdev subtype Unknown
>>>               device node name /dev/v4l-subdev8
>>>          pad0: Output [UYVY2X8 720x525]
>>>                  ->    'OMAP3 ISP CCDC':pad0 [ACTIVE]
>>>
>>>>
>>>>>
>>>>>
>>>>> On Tue, Oct 18, 2011 at 5:07 PM, Gary Thomas<gary@mlbassoc.com>
>>>>>   wrote:
>>>>>>
>>>>>> On 2011-10-18 07:33, Boris Todorov wrote:
>>>>>>>
>>>>>>> Hi
>>>>>>>
>>>>>>> I'm trying to run OMAP + TVP5151 in BT656 mode.
>>>>>>>
>>>>>>> I'm using omap3isp-omap3isp-yuv (git.linuxtv.org/pinchartl/media.git).
>>>>>>> Plus the following patches:
>>>>>>>
>>>>>>> TVP5151:
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> https://github.com/ebutera/meta-igep/tree/testing-v2/recipes-kernel/linux/linux-3.0+3.1rc/tvp5150
>>>>>>>
>>>>>>> The latest RFC patches for BT656 support:
>>>>>>>
>>>>>>> Enrico Butera (2):
>>>>>>>    omap3isp: ispvideo: export isp_video_mbus_to_pix
>>>>>>>    omap3isp: ispccdc: configure CCDC registers and add BT656 support
>>>>>>>
>>>>>>> Javier Martinez Canillas (1):
>>>>>>>    omap3isp: ccdc: Add interlaced field mode to platform data
>>>>>>>
>>>>>>>
>>>>>>> I'm able to configure with media-ctl:
>>>>>>>
>>>>>>> media-ctl -v -r -l '"tvp5150 3-005c":0->"OMAP3 ISP CCDC":0[1], "OMAP3
>>>>>>> ISP CCDC":1->"OMAP3 ISP CCDC output":0[1]'
>>>>>>> media-ctl -v --set-format '"tvp5150 3-005c":0 [UYVY2X8 720x525]'
>>>>>>> media-ctl -v --set-format '"OMAP3 ISP CCDC":0 [UYVY2X8 720x525]'
>>>>>>> media-ctl -v --set-format '"OMAP3 ISP CCDC":1 [UYVY2X8 720x525]'
>>>>>>>
>>>>>>> But
>>>>>>> ./yavta -f UYVY -s 720x525 -n 4 --capture=4 -F /dev/video4
>>>>>>>
>>>>>>> sleeps after
>>>>>>> ...
>>>>>>> Buffer 1 mapped at address 0x4021d000.
>>>>>>> length: 756000 offset: 1515520
>>>>>>> Buffer 2 mapped at address 0x402d6000.
>>>>>>> length: 756000 offset: 2273280
>>>>>>> Buffer 3 mapped at address 0x4038f000.
>>>>>>>
>>>>>>> Anyone with the same issue??? This happens with every other v4l test
>>>>>>> app
>>>>>>> I
>>>>>>> used.
>>>>>>> I can see data from TVP5151 but there are no interrupts in ISP.
>>>>>>
>>>>>> Why are you using /dev/video4?  The CCDC output is on /dev/video2

-- 
------------------------------------------------------------
Gary Thomas                 |  Consulting for the
MLB Associates              |    Embedded world
------------------------------------------------------------

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: omap3isp: BT.656 support
  2011-10-18 16:04             ` Gary Thomas
@ 2011-10-18 16:14               ` Boris Todorov
  2011-10-18 16:24                 ` Gary Thomas
  0 siblings, 1 reply; 24+ messages in thread
From: Boris Todorov @ 2011-10-18 16:14 UTC (permalink / raw)
  To: Gary Thomas; +Cc: linux-media

On Tue, Oct 18, 2011 at 7:04 PM, Gary Thomas <gary@mlbassoc.com> wrote:
> On 2011-10-18 09:53, Boris Todorov wrote:
>>
>> On Tue, Oct 18, 2011 at 6:24 PM, Gary Thomas<gary@mlbassoc.com>  wrote:
>>>
>>> On 2011-10-18 09:10, Boris Todorov wrote:
>>>>
>>>> On Tue, Oct 18, 2011 at 5:49 PM, Gary Thomas<gary@mlbassoc.com>
>>>>  wrote:
>>>>>
>>>>> On 2011-10-18 08:28, Boris Todorov wrote:
>>>>>>
>>>>>> I'm using different board.
>>>>>
>>>>> What board?  I would think the architecture of the OMAP3 ISP would
>>>>> not change, based on the board?
>>>>
>>>> It's a custom board with omap3630. ISP is not changed.
>>>> When I disable OMAP2_VOUT from defconfig "CCD output" is /dev/video2.
>>>
>>> I see, I have that option turned off.
>>>
>>>> But result is the same - yavta sleeps at VIDIOC_DQBUF ioctl
>>>
>>> How are you configuring the TVP5150?  In particular these settings at
>>> boot
>>> time:
>>>
>>> static struct isp_v4l2_subdevs_group my_camera_subdevs[] = {
>>>        {
>>>                .subdevs = tvp5150_camera_subdevs,
>>>                .interface = ISP_INTERFACE_PARALLEL,
>>>                .bus = {
>>>                                .parallel = {
>>>                                        .data_lane_shift = 0,
>>>                                        .clk_pol = 1,
>>>                                        .bt656 = 1,
>>>                                        .fldmode = 1,
>>>                                }
>>>                },
>>>        },
>>>        { },
>>> };
>>
>> My settings are:
>>                                .data_lane_shift        = 0,
>>                                .clk_pol                = 0,
>>                                .hs_pol                 = 0,
>>                                .vs_pol                 = 0,
>>                                .fldmode                = 1,
>>                                .bt656               = 1,
>>
>> I tried yours but same result.
>> Why did you chose clk_pol=1?
>
> I just copied the settings from the BeagleBoard
btw what board are you using?

> Have you had this working before (earlier kernel, etc)?
Never in BT.656 mode...

>
>>
>>>
>>> This is how you tell the ISP to run in BT656 mode.  Without it, it will
>>> run
>>> using the HS/VS/FID signals (and also in my experience does not work
>>> properly)
>>>
>>>>>
>>>>>> According "media-ctl -p":
>>>>>>
>>>>>> - entity 5: OMAP3 ISP CCDC (3 pads, 9 links)
>>>>>>             type V4L2 subdev subtype Unknown
>>>>>>             device node name /dev/v4l-subdev2
>>>>>>         pad0: Input [UYVY2X8 720x525]
>>>>>>                 <- 'OMAP3 ISP CCP2':pad1 []
>>>>>>                 <- 'OMAP3 ISP CSI2a':pad1 []
>>>>>>                 <- 'tvp5150 3-005c':pad0 [ACTIVE]
>>>>>>         pad1: Output [UYVY2X8 720x525]
>>>>>>                 ->      'OMAP3 ISP CCDC output':pad0 [ACTIVE]
>>>>>>                 ->      'OMAP3 ISP resizer':pad0 []
>>>>>>         pad2: Output [UYVY2X8 720x524]
>>>>>>                 ->      'OMAP3 ISP preview':pad0 []
>>>>>>                 ->      'OMAP3 ISP AEWB':pad0 [IMMUTABLE,ACTIVE]
>>>>>>                 ->      'OMAP3 ISP AF':pad0 [IMMUTABLE,ACTIVE]
>>>>>>                 ->      'OMAP3 ISP histogram':pad0 [IMMUTABLE,ACTIVE]
>>>>>>
>>>>>> - entity 6: OMAP3 ISP CCDC output (1 pad, 1 link)
>>>>>>             type Node subtype V4L
>>>>>>             device node name /dev/video4
>>>>>>         pad0: Input
>>>>>>                 <- 'OMAP3 ISP CCDC':pad1 [ACTIVE]
>>>>>>
>>>>>>
>>>>>> Should be /dev/video4...
>>>>>
>>>>> Could you send your pipeline setup and full output of 'media-ctl -p'?
>>>>
>>>> Pipeline setup is:
>>>>
>>>> $ media-ctl -v -r -l '"tvp5150 3-005c":0->"OMAP3 ISP CCDC":0[1],
>>>> "OMAP3 ISP CCDC":1->"OMAP3 ISP CCDC output":0[1]'
>>>> $ media-ctl -v --set-format '"tvp5150 3-005c":0 [UYVY2X8 720x525]'
>>>> $ media-ctl -v --set-format '"OMAP3 ISP CCDC":0 [UYVY2X8 720x525]'
>>>> $ media-ctl -v --set-format '"OMAP3 ISP CCDC":1 [UYVY2X8 720x525]'
>>>>
>>>> media-ctl output (with /dev/video4):
>>>>
>>>> $ media-ctl -p
>>>> Opening media device /dev/media0
>>>> Enumerating entities
>>>> Found 16 entities
>>>> Enumerating pads and links
>>>> Device topology
>>>> - entity 1: OMAP3 ISP CCP2 (2 pads, 2 links)
>>>>             type V4L2 subdev subtype Unknown
>>>>             device node name /dev/v4l-subdev0
>>>>         pad0: Input [SGRBG10 4096x4096]
>>>>                 <- 'OMAP3 ISP CCP2 input':pad0 []
>>>>         pad1: Output [SGRBG10 4096x4096]
>>>>                 ->    'OMAP3 ISP CCDC':pad0 []
>>>>
>>>> - entity 2: OMAP3 ISP CCP2 input (1 pad, 1 link)
>>>>             type Node subtype V4L
>>>>             device node name /dev/video0
>>>>         pad0: Output
>>>>                 ->    'OMAP3 ISP CCP2':pad0 []
>>>>
>>>> - entity 3: OMAP3 ISP CSI2a (2 pads, 2 links)
>>>>             type V4L2 subdev subtype Unknown
>>>>             device node name /dev/v4l-subdev1
>>>>         pad0: Input [SGRBG10 4096x4096]
>>>>         pad1: Output [SGRBG10 4096x4096]
>>>>                 ->    'OMAP3 ISP CSI2a output':pad0 []
>>>>                 ->    'OMAP3 ISP CCDC':pad0 []
>>>>
>>>> - entity 4: OMAP3 ISP CSI2a output (1 pad, 1 link)
>>>>             type Node subtype V4L
>>>>             device node name /dev/video3
>>>>         pad0: Input
>>>>                 <- 'OMAP3 ISP CSI2a':pad1 []
>>>>
>>>> - entity 5: OMAP3 ISP CCDC (3 pads, 9 links)
>>>>             type V4L2 subdev subtype Unknown
>>>>             device node name /dev/v4l-subdev2
>>>>         pad0: Input [UYVY2X8 720x525]
>>>>                 <- 'OMAP3 ISP CCP2':pad1 []
>>>>                 <- 'OMAP3 ISP CSI2a':pad1 []
>>>>                 <- 'tvp5150 3-005c':pad0 [ACTIVE]
>>>>         pad1: Output [UYVY2X8 720x525]
>>>>                 ->    'OMAP3 ISP CCDC output':pad0 [ACTIVE]
>>>>                 ->    'OMAP3 ISP resizer':pad0 []
>>>>         pad2: Output [UYVY2X8 720x524]
>>>>                 ->    'OMAP3 ISP preview':pad0 []
>>>>                 ->    'OMAP3 ISP AEWB':pad0 [IMMUTABLE,ACTIVE]
>>>>                 ->    'OMAP3 ISP AF':pad0 [IMMUTABLE,ACTIVE]
>>>>                 ->    'OMAP3 ISP histogram':pad0 [IMMUTABLE,ACTIVE]
>>>>
>>>> - entity 6: OMAP3 ISP CCDC output (1 pad, 1 link)
>>>>             type Node subtype V4L
>>>>             device node name /dev/video4
>>>>         pad0: Input
>>>>                 <- 'OMAP3 ISP CCDC':pad1 [ACTIVE]
>>>>
>>>> - entity 7: OMAP3 ISP preview (2 pads, 4 links)
>>>>             type V4L2 subdev subtype Unknown
>>>>             device node name /dev/v4l-subdev3
>>>>         pad0: Input [SGRBG10 4096x4096]
>>>>                 <- 'OMAP3 ISP CCDC':pad2 []
>>>>                 <- 'OMAP3 ISP preview input':pad0 []
>>>>         pad1: Output [YUYV 4082x4088]
>>>>                 ->    'OMAP3 ISP preview output':pad0 []
>>>>                 ->    'OMAP3 ISP resizer':pad0 []
>>>>
>>>> - entity 8: OMAP3 ISP preview input (1 pad, 1 link)
>>>>             type Node subtype V4L
>>>>             device node name /dev/video5
>>>>         pad0: Output
>>>>                 ->    'OMAP3 ISP preview':pad0 []
>>>>
>>>> - entity 9: OMAP3 ISP preview output (1 pad, 1 link)
>>>>             type Node subtype V4L
>>>>             device node name /dev/video6
>>>>         pad0: Input
>>>>                 <- 'OMAP3 ISP preview':pad1 []
>>>>
>>>> - entity 10: OMAP3 ISP resizer (2 pads, 4 links)
>>>>              type V4L2 subdev subtype Unknown
>>>>              device node name /dev/v4l-subdev4
>>>>         pad0: Input [YUYV 4095x4095 (4,6)/4086x4082]
>>>>                 <- 'OMAP3 ISP CCDC':pad1 []
>>>>                 <- 'OMAP3 ISP preview':pad1 []
>>>>                 <- 'OMAP3 ISP resizer input':pad0 []
>>>>         pad1: Output [YUYV 4096x4095]
>>>>                 ->    'OMAP3 ISP resizer output':pad0 []
>>>>
>>>> - entity 11: OMAP3 ISP resizer input (1 pad, 1 link)
>>>>              type Node subtype V4L
>>>>              device node name /dev/video7
>>>>         pad0: Output
>>>>                 ->    'OMAP3 ISP resizer':pad0 []
>>>>
>>>> - entity 12: OMAP3 ISP resizer output (1 pad, 1 link)
>>>>              type Node subtype V4L
>>>>              device node name /dev/video8
>>>>         pad0: Input
>>>>                 <- 'OMAP3 ISP resizer':pad1 []
>>>>
>>>> - entity 13: OMAP3 ISP AEWB (1 pad, 1 link)
>>>>              type V4L2 subdev subtype Unknown
>>>>              device node name /dev/v4l-subdev5
>>>>         pad0: Input
>>>>                 <- 'OMAP3 ISP CCDC':pad2 [IMMUTABLE,ACTIVE]
>>>>
>>>> - entity 14: OMAP3 ISP AF (1 pad, 1 link)
>>>>              type V4L2 subdev subtype Unknown
>>>>              device node name /dev/v4l-subdev6
>>>>         pad0: Input
>>>>                 <- 'OMAP3 ISP CCDC':pad2 [IMMUTABLE,ACTIVE]
>>>>
>>>> - entity 15: OMAP3 ISP histogram (1 pad, 1 link)
>>>>              type V4L2 subdev subtype Unknown
>>>>              device node name /dev/v4l-subdev7
>>>>         pad0: Input
>>>>                 <- 'OMAP3 ISP CCDC':pad2 [IMMUTABLE,ACTIVE]
>>>>
>>>> - entity 16: tvp5150 3-005c (1 pad, 1 link)
>>>>              type V4L2 subdev subtype Unknown
>>>>              device node name /dev/v4l-subdev8
>>>>         pad0: Output [UYVY2X8 720x525]
>>>>                 ->    'OMAP3 ISP CCDC':pad0 [ACTIVE]
>>>>
>>>>>
>>>>>>
>>>>>>
>>>>>> On Tue, Oct 18, 2011 at 5:07 PM, Gary Thomas<gary@mlbassoc.com>
>>>>>>  wrote:
>>>>>>>
>>>>>>> On 2011-10-18 07:33, Boris Todorov wrote:
>>>>>>>>
>>>>>>>> Hi
>>>>>>>>
>>>>>>>> I'm trying to run OMAP + TVP5151 in BT656 mode.
>>>>>>>>
>>>>>>>> I'm using omap3isp-omap3isp-yuv
>>>>>>>> (git.linuxtv.org/pinchartl/media.git).
>>>>>>>> Plus the following patches:
>>>>>>>>
>>>>>>>> TVP5151:
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> https://github.com/ebutera/meta-igep/tree/testing-v2/recipes-kernel/linux/linux-3.0+3.1rc/tvp5150
>>>>>>>>
>>>>>>>> The latest RFC patches for BT656 support:
>>>>>>>>
>>>>>>>> Enrico Butera (2):
>>>>>>>>   omap3isp: ispvideo: export isp_video_mbus_to_pix
>>>>>>>>   omap3isp: ispccdc: configure CCDC registers and add BT656 support
>>>>>>>>
>>>>>>>> Javier Martinez Canillas (1):
>>>>>>>>   omap3isp: ccdc: Add interlaced field mode to platform data
>>>>>>>>
>>>>>>>>
>>>>>>>> I'm able to configure with media-ctl:
>>>>>>>>
>>>>>>>> media-ctl -v -r -l '"tvp5150 3-005c":0->"OMAP3 ISP CCDC":0[1],
>>>>>>>> "OMAP3
>>>>>>>> ISP CCDC":1->"OMAP3 ISP CCDC output":0[1]'
>>>>>>>> media-ctl -v --set-format '"tvp5150 3-005c":0 [UYVY2X8 720x525]'
>>>>>>>> media-ctl -v --set-format '"OMAP3 ISP CCDC":0 [UYVY2X8 720x525]'
>>>>>>>> media-ctl -v --set-format '"OMAP3 ISP CCDC":1 [UYVY2X8 720x525]'
>>>>>>>>
>>>>>>>> But
>>>>>>>> ./yavta -f UYVY -s 720x525 -n 4 --capture=4 -F /dev/video4
>>>>>>>>
>>>>>>>> sleeps after
>>>>>>>> ...
>>>>>>>> Buffer 1 mapped at address 0x4021d000.
>>>>>>>> length: 756000 offset: 1515520
>>>>>>>> Buffer 2 mapped at address 0x402d6000.
>>>>>>>> length: 756000 offset: 2273280
>>>>>>>> Buffer 3 mapped at address 0x4038f000.
>>>>>>>>
>>>>>>>> Anyone with the same issue??? This happens with every other v4l test
>>>>>>>> app
>>>>>>>> I
>>>>>>>> used.
>>>>>>>> I can see data from TVP5151 but there are no interrupts in ISP.
>>>>>>>
>>>>>>> Why are you using /dev/video4?  The CCDC output is on /dev/video2
>
> --
> ------------------------------------------------------------
> Gary Thomas                 |  Consulting for the
> MLB Associates              |    Embedded world
> ------------------------------------------------------------
>

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: omap3isp: BT.656 support
  2011-10-18 16:14               ` Boris Todorov
@ 2011-10-18 16:24                 ` Gary Thomas
  0 siblings, 0 replies; 24+ messages in thread
From: Gary Thomas @ 2011-10-18 16:24 UTC (permalink / raw)
  To: Boris Todorov; +Cc: linux-media

On 2011-10-18 10:14, Boris Todorov wrote:
> On Tue, Oct 18, 2011 at 7:04 PM, Gary Thomas<gary@mlbassoc.com>  wrote:
>> On 2011-10-18 09:53, Boris Todorov wrote:
>>>
>>> On Tue, Oct 18, 2011 at 6:24 PM, Gary Thomas<gary@mlbassoc.com>    wrote:
>>>>
>>>> On 2011-10-18 09:10, Boris Todorov wrote:
>>>>>
>>>>> On Tue, Oct 18, 2011 at 5:49 PM, Gary Thomas<gary@mlbassoc.com>
>>>>>   wrote:
>>>>>>
>>>>>> On 2011-10-18 08:28, Boris Todorov wrote:
>>>>>>>
>>>>>>> I'm using different board.
>>>>>>
>>>>>> What board?  I would think the architecture of the OMAP3 ISP would
>>>>>> not change, based on the board?
>>>>>
>>>>> It's a custom board with omap3630. ISP is not changed.
>>>>> When I disable OMAP2_VOUT from defconfig "CCD output" is /dev/video2.
>>>>
>>>> I see, I have that option turned off.
>>>>
>>>>> But result is the same - yavta sleeps at VIDIOC_DQBUF ioctl
>>>>
>>>> How are you configuring the TVP5150?  In particular these settings at
>>>> boot
>>>> time:
>>>>
>>>> static struct isp_v4l2_subdevs_group my_camera_subdevs[] = {
>>>>         {
>>>>                 .subdevs = tvp5150_camera_subdevs,
>>>>                 .interface = ISP_INTERFACE_PARALLEL,
>>>>                 .bus = {
>>>>                                 .parallel = {
>>>>                                         .data_lane_shift = 0,
>>>>                                         .clk_pol = 1,
>>>>                                         .bt656 = 1,
>>>>                                         .fldmode = 1,
>>>>                                 }
>>>>                 },
>>>>         },
>>>>         { },
>>>> };
>>>
>>> My settings are:
>>>                                 .data_lane_shift        = 0,
>>>                                 .clk_pol                = 0,
>>>                                 .hs_pol                 = 0,
>>>                                 .vs_pol                 = 0,
>>>                                 .fldmode                = 1,
>>>                                 .bt656               = 1,
>>>
>>> I tried yours but same result.
>>> Why did you chose clk_pol=1?
>>
>> I just copied the settings from the BeagleBoard
> btw what board are you using?

An internal project for the company I work with, OMAP 3530, much like the BeagleBoard

>
>> Have you had this working before (earlier kernel, etc)?
> Never in BT.656 mode...
>
>>
>>>
>>>>
>>>> This is how you tell the ISP to run in BT656 mode.  Without it, it will
>>>> run
>>>> using the HS/VS/FID signals (and also in my experience does not work
>>>> properly)
>>>>
>>>>>>
>>>>>>> According "media-ctl -p":
>>>>>>>
>>>>>>> - entity 5: OMAP3 ISP CCDC (3 pads, 9 links)
>>>>>>>              type V4L2 subdev subtype Unknown
>>>>>>>              device node name /dev/v4l-subdev2
>>>>>>>          pad0: Input [UYVY2X8 720x525]
>>>>>>>                  <- 'OMAP3 ISP CCP2':pad1 []
>>>>>>>                  <- 'OMAP3 ISP CSI2a':pad1 []
>>>>>>>                  <- 'tvp5150 3-005c':pad0 [ACTIVE]
>>>>>>>          pad1: Output [UYVY2X8 720x525]
>>>>>>>                  ->        'OMAP3 ISP CCDC output':pad0 [ACTIVE]
>>>>>>>                  ->        'OMAP3 ISP resizer':pad0 []
>>>>>>>          pad2: Output [UYVY2X8 720x524]
>>>>>>>                  ->        'OMAP3 ISP preview':pad0 []
>>>>>>>                  ->        'OMAP3 ISP AEWB':pad0 [IMMUTABLE,ACTIVE]
>>>>>>>                  ->        'OMAP3 ISP AF':pad0 [IMMUTABLE,ACTIVE]
>>>>>>>                  ->        'OMAP3 ISP histogram':pad0 [IMMUTABLE,ACTIVE]
>>>>>>>
>>>>>>> - entity 6: OMAP3 ISP CCDC output (1 pad, 1 link)
>>>>>>>              type Node subtype V4L
>>>>>>>              device node name /dev/video4
>>>>>>>          pad0: Input
>>>>>>>                  <- 'OMAP3 ISP CCDC':pad1 [ACTIVE]
>>>>>>>
>>>>>>>
>>>>>>> Should be /dev/video4...
>>>>>>
>>>>>> Could you send your pipeline setup and full output of 'media-ctl -p'?
>>>>>
>>>>> Pipeline setup is:
>>>>>
>>>>> $ media-ctl -v -r -l '"tvp5150 3-005c":0->"OMAP3 ISP CCDC":0[1],
>>>>> "OMAP3 ISP CCDC":1->"OMAP3 ISP CCDC output":0[1]'
>>>>> $ media-ctl -v --set-format '"tvp5150 3-005c":0 [UYVY2X8 720x525]'
>>>>> $ media-ctl -v --set-format '"OMAP3 ISP CCDC":0 [UYVY2X8 720x525]'
>>>>> $ media-ctl -v --set-format '"OMAP3 ISP CCDC":1 [UYVY2X8 720x525]'
>>>>>
>>>>> media-ctl output (with /dev/video4):
>>>>>
>>>>> $ media-ctl -p
>>>>> Opening media device /dev/media0
>>>>> Enumerating entities
>>>>> Found 16 entities
>>>>> Enumerating pads and links
>>>>> Device topology
>>>>> - entity 1: OMAP3 ISP CCP2 (2 pads, 2 links)
>>>>>              type V4L2 subdev subtype Unknown
>>>>>              device node name /dev/v4l-subdev0
>>>>>          pad0: Input [SGRBG10 4096x4096]
>>>>>                  <- 'OMAP3 ISP CCP2 input':pad0 []
>>>>>          pad1: Output [SGRBG10 4096x4096]
>>>>>                  ->      'OMAP3 ISP CCDC':pad0 []
>>>>>
>>>>> - entity 2: OMAP3 ISP CCP2 input (1 pad, 1 link)
>>>>>              type Node subtype V4L
>>>>>              device node name /dev/video0
>>>>>          pad0: Output
>>>>>                  ->      'OMAP3 ISP CCP2':pad0 []
>>>>>
>>>>> - entity 3: OMAP3 ISP CSI2a (2 pads, 2 links)
>>>>>              type V4L2 subdev subtype Unknown
>>>>>              device node name /dev/v4l-subdev1
>>>>>          pad0: Input [SGRBG10 4096x4096]
>>>>>          pad1: Output [SGRBG10 4096x4096]
>>>>>                  ->      'OMAP3 ISP CSI2a output':pad0 []
>>>>>                  ->      'OMAP3 ISP CCDC':pad0 []
>>>>>
>>>>> - entity 4: OMAP3 ISP CSI2a output (1 pad, 1 link)
>>>>>              type Node subtype V4L
>>>>>              device node name /dev/video3
>>>>>          pad0: Input
>>>>>                  <- 'OMAP3 ISP CSI2a':pad1 []
>>>>>
>>>>> - entity 5: OMAP3 ISP CCDC (3 pads, 9 links)
>>>>>              type V4L2 subdev subtype Unknown
>>>>>              device node name /dev/v4l-subdev2
>>>>>          pad0: Input [UYVY2X8 720x525]
>>>>>                  <- 'OMAP3 ISP CCP2':pad1 []
>>>>>                  <- 'OMAP3 ISP CSI2a':pad1 []
>>>>>                  <- 'tvp5150 3-005c':pad0 [ACTIVE]
>>>>>          pad1: Output [UYVY2X8 720x525]
>>>>>                  ->      'OMAP3 ISP CCDC output':pad0 [ACTIVE]
>>>>>                  ->      'OMAP3 ISP resizer':pad0 []
>>>>>          pad2: Output [UYVY2X8 720x524]
>>>>>                  ->      'OMAP3 ISP preview':pad0 []
>>>>>                  ->      'OMAP3 ISP AEWB':pad0 [IMMUTABLE,ACTIVE]
>>>>>                  ->      'OMAP3 ISP AF':pad0 [IMMUTABLE,ACTIVE]
>>>>>                  ->      'OMAP3 ISP histogram':pad0 [IMMUTABLE,ACTIVE]
>>>>>
>>>>> - entity 6: OMAP3 ISP CCDC output (1 pad, 1 link)
>>>>>              type Node subtype V4L
>>>>>              device node name /dev/video4
>>>>>          pad0: Input
>>>>>                  <- 'OMAP3 ISP CCDC':pad1 [ACTIVE]
>>>>>
>>>>> - entity 7: OMAP3 ISP preview (2 pads, 4 links)
>>>>>              type V4L2 subdev subtype Unknown
>>>>>              device node name /dev/v4l-subdev3
>>>>>          pad0: Input [SGRBG10 4096x4096]
>>>>>                  <- 'OMAP3 ISP CCDC':pad2 []
>>>>>                  <- 'OMAP3 ISP preview input':pad0 []
>>>>>          pad1: Output [YUYV 4082x4088]
>>>>>                  ->      'OMAP3 ISP preview output':pad0 []
>>>>>                  ->      'OMAP3 ISP resizer':pad0 []
>>>>>
>>>>> - entity 8: OMAP3 ISP preview input (1 pad, 1 link)
>>>>>              type Node subtype V4L
>>>>>              device node name /dev/video5
>>>>>          pad0: Output
>>>>>                  ->      'OMAP3 ISP preview':pad0 []
>>>>>
>>>>> - entity 9: OMAP3 ISP preview output (1 pad, 1 link)
>>>>>              type Node subtype V4L
>>>>>              device node name /dev/video6
>>>>>          pad0: Input
>>>>>                  <- 'OMAP3 ISP preview':pad1 []
>>>>>
>>>>> - entity 10: OMAP3 ISP resizer (2 pads, 4 links)
>>>>>               type V4L2 subdev subtype Unknown
>>>>>               device node name /dev/v4l-subdev4
>>>>>          pad0: Input [YUYV 4095x4095 (4,6)/4086x4082]
>>>>>                  <- 'OMAP3 ISP CCDC':pad1 []
>>>>>                  <- 'OMAP3 ISP preview':pad1 []
>>>>>                  <- 'OMAP3 ISP resizer input':pad0 []
>>>>>          pad1: Output [YUYV 4096x4095]
>>>>>                  ->      'OMAP3 ISP resizer output':pad0 []
>>>>>
>>>>> - entity 11: OMAP3 ISP resizer input (1 pad, 1 link)
>>>>>               type Node subtype V4L
>>>>>               device node name /dev/video7
>>>>>          pad0: Output
>>>>>                  ->      'OMAP3 ISP resizer':pad0 []
>>>>>
>>>>> - entity 12: OMAP3 ISP resizer output (1 pad, 1 link)
>>>>>               type Node subtype V4L
>>>>>               device node name /dev/video8
>>>>>          pad0: Input
>>>>>                  <- 'OMAP3 ISP resizer':pad1 []
>>>>>
>>>>> - entity 13: OMAP3 ISP AEWB (1 pad, 1 link)
>>>>>               type V4L2 subdev subtype Unknown
>>>>>               device node name /dev/v4l-subdev5
>>>>>          pad0: Input
>>>>>                  <- 'OMAP3 ISP CCDC':pad2 [IMMUTABLE,ACTIVE]
>>>>>
>>>>> - entity 14: OMAP3 ISP AF (1 pad, 1 link)
>>>>>               type V4L2 subdev subtype Unknown
>>>>>               device node name /dev/v4l-subdev6
>>>>>          pad0: Input
>>>>>                  <- 'OMAP3 ISP CCDC':pad2 [IMMUTABLE,ACTIVE]
>>>>>
>>>>> - entity 15: OMAP3 ISP histogram (1 pad, 1 link)
>>>>>               type V4L2 subdev subtype Unknown
>>>>>               device node name /dev/v4l-subdev7
>>>>>          pad0: Input
>>>>>                  <- 'OMAP3 ISP CCDC':pad2 [IMMUTABLE,ACTIVE]
>>>>>
>>>>> - entity 16: tvp5150 3-005c (1 pad, 1 link)
>>>>>               type V4L2 subdev subtype Unknown
>>>>>               device node name /dev/v4l-subdev8
>>>>>          pad0: Output [UYVY2X8 720x525]
>>>>>                  ->      'OMAP3 ISP CCDC':pad0 [ACTIVE]
>>>>>
>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> On Tue, Oct 18, 2011 at 5:07 PM, Gary Thomas<gary@mlbassoc.com>
>>>>>>>   wrote:
>>>>>>>>
>>>>>>>> On 2011-10-18 07:33, Boris Todorov wrote:
>>>>>>>>>
>>>>>>>>> Hi
>>>>>>>>>
>>>>>>>>> I'm trying to run OMAP + TVP5151 in BT656 mode.
>>>>>>>>>
>>>>>>>>> I'm using omap3isp-omap3isp-yuv
>>>>>>>>> (git.linuxtv.org/pinchartl/media.git).
>>>>>>>>> Plus the following patches:
>>>>>>>>>
>>>>>>>>> TVP5151:
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> https://github.com/ebutera/meta-igep/tree/testing-v2/recipes-kernel/linux/linux-3.0+3.1rc/tvp5150
>>>>>>>>>
>>>>>>>>> The latest RFC patches for BT656 support:
>>>>>>>>>
>>>>>>>>> Enrico Butera (2):
>>>>>>>>>    omap3isp: ispvideo: export isp_video_mbus_to_pix
>>>>>>>>>    omap3isp: ispccdc: configure CCDC registers and add BT656 support
>>>>>>>>>
>>>>>>>>> Javier Martinez Canillas (1):
>>>>>>>>>    omap3isp: ccdc: Add interlaced field mode to platform data
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> I'm able to configure with media-ctl:
>>>>>>>>>
>>>>>>>>> media-ctl -v -r -l '"tvp5150 3-005c":0->"OMAP3 ISP CCDC":0[1],
>>>>>>>>> "OMAP3
>>>>>>>>> ISP CCDC":1->"OMAP3 ISP CCDC output":0[1]'
>>>>>>>>> media-ctl -v --set-format '"tvp5150 3-005c":0 [UYVY2X8 720x525]'
>>>>>>>>> media-ctl -v --set-format '"OMAP3 ISP CCDC":0 [UYVY2X8 720x525]'
>>>>>>>>> media-ctl -v --set-format '"OMAP3 ISP CCDC":1 [UYVY2X8 720x525]'
>>>>>>>>>
>>>>>>>>> But
>>>>>>>>> ./yavta -f UYVY -s 720x525 -n 4 --capture=4 -F /dev/video4
>>>>>>>>>
>>>>>>>>> sleeps after
>>>>>>>>> ...
>>>>>>>>> Buffer 1 mapped at address 0x4021d000.
>>>>>>>>> length: 756000 offset: 1515520
>>>>>>>>> Buffer 2 mapped at address 0x402d6000.
>>>>>>>>> length: 756000 offset: 2273280
>>>>>>>>> Buffer 3 mapped at address 0x4038f000.
>>>>>>>>>
>>>>>>>>> Anyone with the same issue??? This happens with every other v4l test
>>>>>>>>> app
>>>>>>>>> I
>>>>>>>>> used.
>>>>>>>>> I can see data from TVP5151 but there are no interrupts in ISP.
>>>>>>>>
>>>>>>>> Why are you using /dev/video4?  The CCDC output is on /dev/video2
>>
>> --
>> ------------------------------------------------------------
>> Gary Thomas                 |  Consulting for the
>> MLB Associates              |    Embedded world
>> ------------------------------------------------------------
>>

-- 
------------------------------------------------------------
Gary Thomas                 |  Consulting for the
MLB Associates              |    Embedded world
------------------------------------------------------------

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: omap3isp: BT.656 support
  2011-10-18 13:33 omap3isp: BT.656 support Boris Todorov
  2011-10-18 14:07 ` Gary Thomas
@ 2011-10-18 16:31 ` Enrico
  2011-10-19  7:01   ` Boris Todorov
  2011-10-19 16:26 ` Stefan Herbrechtsmeier
  2 siblings, 1 reply; 24+ messages in thread
From: Enrico @ 2011-10-18 16:31 UTC (permalink / raw)
  To: Boris Todorov; +Cc: linux-media

On Tue, Oct 18, 2011 at 3:33 PM, Boris Todorov
<boris.st.todorov@gmail.com> wrote:
> Hi
>
> I'm trying to run OMAP + TVP5151 in BT656 mode.
>
> I'm using omap3isp-omap3isp-yuv (git.linuxtv.org/pinchartl/media.git).
> Plus the following patches:
>
> TVP5151:
> https://github.com/ebutera/meta-igep/tree/testing-v2/recipes-kernel/linux/linux-3.0+3.1rc/tvp5150
>
> The latest RFC patches for BT656 support:
>
> Enrico Butera (2):
>  omap3isp: ispvideo: export isp_video_mbus_to_pix
>  omap3isp: ispccdc: configure CCDC registers and add BT656 support
>
> Javier Martinez Canillas (1):
>  omap3isp: ccdc: Add interlaced field mode to platform data
>
>
> I'm able to configure with media-ctl:
>
> media-ctl -v -r -l '"tvp5150 3-005c":0->"OMAP3 ISP CCDC":0[1], "OMAP3
> ISP CCDC":1->"OMAP3 ISP CCDC output":0[1]'
> media-ctl -v --set-format '"tvp5150 3-005c":0 [UYVY2X8 720x525]'
> media-ctl -v --set-format '"OMAP3 ISP CCDC":0 [UYVY2X8 720x525]'
> media-ctl -v --set-format '"OMAP3 ISP CCDC":1 [UYVY2X8 720x525]'
>
> But
> ./yavta -f UYVY -s 720x525 -n 4 --capture=4 -F /dev/video4
>
> sleeps after
> ...
> Buffer 1 mapped at address 0x4021d000.
> length: 756000 offset: 1515520
> Buffer 2 mapped at address 0x402d6000.
> length: 756000 offset: 2273280
> Buffer 3 mapped at address 0x4038f000.
>
> Anyone with the same issue??? This happens with every other v4l test app I used.
> I can see data from TVP5151 but there are no interrupts in ISP.

You can try if this:

http://www.spinics.net/lists/linux-media/msg37795.html

makes it work.

Enrico

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: omap3isp: BT.656 support
  2011-10-18 16:31 ` Enrico
@ 2011-10-19  7:01   ` Boris Todorov
  2011-10-19  8:28     ` Enrico
  0 siblings, 1 reply; 24+ messages in thread
From: Boris Todorov @ 2011-10-19  7:01 UTC (permalink / raw)
  To: Enrico; +Cc: linux-media

On Tue, Oct 18, 2011 at 7:31 PM, Enrico <ebutera@users.berlios.de> wrote:
> On Tue, Oct 18, 2011 at 3:33 PM, Boris Todorov
> <boris.st.todorov@gmail.com> wrote:
>> Hi
>>
>> I'm trying to run OMAP + TVP5151 in BT656 mode.
>>
>> I'm using omap3isp-omap3isp-yuv (git.linuxtv.org/pinchartl/media.git).
>> Plus the following patches:
>>
>> TVP5151:
>> https://github.com/ebutera/meta-igep/tree/testing-v2/recipes-kernel/linux/linux-3.0+3.1rc/tvp5150
>>
>> The latest RFC patches for BT656 support:
>>
>> Enrico Butera (2):
>>  omap3isp: ispvideo: export isp_video_mbus_to_pix
>>  omap3isp: ispccdc: configure CCDC registers and add BT656 support
>>
>> Javier Martinez Canillas (1):
>>  omap3isp: ccdc: Add interlaced field mode to platform data
>>
>>
>> I'm able to configure with media-ctl:
>>
>> media-ctl -v -r -l '"tvp5150 3-005c":0->"OMAP3 ISP CCDC":0[1], "OMAP3
>> ISP CCDC":1->"OMAP3 ISP CCDC output":0[1]'
>> media-ctl -v --set-format '"tvp5150 3-005c":0 [UYVY2X8 720x525]'
>> media-ctl -v --set-format '"OMAP3 ISP CCDC":0 [UYVY2X8 720x525]'
>> media-ctl -v --set-format '"OMAP3 ISP CCDC":1 [UYVY2X8 720x525]'
>>
>> But
>> ./yavta -f UYVY -s 720x525 -n 4 --capture=4 -F /dev/video4
>>
>> sleeps after
>> ...
>> Buffer 1 mapped at address 0x4021d000.
>> length: 756000 offset: 1515520
>> Buffer 2 mapped at address 0x402d6000.
>> length: 756000 offset: 2273280
>> Buffer 3 mapped at address 0x4038f000.
>>
>> Anyone with the same issue??? This happens with every other v4l test app I used.
>> I can see data from TVP5151 but there are no interrupts in ISP.
>
> You can try if this:
>
> http://www.spinics.net/lists/linux-media/msg37795.html
>
> makes it work.

Tried it but it's doesn't work for me.

When yavta calls VIDIOC_DQBUF I'm stuck here:
omap3isp_video_queue_dqbuf() -> isp_video_buffer_wait()
"Wait for a buffer to be ready" with O_NONBLOCK

Btw my kernel is 2.6.35 but ISP and V4L are taken from
omap3isp-omap3isp-yuv and according ISP/TVP register settings
everything should be OK...

>
> Enrico
>

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: omap3isp: BT.656 support
  2011-10-19  7:01   ` Boris Todorov
@ 2011-10-19  8:28     ` Enrico
  2011-10-19  9:03       ` Boris Todorov
  0 siblings, 1 reply; 24+ messages in thread
From: Enrico @ 2011-10-19  8:28 UTC (permalink / raw)
  To: Boris Todorov; +Cc: linux-media

On Wed, Oct 19, 2011 at 9:01 AM, Boris Todorov
<boris.st.todorov@gmail.com> wrote:
> On Tue, Oct 18, 2011 at 7:31 PM, Enrico <ebutera@users.berlios.de> wrote:
>> You can try if this:
>>
>> http://www.spinics.net/lists/linux-media/msg37795.html
>>
>> makes it work.
>
> Tried it but it's doesn't work for me.
>
> When yavta calls VIDIOC_DQBUF I'm stuck here:
> omap3isp_video_queue_dqbuf() -> isp_video_buffer_wait()
> "Wait for a buffer to be ready" with O_NONBLOCK
>
> Btw my kernel is 2.6.35 but ISP and V4L are taken from
> omap3isp-omap3isp-yuv and according ISP/TVP register settings
> everything should be OK...

When you stop yavta you should have in the kernel log something like
this (this comes from an old log i'm not 100% sure they are the
correct values):

[  655.470581] omap3isp omap3isp: ###CCDC PCR=0x00000000
[  655.475677] omap3isp omap3isp: ###CCDC SYN_MODE=0x00032f80
[  655.481231] omap3isp omap3isp: ###CCDC HD_VD_WID=0x00000000
[  655.486816] omap3isp omap3isp: ###CCDC PIX_LINES=0x00000000
[  655.492431] omap3isp omap3isp: ###CCDC HORZ_INFO=0x0000059f
[  655.498046] omap3isp omap3isp: ###CCDC VERT_START=0x00000000
[  655.503784] omap3isp omap3isp: ###CCDC VERT_LINES=0x00000139
[  655.509460] omap3isp omap3isp: ###CCDC CULLING=0xffff00ff
[  655.514892] omap3isp omap3isp: ###CCDC HSIZE_OFF=0x000005a0
[  655.520507] omap3isp omap3isp: ###CCDC SDOFST=0x00000249
[  655.525848] omap3isp omap3isp: ###CCDC SDR_ADDR=0x00001000
[  655.531372] omap3isp omap3isp: ###CCDC CLAMP=0x00000010
[  655.536651] omap3isp omap3isp: ###CCDC DCSUB=0x00000040
[  655.541900] omap3isp omap3isp: ###CCDC COLPTN=0xbb11bb11
[  655.547271] omap3isp omap3isp: ###CCDC BLKCMP=0x00000000
[  655.552612] omap3isp omap3isp: ###CCDC FPC=0x00000000
[  655.557708] omap3isp omap3isp: ###CCDC FPC_ADDR=0x00000000
[  655.563232] omap3isp omap3isp: ###CCDC VDINT=0x013800d1
[  655.568511] omap3isp omap3isp: ###CCDC ALAW=0x00000000
[  655.573669] omap3isp omap3isp: ###CCDC REC656IF=0x00000003
[  655.579193] omap3isp omap3isp: ###CCDC CFG=0x00008800
[  655.584289] omap3isp omap3isp: ###CCDC FMTCFG=0x0000e000
[  655.589660] omap3isp omap3isp: ###CCDC FMT_HORZ=0x00000000
[  655.595184] omap3isp omap3isp: ###CCDC FMT_VERT=0x00000000
[  655.600769] omap3isp omap3isp: ###CCDC PRGEVEN0=0x00000000
[  655.606323] omap3isp omap3isp: ###CCDC PRGEVEN1=0x00000000
[  655.611816] omap3isp omap3isp: ###CCDC PRGODD0=0x00000000
[  655.617279] omap3isp omap3isp: ###CCDC PRGODD1=0x00000000
[  655.622711] omap3isp omap3isp: ###CCDC VP_OUT=0x00000000
[  655.628051] omap3isp omap3isp: ###CCDC LSC_CONFIG=0x00006600
[  655.633758] omap3isp omap3isp: ###CCDC LSC_INITIAL=0x00000000
[  655.639556] omap3isp omap3isp: ###CCDC LSC_TABLE_BASE=0x00000000
[  655.645599] omap3isp omap3isp: ###CCDC LSC_TABLE_OFFSET=0x00000000

Send your values so we can try to see where the problem is.

Enrico

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: omap3isp: BT.656 support
  2011-10-19  8:28     ` Enrico
@ 2011-10-19  9:03       ` Boris Todorov
  2011-10-19 12:40         ` Enrico
  0 siblings, 1 reply; 24+ messages in thread
From: Boris Todorov @ 2011-10-19  9:03 UTC (permalink / raw)
  To: Enrico; +Cc: linux-media

On Wed, Oct 19, 2011 at 11:28 AM, Enrico <ebutera@users.berlios.de> wrote:
> On Wed, Oct 19, 2011 at 9:01 AM, Boris Todorov
> <boris.st.todorov@gmail.com> wrote:
>> On Tue, Oct 18, 2011 at 7:31 PM, Enrico <ebutera@users.berlios.de> wrote:
>>> You can try if this:
>>>
>>> http://www.spinics.net/lists/linux-media/msg37795.html
>>>
>>> makes it work.
>>
>> Tried it but it's doesn't work for me.
>>
>> When yavta calls VIDIOC_DQBUF I'm stuck here:
>> omap3isp_video_queue_dqbuf() -> isp_video_buffer_wait()
>> "Wait for a buffer to be ready" with O_NONBLOCK
>>
>> Btw my kernel is 2.6.35 but ISP and V4L are taken from
>> omap3isp-omap3isp-yuv and according ISP/TVP register settings
>> everything should be OK...
>
> When you stop yavta you should have in the kernel log something like
> this (this comes from an old log i'm not 100% sure they are the
> correct values):
>
> [  655.470581] omap3isp omap3isp: ###CCDC PCR=0x00000000
> [  655.475677] omap3isp omap3isp: ###CCDC SYN_MODE=0x00032f80
> [  655.481231] omap3isp omap3isp: ###CCDC HD_VD_WID=0x00000000
> [  655.486816] omap3isp omap3isp: ###CCDC PIX_LINES=0x00000000
> [  655.492431] omap3isp omap3isp: ###CCDC HORZ_INFO=0x0000059f
> [  655.498046] omap3isp omap3isp: ###CCDC VERT_START=0x00000000
> [  655.503784] omap3isp omap3isp: ###CCDC VERT_LINES=0x00000139
> [  655.509460] omap3isp omap3isp: ###CCDC CULLING=0xffff00ff
> [  655.514892] omap3isp omap3isp: ###CCDC HSIZE_OFF=0x000005a0
> [  655.520507] omap3isp omap3isp: ###CCDC SDOFST=0x00000249
> [  655.525848] omap3isp omap3isp: ###CCDC SDR_ADDR=0x00001000
> [  655.531372] omap3isp omap3isp: ###CCDC CLAMP=0x00000010
> [  655.536651] omap3isp omap3isp: ###CCDC DCSUB=0x00000040
> [  655.541900] omap3isp omap3isp: ###CCDC COLPTN=0xbb11bb11
> [  655.547271] omap3isp omap3isp: ###CCDC BLKCMP=0x00000000
> [  655.552612] omap3isp omap3isp: ###CCDC FPC=0x00000000
> [  655.557708] omap3isp omap3isp: ###CCDC FPC_ADDR=0x00000000
> [  655.563232] omap3isp omap3isp: ###CCDC VDINT=0x013800d1
> [  655.568511] omap3isp omap3isp: ###CCDC ALAW=0x00000000
> [  655.573669] omap3isp omap3isp: ###CCDC REC656IF=0x00000003
> [  655.579193] omap3isp omap3isp: ###CCDC CFG=0x00008800
> [  655.584289] omap3isp omap3isp: ###CCDC FMTCFG=0x0000e000
> [  655.589660] omap3isp omap3isp: ###CCDC FMT_HORZ=0x00000000
> [  655.595184] omap3isp omap3isp: ###CCDC FMT_VERT=0x00000000
> [  655.600769] omap3isp omap3isp: ###CCDC PRGEVEN0=0x00000000
> [  655.606323] omap3isp omap3isp: ###CCDC PRGEVEN1=0x00000000
> [  655.611816] omap3isp omap3isp: ###CCDC PRGODD0=0x00000000
> [  655.617279] omap3isp omap3isp: ###CCDC PRGODD1=0x00000000
> [  655.622711] omap3isp omap3isp: ###CCDC VP_OUT=0x00000000
> [  655.628051] omap3isp omap3isp: ###CCDC LSC_CONFIG=0x00006600
> [  655.633758] omap3isp omap3isp: ###CCDC LSC_INITIAL=0x00000000
> [  655.639556] omap3isp omap3isp: ###CCDC LSC_TABLE_BASE=0x00000000
> [  655.645599] omap3isp omap3isp: ###CCDC LSC_TABLE_OFFSET=0x00000000
>
> Send your values so we can try to see where the problem is.
>
> Enrico
>

I really appreciate your help.

Here is my log:
[   24.683685] omap3isp omap3isp: -------------CCDC Register dump-------------
[   24.683685] omap3isp omap3isp: ###CCDC PCR=0x00000000
[   24.683685] omap3isp omap3isp: ###CCDC SYN_MODE=0x00032f80
[   24.683715] omap3isp omap3isp: ###CCDC HD_VD_WID=0x00000000
[   24.683715] omap3isp omap3isp: ###CCDC PIX_LINES=0x00000000
[   24.683746] omap3isp omap3isp: ###CCDC HORZ_INFO=0x0000059f
[   24.683746] omap3isp omap3isp: ###CCDC VERT_START=0x00000000
[   24.683746] omap3isp omap3isp: ###CCDC VERT_LINES=0x00000105
[   24.683776] omap3isp omap3isp: ###CCDC CULLING=0xffff00ff
[   24.683776] omap3isp omap3isp: ###CCDC HSIZE_OFF=0x000005a0
[   24.683776] omap3isp omap3isp: ###CCDC SDOFST=0x00000249
[   24.683807] omap3isp omap3isp: ###CCDC SDR_ADDR=0x00001000
[   24.683807] omap3isp omap3isp: ###CCDC CLAMP=0x00000010
[   24.683807] omap3isp omap3isp: ###CCDC DCSUB=0x00000000
[   24.683837] omap3isp omap3isp: ###CCDC COLPTN=0x00000000
[   24.683837] omap3isp omap3isp: ###CCDC BLKCMP=0x00000000
[   24.683837] omap3isp omap3isp: ###CCDC FPC=0x00000000
[   24.683868] omap3isp omap3isp: ###CCDC FPC_ADDR=0x00000000
[   24.683868] omap3isp omap3isp: ###CCDC VDINT=0x01040000
[   24.683868] omap3isp omap3isp: ###CCDC ALAW=0x00000004
[   24.683898] omap3isp omap3isp: ###CCDC REC656IF=0x00000003
[   24.683898] omap3isp omap3isp: ###CCDC CFG=0x00008800
[   24.683898] omap3isp omap3isp: ###CCDC FMTCFG=0x00006000
[   24.683929] omap3isp omap3isp: ###CCDC FMT_HORZ=0x000002d0
[   24.683929] omap3isp omap3isp: ###CCDC FMT_VERT=0x0000020d
[   24.683929] omap3isp omap3isp: ###CCDC PRGEVEN0=0x00000000
[   24.683959] omap3isp omap3isp: ###CCDC PRGEVEN1=0x00000000
[   24.683959] omap3isp omap3isp: ###CCDC PRGODD0=0x00000000
[   24.683959] omap3isp omap3isp: ###CCDC PRGODD1=0x00000000
[   24.683990] omap3isp omap3isp: ###CCDC VP_OUT=0x04182d00
[   24.683990] omap3isp omap3isp: ###CCDC LSC_CONFIG=0x00006600
[   24.683990] omap3isp omap3isp: ###CCDC LSC_INITIAL=0x00000000
[   24.684020] omap3isp omap3isp: ###CCDC LSC_TABLE_BASE=0x00000000
[   24.684020] omap3isp omap3isp: ###CCDC LSC_TABLE_OFFSET=0x00000000
[   24.684051] omap3isp omap3isp: --------------------------------------------

This is with:

.data_lane_shift = 0,
.clk_pol             = 0,
.hs_pol             = 0,
.vs_pol             = 0,
.data_pol	       = 0,
.fldmode           = 1,
.bt656               = 1,

and the above mentioned media-ctl settings

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: omap3isp: BT.656 support
  2011-10-19  9:03       ` Boris Todorov
@ 2011-10-19 12:40         ` Enrico
  2011-10-19 13:06           ` Boris Todorov
  0 siblings, 1 reply; 24+ messages in thread
From: Enrico @ 2011-10-19 12:40 UTC (permalink / raw)
  To: Boris Todorov; +Cc: linux-media

On Wed, Oct 19, 2011 at 11:03 AM, Boris Todorov
<boris.st.todorov@gmail.com> wrote:
> Here is my log:
> [   24.683685] omap3isp omap3isp: -------------CCDC Register dump-------------
> [   24.683685] omap3isp omap3isp: ###CCDC PCR=0x00000000
> [   24.683685] omap3isp omap3isp: ###CCDC SYN_MODE=0x00032f80
> [   24.683715] omap3isp omap3isp: ###CCDC HD_VD_WID=0x00000000
> [   24.683715] omap3isp omap3isp: ###CCDC PIX_LINES=0x00000000
> [   24.683746] omap3isp omap3isp: ###CCDC HORZ_INFO=0x0000059f
> [   24.683746] omap3isp omap3isp: ###CCDC VERT_START=0x00000000
> [   24.683746] omap3isp omap3isp: ###CCDC VERT_LINES=0x00000105
> [   24.683776] omap3isp omap3isp: ###CCDC CULLING=0xffff00ff
> [   24.683776] omap3isp omap3isp: ###CCDC HSIZE_OFF=0x000005a0
> [   24.683776] omap3isp omap3isp: ###CCDC SDOFST=0x00000249
> [   24.683807] omap3isp omap3isp: ###CCDC SDR_ADDR=0x00001000
> [   24.683807] omap3isp omap3isp: ###CCDC CLAMP=0x00000010
> [   24.683807] omap3isp omap3isp: ###CCDC DCSUB=0x00000000
> [   24.683837] omap3isp omap3isp: ###CCDC COLPTN=0x00000000
> [   24.683837] omap3isp omap3isp: ###CCDC BLKCMP=0x00000000
> [   24.683837] omap3isp omap3isp: ###CCDC FPC=0x00000000
> [   24.683868] omap3isp omap3isp: ###CCDC FPC_ADDR=0x00000000
> [   24.683868] omap3isp omap3isp: ###CCDC VDINT=0x01040000
> [   24.683868] omap3isp omap3isp: ###CCDC ALAW=0x00000004
> [   24.683898] omap3isp omap3isp: ###CCDC REC656IF=0x00000003
> [   24.683898] omap3isp omap3isp: ###CCDC CFG=0x00008800
> [   24.683898] omap3isp omap3isp: ###CCDC FMTCFG=0x00006000
> [   24.683929] omap3isp omap3isp: ###CCDC FMT_HORZ=0x000002d0
> [   24.683929] omap3isp omap3isp: ###CCDC FMT_VERT=0x0000020d
> [   24.683929] omap3isp omap3isp: ###CCDC PRGEVEN0=0x00000000
> [   24.683959] omap3isp omap3isp: ###CCDC PRGEVEN1=0x00000000
> [   24.683959] omap3isp omap3isp: ###CCDC PRGODD0=0x00000000
> [   24.683959] omap3isp omap3isp: ###CCDC PRGODD1=0x00000000
> [   24.683990] omap3isp omap3isp: ###CCDC VP_OUT=0x04182d00
> [   24.683990] omap3isp omap3isp: ###CCDC LSC_CONFIG=0x00006600
> [   24.683990] omap3isp omap3isp: ###CCDC LSC_INITIAL=0x00000000
> [   24.684020] omap3isp omap3isp: ###CCDC LSC_TABLE_BASE=0x00000000
> [   24.684020] omap3isp omap3isp: ###CCDC LSC_TABLE_OFFSET=0x00000000
> [   24.684051] omap3isp omap3isp: --------------------------------------------
>
> This is with:
>
> .data_lane_shift = 0,
> .clk_pol             = 0,
> .hs_pol             = 0,
> .vs_pol             = 0,
> .data_pol              = 0,
> .fldmode           = 1,
> .bt656               = 1,
>
> and the above mentioned media-ctl settings

>From a quick look It seems ok (apart ALAW that maybe should be 0).

One thing to check: before loading omap3-isp kernel module you must
manually load iommu2, if you don't it will automatically load only
iommu and it will not work

Enrico

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: omap3isp: BT.656 support
  2011-10-19 12:40         ` Enrico
@ 2011-10-19 13:06           ` Boris Todorov
  2011-10-19 15:56             ` Boris Todorov
  0 siblings, 1 reply; 24+ messages in thread
From: Boris Todorov @ 2011-10-19 13:06 UTC (permalink / raw)
  To: Enrico; +Cc: linux-media

On Wed, Oct 19, 2011 at 3:40 PM, Enrico <ebutera@users.berlios.de> wrote:
> On Wed, Oct 19, 2011 at 11:03 AM, Boris Todorov
> <boris.st.todorov@gmail.com> wrote:
>> Here is my log:
>> [   24.683685] omap3isp omap3isp: -------------CCDC Register dump-------------
>> [   24.683685] omap3isp omap3isp: ###CCDC PCR=0x00000000
>> [   24.683685] omap3isp omap3isp: ###CCDC SYN_MODE=0x00032f80
>> [   24.683715] omap3isp omap3isp: ###CCDC HD_VD_WID=0x00000000
>> [   24.683715] omap3isp omap3isp: ###CCDC PIX_LINES=0x00000000
>> [   24.683746] omap3isp omap3isp: ###CCDC HORZ_INFO=0x0000059f
>> [   24.683746] omap3isp omap3isp: ###CCDC VERT_START=0x00000000
>> [   24.683746] omap3isp omap3isp: ###CCDC VERT_LINES=0x00000105
>> [   24.683776] omap3isp omap3isp: ###CCDC CULLING=0xffff00ff
>> [   24.683776] omap3isp omap3isp: ###CCDC HSIZE_OFF=0x000005a0
>> [   24.683776] omap3isp omap3isp: ###CCDC SDOFST=0x00000249
>> [   24.683807] omap3isp omap3isp: ###CCDC SDR_ADDR=0x00001000
>> [   24.683807] omap3isp omap3isp: ###CCDC CLAMP=0x00000010
>> [   24.683807] omap3isp omap3isp: ###CCDC DCSUB=0x00000000
>> [   24.683837] omap3isp omap3isp: ###CCDC COLPTN=0x00000000
>> [   24.683837] omap3isp omap3isp: ###CCDC BLKCMP=0x00000000
>> [   24.683837] omap3isp omap3isp: ###CCDC FPC=0x00000000
>> [   24.683868] omap3isp omap3isp: ###CCDC FPC_ADDR=0x00000000
>> [   24.683868] omap3isp omap3isp: ###CCDC VDINT=0x01040000
>> [   24.683868] omap3isp omap3isp: ###CCDC ALAW=0x00000004
>> [   24.683898] omap3isp omap3isp: ###CCDC REC656IF=0x00000003
>> [   24.683898] omap3isp omap3isp: ###CCDC CFG=0x00008800
>> [   24.683898] omap3isp omap3isp: ###CCDC FMTCFG=0x00006000
>> [   24.683929] omap3isp omap3isp: ###CCDC FMT_HORZ=0x000002d0
>> [   24.683929] omap3isp omap3isp: ###CCDC FMT_VERT=0x0000020d
>> [   24.683929] omap3isp omap3isp: ###CCDC PRGEVEN0=0x00000000
>> [   24.683959] omap3isp omap3isp: ###CCDC PRGEVEN1=0x00000000
>> [   24.683959] omap3isp omap3isp: ###CCDC PRGODD0=0x00000000
>> [   24.683959] omap3isp omap3isp: ###CCDC PRGODD1=0x00000000
>> [   24.683990] omap3isp omap3isp: ###CCDC VP_OUT=0x04182d00
>> [   24.683990] omap3isp omap3isp: ###CCDC LSC_CONFIG=0x00006600
>> [   24.683990] omap3isp omap3isp: ###CCDC LSC_INITIAL=0x00000000
>> [   24.684020] omap3isp omap3isp: ###CCDC LSC_TABLE_BASE=0x00000000
>> [   24.684020] omap3isp omap3isp: ###CCDC LSC_TABLE_OFFSET=0x00000000
>> [   24.684051] omap3isp omap3isp: --------------------------------------------
>>
>> This is with:
>>
>> .data_lane_shift = 0,
>> .clk_pol             = 0,
>> .hs_pol             = 0,
>> .vs_pol             = 0,
>> .data_pol              = 0,
>> .fldmode           = 1,
>> .bt656               = 1,
>>
>> and the above mentioned media-ctl settings
>
> From a quick look It seems ok (apart ALAW that maybe should be 0).
>
> One thing to check: before loading omap3-isp kernel module you must
> manually load iommu2, if you don't it will automatically load only
> iommu and it will not work
>
> Enrico
>

When I started omap3-isp was embedded in kernel and my /dev/media0 was
missing. Making it module resolved this issue.
iommu2 is still embedded...
will try with module now

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: omap3isp: BT.656 support
  2011-10-19 13:06           ` Boris Todorov
@ 2011-10-19 15:56             ` Boris Todorov
  0 siblings, 0 replies; 24+ messages in thread
From: Boris Todorov @ 2011-10-19 15:56 UTC (permalink / raw)
  To: Enrico; +Cc: linux-media

On Wed, Oct 19, 2011 at 4:06 PM, Boris Todorov
<boris.st.todorov@gmail.com> wrote:
> On Wed, Oct 19, 2011 at 3:40 PM, Enrico <ebutera@users.berlios.de> wrote:
>> On Wed, Oct 19, 2011 at 11:03 AM, Boris Todorov
>> <boris.st.todorov@gmail.com> wrote:
>>> Here is my log:
>>> [   24.683685] omap3isp omap3isp: -------------CCDC Register dump-------------
>>> [   24.683685] omap3isp omap3isp: ###CCDC PCR=0x00000000
>>> [   24.683685] omap3isp omap3isp: ###CCDC SYN_MODE=0x00032f80
>>> [   24.683715] omap3isp omap3isp: ###CCDC HD_VD_WID=0x00000000
>>> [   24.683715] omap3isp omap3isp: ###CCDC PIX_LINES=0x00000000
>>> [   24.683746] omap3isp omap3isp: ###CCDC HORZ_INFO=0x0000059f
>>> [   24.683746] omap3isp omap3isp: ###CCDC VERT_START=0x00000000
>>> [   24.683746] omap3isp omap3isp: ###CCDC VERT_LINES=0x00000105
>>> [   24.683776] omap3isp omap3isp: ###CCDC CULLING=0xffff00ff
>>> [   24.683776] omap3isp omap3isp: ###CCDC HSIZE_OFF=0x000005a0
>>> [   24.683776] omap3isp omap3isp: ###CCDC SDOFST=0x00000249
>>> [   24.683807] omap3isp omap3isp: ###CCDC SDR_ADDR=0x00001000
>>> [   24.683807] omap3isp omap3isp: ###CCDC CLAMP=0x00000010
>>> [   24.683807] omap3isp omap3isp: ###CCDC DCSUB=0x00000000
>>> [   24.683837] omap3isp omap3isp: ###CCDC COLPTN=0x00000000
>>> [   24.683837] omap3isp omap3isp: ###CCDC BLKCMP=0x00000000
>>> [   24.683837] omap3isp omap3isp: ###CCDC FPC=0x00000000
>>> [   24.683868] omap3isp omap3isp: ###CCDC FPC_ADDR=0x00000000
>>> [   24.683868] omap3isp omap3isp: ###CCDC VDINT=0x01040000
>>> [   24.683868] omap3isp omap3isp: ###CCDC ALAW=0x00000004
>>> [   24.683898] omap3isp omap3isp: ###CCDC REC656IF=0x00000003
>>> [   24.683898] omap3isp omap3isp: ###CCDC CFG=0x00008800
>>> [   24.683898] omap3isp omap3isp: ###CCDC FMTCFG=0x00006000
>>> [   24.683929] omap3isp omap3isp: ###CCDC FMT_HORZ=0x000002d0
>>> [   24.683929] omap3isp omap3isp: ###CCDC FMT_VERT=0x0000020d
>>> [   24.683929] omap3isp omap3isp: ###CCDC PRGEVEN0=0x00000000
>>> [   24.683959] omap3isp omap3isp: ###CCDC PRGEVEN1=0x00000000
>>> [   24.683959] omap3isp omap3isp: ###CCDC PRGODD0=0x00000000
>>> [   24.683959] omap3isp omap3isp: ###CCDC PRGODD1=0x00000000
>>> [   24.683990] omap3isp omap3isp: ###CCDC VP_OUT=0x04182d00
>>> [   24.683990] omap3isp omap3isp: ###CCDC LSC_CONFIG=0x00006600
>>> [   24.683990] omap3isp omap3isp: ###CCDC LSC_INITIAL=0x00000000
>>> [   24.684020] omap3isp omap3isp: ###CCDC LSC_TABLE_BASE=0x00000000
>>> [   24.684020] omap3isp omap3isp: ###CCDC LSC_TABLE_OFFSET=0x00000000
>>> [   24.684051] omap3isp omap3isp: --------------------------------------------
>>>
>>> This is with:
>>>
>>> .data_lane_shift = 0,
>>> .clk_pol             = 0,
>>> .hs_pol             = 0,
>>> .vs_pol             = 0,
>>> .data_pol              = 0,
>>> .fldmode           = 1,
>>> .bt656               = 1,
>>>
>>> and the above mentioned media-ctl settings
>>
>> From a quick look It seems ok (apart ALAW that maybe should be 0).
>>
>> One thing to check: before loading omap3-isp kernel module you must
>> manually load iommu2, if you don't it will automatically load only
>> iommu and it will not work
>>
>> Enrico
>>
>
> When I started omap3-isp was embedded in kernel and my /dev/media0 was
> missing. Making it module resolved this issue.
> iommu2 is still embedded...
> will try with module now
>

I loaded the modules in this order:
iommu.ko -> iovmm.ko -> iommu2.ko -> omap_iommu.ko -> omap3_isp.ko

# lsmod
Module                  Size  Used by    Not tainted
omap3_isp             121471  0
omap_iommu              1276  0
iommu2                  5118  0
iovmm                  11389  1 omap3_isp
iommu                  14627  3 omap3_isp,iommu2,iovmm

But it didn't solved my problem.
I just scoped PCLK and the data lines from TVP and everything looks
fine. I can see the BT.656 embedded sync information. But no ISP
irqs...

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: omap3isp: BT.656 support
  2011-10-18 13:33 omap3isp: BT.656 support Boris Todorov
  2011-10-18 14:07 ` Gary Thomas
  2011-10-18 16:31 ` Enrico
@ 2011-10-19 16:26 ` Stefan Herbrechtsmeier
       [not found]   ` <CAFYgh7xxCM0=hiU9+bFS+qA447wC4+OkCRxv1eonYMgTH7oeEw@mail.gmail.com>
  2 siblings, 1 reply; 24+ messages in thread
From: Stefan Herbrechtsmeier @ 2011-10-19 16:26 UTC (permalink / raw)
  To: Boris Todorov; +Cc: linux-media

Am 18.10.2011 15:33, schrieb Boris Todorov:
> Hi
>
> I'm trying to run OMAP + TVP5151 in BT656 mode.
>
> I'm using omap3isp-omap3isp-yuv (git.linuxtv.org/pinchartl/media.git).
> Plus the following patches:
>
> TVP5151:
> https://github.com/ebutera/meta-igep/tree/testing-v2/recipes-kernel/linux/linux-3.0+3.1rc/tvp5150
>
> The latest RFC patches for BT656 support:
>
> Enrico Butera (2):
>   omap3isp: ispvideo: export isp_video_mbus_to_pix
>   omap3isp: ispccdc: configure CCDC registers and add BT656 support
>
> Javier Martinez Canillas (1):
>   omap3isp: ccdc: Add interlaced field mode to platform data
>
>
> I'm able to configure with media-ctl:
>
> media-ctl -v -r -l '"tvp5150 3-005c":0->"OMAP3 ISP CCDC":0[1], "OMAP3
> ISP CCDC":1->"OMAP3 ISP CCDC output":0[1]'
> media-ctl -v --set-format '"tvp5150 3-005c":0 [UYVY2X8 720x525]'
> media-ctl -v --set-format '"OMAP3 ISP CCDC":0 [UYVY2X8 720x525]'
> media-ctl -v --set-format '"OMAP3 ISP CCDC":1 [UYVY2X8 720x525]'
>
> But
> ./yavta -f UYVY -s 720x525 -n 4 --capture=4 -F /dev/video4
>
> sleeps after
> ...
> Buffer 1 mapped at address 0x4021d000.
> length: 756000 offset: 1515520
> Buffer 2 mapped at address 0x402d6000.
> length: 756000 offset: 2273280
> Buffer 3 mapped at address 0x4038f000.
>
> Anyone with the same issue??? This happens with every other v4l test app I used.
I had the same issue.

Make sure that you disable the xclk when you remove your sensor driver.

isp->platform_cb.set_xclk(isp, 0, ISP_XCLK_A)

Regards,
    Stefan


^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: omap3isp: BT.656 support
       [not found]   ` <CAFYgh7xxCM0=hiU9+bFS+qA447wC4+OkCRxv1eonYMgTH7oeEw@mail.gmail.com>
@ 2011-10-20  9:03     ` Stefan Herbrechtsmeier
  2011-10-20 12:14       ` Boris Todorov
  0 siblings, 1 reply; 24+ messages in thread
From: Stefan Herbrechtsmeier @ 2011-10-20  9:03 UTC (permalink / raw)
  To: Boris Todorov, Linux Media Mailing List

Am 20.10.2011 08:56, schrieb Boris Todorov:
> On Wed, Oct 19, 2011 at 7:26 PM, Stefan Herbrechtsmeier
> <sherbrec@cit-ec.uni-bielefeld.de> wrote:
>> Am 18.10.2011 15:33, schrieb Boris Todorov:
>>> Hi
>>>
>>> I'm trying to run OMAP + TVP5151 in BT656 mode.
>>>
>>> I'm using omap3isp-omap3isp-yuv (git.linuxtv.org/pinchartl/media.git).
>>> Plus the following patches:
>>>
>>> TVP5151:
>>> https://github.com/ebutera/meta-igep/tree/testing-v2/recipes-kernel/linux/linux-3.0+3.1rc/tvp5150
>>>
>>> The latest RFC patches for BT656 support:
>>>
>>> Enrico Butera (2):
>>>   omap3isp: ispvideo: export isp_video_mbus_to_pix
>>>   omap3isp: ispccdc: configure CCDC registers and add BT656 support
>>>
>>> Javier Martinez Canillas (1):
>>>   omap3isp: ccdc: Add interlaced field mode to platform data
>>>
>>>
>>> I'm able to configure with media-ctl:
>>>
>>> media-ctl -v -r -l '"tvp5150 3-005c":0->"OMAP3 ISP CCDC":0[1], "OMAP3
>>> ISP CCDC":1->"OMAP3 ISP CCDC output":0[1]'
>>> media-ctl -v --set-format '"tvp5150 3-005c":0 [UYVY2X8 720x525]'
>>> media-ctl -v --set-format '"OMAP3 ISP CCDC":0 [UYVY2X8 720x525]'
>>> media-ctl -v --set-format '"OMAP3 ISP CCDC":1 [UYVY2X8 720x525]'
>>>
>>> But
>>> ./yavta -f UYVY -s 720x525 -n 4 --capture=4 -F /dev/video4
>>>
>>> sleeps after
>>> ...
>>> Buffer 1 mapped at address 0x4021d000.
>>> length: 756000 offset: 1515520
>>> Buffer 2 mapped at address 0x402d6000.
>>> length: 756000 offset: 2273280
>>> Buffer 3 mapped at address 0x4038f000.
>>>
>>> Anyone with the same issue??? This happens with every other v4l test app I used.
>> I had the same issue.
>>
>> Make sure that you disable the xclk when you remove your sensor driver.
>>
>> isp->platform_cb.set_xclk(isp, 0, ISP_XCLK_A)
> How exactly did you solved your problem? I don't see how XCLK in
> _remove will help. Pls explain.
Sorry, I mean deactive / power off your sensor.
> Btw I'm feeding TVP with external clock (not from xtal pins) -
> omap.cam_xclk -> tvp.clk_in
I mean the cam_xclk.
> And I'm using kind of hack to get it:
> isp_probe()
> + isp_set_xclk(isp, 27000000, 1);
This is your problem.

You should control the clock via board / platform callback from your driver.
Example:
http://www.mail-archive.com/linux-omap@vger.kernel.org/msg56627.html

It is important that you set the clock to zero when your driver is not
in use.

The problem is connected to the use count of the ISP and some
initialisation which only happen when the counter change between zero
and one.

Regards,
    Stefan


^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: omap3isp: BT.656 support
  2011-10-20  9:03     ` Stefan Herbrechtsmeier
@ 2011-10-20 12:14       ` Boris Todorov
  2011-10-20 14:36         ` Stefan Herbrechtsmeier
  0 siblings, 1 reply; 24+ messages in thread
From: Boris Todorov @ 2011-10-20 12:14 UTC (permalink / raw)
  To: Stefan Herbrechtsmeier; +Cc: linux-media

On Thu, Oct 20, 2011 at 12:03 PM, Stefan Herbrechtsmeier
<sherbrec@cit-ec.uni-bielefeld.de> wrote:
> Am 20.10.2011 08:56, schrieb Boris Todorov:
>> On Wed, Oct 19, 2011 at 7:26 PM, Stefan Herbrechtsmeier
>> <sherbrec@cit-ec.uni-bielefeld.de> wrote:
>>> Am 18.10.2011 15:33, schrieb Boris Todorov:
>>>> Hi
>>>>
>>>> I'm trying to run OMAP + TVP5151 in BT656 mode.
>>>>
>>>> I'm using omap3isp-omap3isp-yuv (git.linuxtv.org/pinchartl/media.git).
>>>> Plus the following patches:
>>>>
>>>> TVP5151:
>>>> https://github.com/ebutera/meta-igep/tree/testing-v2/recipes-kernel/linux/linux-3.0+3.1rc/tvp5150
>>>>
>>>> The latest RFC patches for BT656 support:
>>>>
>>>> Enrico Butera (2):
>>>>   omap3isp: ispvideo: export isp_video_mbus_to_pix
>>>>   omap3isp: ispccdc: configure CCDC registers and add BT656 support
>>>>
>>>> Javier Martinez Canillas (1):
>>>>   omap3isp: ccdc: Add interlaced field mode to platform data
>>>>
>>>>
>>>> I'm able to configure with media-ctl:
>>>>
>>>> media-ctl -v -r -l '"tvp5150 3-005c":0->"OMAP3 ISP CCDC":0[1], "OMAP3
>>>> ISP CCDC":1->"OMAP3 ISP CCDC output":0[1]'
>>>> media-ctl -v --set-format '"tvp5150 3-005c":0 [UYVY2X8 720x525]'
>>>> media-ctl -v --set-format '"OMAP3 ISP CCDC":0 [UYVY2X8 720x525]'
>>>> media-ctl -v --set-format '"OMAP3 ISP CCDC":1 [UYVY2X8 720x525]'
>>>>
>>>> But
>>>> ./yavta -f UYVY -s 720x525 -n 4 --capture=4 -F /dev/video4
>>>>
>>>> sleeps after
>>>> ...
>>>> Buffer 1 mapped at address 0x4021d000.
>>>> length: 756000 offset: 1515520
>>>> Buffer 2 mapped at address 0x402d6000.
>>>> length: 756000 offset: 2273280
>>>> Buffer 3 mapped at address 0x4038f000.
>>>>
>>>> Anyone with the same issue??? This happens with every other v4l test app I used.
>>> I had the same issue.
>>>
>>> Make sure that you disable the xclk when you remove your sensor driver.
>>>
>>> isp->platform_cb.set_xclk(isp, 0, ISP_XCLK_A)
>> How exactly did you solved your problem? I don't see how XCLK in
>> _remove will help. Pls explain.
> Sorry, I mean deactive / power off your sensor.
>> Btw I'm feeding TVP with external clock (not from xtal pins) -
>> omap.cam_xclk -> tvp.clk_in
> I mean the cam_xclk.
>> And I'm using kind of hack to get it:
>> isp_probe()
>> + isp_set_xclk(isp, 27000000, 1);
> This is your problem.
>
> You should control the clock via board / platform callback from your driver.
> Example:
> http://www.mail-archive.com/linux-omap@vger.kernel.org/msg56627.html
>
> It is important that you set the clock to zero when your driver is not
> in use.
>
> The problem is connected to the use count of the ISP and some
> initialisation which only happen when the counter change between zero
> and one.
>
tvp_probe() needs clock for i2c detected/config. tvp5150_s_power call
happens when video starts streaming and if tvp is not configured ->
kernel panic.
And what about the case when TVP is used with OSC on XTAL pins and
CLK_IN is not used at all?
Maybe I don't fully understand what is happening...
or isp_set_xclk() use is messing up with ISP

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: omap3isp: BT.656 support
  2011-10-20 12:14       ` Boris Todorov
@ 2011-10-20 14:36         ` Stefan Herbrechtsmeier
  2011-10-23 19:15           ` Boris Todorov
  0 siblings, 1 reply; 24+ messages in thread
From: Stefan Herbrechtsmeier @ 2011-10-20 14:36 UTC (permalink / raw)
  To: Boris Todorov; +Cc: linux-media

Am 20.10.2011 14:14, schrieb Boris Todorov:
> On Thu, Oct 20, 2011 at 12:03 PM, Stefan Herbrechtsmeier
> <sherbrec@cit-ec.uni-bielefeld.de> wrote:
>> Am 20.10.2011 08:56, schrieb Boris Todorov:
>>> On Wed, Oct 19, 2011 at 7:26 PM, Stefan Herbrechtsmeier
>>> <sherbrec@cit-ec.uni-bielefeld.de> wrote:
>>>> Am 18.10.2011 15:33, schrieb Boris Todorov:
>>>>> Hi
>>>>>
>>>>> I'm trying to run OMAP + TVP5151 in BT656 mode.
>>>>>
>>>>> I'm using omap3isp-omap3isp-yuv (git.linuxtv.org/pinchartl/media.git).
>>>>> Plus the following patches:
>>>>>
>>>>> TVP5151:
>>>>> https://github.com/ebutera/meta-igep/tree/testing-v2/recipes-kernel/linux/linux-3.0+3.1rc/tvp5150
>>>>>
>>>>> The latest RFC patches for BT656 support:
>>>>>
>>>>> Enrico Butera (2):
>>>>>   omap3isp: ispvideo: export isp_video_mbus_to_pix
>>>>>   omap3isp: ispccdc: configure CCDC registers and add BT656 support
>>>>>
>>>>> Javier Martinez Canillas (1):
>>>>>   omap3isp: ccdc: Add interlaced field mode to platform data
>>>>>
>>>>>
>>>>> I'm able to configure with media-ctl:
>>>>>
>>>>> media-ctl -v -r -l '"tvp5150 3-005c":0->"OMAP3 ISP CCDC":0[1], "OMAP3
>>>>> ISP CCDC":1->"OMAP3 ISP CCDC output":0[1]'
>>>>> media-ctl -v --set-format '"tvp5150 3-005c":0 [UYVY2X8 720x525]'
>>>>> media-ctl -v --set-format '"OMAP3 ISP CCDC":0 [UYVY2X8 720x525]'
>>>>> media-ctl -v --set-format '"OMAP3 ISP CCDC":1 [UYVY2X8 720x525]'
>>>>>
>>>>> But
>>>>> ./yavta -f UYVY -s 720x525 -n 4 --capture=4 -F /dev/video4
>>>>>
>>>>> sleeps after
>>>>> ...
>>>>> Buffer 1 mapped at address 0x4021d000.
>>>>> length: 756000 offset: 1515520
>>>>> Buffer 2 mapped at address 0x402d6000.
>>>>> length: 756000 offset: 2273280
>>>>> Buffer 3 mapped at address 0x4038f000.
>>>>>
>>>>> Anyone with the same issue??? This happens with every other v4l test app I used.
>>>> I had the same issue.
>>>>
>>>> Make sure that you disable the xclk when you remove your sensor driver.
>>>>
>>>> isp->platform_cb.set_xclk(isp, 0, ISP_XCLK_A)
>>> How exactly did you solved your problem? I don't see how XCLK in
>>> _remove will help. Pls explain.
>> Sorry, I mean deactive / power off your sensor.
>>> Btw I'm feeding TVP with external clock (not from xtal pins) -
>>> omap.cam_xclk -> tvp.clk_in
>> I mean the cam_xclk.
>>> And I'm using kind of hack to get it:
>>> isp_probe()
>>> + isp_set_xclk(isp, 27000000, 1);
>> This is your problem.
>>
>> You should control the clock via board / platform callback from your driver.
>> Example:
>> http://www.mail-archive.com/linux-omap@vger.kernel.org/msg56627.html
>>
>> It is important that you set the clock to zero when your driver is not
>> in use.
>>
>> The problem is connected to the use count of the ISP and some
>> initialisation which only happen when the counter change between zero
>> and one.
>>
> tvp_probe() needs clock for i2c detected/config. tvp5150_s_power call
> happens when video starts streaming and if tvp is not configured ->
> kernel panic.
I use an other sensor and driver and this config the sensor during start
stream.
> And what about the case when TVP is used with OSC on XTAL pins and
> CLK_IN is not used at all?
Then your system will work, as you never call isp_set_xclk.

The problem is not the clock, but how the isp driver works.
It expects, that the sensor driver disable the cam_xclk, if the sensor
is not used.
> Maybe I don't fully understand what is happening...
> or isp_set_xclk() use is messing up with ISP
On my system I have the same issues as you if I don't set the cam_xclk
to zero
during stop streaming.

I haven't investigate in the real cause for the issue. I only released,
that this
issue stick together with an always enabled cam_xclk.

Regards,
    Stefan


^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: omap3isp: BT.656 support
  2011-10-20 14:36         ` Stefan Herbrechtsmeier
@ 2011-10-23 19:15           ` Boris Todorov
  2011-10-24  9:47             ` Gary Thomas
  0 siblings, 1 reply; 24+ messages in thread
From: Boris Todorov @ 2011-10-23 19:15 UTC (permalink / raw)
  To: Stefan Herbrechtsmeier; +Cc: linux-media

On Thu, Oct 20, 2011 at 5:36 PM, Stefan Herbrechtsmeier
<sherbrec@cit-ec.uni-bielefeld.de> wrote:
> Am 20.10.2011 14:14, schrieb Boris Todorov:
>> On Thu, Oct 20, 2011 at 12:03 PM, Stefan Herbrechtsmeier
>> <sherbrec@cit-ec.uni-bielefeld.de> wrote:
>>> Am 20.10.2011 08:56, schrieb Boris Todorov:
>>>> On Wed, Oct 19, 2011 at 7:26 PM, Stefan Herbrechtsmeier
>>>> <sherbrec@cit-ec.uni-bielefeld.de> wrote:
>>>>> Am 18.10.2011 15:33, schrieb Boris Todorov:
>>>>>> Hi
>>>>>>
>>>>>> I'm trying to run OMAP + TVP5151 in BT656 mode.
>>>>>>
>>>>>> I'm using omap3isp-omap3isp-yuv (git.linuxtv.org/pinchartl/media.git).
>>>>>> Plus the following patches:
>>>>>>
>>>>>> TVP5151:
>>>>>> https://github.com/ebutera/meta-igep/tree/testing-v2/recipes-kernel/linux/linux-3.0+3.1rc/tvp5150
>>>>>>
>>>>>> The latest RFC patches for BT656 support:
>>>>>>
>>>>>> Enrico Butera (2):
>>>>>>   omap3isp: ispvideo: export isp_video_mbus_to_pix
>>>>>>   omap3isp: ispccdc: configure CCDC registers and add BT656 support
>>>>>>
>>>>>> Javier Martinez Canillas (1):
>>>>>>   omap3isp: ccdc: Add interlaced field mode to platform data
>>>>>>
>>>>>>
>>>>>> I'm able to configure with media-ctl:
>>>>>>
>>>>>> media-ctl -v -r -l '"tvp5150 3-005c":0->"OMAP3 ISP CCDC":0[1], "OMAP3
>>>>>> ISP CCDC":1->"OMAP3 ISP CCDC output":0[1]'
>>>>>> media-ctl -v --set-format '"tvp5150 3-005c":0 [UYVY2X8 720x525]'
>>>>>> media-ctl -v --set-format '"OMAP3 ISP CCDC":0 [UYVY2X8 720x525]'
>>>>>> media-ctl -v --set-format '"OMAP3 ISP CCDC":1 [UYVY2X8 720x525]'
>>>>>>
>>>>>> But
>>>>>> ./yavta -f UYVY -s 720x525 -n 4 --capture=4 -F /dev/video4
>>>>>>
>>>>>> sleeps after
>>>>>> ...
>>>>>> Buffer 1 mapped at address 0x4021d000.
>>>>>> length: 756000 offset: 1515520
>>>>>> Buffer 2 mapped at address 0x402d6000.
>>>>>> length: 756000 offset: 2273280
>>>>>> Buffer 3 mapped at address 0x4038f000.
>>>>>>
>>>>>> Anyone with the same issue??? This happens with every other v4l test app I used.
>>>>> I had the same issue.
>>>>>
>>>>> Make sure that you disable the xclk when you remove your sensor driver.
>>>>>
>>>>> isp->platform_cb.set_xclk(isp, 0, ISP_XCLK_A)
>>>> How exactly did you solved your problem? I don't see how XCLK in
>>>> _remove will help. Pls explain.
>>> Sorry, I mean deactive / power off your sensor.
>>>> Btw I'm feeding TVP with external clock (not from xtal pins) -
>>>> omap.cam_xclk -> tvp.clk_in
>>> I mean the cam_xclk.
>>>> And I'm using kind of hack to get it:
>>>> isp_probe()
>>>> + isp_set_xclk(isp, 27000000, 1);
>>> This is your problem.
>>>
>>> You should control the clock via board / platform callback from your driver.
>>> Example:
>>> http://www.mail-archive.com/linux-omap@vger.kernel.org/msg56627.html
>>>
>>> It is important that you set the clock to zero when your driver is not
>>> in use.
>>>
>>> The problem is connected to the use count of the ISP and some
>>> initialisation which only happen when the counter change between zero
>>> and one.
>>>
>> tvp_probe() needs clock for i2c detected/config. tvp5150_s_power call
>> happens when video starts streaming and if tvp is not configured ->
>> kernel panic.
> I use an other sensor and driver and this config the sensor during start
> stream.
>> And what about the case when TVP is used with OSC on XTAL pins and
>> CLK_IN is not used at all?
> Then your system will work, as you never call isp_set_xclk.
>
> The problem is not the clock, but how the isp driver works.
> It expects, that the sensor driver disable the cam_xclk, if the sensor
> is not used.
>> Maybe I don't fully understand what is happening...
>> or isp_set_xclk() use is messing up with ISP
> On my system I have the same issues as you if I don't set the cam_xclk
> to zero
> during stop streaming.
>
> I haven't investigate in the real cause for the issue. I only released,
> that this
> issue stick together with an always enabled cam_xclk.
>
> Regards,
>    Stefan

Thanks Stefan. Now I have IRQs and I'm able to get some image from TVP.

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: omap3isp: BT.656 support
  2011-10-23 19:15           ` Boris Todorov
@ 2011-10-24  9:47             ` Gary Thomas
  2011-10-24 10:33               ` Boris Todorov
  0 siblings, 1 reply; 24+ messages in thread
From: Gary Thomas @ 2011-10-24  9:47 UTC (permalink / raw)
  To: Boris Todorov; +Cc: Stefan Herbrechtsmeier, linux-media

On 2011-10-23 13:15, Boris Todorov wrote:
> On Thu, Oct 20, 2011 at 5:36 PM, Stefan Herbrechtsmeier
> <sherbrec@cit-ec.uni-bielefeld.de>  wrote:
>> Am 20.10.2011 14:14, schrieb Boris Todorov:
>>> On Thu, Oct 20, 2011 at 12:03 PM, Stefan Herbrechtsmeier
>>> <sherbrec@cit-ec.uni-bielefeld.de>  wrote:
>>>> Am 20.10.2011 08:56, schrieb Boris Todorov:
>>>>> On Wed, Oct 19, 2011 at 7:26 PM, Stefan Herbrechtsmeier
>>>>> <sherbrec@cit-ec.uni-bielefeld.de>  wrote:
>>>>>> Am 18.10.2011 15:33, schrieb Boris Todorov:
>>>>>>> Hi
>>>>>>>
>>>>>>> I'm trying to run OMAP + TVP5151 in BT656 mode.
>>>>>>>
>>>>>>> I'm using omap3isp-omap3isp-yuv (git.linuxtv.org/pinchartl/media.git).
>>>>>>> Plus the following patches:
>>>>>>>
>>>>>>> TVP5151:
>>>>>>> https://github.com/ebutera/meta-igep/tree/testing-v2/recipes-kernel/linux/linux-3.0+3.1rc/tvp5150
>>>>>>>
>>>>>>> The latest RFC patches for BT656 support:
>>>>>>>
>>>>>>> Enrico Butera (2):
>>>>>>>    omap3isp: ispvideo: export isp_video_mbus_to_pix
>>>>>>>    omap3isp: ispccdc: configure CCDC registers and add BT656 support
>>>>>>>
>>>>>>> Javier Martinez Canillas (1):
>>>>>>>    omap3isp: ccdc: Add interlaced field mode to platform data
>>>>>>>
>>>>>>>
>>>>>>> I'm able to configure with media-ctl:
>>>>>>>
>>>>>>> media-ctl -v -r -l '"tvp5150 3-005c":0->"OMAP3 ISP CCDC":0[1], "OMAP3
>>>>>>> ISP CCDC":1->"OMAP3 ISP CCDC output":0[1]'
>>>>>>> media-ctl -v --set-format '"tvp5150 3-005c":0 [UYVY2X8 720x525]'
>>>>>>> media-ctl -v --set-format '"OMAP3 ISP CCDC":0 [UYVY2X8 720x525]'
>>>>>>> media-ctl -v --set-format '"OMAP3 ISP CCDC":1 [UYVY2X8 720x525]'
>>>>>>>
>>>>>>> But
>>>>>>> ./yavta -f UYVY -s 720x525 -n 4 --capture=4 -F /dev/video4
>>>>>>>
>>>>>>> sleeps after
>>>>>>> ...
>>>>>>> Buffer 1 mapped at address 0x4021d000.
>>>>>>> length: 756000 offset: 1515520
>>>>>>> Buffer 2 mapped at address 0x402d6000.
>>>>>>> length: 756000 offset: 2273280
>>>>>>> Buffer 3 mapped at address 0x4038f000.
>>>>>>>
>>>>>>> Anyone with the same issue??? This happens with every other v4l test app I used.
>>>>>> I had the same issue.
>>>>>>
>>>>>> Make sure that you disable the xclk when you remove your sensor driver.
>>>>>>
>>>>>> isp->platform_cb.set_xclk(isp, 0, ISP_XCLK_A)
>>>>> How exactly did you solved your problem? I don't see how XCLK in
>>>>> _remove will help. Pls explain.
>>>> Sorry, I mean deactive / power off your sensor.
>>>>> Btw I'm feeding TVP with external clock (not from xtal pins) -
>>>>> omap.cam_xclk ->  tvp.clk_in
>>>> I mean the cam_xclk.
>>>>> And I'm using kind of hack to get it:
>>>>> isp_probe()
>>>>> + isp_set_xclk(isp, 27000000, 1);
>>>> This is your problem.
>>>>
>>>> You should control the clock via board / platform callback from your driver.
>>>> Example:
>>>> http://www.mail-archive.com/linux-omap@vger.kernel.org/msg56627.html
>>>>
>>>> It is important that you set the clock to zero when your driver is not
>>>> in use.
>>>>
>>>> The problem is connected to the use count of the ISP and some
>>>> initialisation which only happen when the counter change between zero
>>>> and one.
>>>>
>>> tvp_probe() needs clock for i2c detected/config. tvp5150_s_power call
>>> happens when video starts streaming and if tvp is not configured ->
>>> kernel panic.
>> I use an other sensor and driver and this config the sensor during start
>> stream.
>>> And what about the case when TVP is used with OSC on XTAL pins and
>>> CLK_IN is not used at all?
>> Then your system will work, as you never call isp_set_xclk.
>>
>> The problem is not the clock, but how the isp driver works.
>> It expects, that the sensor driver disable the cam_xclk, if the sensor
>> is not used.
>>> Maybe I don't fully understand what is happening...
>>> or isp_set_xclk() use is messing up with ISP
>> On my system I have the same issues as you if I don't set the cam_xclk
>> to zero
>> during stop streaming.
>>
>> I haven't investigate in the real cause for the issue. I only released,
>> that this
>> issue stick together with an always enabled cam_xclk.
>>
>> Regards,
>>     Stefan
>
> Thanks Stefan. Now I have IRQs and I'm able to get some image from TVP.

How did you end up fixing this?  I ask only to enlighten the list, not to embarrass
you, as others and I have had no troubles making this go from the start.

-- 
------------------------------------------------------------
Gary Thomas                 |  Consulting for the
MLB Associates              |    Embedded world
------------------------------------------------------------

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: omap3isp: BT.656 support
  2011-10-24  9:47             ` Gary Thomas
@ 2011-10-24 10:33               ` Boris Todorov
  0 siblings, 0 replies; 24+ messages in thread
From: Boris Todorov @ 2011-10-24 10:33 UTC (permalink / raw)
  To: Gary Thomas; +Cc: Stefan Herbrechtsmeier, linux-media

On Mon, Oct 24, 2011 at 12:47 PM, Gary Thomas <gary@mlbassoc.com> wrote:
> On 2011-10-23 13:15, Boris Todorov wrote:
>>
>> On Thu, Oct 20, 2011 at 5:36 PM, Stefan Herbrechtsmeier
>> <sherbrec@cit-ec.uni-bielefeld.de>  wrote:
>>>
>>> Am 20.10.2011 14:14, schrieb Boris Todorov:
>>>>
>>>> On Thu, Oct 20, 2011 at 12:03 PM, Stefan Herbrechtsmeier
>>>> <sherbrec@cit-ec.uni-bielefeld.de>  wrote:
>>>>>
>>>>> Am 20.10.2011 08:56, schrieb Boris Todorov:
>>>>>>
>>>>>> On Wed, Oct 19, 2011 at 7:26 PM, Stefan Herbrechtsmeier
>>>>>> <sherbrec@cit-ec.uni-bielefeld.de>  wrote:
>>>>>>>
>>>>>>> Am 18.10.2011 15:33, schrieb Boris Todorov:
>>>>>>>>
>>>>>>>> Hi
>>>>>>>>
>>>>>>>> I'm trying to run OMAP + TVP5151 in BT656 mode.
>>>>>>>>
>>>>>>>> I'm using omap3isp-omap3isp-yuv
>>>>>>>> (git.linuxtv.org/pinchartl/media.git).
>>>>>>>> Plus the following patches:
>>>>>>>>
>>>>>>>> TVP5151:
>>>>>>>>
>>>>>>>> https://github.com/ebutera/meta-igep/tree/testing-v2/recipes-kernel/linux/linux-3.0+3.1rc/tvp5150
>>>>>>>>
>>>>>>>> The latest RFC patches for BT656 support:
>>>>>>>>
>>>>>>>> Enrico Butera (2):
>>>>>>>>   omap3isp: ispvideo: export isp_video_mbus_to_pix
>>>>>>>>   omap3isp: ispccdc: configure CCDC registers and add BT656 support
>>>>>>>>
>>>>>>>> Javier Martinez Canillas (1):
>>>>>>>>   omap3isp: ccdc: Add interlaced field mode to platform data
>>>>>>>>
>>>>>>>>
>>>>>>>> I'm able to configure with media-ctl:
>>>>>>>>
>>>>>>>> media-ctl -v -r -l '"tvp5150 3-005c":0->"OMAP3 ISP CCDC":0[1],
>>>>>>>> "OMAP3
>>>>>>>> ISP CCDC":1->"OMAP3 ISP CCDC output":0[1]'
>>>>>>>> media-ctl -v --set-format '"tvp5150 3-005c":0 [UYVY2X8 720x525]'
>>>>>>>> media-ctl -v --set-format '"OMAP3 ISP CCDC":0 [UYVY2X8 720x525]'
>>>>>>>> media-ctl -v --set-format '"OMAP3 ISP CCDC":1 [UYVY2X8 720x525]'
>>>>>>>>
>>>>>>>> But
>>>>>>>> ./yavta -f UYVY -s 720x525 -n 4 --capture=4 -F /dev/video4
>>>>>>>>
>>>>>>>> sleeps after
>>>>>>>> ...
>>>>>>>> Buffer 1 mapped at address 0x4021d000.
>>>>>>>> length: 756000 offset: 1515520
>>>>>>>> Buffer 2 mapped at address 0x402d6000.
>>>>>>>> length: 756000 offset: 2273280
>>>>>>>> Buffer 3 mapped at address 0x4038f000.
>>>>>>>>
>>>>>>>> Anyone with the same issue??? This happens with every other v4l test
>>>>>>>> app I used.
>>>>>>>
>>>>>>> I had the same issue.
>>>>>>>
>>>>>>> Make sure that you disable the xclk when you remove your sensor
>>>>>>> driver.
>>>>>>>
>>>>>>> isp->platform_cb.set_xclk(isp, 0, ISP_XCLK_A)
>>>>>>
>>>>>> How exactly did you solved your problem? I don't see how XCLK in
>>>>>> _remove will help. Pls explain.
>>>>>
>>>>> Sorry, I mean deactive / power off your sensor.
>>>>>>
>>>>>> Btw I'm feeding TVP with external clock (not from xtal pins) -
>>>>>> omap.cam_xclk ->  tvp.clk_in
>>>>>
>>>>> I mean the cam_xclk.
>>>>>>
>>>>>> And I'm using kind of hack to get it:
>>>>>> isp_probe()
>>>>>> + isp_set_xclk(isp, 27000000, 1);
>>>>>
>>>>> This is your problem.
>>>>>
>>>>> You should control the clock via board / platform callback from your
>>>>> driver.
>>>>> Example:
>>>>> http://www.mail-archive.com/linux-omap@vger.kernel.org/msg56627.html
>>>>>
>>>>> It is important that you set the clock to zero when your driver is not
>>>>> in use.
>>>>>
>>>>> The problem is connected to the use count of the ISP and some
>>>>> initialisation which only happen when the counter change between zero
>>>>> and one.
>>>>>
>>>> tvp_probe() needs clock for i2c detected/config. tvp5150_s_power call
>>>> happens when video starts streaming and if tvp is not configured ->
>>>> kernel panic.
>>>
>>> I use an other sensor and driver and this config the sensor during start
>>> stream.
>>>>
>>>> And what about the case when TVP is used with OSC on XTAL pins and
>>>> CLK_IN is not used at all?
>>>
>>> Then your system will work, as you never call isp_set_xclk.
>>>
>>> The problem is not the clock, but how the isp driver works.
>>> It expects, that the sensor driver disable the cam_xclk, if the sensor
>>> is not used.
>>>>
>>>> Maybe I don't fully understand what is happening...
>>>> or isp_set_xclk() use is messing up with ISP
>>>
>>> On my system I have the same issues as you if I don't set the cam_xclk
>>> to zero
>>> during stop streaming.
>>>
>>> I haven't investigate in the real cause for the issue. I only released,
>>> that this
>>> issue stick together with an always enabled cam_xclk.
>>>
>>> Regards,
>>>    Stefan
>>
>> Thanks Stefan. Now I have IRQs and I'm able to get some image from TVP.
>
> How did you end up fixing this?  I ask only to enlighten the list, not to
> embarrass
> you, as others and I have had no troubles making this go from the start.

I just followed Stefan's example - added .s_power callback to control xclk.

^ permalink raw reply	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2011-10-24 10:33 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-18 13:33 omap3isp: BT.656 support Boris Todorov
2011-10-18 14:07 ` Gary Thomas
2011-10-18 14:28   ` Boris Todorov
2011-10-18 14:49     ` Gary Thomas
2011-10-18 15:10       ` Boris Todorov
2011-10-18 15:24         ` Gary Thomas
2011-10-18 15:53           ` Boris Todorov
2011-10-18 16:04             ` Gary Thomas
2011-10-18 16:14               ` Boris Todorov
2011-10-18 16:24                 ` Gary Thomas
2011-10-18 16:31 ` Enrico
2011-10-19  7:01   ` Boris Todorov
2011-10-19  8:28     ` Enrico
2011-10-19  9:03       ` Boris Todorov
2011-10-19 12:40         ` Enrico
2011-10-19 13:06           ` Boris Todorov
2011-10-19 15:56             ` Boris Todorov
2011-10-19 16:26 ` Stefan Herbrechtsmeier
     [not found]   ` <CAFYgh7xxCM0=hiU9+bFS+qA447wC4+OkCRxv1eonYMgTH7oeEw@mail.gmail.com>
2011-10-20  9:03     ` Stefan Herbrechtsmeier
2011-10-20 12:14       ` Boris Todorov
2011-10-20 14:36         ` Stefan Herbrechtsmeier
2011-10-23 19:15           ` Boris Todorov
2011-10-24  9:47             ` Gary Thomas
2011-10-24 10:33               ` Boris Todorov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox