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.

IPIPE: Segmentation fault



Hello!

I have a TMX320DM355 Evalution Module 702065 Rev C 30 Nov 07 manufactured by SpectrumDigital with MT9M131 CMOS-matrix.

When I run ipipe_480p_example I get errors:

# ./ipipe_480p_example
initializing capture device
Open Done
vpfe vpfe.1:
 Validation pass
mt9t001_ctrle
Calling confimt9t001_getparams
gCCDCraw()
mt9t001_getformat
the col size is : 14mt9t001_ctrl
71
configCCDmt9t001_setstd
Craw Done
settimt9t001_setformat
ng data format
write reg = 0x3, data[1] = 0x3, data[2] = 0xcf
SetDataFormat:sewrite reg = 0x4, data[1] = 0x5, data[2] = 0xbf
write reg = 0x5, data[1] = 0x1, data[2] = 0x5e
write reg = 0x6, data[1] = 0x1, data[2] = 0x5e
write reg = 0x9, data[1] = 0x3, data[2] = 0x82
write reg = 0x8, data[1] = 0x0, data[2] = 0x0
write reg = 0x22, data[1] = 0x0, data[2] = 0x11
write reg = 0x23, data[1] = 0x0, data[2] = 0x11
write reg = 0x49, data[1] = 0x0, data[2] = 0x40
 ERROR: i2c readback failed, val = 0x40, readval = 0x0, reg = 0x49
write reg = 0x1, data[1] = 0x0, data[2] = 0x0
write reg = 0x2, data[1] = 0x0, data[2] = 0x0
write reg = 0xa, data[1] = 0x80, data[2] = 0x0
 ERROR: i2c readback failed, val = 0x8000, readval = 0x8001, reg = 0xa
write reg = 0x7, data[1] = 0x0, data[2] = 0x2
mt9t001_readregs
S_STD Done
GetSTD Done WITH std = 15
SetDataFormat:requesting width:720 height:480
S_FMT Done
initializingIPIPE_SET_PARAM - NULL parametrs
 capture buffersIPIPE_SET_PARAM - validate_params
IPIPE_SET_PARAM - copy the values to device params
QUERYBUF DoneIPIPE_SET_PARAM - ipipe_hw_setup
QUERYBUF DonIPIPE_SET_PARAM - validate_paramse
QUERYBUF DoIPIPE_SET_PARAM - copy the values to device params
ne
IPIPE_SET_PARAM - ipipe_hw_setup
initialize Ipipeinitializing displayDavinciDisplay DavinciDisplay.1: Display Manager failed to allocate layer
 device
DavinciDisplay DavinciDisplay.1: Unable to configure video layer for id = 0
starting streaming
Queing buffer:0
Q_BUF Done
Queing buffer:1
Q_BUF Done
Queing buffer:2
Q_BUF Done
STREAMON Done
IPIPE_SET_PARAM - NULL parametrs
IPIPE_SET_PARAM - validate_params
IPIPE_SET_PARAM - copy the values to device params
IPIPE_SET_PARAM - ipipe_hw_setup
IPIPE_SET_PARAM - validate_params
IPIPE_SET_PARAM - copy the values to device params
IPIPE_SET_PARAM - ipipe_hw_setup
VIDIOC_DQBUF
Segmentation fault

# cat video.conf
cap_fmt=0
vid_dev=0
vid_out=0
std_sel=0

 #ls -l /dev/video*
lrwxrwxrwx    1 root     root           10 Aug 27  2008 /dev/video0 -> v4l/video0
lrwxrwxrwx    1 root     root           10 Aug 27  2008 /dev/video2 -> v4l/video2
lrwxrwxrwx    1 root     root           10 Aug 27  2008 /dev/video3 -> v4l/video3

#ls -l /dev/v4l/video*
crw-rw----    1 1000     1000      81,   0 Aug 27  2008 /dev/v4l/video0
crw-rw----    1 root     root      81,   2 Aug 27  2008 /dev/v4l/video2
crw-rw----    1 root     root      81,   3 Aug 27  2008 /dev/v4l/video3

#dmesg
...............................
vpfe vpfe.1: DaVinci v4l2 capture driver V1.0 loaded
Registering platform device 'DavinciDisplay.1'. Parent at platform
Trying to register davinci display video device.
layer=c0bf2c00,layer->video_dev=c0bf2d64
Trying to register davinci display video device.
layer=c0bf2a00,layer->video_dev=c0bf2b64
davinci_init:DaVinci V4L2 Display Driver V1.0 loaded
DaVinci V4L2 Display Driver V1.0 loaded
ipipe major#: 254, minor# 0
Registering platform device 'dm355_ipipe.2'. Parent at platform
....................................

I have found error Display Manager failed to allocate layer in kernel/drivers/media/video/davinci/davinci_display.c:

static int davinci_config_layer(enum davinci_display_device_id id) {
.........................................
if (davinci_disp_request_layer(layer->layer_info.id)) {
        /* Couldn't get layer */
        dev_err(davinci_display_dev,
            "Display Manager failed to allocate layer\n");
        return -EBUSY;
}
....................................

 

How can I solve problems?

Thanks.

  • My initial guess is that during driver bootup time, the system was not configured to support 480p (I believe default is NTSC or PAL)

    You need to set the resolution size, output type (component, composite) and output mode via u-boot bootargs environment variable during boot time.  I believe the default are 720x576x16 (enough to support NTSC or PAL), COMPOSITE (will need to change for 480p), and ntsc (will need to change for 480p).

    These options are discussed in the PSP documents included in the DVSDK (see SPRUEK9.pdf in particular). 

    That said, how do you plan on seeing 480p output ; do you have a duaghter card to connnect to DM355 EVM?

  • Thak you for your answer.

    I have used standart boot parametrs:

    setenv videomode video=davincifb:vid0=720x576x16,2500K:vid1=720x576x16,2500K:osd0=720x576x16,2025K davinci_enc_mngr.ch0_output=COMPOSITE davinci_enc_mngr.ch0_mode=$(videostd)
    setenv bootcmd 'nboot 0x80700000 0 0x400000;bootm'
    setenv capture v4l2_video_capture=device:MT9T031
    setenv bootargs console=ttyS0,115200n8 noinitrd rw ip=192.168.0.32:192.168.0.132:::arm:eth0:off root=/dev/nfs nfsroot=192.168.0.132:/home/kirill/nfs/busybox,nolock mem=116M $(videomode) $(capture)

    I plan see video on analog screen and in future through web-browser.

    P.S. I have talk with engineer from Moscow TI office and he also get this error.

  • Hello, I have the same problem! Is there a workaround available?

  • I am trying to run the (unmodified) ipipe_rsz_example on a DM355 and have found the same problem:

    DavinciDisplay DavinciDisplay.1: Display Manager failed to allocate layer
    DavinciDisplay DavinciDisplay.1: Unable to configure video layer for id = 0

    followed by a segmentation fault.  I am using dvsdk_1_30_00_40 and PSP_01_10_00_014

    I need to modify the decode demo to resize, so I would like to start from a working example of resizing using IPIPE.  Has anyone had any luck getting the ipipe examples to run?

    Thanks!

  • I'm new at this, but I found somewhere that you need to disable /dev/fb/1 and /dev/fb/3 driver access to run several of the demos. Or was it 0 and 2?

    You can do that with the fbset command:

    fbset /dev/fb/0 -xres 0

    fbset /dev/fb/2 -xres 0

    Or use 1 and 3 if those are the correct FBDEV nodes to disable.

    Hope this helps - heck, I hope it's even correct!

     

  • Hi Glen, thank you very very much! That helped!!

    The correct commands are:

    fbset -fb /dev/fb/1 -xres 0
    fbset -fb /dev/fb/3 -xres 0

     

    Martin

  • Yup, thanks from me too Glenn.