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.

RTOS: VIP/VPDMA Firmware load in VPDMA_LIST_ADDR makes the system hangs in Jacinto DRA7xx

Other Parts Discussed in Thread: SYSBIOS

Tool/software: TI-RTOS

We are trying to write a Video Input Port(VIP) driver for DRA74xx processor which should finally transfer data to a DDR location via VPDMA.

The decoder TW9966 which gives camera data in BT656 format that is interfaced to VIP1 Slice1-Port A (8 lines).Following is the VIP initialization of YUV422 input in
BT656.

//reset port
write_vreg(VIP_PARSER_PORTA_0, VIP_SW_RESET);
SAL_Delay(200);
write_vreg(VIP_PARSER_PORTA_0, 0);

//set port enable
val = 0;
val |= VIP_PORT_ENABLE;
write_vreg(VIP_PARSER_PORTA_0, val);

//data interface
val = 0;
insert_field(&val, DUAL_8B_INTERFACE, VIP_DATA_INTERFACE_MODE_MASK, VIP_DATA_INTERFACE_MODE_SHFT);
write_vreg(VIP_PARSER_MAIN_CFG, val);
//sync type
val = read_vreg(VIP_PARSER_PORTA_0);
insert_field(&val, EMBEDDED_SYNC_SINGLE_YUV422, VIP_SYNC_TYPE_MASK, VIP_SYNC_TYPE_SHFT);
write_vreg(VIP_PARSER_PORTA_0, val);

But when i am trying to initialize the firmware of VPDMA to VPDMA_LIST_ADDR ,the system hangs.

extern const unsigned char vpdma_fw[];
write_sreg(VPDMA_LIST_ADDR, (unsigned int)vpdma_fw);

Can you let me know why the system hangs?. We have kept the op-codes of VPDMA firmware in a global array and trying to point the address of the same. Is this method of loading firmware ok? Have attached the vpdma hex code used.

This code is taken from “kernel/firmware/vpdma-1b8.fw” Is this version of firmware and the way VPDMA_LIST_ADDR initialization are ok ?Please help us on the same.

Thanks for the support.

With regards,
Jeyaseelan

  • Regarding your changes:
    • You are not supposed to change the VIP driver for using different decoder, You should write a subdev driver that talks to VIP driver
    • VPDMA driver loading is already present in the VPDMA driver, why are you re-writing it?
    • The reason system hangs because you are not passing physical address, rather a kernel virtual address, This is not right
    • Use the exsting VPDMA driver, it works well


    Regards,
    Nikhil D
  • Thanks for the reply. I have posted the same in TIE2E also. Jacinto processor what I use has 2 cores with A15 running linux (ti-glsdk) and M4 running Sysbios. Here we need the driver for Sysbios M4 and it has no page translation(which is disabled so all reference is physical).On the other hand A15 is running with Linux from ti-glsdk package. I sense there is a conflict between M4 and A15 driver when both tries to access the same VIP register for VPDMA firmware load. Kindly confirm the same.

    Is it possible to configure the kernel in ti-glsdk not to include the VIP driver from linux side and also the loading of VPDMA firmware. If so can you let me know the steps.

    Following is the source reference we use for including in sysbios.

    elixir.free-electrons.com/.../ti-vpe
  • Hi Jeyaseelan,

    I have forwarded your question to a VIP expert.
    Can you just clarify which is the version of your SDK/Linux kernel?

    Regards,
    Yordan
  • Hi Yordon,

    The SDK version is : ti-processor-sdk-linux-automotive_dra7xx-evm_03_00_00_03
    Kernel version is : 4.4.14

    With regards,
    Jeyaseelan
  • Hi, What you are asking for is already there as part of * Vision SDK linux * infoadas If you explain your full usecase, you might be able to utilze one of this product which actually runs Linux and sysBIOS both together to realize some of the Vision and ADAS usecases. To answer your specific question:- VIP can be disabled from Linux by setting status="disabled"; property in device tree. Nikhil D
  • Hi Nikhil,

    We are planning to use TI Vision library for capture.Our use case is capturing analog camera input via TW9966 which in turn sends BT656 data to VIP.Since we want to distribute the processing across cores,we want video capture in M4 core,simple processing in DSP and sink the resultant video into weston running in AP.

    I have a firmware load issue when i try to use already made custom driver in sysbios which is again based on ti-vpe driver in linux where all calls to linux /v4l2 API's are replaced with sybios calls. I will now try removing this driver(ti-vpe) from kernel.

    With regards,
    Jeyaseelan
  • Using TI Vision library is our second option.We are trying now the first option of reusing the customized(based on ti-vpe) driver in sysbios.
  • Hi Nikhil,

    I am a newbie to kernel configuration.I have git pull the kernel repository (customized ti glsdk for our board which is based on dra74xx_evm board )and have a local workspace copy of it(uboot/kernel/rootfs). Which are the files now i need to edit?.I found a dra74xx.dtsi file which has some vip registers defined. But there is no option for disabling vip " for VIP can be disabled from Linux by setting status="disabled" in device tree.Is this the file i have to edit.
    Also let me know do i have to rebuild the kernel after editing the device file.
    I tried make menuconfig for configuring kernel.But not found ti-vpe driver under drivers->media->v42l.Can you let me know the step by step procedures how to remove the existing driver.

    With regards,
    Jeyaseelan

  • Hi, Please refer to sysbios imeplementation for reference if you are re writing a driver yourself. Referring to linux wont help because linux has lot of abstractions. some of the ioread/write functions take care of memory barrieers etc which linux driver wont care about. PS: Please raise different query for different topics. Do not mix and match BIOS and Linux queries. Nikhil D
  • Thanks Nikhil for the answers you provided. We just opted for linux as it is a open source.You guys have done a good job in writing this driver and is still informative in many ways :-)
    Thanks