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.

Problem displaying video with dvsdk 3.10.00.19 demos kernel version: no /dev/video2 found

Other Parts Discussed in Thread: THS7303, THS8200, THS7353, TVP7002

Hi, everone

I've found the following problem when upgrading from dvsdk 3.10.00.12 to dvsdk 3.10.00.19: the demo codes which I modified when working with
the dvsdk 3.10.00.12 (and which worked pretty well) have cesaed to run.

The tweaks I tried by comparing the codes and configurations between 3.10.00.12 and 3.10.00.19 didn't work, so I decided
to start from scratch by removing all dvsdk 3.10.00.19 and reinstalling again
, following the Tiwiki instructions.

What happens now is that the original demos supplied with the dvsdk fail. For example, If I try to run the decode demo,
what occurs is as follows:

root@dm6467t-evm:/opt/dvsdk/dm6467# ./decode -v data/videos/davincieffect_1080i_30fps.264 -y 5
Decode demo started.
Error: Failed to create display device
root@dm6467t-evm:/opt/dvsdk/dm6467#

Just let me remark a HD Tv is correctly connected to the component output of the dvevm board, and it
worked pretty well when running the demo codes in the dvsdk 3.10.00.12.

To harvest more information, I run the decode with DMAI_DEBUG=2, thus obtaining the following:

root@dm6467t-evm:/opt/dvsdk/dm6467# DMAI_DEBUG=2 ./decode -v data/videos/davincieffect_1080i_30fps.264 -y 5
Decode demo started.
@0x0005f071:[T:0x4001fcd0] ti.sdo.dmai - [Dmai] Dmai log level set to '2'. Note that calling CERuntime_init after this point may cause unexpected change to DMAI tracing behavior.
@0x0005f535:[T:0x413d6490] ti.sdo.dmai - [BufTab] Allocating BufTab for 3 buffers
@0x0005f6fa:[T:0x413d6490] ti.sdo.dmai - [Buffer] Alloc Buffer of size 4147200 at 0x413d7000 (0x87f44000 phys)
@0x0005f87b:[T:0x413d6490] ti.sdo.dmai - [Buffer] Alloc Buffer of size 4147200 at 0x417cc000 (0x88339000 phys)
@0x0005fa00:[T:0x413d6490] ti.sdo.dmai - [Buffer] Alloc Buffer of size 4147200 at 0x41bc1000 (0x8872e000 phys)
@0x0005fbe8:[T:0x413d6490] ti.sdo.dmai - [Display] Cannot open /dev/video2 (No such file or directory)
Error: Failed to create display device
@0x000c788a:[T:0x427b5490] ti.sdo.dmai - [Vdec2] Video decoder instance created
@0x000c79fb:[T:0x427b5490] ti.sdo.dmai - [Vdec2] Made XDM_SETPARAMS control call
@0x000c7b2e:[T:0x427b5490] ti.sdo.dmai - [Vdec2] Made XDM_GETBUFINFO control call
@0x000c7ba7:[T:0x427b5490] ti.sdo.dmai - [BufTab] Allocating BufTab for 5 buffers
...
root@dm6467t-evm:/opt/dvsdk/dm6467#

I've browsed through /dev, to find the following devices:

root@dm6467t-evm:/opt/dvsdk/dm6467# ls -la /dev
...
crw-rw----    1 root     root     251,   0 Jan  1  1970 usbmon0
crw-rw----    1 root     tty        7,   0 Jan  1  1970 vcs
crw-rw----    1 root     tty        7,   1 Jan  1  1970 vcs1
crw-rw----    1 root     tty        7, 128 Jan  1  1970 vcsa
crw-rw----    1 root     tty        7, 129 Jan  1  1970 vcsa1
crw-rw----    1 root     video     81,   0 Jan  1  1970 video0
crw-rw----    1 root     video     81,   1 Jan  1  1970 video1
crw-rw----    1 root     root      10, 130 Jan  1  1970 watchdog
crw-rw-rw-    1 root     root       1,   5 Jan  1  1970 zero
root@dm6467t-evm:/opt/dvsdk/dm6467#

It seems that the /dev/video0 and /dev/video1 are created during boot, by -may be, I dont'k know for sure- udev.
I think that because I've browsed the filesystem in the host side (I'm using an nfs filesystem to run programs during development)
but no /dev/video devices appeared.

I've created the device by "mknod /dev/video2 c 81 2", and relaunched the demo, but this time the failure is:

root@dm6467t-evm:/opt/dvsdk/dm6467# DMAI_DEBUG=2 ./decode -v data/videos/davincieffect_1080i_30fps.264 -y 5
Decode demo started.
@0x000a18b5:[T:0x4001fcd0] ti.sdo.dmai - [Dmai] Dmai log level set to '2'. Note that calling CERuntime_init after this point may cause unexpected change to DMAI tracing behavior.
@0x000a1d76:[T:0x413d6490] ti.sdo.dmai - [BufTab] Allocating BufTab for 3 buffers
@0x000a1f3c:[T:0x413d6490] ti.sdo.dmai - [Buffer] Alloc Buffer of size 4147200 at 0x413d7000 (0x8872e000 phys)
@0x000a20c6:[T:0x413d6490] ti.sdo.dmai - [Buffer] Alloc Buffer of size 4147200 at 0x417cc000 (0x88339000 phys)
@0x000a2296:[T:0x413d6490] ti.sdo.dmai - [Buffer] Alloc Buffer of size 4147200 at 0x41bc1000 (0x87f44000 phys)
@0x000a23b2:[T:0x413d6490] ti.sdo.dmai - [Display] Component Output not found
@0x000a241d:[T:0x413d6490] ti.sdo.dmai - [Display] Display_detectVideoStd Failed
Error: Failed to create display device
@0x0011aff5:[T:0x427b5490] ti.sdo.dmai - [Vdec2] Video decoder instance created
@0x0011b16a:[T:0x427b5490] ti.sdo.dmai - [Vdec2] Made XDM_SETPARAMS control call
@0x0011b29c:[T:0x427b5490] ti.sdo.dmai - [Vdec2] Made XDM_GETBUFINFO control call
...
root@dm6467t-evm:/opt/dvsdk/dm6467#

Which I think is inconsistent with what the kernel says in the dmesg:

...
Linux video capture interface: v2.00
vpif_display vpif_display: channel=c51ad000,channel->video_dev=c51ad000
vpif_display vpif_display: channel=c51ad400,channel->video_dev=c51ad400
ths7303 1-002c: chip found @ 0x58 (DaVinci I2C adapter)
ths8200 1-0020: chip found @ 0x40 (DaVinci I2C adapter) <- here we have the component display chip correctly registered!
ths7353 1-002e: chip found @ 0x5c (DaVinci I2C adapter)
vpif_capture vpif_capture: registered sub device ths7353
tvp7002 1-005d: tvp7002 1-005d decoder driver registered !!
vpif_capture vpif_capture: registered sub device tvp7002
vpif_capture vpif_capture: DM646x VPIF Capture driver initialized
...

What could I do?

 

  • Hi Gerard,

    It looks like demo process is running at the time of bootup.

    Can you send me the output of ps?

    If you see process with name "interface" you want to kill it and retry?

    Regards

    Sajesh

     

  • Hi,

     

    Not sure exactly, what could be the problem? Can you try running sample application which just display something on tv to make sure display independently is working fine?

     

    Thanks,

    Brijesh

  • Hi,

    In response to Sajesh:

    Here you have my ps output:

    Starting thttpdNET: Registered protocol family 10
    .

     _____                    _____           _         _  
    |  _  |___ ___ ___ ___   |  _  |___ ___  |_|___ ___| |_
    |     |  _| .'| . | . |  |   __|  _| . | | | -_|  _|  _|
    |__|__|_| |__,|_  |___|  |__|  |_| |___|_| |___|___|_| 
                  |___|                    |___|           

    Arago Project http://arago-project.org dm6467t-evm ttyS0

    Arago 2009.11 dm6467t-evm ttyS0

    dm6467t-evm login: root
    root@dm6467t-evm:~# ps
      PID USER       VSZ STAT COMMAND
        1 root      1652 S    init [5]  
        2 root         0 SW   [kthreadd]
        3 root         0 SW   [ksoftirqd/0]
        4 root         0 SW   [watchdog/0]
        5 root         0 SW   [events/0]
        6 root         0 SW   [khelper]
       10 root         0 SW   [async/mgr]
      161 root         0 SW   [sync_supers]
      163 root         0 SW   [bdi-default]
      165 root         0 SW   [kblockd/0]
      171 root         0 SW   [ata/0]
      172 root         0 SW   [ata_aux]
      181 root         0 SW   [khubd]
      184 root         0 SW   [kseriod]
      198 root         0 SW   [kmmcd]
      216 root         0 SW   [rpciod/0]
      226 root         0 SW   [khungtaskd]
      227 root         0 SW   [kswapd0]
      274 root         0 SW   [aio/0]
      283 root         0 SW   [nfsiod]
      916 root         0 SW   [mtdblockd]
      934 root         0 SW   [spi_davinci.0]
      989 root         0 SW   [usbhid_resumer]
     1033 root         0 SW   [flush-0:13]
     1035 root      1900 S <  /sbin/udevd -d
     1446 root      2868 S    udhcpc -R -n -p /var/run/udhcpc.eth0.pid -i eth0
     1471 root      2864 S    /usr/sbin/telnetd
     1476 root      2928 S    /sbin/syslogd -n -C64 -m 20
     1478 root      2864 S    /sbin/klogd -n
     1489 nobody    2120 S    /usr/sbin/thttpd -d /srv/www
     1494 root      3056 S    -sh
     1495 root      1912 S    /sbin/getty 38400 tty1
     1497 root      3056 R    ps
    root@dm6467t-evm:~#

    In response to Brijesh:

    Here is a session with the video_display dmai example:

    root@dm6467t-evm:/opt/dvsdk/dm6467# ./video_display_dm6467.x470MV --help
    Usage: video_display_<platform> [options]

    Options:
    -y | --display_standard  Video standard to use for display (see below)
    -O | --display_output    Video output to use (see below)
         --benchmark         Print benchmarking information
    -h | --help              Print usage information (this message)
    -n | --numframes         Number of frames to process [Default: 1000]

    Display standards available:
            1       D1 NTSC @ 30 fps [Default]
            2       D1 PAL @ 25 fps
            3       480P @ 60 fps
            4       576P @ 50 fps
            5       720P @ 60 fps
            6       720P @ 50 fps
            7       1080i @ 30 fps
            8       1080i @ 25 fps
            9       1080p @ 30 fps
            10      1080p @ 25 fps
            11      1080p @ 24 fps

            12      VGA

            13      1080p @ 60 fps
            14      1080p @ 50 fps

    Video output available:
            composite [Default]
            svideo
            component
            lcd
            dvi
            auto (select video output by reading sysfs)

    Note: All display standards might not be supported by a platform.
          Please check PSP documents for supported standards.

    root@dm6467t-evm:/opt/dvsdk/dm6467# ./video_display_dm6467.x470MV -y 5 -O component
    Failed to open display device
    root@dm6467t-evm:/opt/dvsdk/dm6467# DMAI_DEBUG=2 ./video_display_dm6467.x470MV -y 5 -O component
    @0x000e7808:[T:0x4001f050] ti.sdo.dmai - [Dmai] Dmai log level set to '2'. Note that calling CERuntime_init after this point may cause unexpected change to DMAI tracing behavior.
    @0x000e7e28:[T:0x4001f050] ti.sdo.dmai - [BufTab] Allocating BufTab for 3 buffers
    @0x000e7fa6:[T:0x4001f050] ti.sdo.dmai - [Buffer] Alloc Buffer of size 1843200 at 0x402ff000 (0x89151000 phys)
    @0x000e80fe:[T:0x4001f050] ti.sdo.dmai - [Buffer] Alloc Buffer of size 1843200 at 0x40616000 (0x88e3a000 phys)
    @0x000e825e:[T:0x4001f050] ti.sdo.dmai - [Buffer] Alloc Buffer of size 1843200 at 0x4092d000 (0x88b23000 phys)
    @0x000e8447:[T:0x4001f050] ti.sdo.dmai - [Display] Cannot open /dev/video2 (No such file or directory)
    Failed to open display device
    @0x000e8772:[T:0x4001f050] ti.sdo.dmai - [Buffer] Free Buffer of size 1843200 at 0x402ff000 (0x89151000 phys)
    @0x000e8d70:[T:0x4001f050] ti.sdo.dmai - [Buffer] Free Buffer of size 1843200 at 0x40616000 (0x88e3a000 phys)
    @0x000e9360:[T:0x4001f050] ti.sdo.dmai - [Buffer] Free Buffer of size 1843200 at 0x4092d000 (0x88b23000 phys)
    root@dm6467t-evm:/opt/dvsdk/dm6467# dmesg | grep tvp
    tvp7002 1-005d: tvp7002 1-005d decoder driver registered !!
    vpif_capture vpif_capture: registered sub device tvp7002
    root@dm6467t-evm:/opt/dvsdk/dm6467#

    One remarkable thing: when I try to load the cmem module compiled matching the default configuration for the kernel, It leaves an error message:

    root@dm6467t-evm:/opt/dvsdk/dm6467# ./loadmodules.sh
    insmod: error inserting 'cmemk.ko': -1 Invalid parameters
    root@dm6467t-evm:/opt/dvsdk/dm6467#

    I've browsed the code of the loadmodules.sh script that the "make install" order installs, and I've noticed that the memory map assumed to install the cmem module does not match the current memory map. To load the modules I needed to replace the line:

    insmod cmemk.ko phys_start=0x84C00000 phys_end=0x8ba00000 pools=2x921600,1x460800,1x1048576,1x345600,2x86400,11x564528,5x677376,14x5396480,3x4147200,4x1451520,4x1843200

    by this one, present in the loadmodules.sh script of the 3.10.00.12 dvsdk version (3.10.00.10 dvsdk demos version):

    insmod cmemk.ko phys_start=0x87000000 phys_end=0x8ba00000 pools=2x921600,1x460800,1x1048576,1x345600,2x86400,11x564528,5x677376,11x3237936,3x4147200,11x1451520

    I don't know if this can be related with the problem.

    Thanks!