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.

ti81xxfb : failed to start

Ti8168EVM;

DVR RDK 3.0;

 

root@dm816x:/mnt/dvrrdk/tg3/opt/dvr_rdk/ti816x# ./init.sh
*** Bootargs Validated for mem param ***
*** Bootargs Validated for notifyk.vpssm3 params ***
Kernel bootargs validated
 [c6xdsp ] Remote Debug Shared Memory @ 0xbf000000
 [m3video] Remote Debug
SysLink version : 2.10.02.17
SysLink module created on Date:Aug 20 2013 Time:10:19:53
Trace enabled
Trace SetFailureReason enabled
 Setting DMM priority for [DUCATI  ] to [0] ( 0x4e000624 = 0x08000000 )
 Setting DMM priority for [HDVICP0 ] to [2] ( 0x4e000634 = 0x0000000a )
 Setting DMM priority for [HDVICP1 ] to [2] ( 0x4e000634 = 0x000a0000 )
 Setting DMM priority for [HDVICP2 ] to [2] ( 0x4e000634 = 0x00a00000 )
root@dm816x:/mnt/dvrrdk/tg3/opt/dvr_rdk/ti816x# ./load.sh
Attached to slave procId 2.
Loaded file ../firmware/dvr_rdk_fw_m3vpss.xem3 on slave procId 2.
Started slave procId 2.
After Ipc_loadcallback status [0x00000000]
 [m3vpss ] ***** SYSTEM  : Frequency <ORG> - 250000000, <NEW> - 280000000
 [m3vpss ] notify_attach  rtnVal  0
 [m3vpss ] initProxyServer  rtnVal  0
 [m3vpss ] 
 [m3vpss ]  *** UTILS: CPU KHz = 560000 Khz ***
 [m3vpss ] 
 [m3vpss ]  44: SYSTEM  : System Common Init in progress !!!
 [m3vpss ]  44: SYSTEM: IPC init in progress !!!
 [m3vpss ]  45: SYSTEM: Attaching to [HOST] ...
 [m3vpss ]  1044: SYSTEM: Attaching to [HOST] ...
 [m3vpss ]  1046: SYSTEM: Attaching to [HOST] ... SUCCESS !!!
 [m3vpss ]  1046: SYSTEM: Attaching to [DSP] ...
After Ipc_startcallback status [0x097d2000]
Attached to slave procId 1.
Loaded file ../firmware/dvr_rdk_fw_m3video.xem3 on slave procId 1.
Started slave procId 1.
After Ipc_loadcallback status [0x00000000]
 [m3video] ***** SYSTEM  : Frequency <ORG> - 250000000, <NEW> - 280000000
 [m3vpss ]  2046: SYSTEM: Attaching to [DSP] ...
 [m3video] 
 [m3video]  *** UTILS: CPU KHz = 560000 Khz ***
 [m3video] 
 [m3video]  1365: SYSTEM  : System Common Init in progress !!!
 [m3video]  1366: SYSTEM: IPC init in progress !!!
 [m3video]  1366: SYSTEM: Attaching to [HOST] ...
 [m3video]  2365: SYSTEM: Attaching to [HOST] ...
 [m3video]  2367: SYSTEM: Attaching to [HOST] ... SUCCESS !!!
 [m3video]  2367: SYSTEM: Attaching to [DSP] ...
After Ipc_startcallback status [0x00000000]
Attached to slave procId 0.
Loaded file ../firmware/dvr_rdk_fw_c6xdsp.xe674 on slave procId 0.
Started slave procId 0.
After Ipc_loadcallback status [0x00000000]
 [c6xdsp ] ***** SYSTEM  : Frequency <ORG> - 800000000, <NEW> - 800000000
 [m3video]  3367: SYSTEM: Attaching to [DSP] ...
 [m3vpss ]  3046: SYSTEM: Attaching to [DSP] ...
 [c6xdsp ] 
 [c6xdsp ]  *** UTILS: CPU KHz = 800000 Khz ***
 [c6xdsp ] 
 [c6xdsp ]  5: SYSTEM  : System Common Init in progress !!!
 [c6xdsp ]  5: SYSTEM: IPC init in progress !!!
 [c6xdsp ]  5: SYSTEM: Attaching to [HOST] ...
 [c6xdsp ]  1029: SYSTEM: Attaching to [HOST] ...
 [c6xdsp ]  103DMA: Module install successful, device major num = 251
1: SYSTEM: AttacDRV: Module install successful
hing to [HOST] .DRV: Module built on Aug 28 2013 14:23:21
.. SUCCESS !!!
 [c6xdsp ]  1032: SYSTEM: Attaching to [VIDEO-M3] ...
After Ipc_startcallback status [0x00000000]
10
 [c6xdsp ] Remote Debug Shared Memory @ 0xbf000000
 [m3video] Remote Debug Shared Memory @ 0xbf005020
 [m3vpss ] Remote Debug Shared Memory @ 0xbf00a040
 [m3vpss ]  4046: SYSTEM: Attaching to [DSP] ...
 [c6xdsp ]  2055: SYSTEM: Attaching to [VIDEO-M3] ...
 [m3video]  4367: SYSTEM: Attaching to [DSP] ...
 [m3vpss ]  5046: SYSTEM: Attaching to [DSP] ...
 [c6xdsp ]  3078: SYSTEM: Attaching to [VIDEO-M3] ...
 [c6xdsp ]  3311: SYSTEM: Attaching to [VIDEO-M3] ... SUCCESS !!!
 [m3video]  5367: SYSTEM: Attaching to [DSP] ...
 [c6xdsp ]  3311: SYSTEM: Attaching to [VPSS-M3] ...
 [m3video]  5367: SYSTEM: Attaching to [DSP] ... SUCCESS !!!
 [m3video]  5367: SYSTEM: Attaching to [VPSS-M3] ...
 [m3vpss ]  6046: SYSTEM: Attaching to [DSP] ...
 [c6xdsp ]  4334: SYSTEM: Attaching to [VPSS-M3] ...
 [m3video]  6367: SYSTEM: Attaching to [VPSS-M3] ...
 [c6xdsp ]  5247: SYSTEM: Attaching to [VPSS-M3] ... SUCCESS !!!
 [m3vpss ]  7046: SYSTEM: Attaching to [DSP] ...
 [c6xdsp ]  5247: SYSTEM: Opening MsgQ Heap [IPC_MSGQ_MSG_HEAP] ...
 [m3vpss ]  7047: SYSTEM: Attaching to [DSP] ... SUCCESS !!!
 [m3vpss ]  7047: SYSTEM: Attaching to [VIDEO-M3] ...
 [m3video]  7367: SYSTEM: Attaching to [VPSS-M3] ...
 [c6xdsp ]  6270: SYSTEM: Opening MsgQ Heap [IPC_MSGQ_MSG_HEAP] ...
 [m3video]  8047: SYSTEM: Attaching to [VPSS-M3] ... SUCCESS !!!
 [m3vpss ]  8046: SYSTEM: Attaching to [VIDEO-M3] ...
 [m3video]  8047: SYSTEM: Opening MsgQ Heap [IPC_MSGQ_MSG_HEAP] ...
 [m3vpss ]  8047: SYSTEM: Attaching to [VIDEO-M3] ... SUCCESS !!!
 [m3video]  8047: SYSTEM: Creating MsgQ [VIDEO-M3_MSGQ] ...
 [m3vpss ]  8047: SYSTEM: Creating MsgQ Heap [IPC_MSGQ_MSG_HEAP] ...
 [m3video]  8047: SYSTEM: Creating MsgQ [VIDEO-M3_ACK_MSGQ] ...
 [m3vpss ]  8047: SYSTEM: Creating MsgQ [VPSS-M3_MSGQ] ...
 [m3vpss ]  8047: SYSTEM: Creating MsgQ [VPSS-M3_ACK_MSGQ] ...
 [m3vpss ]  8049: SYSTEM: Notify register to [HOST] line 0, event 15 ...
 [m3video]  8049: SYSTEM: Notify register to [HOST] line 0, event 15 ...
 [m3vpss ]  8049: SYSTEM: Notify register to [DSP] line 0, event 15 ...
 [m3video]  8049: SYSTEM: Notify register to [DSP] line 0, event 15 ...
 [m3vpss ]  8049: SYSTEM: Notify register to [VIDEO-M3] line 0, event 15 ...
 [m3video]  8049: SYSTEM: Notify register to [VPSS-M3] line 0, event 15 ...
 [m3vpss ]  8049: SYSTEM: IPC init DONE !!!
 [m3video]  8049: SYSTEM: IPC init DONE !!!
 [m3vpss ]  8055: MEM: Shared Region 2: Base = 0xb0000000, Length = 0x0e9c0000 (233 MB)
 [m3video]  8055: MEM: Shared Region 2: Base = 0xb0000000, Length = 0x0e9c0000 (233 MB)
 [m3vpss ]  8055: MEM: Shared Region 1: Base = 0x90000000, Length = 0x0d000000 (208 MB)
 [m3video]  8055: MEM: Shared Region 1: Base = 0x90000000, Length = 0x0d000000 (208 MB)
 [m3vpss ]  8057: SYSTEM  : System Common Init Done !!!
 [m3video]  8057: SYSTEM  : System Common Init Done !!!
 [m3vpss ]  8057: SYSTEM  : System VPSS Init in progress !!!
 [m3video]  8057: SYSTEM  : System Video Init in progress !!!
 [m3vpss ]  8057: SYSTEM: All VPDMA Free !!!
 [m3video]  8057: SYSTEM  : System Video Init Done !!!
 [m3video]  8057: SYSTEM: Creating ListMP [VIDEO-M3_IPC_OUT_0] in region 0 ...
 [m3video]  8058: SYSTEM: Creating ListMP [VIDEO-M3_IPC_IN_0] in region 0 ...
 [m3video]  8058: SYSTEM: ListElem Shared Addr = 0xbf18b680
 [m3video]  8060: SYSTEM: Creating ListMP [VIDEO-M3_IPC_OUT_1] in region 0 ...
 [m3vpss ] === HDVPSS Clocks are enabled ===
 [m3video]  8060: SYSTEM: Creating ListMP [VIDEO-M3_IPC_IN_1] in region 0 ...
 [m3vpss ] === HDVPSS is fully functional ===
 [m3video]  8060: SYSTEM: ListElem Shared Addr = 0xbf18eb80
 [m3vpss ] === HDVPSS module is not in standby ===
 [m3video]  8066: SYSTEM: Creating ListMP [VIDEO-M3_IPC_OUT_19] in region 0 ...
 [m3vpss ] === I2C1 Clk is active ===
 [m3video]  8066: SYSTEM: Creating ListMP [VIDEO-M3_IPC_IN_19] in region 0 ...
 [m3vpss ]  8063: SYSTEM: Creating ListMP [VPSS-M3_IPC_OUT_0] in region 0 ...
 [m3video]  8067: SYSTEM: ListElem Shared Addr = 0xbf198a80
 [m3vpss ]  8063: SYSTEM: Creating ListMP [VPSS-M3_IPC_IN_0] in region 0 ...
 [m3vpss ]  8063: SYSTEM: ListElem Shared Addr = 0xbf192080
 [m3vpss ]  8065: SYSTEM: Creating ListMP [VPSS-M3_IPC_OUT_1] in region 0 ...
 [m3vpss ]  8066: SYSTEM: Creating ListMP [VPSS-M3_IPC_IN_1] in region 0 ...
 [m3vpss ]  8066: SYSTEM: ListElem Shared Addr = 0xbf195580
 [m3video]  8069: SYSTEM: Creating ListMP [VIDEO-M3_IPC_OUT_20] in region 0 ...
 [m3video]  8069: SYSTEM: Creating ListMP [VIDEO-M3_IPC_IN_20] in region 0 ...
 [m3video]  8069: SYSTEM: ListElem Shared Addr = 0xbf1b8480
 [m3video]  8072: SYSTEM: Creating ListMP [VIDEO-M3_IPC_OUT_21] in region 0 ...
 [m3video]  8072: SYSTEM: Creating ListMP [VIDEO-M3_IPC_IN_21] in region 0 ...
 [m3video]  8072: SYSTEM: ListElem Shared Addr = 0xbf1d7e80
 [m3vpss ]  8080: SYSTEM: Creating ListMP [VPSS-M3_IPC_OUT_19] in region 0 ...
 [m3vpss ]  8080: SYSTEM: Creating ListMP [VPSS-M3_IPC_IN_19] in region 0 ...
 [m3vpss ]  8081: SYSTEM: ListElem Shared Addr = 0xbf1f7880
 [m3vpss ]  8083: SYSTEM: Creating ListMP [VPSS-M3_IPC_OUT_20] in region 0 ...
 [m3vpss ]  8083: SYSTEM: Creating ListMP [VPSS-M3_IPC_IN_20] in region 0 ...
 [m3vpss ]  8083: SYSTEM: ListElem Shared Addr = 0xbf217280
 [m3video]  8086: SYSTEM: Creating ListMP [VIDEO-M3_IPC_OUT_24] in region 0 ...
 [m3vpss ]  8086: SYSTEM: Creating ListMP [VPSS-M3_IPC_OUT_21] in region 0 ...
 [m3video]  8086: SYSTEM: Creating ListMP [VIDEO-M3_IPC_IN_24] in region 0 ...
 [m3vpss ]  8086: SYSTEM: Creating ListMP [VPSS-M3_IPC_IN_21] in region 0 ...
 [m3video]  8086: SYSTEM: ListElem Shared Addr = 0xbf256680
 [m3vpss ]  8086: SYSTEM: ListElem Shared Addr = 0xbf237200
 [m3video]  8089: SYSTEM: Creating ListMP [VIDEO-M3_IPC_OUT_25] in region 0 ...
 [m3vpss ]  8088: SYSTEM : HDVPSS Drivers Version: HDVPSS_01_00_01_37
 [m3video]  8089: SYSTEM: Creating ListMP [VIDEO-M3_IPC_IN_25] in region 0 ...
 [m3vpss ]  8088: SYSTEM  : FVID2 Init in progress !!!
 [m3video]  8089: SYSTEM: ListElem Shared Addr = 0xbf274180
 [m3vpss ]  8167: SYSTEM  : FVID2 Init in progress DONE !!!
 [m3video]  8091: HDVICP: Doing PRCM for IVAHD[0] ...
 [m3vpss ]  8168: SYSTEM  : Device Init in progress !!!
 [m3video]  8091: HDVICP: PRCM for IVAHD[0] ... DONE.
 [m3video]  8091: HDVICP: Doing PRCM for IVAHD[1] ...
 [m3vpss ] initPrms.isI2cInitReq = 0
 [m3video]  8091: HDVICP: PRCM for IVAHD[1] ... DONE.
 [m3video]  8091: HDVICP: Doing PRCM for IVAHD[2] ...
 [m3vpss ] initPrms.isI2cInitReq = 0
 [m3video]  8091: HDVICP: PRCM for IVAHD[2] ... DONE.
 [m3vpss ]  8170: SYSTEM  : Device Init in progress DONE !!!
 [m3video]  8091: SYSTEM  : Initializing Links !!!
 [m3vpss ]  8288: SYSTEM  : System VPSS Init Done !!!
 [m3vpss ]  8289: UTILS: DMA: HWI Create for INT63 !!!
 [m3video]  8092: SYSTEM  : FREE SPACE : System Heap      = 6280232 B, Mbx = 10240 msgs)
 [m3vpss ]  8289: SYSTEM  : Initializing Links !!!
 [m3video]  8092: SYSTEM  : FREE SPACE : SR0 Heap         = 14084480 B (13 MB)
 [m3vpss ]  8289: SYSTEM  : FREE SPACE : System Heap      = 13056 B, Mbx = 10240 msgs)
 [m3video]  8092: SYSTEM  : FREE SPACE : Frame Buffer     = 245104512 B (233 MB)
 [m3vpss ]  8289: SYSTEM  : FREE SPACE : SR0 Heap         = 14084480 B (13 MB)
 [m3vpss ] Received character 's'
12
 [m3video]  8092: SYSTEM  : FREE SPACE : Bitstream Buffer = 218103680 B (207 MB)
 [m3vpss ]  8289: SYSTEM  : FREE SPACE : Frame Buffer     = 240794496 B (229 MB)
 [c6xdsp ] Remote Debug Shared Memory @ 0xbf000000
 [m3video] Remote Debug Shared Memory @ 0xbf005020
 [m3vpss ] Remote Debug Shared Memory @ 0xbf00a040
 [m3video] Received character 's'
14
 [m3video]  8092: SYSTEM: Opening MsgQ [VPSS-M3_MSGQ] ...
 [m3vpss ]  8289: SYSTEM  : FREE SPACE : Bitstream Buffer = 218103680 B (207 MB)
 [m3video]  8093: SYSTEM  : FREE SPACE : Tiler 8-bit      = 134217728 B (128 MB)  - TILER ON
 [m3vpss ]  8290: SYSTEM  : FREE SPACE : Tiler 8-bit      = 134217728 B (128 MB)  - TILER ON
 [m3video]  8093: SYSTEM  : FREE SPACE : Tiler 16-bit     = 134217728 B (128 MB)  - TILER ON
 [m3vpss ]  8290: SYSTEM  : FREE SPACE : Tiler 16-bit     = 134217728 B (128 MB)  - TILER ON
 [m3video]  8127: SYSTEM  : Initializing Links ... DONE !!!
 [m3vpss ]  8408: SYSTEM  : Initializing Links ... DONE !!!
 [c6xdsp ] Remote Debug Shared Memory @ 0xbf000000
 [m3video] Remote Debug Shared Memory @ 0xbf005020
 [m3vpss ] Remote Debug Shared Memory @ 0xbf00a040
 [m3vpss ]  8408: SYSTEM  : Set Static L3 pressure for HDVPSS as High
 [c6xdsp ]  7294: SYSTEM: Opening MsgQ Heap [IPC_MSGQ_MSG_HEAP] ...
 [c6xdsp ]  7294: SYSTEM: Creating MsgQ [DSP_MSGQ] ...
 [c6xdsp ]  7294: SYSTEM: Creating MsgQ [DSP_ACK_MSGQ] ...
 [c6xdsp ]  7294: SYSTEM: Notify register to [HOST] line 0, event 15 ...
 [c6xdsp ]  7295: SYSTEM: Notify register to [VIDEO-M3] line 0, event 15 ...
 [c6xdsp ]  7295: SYSTEM: Notify register to [VPSS-M3] line 0, event 15 ...
 [c6xdsp ]  7295: SYSTEM: IPC init DONE !!!
 [c6xdsp ]  7297: MEM: Shared Region 2: Base = 0xb0000000, Length = 0x0e9c0000 (233 MB)
 [c6xdsp ]  7297: MEM: Shared Region 1: Base = 0x90000000, Length = 0x0d000000 (208 MB)
 [c6xdsp ]  7297: SYSTEM  : System Common Init Done !!!
 [c6xdsp ]  7123: SYSTEM  : System DSP Init in progress !!!
 [c6xdsp ]  7123: SYSTEM  : RpeServer_init() done... Ret Val 0!!!
 [c6xdsp ]  7300: SYSTEM: Creating ListMP [DSP_IPC_OUT_19] in region 0 ...
 [c6xdsp ]  7300: SYSTEM: Creating ListMP [DSP_IPC_IN_19] in region 0 ...
 [c6xdsp ]  7300: SYSTEM: ListElem Shared Addr = 0xbf291c80
 [c6xdsp ]  7301: SYSTEM: Creating ListMP [DSP_IPC_OUT_20] in region 0 ...
 [c6xdsp ]  7301: SYSTEM: Creating ListMP [DSP_IPC_IN_20] in region 0 ...
 [c6xdsp ][module] ti81xxfb probe done.
  7301: SYSTEM: ListElem Shared Addr = 0xbf2b1680
 [c6xdsp ]  7302: SYSTEM: Creating ListMP [DSP_IPC_OUT_21] in region 0 ...
 [c6xdsp ]  7302: SYSTEM: Creating ListMP [DSP_IPC_IN_21] in region 0 ...
 [c6xdsp ]  7302: SYSTEM: ListElem Shared Addr = 0xbf2HDMI W1 rev 2.0
d1080
 [c6xdsp ]  7303: SYSTEM: Creating ListMP [DSP_IPC_OUT_24] in region 0 ...
 [c6xdsp ]  7[module] ti81xx_hdmi probe done.
303: SYSTEM: Creating ListMP [DSP_IPC_IN_24] in region 0 ...
 [c6xdsp ]  7303: SYSTEM: ListElem Shared Addr = 0xbf2f0a80
 [c6xdsp ]  7304: SYSTEM: Creating ListMP [DSP_IPC_OUT_25] in region 0 ...
 [c6xdsp ]  7304: SYSTEM: Creating ListMP [DSP_IPC_IN_25] in region 0 ...
 [c6xdsp ]  7304: SYSTEM: ListElem Shared Addr = 0xbf30e580
 [c6xdsp ] !!WARNING.Resource already registered:2
 [c6xdsp ]  7130: SYSTEM  : Initializing Links !!!
 [c6xdsp ]  7304: SYSTEM  : FREE SPACE : System Heap      = 10268448 B, Mbx = 10240 msgs)
 [c6xdsp ] Received character 's'
15
/mnt/dvrrdk/tg3/opt/dvr_rdk/ti816x
18
 [c6xdsp ]  7140: SYSTEM  : Initializing Links ... DONE !!!
 [c6xdsp ]  7140: SYSTEM  : System DSP Init Done !!!
I2C No Ack
 
 ORG 0x46c00524: 0
 NEW 0x46c00524: 2
 
root@dm816x:/mnt/dvrrdk/tg3/opt/dvr_rdk/ti816x# fbset

ti81xxfb ti81xxfb: failed to start.
open /dev/fb0: Operation not permitted

 tracking error ,i find the error in the function  vps_grpx_start(),the following codes are cause the error,

how can i fixed the error ?


 static int vps_grpx_start(struct vps_grpx_ctrl *gctrl)
{
 int r = 0;
 VPSSDBG("start grpx%d\n", gctrl->grpx_num);
 if ((gctrl == NULL) || (gctrl->handle == NULL))
  return -EINVAL;

 if (!gctrl->gstate.isstarted) {
  grpx_pre_start(gctrl);
  /*start everything over, set format,
    params, queue buffer*/
  r = vps_fvid2_setformat(
   gctrl->handle,
   (struct fvid2_format *)gctrl->inputf_phy);

  if (r == 0) {
   if (gctrl->gparams->regparams.scenable)
    gctrl->glist->scparams =
        (struct vps_grpxscparams *)gctrl->gscp_phy;

   r = vps_fvid2_control(gctrl->handle,
       IOCTL_VPS_SET_GRPX_PARAMS,
       (struct vps_grpxparamlist *)
      gctrl->glist_phy,
        NULL);
     VPSSERR(" r = %d\n",r);  //   error  r=-1: the return value is -1 

  }

  if (r == 0)
   r = vps_fvid2_queue(gctrl->handle,
       (struct fvid2_framelist *)
          gctrl->frmls_phy,
       0);

  if (r == 0)
   r = vps_fvid2_start(gctrl->handle, NULL);


  if (!r)
   gctrl->gstate.isstarted = true;
 }
 return r;
}

int vps_fvid2_control(void *handle,
        u32 cmd,
        void *cmdargs,
        void *cmdstatusargs)
{
 struct vps_fvid2_ctrl *fctrl = (struct vps_fvid2_ctrl *)handle;
 int status;
 struct timeval etime, stime;
 u32 td = 0;

 if (vps_check_fvid2_ctrl(handle))
  return -EINVAL;

 VPSSDBG("send control with cmd 0x%08x\n", cmd);
 /*assembel the structure*/
 fctrl->fctrlprms->command = VPS_FVID2_CONTROL;
 fctrl->fctrlprms->fvid2handle = (void *)fctrl->fvid2handle;
 fctrl->fctrlprms->cmd = cmd;
 fctrl->fctrlprms->cmdargs = cmdargs;
 fctrl->fctrlprms->cmdstatusargs = cmdstatusargs;
 fctrl->fctrlprms->returnvalue = VPS_FVID2_M3_INIT_VALUE;

 fctrl->cmdprms->cmdtype = VPS_FVID2_CMDTYPE_SIMPLEX;
 fctrl->cmdprms->simplexcmdarg = (void *)fctrl->fctrlprms_phy;
 /*send the event*/
 #ifdef CONFIG_TI81XX_VPSS_SYSNLINK_NOTIFY
 status = Notify_sendEvent(fctrl->rmprocid,
      fctrl->lineid,
      fctrl->notifyno,
      fctrl->cmdprms_phy,
      1);
 #else
 status = notify_send_event(fctrl->rmprocid,
      fctrl->lineid,
      fctrl->notifyno,
      fctrl->cmdprms_phy,
      1);
 #endif

 if (status < 0) {
  VPSSERR("send control with cmd 0x%08x status 0x%08x\n",
     cmd, status);
  return -EINVAL;
 } else {
  do_gettimeofday(&stime);
  etime = stime;
  while (fctrl->fctrlprms->returnvalue ==
   VPS_FVID2_M3_INIT_VALUE) {

   usleep_range(100, 300);
   if (vps_timeout) {
    do_gettimeofday(&etime);
    td = time_diff(stime, etime);
    if (vps_timeout < td) {
     VPSSERR("contrl event 0x%x timeout\n",
      cmd);
     return -ETIMEDOUT;
    }
   }
  }
 }

 VPSSDBG("control event 0x%x return %d within %d ms.\n",
  cmd,
  fctrl->fctrlprms->returnvalue,
  td);
     return fctrl->fctrlprms->returnvalue;   // here  fctrl->fctrlprms->returnvalue is -1

}