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.

TMS320DM368: Kernel reboots during h264 and DEI running

Part Number: TMS320DM368

Hello, 

We have dm368 based custom board. 

We are using dvsdk 04_02_00_06 and kernel version is 2.6.32. We have taken the DEI from IPNC_RDK 5.1 and ported into dvsdk 04_02_00_06 and also changed the h264 codec.

We have put h264 encoder and dei in different group id. 

Our data flow is like this:

capture                        ->                      DEI ->                                          Resizing                     ->                   Encoder                       ->          SD card

(720x576YUV422)                 (720x576,YUv422)                   (712x570, YUV422)                 (736x576, YUV420PSEMI)                          (Encoded Data)

DEI and H264 are running simultaneously.

Our kernel reboots during the record on. We are not getting any error messages in CE_DEBUG or in DMAI. 

Our cmem parameters is as following :-

modprobe cmemk phys_start=0x87800000 phys_end=0x90000000 allowOverlap=1 phys_start_1=0x00001000 phys_end_1=0x00008000 pools_1=1x28672 useHeapIfPoolUnavailable=1

H264 Parameters is

IH264VENC_Params

h264Params.videncParams.size = sizeof(IH264VENC_Params);
h264Params.profileIdc = 100; /*!< profile idc */
h264Params.levelIdc = 40 or 50; /*!< level idc */
h264Params.entropyMode = 1; /*!< entropy mode flag 0-CAVLC, 1-CABAC */
h264Params.transform8x8FlagIntraFrame = 1; /*!< Flag for 8x8 Transform in Inter frames*/
h264Params.transform8x8FlagInterFrame = 1; /*!< Flag for 8x8 Transform in Intra Frames*/
h264Params.seqScalingFlag = 1;
h264Params.videncParams.maxFrameRate = 25000;
h264Params.videncParams.reconChromaFormat = XDM_YUV_420SPt;
h264Params.videncParams.rateControlPreset = IVIDEO_STORAGE;
h264Params.videncParams.maxBitRate = 1500000;
h264Params.videncParams.encodingPreset =XDM_HIGH_QUALITY;
h264Params.videncParams.maxWidth = 1920;
h264Params.videncParams.maxHeight = 1080;
h264Params.videncParams.inputChromaFormat = XDM_YUV_420SP;
dynParams->intraFrameInterval = 12;
h264Params.enableDDRbuff = 1;

IVDENC1_Dynamic_Params

dynParams->targetBitRate =1500000;
dynParams->inputWidth = 736;
dynParams->inputHeight = 576;
dynParams->refFrameRate = 25000;
dynParams->targetFrameRate = 25000;
dynParams->interFrameInterval = 0;
dynParams->intraFrameInterval = 12;

DEI Parameters:

deiAttrs.height = 576;
deiAttrs.width = 720;
deiAttrs.inFormat = ColorSpace_UYVY;
deiAttrs.outFormat = ColorSpace_UYVY;
deiAttrs.threshold[0] = 0;
deiAttrs.threshold[1] = 2;
deiAttrs.sysBaseAddr = dm365MM_mmap();

Our configuration file and log file is enclosed.

Kernel_Reboot_Logs.txt

encodedecode_new.txt
/*
 * encodedecode.cfg
 *
 * This configuration file configures the DVSDK encodedecode demos  for 
 * DM365 platform 
 *
 * Copyright (C) 2010 Texas Instruments Incorporated - http://www.ti.com/ 
 * 
 * 
 *  Redistribution and use in source and binary forms, with or without 
 *  modification, are permitted provided that the following conditions 
 *  are met:
 *
 *    Redistributions of source code must retain the above copyright 
 *    notice, this list of conditions and the following disclaimer.
 *
 *    Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the 
 *    documentation and/or other materials provided with the   
 *    distribution.
 *
 *    Neither the name of Texas Instruments Incorporated nor the names of
 *    its contributors may be used to endorse or promote products derived
 *    from this software without specific prior written permission.
 *
 *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
 *  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
 *  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
 *  A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
 *  OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
 *  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
 *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 *  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 *  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 
 *  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
 *  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 *
*/

/* Load support for the Codec Engine OSAL */
var osalGlobal = xdc.useModule('ti.sdo.ce.osal.Global');

/* Configure CE to use it's DSP Link Linux version */
osalGlobal.runtimeEnv = osalGlobal.LINUX;

/*
 *  ======== Engine Configuration ========
 */
var H264ENC  = xdc.useModule('ti.sdo.codecs.h264enc.ce.H264ENC');
var H264DEC  = xdc.useModule('ti.sdo.codecs.h264dec.ce.H264DEC');
var JPEGENC  = xdc.useModule('ti.sdo.codecs.jpegenc.ce.JPEGENC');
var JPEGDEC  = xdc.useModule('ti.sdo.codecs.jpegdec.ce.JPEGDEC');
var IPRUN	= xdc.useModule('ti.sdo.codecs.iprun.ce.IPRUN');
var DEI		= xdc.useModule('ti.sdo.codecs.dei.ce.DEI');

var Engine = xdc.useModule('ti.sdo.ce.Engine');
var myEngine = Engine.create("encodedecode", [
    {name: "h264enc", mod: H264ENC, local: true, groupId: 1},
    {name: "h264dec", mod: H264DEC, local: true, groupId: 1},
    {name: "jpegenc", mod:  JPEGENC, local: true, groupId: 1},
    {name: "jpegdec", mod: JPEGDEC, local: true, groupId: 1},
    {name: "iprun",   mod: IPRUN,   local: true, groupId: 2},
	{name: "dei",     mod: DEI,     local: true, groupId: 2},
]);

/* Load support for the 'Davinci Multimedia Application Interface' modules */
var DMAI = xdc.loadPackage('ti.sdo.dmai');

/* Configure RMAN */ 
var RMAN = xdc.useModule('ti.sdo.fc.rman.RMAN');
RMAN.useDSKT2 = false;
RMAN.persistentAllocFxn = "__ALG_allocMemory";
RMAN.persistentFreeFxn = "__ALG_freeMemory";
RMAN.semCreateFxn = "Sem_create";
RMAN.semDeleteFxn = "Sem_delete";
RMAN.semPendFxn = "Sem_pend";
RMAN.semPostFxn = "Sem_post";
RMAN.tableSize = 10;

/* Configure VICPSYNC */
var VICPSYNC = xdc.useModule('ti.sdo.fc.vicpsync.VICPSYNC');

/* Configure HDVICPSYNC */
var HDVICPSYNC = xdc.useModule('ti.sdo.fc.hdvicpsync.HDVICPSYNC');

/* Configure MEMUTILS */
var MEMUTILS = xdc.useModule('ti.sdo.fc.memutils.MEMUTILS');

var EDMA3 = xdc.useModule('ti.sdo.fc.edma3.Settings');
EDMA3.globalInit = true;
EDMA3.maxQdmaChannels = [10,10,10,10];
EDMA3.trace = false;
EDMA3.debug = false;
EDMA3.maxRequests = 256;

var HDVICP = xdc.useModule('ti.sdo.fc.ires.hdvicp.HDVICP');

var VICP = xdc.useModule('ti.sdo.fc.ires.vicp.VICP2');
VICP.debug = false;

var ADDRSPACE = xdc.useModule('ti.sdo.fc.ires.addrspace.ADDRSPACE');

var EDMA3CHAN = xdc.useModule('ti.sdo.fc.ires.edma3chan.EDMA3CHAN');

var EDMA = xdc.useModule('ti.sdo.linuxutils.edma.EDMA');

var CMEM = xdc.useModule('ti.sdo.linuxutils.cmem.CMEM');

var MEMTCM = xdc.useModule('ti.sdo.fc.ires.memtcm.MEMTCM');

var OSAL_SETTINGS = xdc.useModule('ti.sdo.ce.osal.linux.Settings');

OSAL_SETTINGS.maxCbListSize = 200;

MEMTCM.cmemBlockId = 1; //Since we use _1 in our insmod command.

/* Uncomment these lines if you wish to debug FC and enable FC trace */
 
/*
xdc.loadPackage('ti.sdo.fc.ires.vicp').profile = "debug_trace";
xdc.loadPackage('ti.sdo.fc.ires.edma3chan').profile = "debug_trace";
xdc.loadPackage('ti.sdo.fc.rman').profile = "debug_trace";
xdc.loadPackage('ti.sdo.fc.edma3').profile = "debug_trace";
EDMA3CHAN.trace = true;
EDMA3CHAN.debug = true;
*/

Anybody tell me what is the reason behind this?

Thanks & Regards

  • Hi,

    I will inform Team to look into this issue.

    Regards,
    Anuj
    Pathpartner Technology Pvt Ltd.
  • Hi, 

    Your codec and CMEM configuration looks fine . From your kernel logs I do see , TIMER2 interrupts being disabled just before reboot , INTMUX (0x00000018) = 0x00000004 -> 0x00000005 .

    I am not sure of multimedia framework that you use .If you can share your observation removing codec and store to SD card it would be good for someone else to help you on this. 

    Thanks & Regards,

    Vishwanath Patil