This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

v4l2 registering sub device in DM8168

Other Parts Discussed in Thread: TVP5150, TVP5150AM1

Hi,

I am using the DM8168 processor with Silicon revision 2.1. The EZSDK version is 5_05_02_00 and my Linux version linux-2.6.37-psp04.04.00.01.

I am using TWO instances of capture devices. The first one is TVP5150 and the second one is CMOS camera (OV772x).

While registering the TVP device, it registering properly without any issue and below is the debug messages and commands:

root@dm816x-evm:~# insmod /lib/modules/2.6.37/kernel/drivers/media/video/tvp5150
.ko
root@dm816x-evm:~# modprobe ti81xxvin
tvp80 81 am1 detected.
tvp82 83 detected.
tvp5150 2-005d: chip found @ 0xba (OMAP I2C adapter)
ti81xxvin ti81xxvin: registered sub device tvp5150
ti81xxvin ti81xxvin: TI81xx HDVPSS Capture driver initialized
root@dm816x-evm:~#

When I am registering the CMOS camera its showing some error below:

root@dm816x-evm:~# modprobe ti81xxvin
ti81xxvin ti81xxvin: Error registering v4l2 subdevice
root@dm816x-evm:~#

Why it is taking only the first device and not able to register the second?.

Is there any patches or changes needs to be done in the ti8xxvin driver. If so, please provide the same to solve this issue.

Thanks in advance.

Regards,

Salih

  • Can you send log of dmesg command?

     

    Rgds,

    Brijesh

  • Hi,

    Please find the attached log file with this post.

    /cfs-file/__key/communityserver-discussions-components-files/791/3782.log_5F00_camera.txt

    Thanks in advance.

    Regards,
    Salih

  • Hi Salih,
    It seems that driver does not support two slave devices. i was just checking the v4l2 capture driver and found that inside the function ti81xxvin_probe, driver calls get_subdev info and registers subdev info only once. To confirm the same, could you try registering your second device first and then TVP and see if it works?
    I think if you want to use two input devices with the V4L2, it requires driver changes. Please contact your local TI FAE support for the same.
    Rgds,Brijesh
  • Hi Brijesh,

    Thanks for your inputs. Whatever you said in the previous post is correct. I can able to register only one slave device at a time.
    How can I contact or fetch the details of my local TI FAE support. Is there any forum available to interact as like e2e. If so, please provide the link to get the same. Or else any pointers for assistance would be appreciated.

    Thanks in advance.

    Regards,
    Salih
  • Could you please send your location details?Regards,Brijesh
  • Hi,

    Thanks for your inputs. Below is my Location Details:

    7/B, 29th Main, BTM 2nd Stage,
    Bangalore - 560076
    Karnataka State,
    India.

    Regards,
    Salih

  • Hi,

    Is there any updates on this post?. Waiting for your reply

    Thanks in advance,

    Regards,
    Salih

  • Hi,

    I have tried to register both slave devices (tvp5150 and ov772x). I have made changes in the below file:

    File: drivers/media/video/ti81xx/ti81xxvin_main.c

            }
    -        for (i = 0; i < 1; i++) {
    +       for (i = 0; i < 2; i++) {
                    subdevdata = &config->subdev_info[i];
                    ti81xxvin_obj.sd[i] =
                            v4l2_i2c_new_subdev_board(&ti81xxvin_obj.v4l2_dev,

    I have loaded the below modules

    root@dm816x-evm:~# insmod tvp5150.ko
    root@dm816x-evm:~# insmod ov772x.ko

    While loading v4l2 module
    ti81xxvin.ko, I am getting the below kernel crash messages:

    root@dm816x-evm:~# insmod ti81xxvin.ko
    tvp5150 1-005d: chip found @ 0xba (OMAP I2C adapter)
    tvp5150 1-005d: tvp5150am1 detected.
    ti81xxvin ti81xxvin: registered sub device tvp5150
    Unable to handle kernel paging request at virtual address ff480814
    pgd = cf8a0000
    [ff480814] *pgd=00000000
    Internal error: Oops: 5 [#1]
    last sysfs file: /sys/devices/virtual/video4linux/video4/index
    Modules linked in: ti81xxvin(+) ov772x tvp5150 ipv6 ti81xxhdmi ti81xxvo ti81xxfb vpss syslink
    CPU: 0    Not tainted  (2.6.37 #36)
    PC is at ov772x_probe+0x40/0x1f8 [ov772x]
    LR is at i2c_device_probe+0x78/0xa0
    pc : [<bf1de9c0>]    lr : [<c0295fe0>]    psr: a0000013
    sp : cf80fc48  ip : cf80fc88  fp : cf80fc84
    r10: c0539385  r9 : 00000000  r8 : cf89a400
    r7 : 00000000  r6 : ff480800  r5 : cf89a400  r4 : d347e470
    r3 : 00000000  r2 : 00000007  r1 : bf1dec10  r0 : cf89a400
    Flags: NzCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment user
    Control: 10c5387d  Table: 8f8a0019  DAC: 00000015
    Process insmod (pid: 1366, stack limit = 0xcf80e2e8)
    Stack: (0xcf80fc48 to 0xcf810000)
    fc40:                   cf89a420 00000000 cf89a428 00000000 cf89a400 bf1de980
    fc60: cf89a400 bf1dee4c 00000000 cf89a400 00000000 c0559784 cf80fc9c cf80fc88
    fc80: c0295fe0 bf1de98c bf1dee4c cf89a420 cf80fcbc cf80fca0 c020585c c0295f74
    fca0: bf1dee4c cf89a420 cf89a420 00000000 cf80fcd4 cf80fcc0 c02059ec c0205798
    fcc0: 00000000 c02059a8 cf80fcfc cf80fcd8 c0204d00 c02059b4 d3445248 d2e51334
    fce0: c010e3dc cf89a420 cf89a420 cf89a454 cf80fd1c cf80fd00 c0205a8c c0204cbc
    fd00: cf89a420 cf89a420 d347e440 00000000 cf80fd2c cf80fd20 c0204b68 c0205a28
    fd20: cf80fd74 cf80fd30 c02034c8 c0204b48 cf89a428 d347e470 cf80fd5c cf80fd48
    fd40: c0209374 c0086b4c cf89a420 cf89a420 cf89a400 d347e440 cf89a404 cf89a400
    fd60: 00000080 d347e440 cf80fd8c cf80fd78 c0203658 c02031b0 cf89a420 cf89a400
    fd80: cf80fdbc cf80fd90 c0296888 c0203648 00000000 00000000 d347e440 00000000
    fda0: d347e440 c05392f8 bf1e93f0 bf1e93f0 cf80fddc cf80fdc0 c02b800c c0296794
    fdc0: cf80b880 00000001 c05392f4 00000000 cf80fe2c cf80fde0 bf1e8124 c02b7fa0
    fde0: 00000000 00000001 c0539138 c0539274 c0539130 00000000 c0539248 00000004
    fe00: cf80fe1c c0539138 c0539138 bf1e9230 cf870d00 c0550d18 cf80e000 00000000
    fe20: cf80fe3c cf80fe30 c02068f0 bf1e7d40 cf80fe5c cf80fe40 c020585c c02068dc
    fe40: c0539138 c053916c bf1e9230 cf870d00 cf80fe7c cf80fe60 c0205984 c0205798
    fe60: 00000000 c020591c bf1e9230 cf870d00 cf80fea4 cf80fe80 c0205008 c0205928
    fe80: d341bfb8 d34657b0 c01b6238 00000000 bf1e921c bf1e9230 cf80feb4 cf80fea8
    fea0: c0205680 c0204fc4 cf80fee4 cf80feb8 c02048e0 c020566c bf1e8e8e cf80fec8
    fec0: 00000000 bf1e921c bf1e9230 00012018 bf1ed000 00000000 cf80ff0c cf80fee8
    fee0: c0205cbc c0204838 00000000 bf1e921c 00012008 00012018 bf1ed000 cf80e000
    ff00: cf80ff1c cf80ff10 c0206bdc c0205c18 cf80ff34 cf80ff20 c0206c10 c0206b9c
    ff20: 00000000 bf1e92cc cf80ff44 cf80ff38 bf1ed018 c0206bfc cf80ff7c cf80ff48
    ff40: c003c42c bf1ed00c bf1e92cc 00012008 00012018 c0046fa8 00000000 bf1e92cc
    ff60: 00012008 00012018 c0046fa8 00000000 cf80ffa4 cf80ff80 c009b28c c003c368
    ff80: c00c6af0 c00c6a08 00000000 00010000 00000003 00000080 00000000 cf80ffa8
    ffa0: c0046e00 c009b1fc 00000000 00010000 00012018 0000904e 00012008 00000001
    ffc0: 00000000 00010000 00000003 00000080 00012008 00000000 00012018 00000000
    ffe0: bef2becc bef2bc5c 00008da0 401ba7d4 60000010 00012018 00000000 00000000
    Backtrace:
    [<bf1de980>] (ov772x_probe+0x0/0x1f8 [ov772x]) from [<c0295fe0>] (i2c_device_probe+0x78/0xa0)
    [<c0295f68>] (i2c_device_probe+0x0/0xa0) from [<c020585c>] (driver_probe_device+0xd0/0x190)
     r5:cf89a420 r4:bf1dee4c
    [<c020578c>] (driver_probe_device+0x0/0x190) from [<c02059ec>] (__device_attach+0x44/0x48)
     r7:00000000 r6:cf89a420 r5:cf89a420 r4:bf1dee4c
    [<c02059a8>] (__device_attach+0x0/0x48) from [<c0204d00>] (bus_for_each_drv+0x50/0x90)
     r5:c02059a8 r4:00000000
    [<c0204cb0>] (bus_for_each_drv+0x0/0x90) from [<c0205a8c>] (device_attach+0x70/0x94)
     r6:cf89a454 r5:cf89a420 r4:cf89a420
    [<c0205a1c>] (device_attach+0x0/0x94) from [<c0204b68>] (bus_probe_device+0x2c/0x48)
     r7:00000000 r6:d347e440 r5:cf89a420 r4:cf89a420
    [<c0204b3c>] (bus_probe_device+0x0/0x48) from [<c02034c8>] (device_add+0x324/0x498)
    [<c02031a4>] (device_add+0x0/0x498) from [<c0203658>] (device_register+0x1c/0x20)
    [<c020363c>] (device_register+0x0/0x20) from [<c0296888>] (i2c_new_device+0x100/0x164)
     r5:cf89a400 r4:cf89a420
    [<c0296788>] (i2c_new_device+0x0/0x164) from [<c02b800c>] (v4l2_i2c_new_subdev_board+0x78/0x19c)
     r8:bf1e93f0 r7:bf1e93f0 r6:c05392f8 r5:d347e440 r4:00000000
    [<c02b7f94>] (v4l2_i2c_new_subdev_board+0x0/0x19c) from [<bf1e8124>] (ti81xxvin_probe+0x3f0/0x578 [ti81xxvin])
     r7:00000000 r6:c05392f4 r5:00000001 r4:cf80b880
    [<bf1e7d34>] (ti81xxvin_probe+0x0/0x578 [ti81xxvin]) from [<c02068f0>] (platform_drv_probe+0x20/0x24)
    [<c02068d0>] (platform_drv_probe+0x0/0x24) from [<c020585c>] (driver_probe_device+0xd0/0x190)
    [<c020578c>] (driver_probe_device+0x0/0x190) from [<c0205984>] (__driver_attach+0x68/0x8c)
     r7:cf870d00 r6:bf1e9230 r5:c053916c r4:c0539138
    [<c020591c>] (__driver_attach+0x0/0x8c) from [<c0205008>] (bus_for_each_dev+0x50/0x84)
     r7:cf870d00 r6:bf1e9230 r5:c020591c r4:00000000
    [<c0204fb8>] (bus_for_each_dev+0x0/0x84) from [<c0205680>] (driver_attach+0x20/0x28)
     r6:bf1e9230 r5:bf1e921c r4:00000000
    [<c0205660>] (driver_attach+0x0/0x28) from [<c02048e0>] (bus_add_driver+0xb4/0x234)
    [<c020482c>] (bus_add_driver+0x0/0x234) from [<c0205cbc>] (driver_register+0xb0/0x13c)
    [<c0205c0c>] (driver_register+0x0/0x13c) from [<c0206bdc>] (platform_driver_register+0x4c/0x60)
     r9:cf80e000 r8:bf1ed000 r7:00012018 r6:00012008 r5:bf1e921c
    r4:00000000
    [<c0206b90>] (platform_driver_register+0x0/0x60) from [<c0206c10>] (platform_driver_probe+0x20/0x70)
    [<c0206bf0>] (platform_driver_probe+0x0/0x70) from [<bf1ed018>] (ti81xxvin_init+0x18/0x24 [ti81xxvin])
     r5:bf1e92cc r4:00000000
    [<bf1ed000>] (ti81xxvin_init+0x0/0x24 [ti81xxvin]) from [<c003c42c>] (do_one_initcall+0xd0/0x1a4)
    [<c003c35c>] (do_one_initcall+0x0/0x1a4) from [<c009b28c>] (sys_init_module+0x9c/0x1bc)
    [<c009b1f0>] (sys_init_module+0x0/0x1bc) from [<c0046e00>] (ret_fast_syscall+0x0/0x30)
     r7:00000080 r6:00000003 r5:00010000 r4:00000000
    Code: ea000064 e59a6050 e3560000 0a000061 (e5963014)
    ---[ end trace 19bd899e7b1e9e50 ]---
    Segmentation fault
    root@dm816x-evm:~#

    Please suggest me any solution to solve this issue.

    Thanks in advance.

    Regards,
    Salih

  • Hi,

    Looking at the crash, its within your ov7xx sensor driver, you need to debug you sensor driver for it.

    Thanks,
    --Prabhakar Lad