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.

DDR3 512MB settings and video capture

I have a custom dm8148 board with 512MB DDR3. I am using PSP04.0.4 and SDK5.04

I was using default settings from SDK and however my board can only work on 1080p@15

so I guess the problem coming from DDR3 settings.

Then, I made related changes according to the TI wiki ezsdk_memory mapping, and I worte What I have done in the end of this poster.

My bootargs is: setenv bootargs 'console=ttyO0,115200n8 rootwait rw mem=176M earlyprintk notifyk.vpssm3_sva=0x8DB00000 vram=50M ti814xfb.vram=0:16M,1:16M,2:6M root=/dev/nfs nfsroot=10.0.1.27:/root/targetfs ip=dhcp'

After applying the changes and I rebuilt linux uboot dsp syslink and media-controller and copied them into targetfs.

Then I was trying to load the module by following scripts;

prcm_config_app s

insmod /home/root/dm814x-evm/lib/modules/2.6.37/kernel/drivers/dsp/syslink.ko

until [[ -e /dev/syslinkipc_ProcMgr && -e /dev/syslinkipc_ClientNotifyMgr ]]

do sleep 1.5 done

./slaveloader startup VIDEO-M3 /usr/share/ti/ti-media-controller-utils/dm814x_hdvicp.xem3

./slaveloader startup VPSS-M3 ./ti814x_hdvpss_512M.xem3

I did not get any return errors so I assume the two fireware get loaded correctly.

However, then I was trying to insert vpss.ko

insmod /home/root/HDVPSS_01_00_01_37/ti814x/rebuilt_firmwares/vpss.ko sbufaddr=0x8DE00000 mode=hdmi:1080p-60

I got folowing errors for many time.

notify_shm_drv_sendevent failed! status = 0xfffffff0

notify_send_event failed! status = 0xfffffff0

I searched around in this forum and found many people has similar problem, but I didnot see a clear soluton.

Could anyone point out what I missed here to make my board can work with 512MB DDR3 settings?

=============================== The chages I made are as followings; #Modifications for DDR3 =====================================

Changes inside uboot 1.uboot/ti8148_evm.h

/** * Physical Memory Map */

#define CONFIG_NR_DRAM_BANKS 2

/*we have 2 banks of DRAM */

#define PHYS_DRAM_1 0x80000000 /* DRAM Bank #1 */

#define PHYS_DRAM_1_SIZE 0x10000000 /* 256MB */

#define PHYS_DRAM_2 0xA0000000

#define PHYS_DRAM_2_SIZE 0x10000000 /* 256MB*/

2.uboot/ddr_defs_ti814x.h

#define PG2_1_DMM_LISA_MAP__0 0x0

#define PG2_1_DMM_LISA_MAP__1 0x0 

#define PG2_1_DMM_LISA_MAP__2 0x80540300

#define PG2_1_DMM_LISA_MAP__3 0xA0540300

=========== changes inside Linux kernel

board-support/media-controller-utils_2_03_01_14/src/mm_host_util/memsegdef_dm81xxbm_512M.c

board-support/media-controller-utils_2_03_01_14/src/firmware_loader

 Regards,

Jun

  • update:

    If I following the steps in the ezsdk_memory_map and set

    notifyk.vpssm3_sva=0xBF900000

    and vpss sbufaddr=0xBFB00000

    The error is gone.

    However, could any TI expert clarify this for me.

    If I am using 512MB DDR3, and  I want to use v4l2 vpss firmware, I just need follow the steps in ezsdk_memory mapping.

    And donot need load ti814x_hdvpss_512M?

    Am I right?

     

    Regards,

     

    Jun

     

     

  • update::

    There is certain inconsistence between ezsdk_memory_mapping and vpss user guide.

    In ezsdk_memory map wiki page:

    Linux Notify Module Memory

    The memory for kernel Notify module is specified through Linux bootargs. This address also used in the MC-HDVPSS firmware.
    • notifyk.vpssm3_sva=<addr of MC_HDVPSS_NOTIFY_MEM>

    FbDev Memory

    Fbdev memory address is specified through the sbufaddrparameter.
    • insmod vpss.ko sbufaddr=<addr of MC_HDVPSS_V4L2_FBDEF_MEM>

    And based on that excel file

    media:EZSDK_MemCfg.zip ,
     

    notifyk.vpssm3_sva=0xBF900000

    and vpss sbufaddr=0xBFB00000

    With this settings, i can insert the module vpss.ko and do certain video capture with v4l2.xem , however it will fail after around 1000 video frames.

    Please refer to this post: http://e2e.ti.com/support/dsp/davinci_digital_media_processors/f/716/t/186252.aspx

     

    =================================================

    Info from vpss user guide:

    VPSS-M3 Firmware                         Notify Buffer Default Value(notifyk.vpssm3_sva)      Sharing Buffer Default Value(sbufaddr)
    ti814x_hdvpss_512M.xem3           0x8DB00000                                                                        0x8DE00000

    With this settings, I can not insert vpss and will be returned with error like:

    notify_shm_drv_sendevent failed! status = 0xfffffff0

    notify_send_event failed! status = 0xfffffff0

    =============================================

    I tested this with dm814x_hdvpss_v4l2.xem3 or dm814x_hdvpss_512.xem3 and it is the same.

    I also need be clarfied with 512MB if I want to v4l2 capture, do I need dm814x_hdvpss_v4l2.xem3 instead of dm814x_hdvpss_512.xem3 ?

    Based on the info from vpss user guide it seems I only need dm814x_hdvpss_512.xem3, with which I am not able to do any capture.

     

    Regards,

    Jun

  • One more thing need to be added:

    With

    notifyk.vpssm3_sva=0xBF900000

    and vpss sbufaddr=0xBFB00000

    And after running ./slaveloader startup VPSS-M3 ./ti814x_hdvpss_512M.xem3 ./mm_dm81xxbm_512M.bin

    Then if trying insert vpss.ko, the board will be stuck there and nothing will happen.

     

  • Could anyone confirm the following things:

    When the DM8148 working with 512MB DDR3 and we want to use v4l2 capture

    1. Which firmware I should load: dm814x_hdvpss_v4l2..xem3 or ti814x_hdvpss_512M.xem3?

    2. If dm814x_hdvpss_v4l2.xem3, should I insert the firmware directly or like firmware_loader 2 dm814x_hdvpss_v4l2.xem3 ./ mm_dm81xxbm_512M.bin

     and what is right address for  sbufaddr and notifyk.vpssm3_sva?

     sbufaddr=0xBFB00000and notifyk.vpssm3_sva=0xBF900000 or  notifyk.vpssm3_sva= 0x8DB00000 , sbufaddr=0x8DE00000?

    3. If ti814x_hdvpss_512M.xem3,what is the right address for sbufaddr and notifyk.vpssm3_sva

     based on the ezsdk memory map, it should be sbufaddr=0xBFB00000and notifyk.vpssm3_sva=0xBF900000

     Based on the vpss user guide, it should be notifyk.vpssm3_sva= 0x8DB00000 , sbufaddr=0x8DE00000, and I should use ti814x_hdvpss_512M.xem3.(I will have

    notify_send_event failed! status = 0xfffffff0 error, if using this setting)

    Regards,

    Jun

     


  • Hi,

    Answers inline,

    Jun_Zhang said:
    Which firmware I should load: dm814x_hdvpss_v4l2..xem3 or ti814x_hdvpss_512M.xem3?

    If you want to use only V4L2 caputure + V4L2 display + fbdev than ti814x_hdvpss_512M.xem3 is fine,  if you want to use encode/decode or any of OpenMax components you need to use dm814x_hdvpss_v4l2..xem3, but you need to recompile it for 512MB as by default its compiled for 1G. Please refer to twiki for configuring dm814x_hdvpss_v4l2..xem3 to 512MB@http://processors.wiki.ti.com/index.php/EZSDK_Memory_Map#Changing_Memory_Map_For_512MB_DM814x_Board

    Jun_Zhang said:

    If dm814x_hdvpss_v4l2.xem3, should I insert the firmware directly or like firmware_loader 2 dm814x_hdvpss_v4l2.xem3 ./ mm_dm81xxbm_512M.bin

     and what is right address for  sbufaddr and notifyk.vpssm3_sva?

    Please refer to video driver userguide@ http://processors.wiki.ti.com/index.php/TI81XX_VPSS_Video_Driver_User_Guide#Installation_Guide

    Jun_Zhang said:

    If ti814x_hdvpss_512M.xem3,what is the right address for sbufaddr and notifyk.vpssm3_sva

     based on the ezsdk memory map, it should be sbufaddr=0xBFB00000and notifyk.vpssm3_sva=0xBF900000

     Based on the vpss user guide, it should be notifyk.vpssm3_sva= 0x8DB00000 , sbufaddr=0x8DE00000, and I should use ti814x_hdvpss_512M.xem3.(I will have

    notify_send_event failed! status = 0xfffffff0 error, if using this setting)

    Same as answer 2

    Regards,

    Hardik Shah

  • Hi Hardik,

    Really appreciate your help on this matter and thanks for your answer.

    However, could you please clarify further about following ?

    1. My usecase  need encoder/decoder and other omx components to implement video/audio processing.

    So, I guess I have to stick on v4l2.xem3. And based on the ezsdk_map wiki and the media:EZSDK_MemCfg.zip  file (I copy the related part below)

     I should pass these address to M3:  sbufaddr=0xBFB00000and notifyk.vpssm3_sva=0xBF900000. 

    Based on this I can insert the vpss without any error.

    So I guess this address is right for my 512MB DDR3 settings, right?

    ==============info from TI ezsdk memory map wiki ======================================

    EZSDK_MemCfg.zip 512MB sectuib

    HDVPSS_NOTIFY_MEM 2 200000 BF900000
    HDVPSS_V4L2_FBDEF_MEM 2 200000 BFB00000

     

    http://processors.wiki.ti.com/index.php/EZSDK_Memory_Map#Changing_Memory_Map_For_512MB_DM814x_Board

    Linux Notify Module Memory

    The memory for kernel Notify module is specified through Linux bootargs. This address also used in the MC-HDVPSS firmware.
    • notifyk.vpssm3_sva=<addr of MC_HDVPSS_NOTIFY_MEM>

    FbDev Memory

    Fbdev memory address is specified through the sbufaddrparameter.
    • insmod vpss.ko sbufaddr=<addr of MC_HDVPSS_V4L2_FBDEF_MEM>

    ===============================================================================================

    2. 

    HardikShah said:

    If you want to use only V4L2 caputure + V4L2 display + fbdev than ti814x_hdvpss_512M.xem3 is fine,  if you want to use encode/decode or any of OpenMax components you need to use dm814x_hdvpss_v4l2..xem3, but you need to recompile it for 512MB as by default its compiled for 1G. Please refer to twiki for configuring dm814x_hdvpss_v4l2..xem3 to 512MB@http://processors.wiki.ti.com/index.php/EZSDK_Memory_Map#Changing_Memory_Map_For_512MB_DM814x_Board

    Please be aware that I have no access to the dm814x_hdvpss_v4l2..xem3 source code, and I am only able to do following things in the uboot or linux kernel and then make new modules like vpss.ko. So could you please tell me how to rebuid  dm814x_hdvpss_v4l2..xem3  for 512MB? Or you just mean rebuild firmware_loader for 512MB? which I already did.
     

    Step 2.1: Change Linux Memory size

    Change Linux memory size to 176 MB . This can be done by setting the MEM to 176M in bootargs

    Step 2.2: Change Location of Video Frame Buffers

    Change location of IPC_SR_FRAME_BUFFERS to 0xAB000000. This change needs to be done in the firmware loader input file. Update the system_addr and slave_virtual_addr values for IPC_SR_FRAME_BUFFERS from 0xB3D00000 to 0xAB000000 in the source memsegdef_default.c ($(EZSDK_ROOT)/board-support/media-controller-utils_<REL-TAG>/src/firmware_loader). Rebuild the firmware loader and copy the generated firmware loader in the target filesystem ($(EZSDK_ROOT)/filesys/usr/bin)

    Step 2.3: Update memory map for DSP

    Step 2.4: Update memory map for Linux side app

     
    Best Regards,
     
    Jun
  • Hi,

    Jun_Zhang said:

    1. My usecase  need encoder/decoder and other omx components to implement video/audio processing.

    So, I guess I have to stick on v4l2.xem3. And based on the ezsdk_map wiki and the media:EZSDK_MemCfg.zip  file (I copy the related part below)

    Yes you will have to stick to v4l2.xem3.

    Regarding your Questions in section 2 I am not the correct guy for EZSDK memory map. I will forward it to the concerned team here and they will reply.

    Regards,

    Hardik Shah

  • Hi Hardik,

    Did you have the chance to get any answer from other TI employee?

    I am expecting this 512MB-DDR3 setting info for v4l2.xem3 to rule out my v4l2 capture issue.

    Best Regards,

    Jun