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.

HDVICP2 - HDVPSS Dependency: Boot time optimization

Hello,


we do not use any video en-/decoding on the dm814x. During boot time analysis we realized that loading the HDVICP2 firmware takes about 1.8 seconds. Since our application works fine without loading this firmware, we just skipped this in the start scripts. It would either speed up the device start and we can use its memory for your own purposes.

But now loading the HDVPSS firmware takes 5.3 seconds instead of the 0.92 seconds before! Are there any dependencies? How to use the framebuffer/powervr without HDVICP2?


Here the benchmarks:

[   0.000|   0.000] ####################################################################
[   0.000|   0.000] ############## Failed to load HDVICP FW !!! ########################
[   0.015|   0.015] ####################################################################
[   0.015|   0.015] Loading HDVPSS Firmware
[   0.031|   0.031] FIRMWARE: Memory map bin file not passed
[   0.031|   0.031] Usage : firmware_loader <Processor Id> <Location of Firmware> <start|stop> [-mmap <memory_map_file>] [-i2c <0|1>]
[   0.047|   0.047] ===Mandatory arguments===
[   0.047|   0.047] <Processor Id>         0: DSP, 1: Video-M3, 2: Vpss-M3
[   0.062|   0.062] <Location of Firmware> firmware binary file
[   0.062|   0.062] <start|stop>           to start/stop the firmware
[   0.062|   0.062] ===Optional arguments===
[   0.062|   0.062] -mmap                  input memory map bin file name
[   0.078|   0.078] -i2c                   0: i2c init not done by M3, 1(default): i2c init done by M3
[   0.078|   0.078] FIRMWARE: isI2cInitRequiredOnM3: 0
[   0.078|   0.078] FIRMWARE: Default memory configuration is used
[   0.078|   0.078] Firmware Loader debugging not configured
[   0.094|   0.094] Default FL_DEBUG: warning
[   0.094|   0.094] Allowed FL_DEBUG levels: error, warning, info, debug, log
[   0.125|   0.125] MemCfg: DCMM (Dynamically Configurable Memory Map) Version :  2.1.2.1
[   5.344|   5.344] FIRMWARE: 2 start Successful
########################## CHECKPOINT ##################################

and with HDVICP

[   0.000|   0.000] Loading HDVICP2 Firmware
[   0.047|   0.047] FIRMWARE: Memory map bin file not passed
[   0.047|   0.047] Usage : firmware_loader <Processor Id> <Location of Firmware> <start|stop> [-mmap <memory_map_file>] [-i2c <0|1>]
[   0.063|   0.063] ===Mandatory arguments===
[   0.063|   0.063] <Processor Id>         0: DSP, 1: Video-M3, 2: Vpss-M3
[   0.063|   0.063] <Location of Firmware> firmware binary file
[   0.063|   0.063] <start|stop>           to start/stop the firmware
[   0.078|   0.078] ===Optional arguments===
[   0.078|   0.078] -mmap                  input memory map bin file name
[   0.078|   0.078] -i2c                   0: i2c init not done by M3, 1(default): i2c init done by M3
[   0.094|   0.094] FIRMWARE: isI2cInitRequiredOnM3: 0
[   0.094|   0.094] FIRMWARE: Default memory configuration is used
[   0.094|   0.094] Firmware Loader debugging not configured
[   0.094|   0.094] Default FL_DEBUG: warning
[   0.109|   0.109] Allowed FL_DEBUG levels: error, warning, info, debug, log
[   0.141|   0.141] MemCfg: DCMM (Dynamically Configurable Memory Map) Version :  2.1.2.1
[   1.813|   1.813] FIRMWARE: 1 start Successful
########################## CHECKPOINT ##################################
[   1.828|   0.015] Loading HDVPSS Firmware
[   1.828|   0.015] FIRMWARE: Memory map bin file not passed
[   1.828|   0.015] Usage : firmware_loader <Processor Id> <Location of Firmware> <start|stop> [-mmap <memory_map_file>] [-i2c <0|1>]
[   1.844|   0.031] ===Mandatory arguments===
[   1.844|   0.031] <Processor Id>         0: DSP, 1: Video-M3, 2: Vpss-M3
[   1.844|   0.031] <Location of Firmware> firmware binary file
[   1.859|   0.046] <start|stop>           to start/stop the firmware
[   1.859|   0.046] ===Optional arguments===
[   1.859|   0.046] -mmap                  input memory map bin file name
[   1.859|   0.046] -i2c                   0: i2c init not done by M3, 1(default): i2c init done by M3
[   1.875|   0.062] FIRMWARE: isI2cInitRequiredOnM3: 0
[   1.875|   0.062] FIRMWARE: Default memory configuration is used
[   1.875|   0.062] Firmware Loader debugging not configured
[   1.875|   0.062] Default FL_DEBUG: warning
[   1.891|   0.078] Allowed FL_DEBUG levels: error, warning, info, debug, log
[   1.891|   0.078] MemCfg: DCMM (Dynamically Configurable Memory Map) Version :  2.1.2.1
[   2.734|   0.921] FIRMWARE: 2 start Successful
########################## CHECKPOINT ##################################

I ve attached the startscript we re curently using:

#!/bin/sh
#
# manage HDVPSS Engine firmware
#

PATH=$PATH:/usr/share/ti/ti-media-controller-utils
HDVICP_ID=1
HDVICP_FW=/usr/share/ti/ti-media-controller-utils/dm814x_hdvicp.xem3
HDVPSS_ID=2
HDVPSS_FW=/usr/share/ti/ti-media-controller-utils/dm814x_hdvpss.xem3

configure_lcd()
{
	echo "Configuring fb0 to LCD"
	echo 1:dvo2 > /sys/devices/platform/vpss/graphics0/nodes
	echo 0 > /sys/devices/platform/vpss/display1/enabled
	echo 25180,640/16/114/30,480/10/32/3,1 > /sys/devices/platform/vpss/display1/timings
	echo triplediscrete,rgb888,0/0/1/1 > /sys/devices/platform/vpss/display1/output
	echo 1 > /sys/devices/platform/vpss/display1/enabled
	fbset -xres 640 -yres 480 -vxres 640 -vyres 480
}


case "$1" in
	start)
		echo "Configuring 'Power, reset, and clock manager'..."
		prcm_config_app s
		MODPATH=/lib/modules/$(uname -r)
		if [ ! -d $MODPATH ] ; then
			echo "####################################################################";
			echo "################## Wrong kernel for Rootfs! ########################";
			echo "####################################################################";
			echo "Path not found: $MODPATH";
			exit
		fi
		SYSLINK_PATH=`find $MODPATH -name 'syslink.ko'`
		if [ $? -ne 0 ] ; then
			echo "####################################################################";
			echo "############## Syslink Module not found !!! ########################";
			echo "####################################################################";
			exit
		fi
		echo "Loading Syslink module..."
		insmod $SYSLINK_PATH
		if [ ! -e /dev/syslinkipc_ProcMgr -o ! -e /dev/syslinkipc_ClientNotifyMgr ] ; then
			echo -n "Probing syslink devices..."
			until [[ -e /dev/syslinkipc_ProcMgr -a -e /dev/syslinkipc_ClientNotifyMgr ]]
			do
				usleep 100000
			done
			echo " done."
		fi
		echo "Loading HDVICP2 Firmware"
		firmware_loader $HDVICP_ID $HDVICP_FW start -i2c 0
		if [ $? -ne 0 ] ; then
			echo "####################################################################";
			echo "############## Failed to load HDVICP FW !!! ########################";
			echo "####################################################################";
			exit
		fi
		echo "Loading HDVPSS Firmware"
		firmware_loader $HDVPSS_ID $HDVPSS_FW start -i2c 0
		if [ $? -ne 0 ] ; then
			echo "####################################################################";
			echo "############## Failed to load HDVPSS FW !!! ########################";
			echo "####################################################################";
			exit
		fi
		echo "Loading VPSS Module"
		modprobe vpss sbufaddr=0xBFB00000
		echo "Loading Framebuffer Module"
		modprobe ti81xxfb vram=0:16M
		echo "Configuring LCD"
		configure_lcd
		;;
	stop)
		echo "Unloading ti81xxfb kernel module..."
		rmmod ti81xxfb
		echo "Unloading vpss kernel module..."
		rmmod vpss
		echo "Unloading HDVPSS Firmware"
		firmware_loader $HDVPSS_ID $HDVPSS_FW stop > /dev/null
		echo "Unloading HDVICP2 Firmware"
		firmware_loader $HDVICP_ID $HDVICP_FW stop > /dev/null
		echo "Unloading syslink kernel module..."
		rmmod syslink
		;;
	*)
		echo "Usage: /etc/init.d/load-hd-firmware.sh {start|stop}"
		exit 1
		;;
esac

exit 0

The kernel bootargs are

console=ttyO0,115200n8 rootwait ubi.mtd=6 root=ubi0:rootfs rootfstype=ubifs rw mem=169M earlyprintk notifyk.vpssm3_sva=0xBF900000 vram=16M ti814xfb.vram=0:16M ip=off noinitrd libata.force=1.5G

Thanks,

Charly

 

  • Hi Charly,

    Are you on EZSDK 5.05.02.00?

    Please refer to the below e2e thread for info:

    http://e2e.ti.com/support/dsp/davinci_digital_media_processors/f/717/p/205877/743707.aspx#743707

    Best regards,
    Pavel

  • Hello Pawel,


    thanks for this link. It seems that the "HDVPSS-M3 standalone firmware" would be the right option for me. Valan wrote

    The other option is to look at the HDVPSS-M3 standalone firmware, present in HDVPSS driver component if you are not using any of the OMX components.

    but it was never answered (at least I haven't found it) how to get the "HDVPSS-M3 standalone firmware". It should be a 'binary (blackbox)' in the EZSDK - but I cannot find it in the "ezsdk_dm814x-evm_5_05_02_00".

    There is a VPSS "dm814x_hdvpss.xem3" (which I'm using) and another for v4l2. Should I find also a third?

    Thx, Charly

  • Charly,

    Karl Krach said:
    The other option is to look at the HDVPSS-M3 standalone firmware, present in HDVPSS driver component if you are not using any of the OMX components.

    In this case, you should use V4L2, not OMX. And you should use the M3 firmware coming with PSP package (ti814x_hdvpss_1G.xem3 or ti814x_hdvpss_512M.xem3) instead of M3 firmware coming with EZSDK package (dm814x_hdvpss.xem3).

    See the below links for more info:

    http://processors.wiki.ti.com/index.php/TI81XX_PSP_VPSS_Video_Driver_User_Guide

    http://processors.wiki.ti.com/index.php/TI81XX_PSP_VIDEO_CAPTURE_Driver_User_Guide

    http://downloads.ti.com/dsps/dsps_public_sw/psp/LinuxPSP/TI81XX_04_04/04_04_00_02/index_FDS.html -> TI81xx HDVPSS binary package

    This M3 HDVPSS firmware (ti814x_hdvpss_1G.xem3 or ti814x_hdvpss_512M.xem3) is not supposed to be used with the M3 HDVICP2 firmware.

    Best regards,
    Pavel 

  • Pawel,

    thanks for your help. When working on this topic in February I struggled with the different PSP versions. We used the EZSDK 5.05.02.00 which comes with the PSP 04.04.00.01 - thus I thought I have to use the "HDVPSS binary package" of 04.04.00.01 - this was wrong.


    How I get it working:

    1. Even if our kernel comes from PSP 04.04.00.01, I used the VPSS binary from 04_04_00_02
    2. Even if the documentation says, that the addresses should be used from EZSDK (if having an EZSDK system) I used the addresses from the PSP documentation (notifyk.vpssm3_sva=0xA0000000 and sbufaddr=0xA0200000)
    3. I used the slaveloader (which comes with 04_04_00_01) instead of the firmware_loader from the EZSDK, even if the VPSS binary is from 04_04_00_02 (which has no slaveloader or firmware_loader binary included).
    4. I used the firmware_loader from the EZSDK to load the DSP
    5. I insert the syslink module first, then load the DSP binary and afterwards the VPSS binary (and all graphics modules)

    This looks (and is) very weird, but this is the only way how to get the VPSS (and display) working.

     

    Now I have some questions:

    1. What is the difference between the firmware_loader from the EZSDK (which fails to load the VPSS binary) and the slaveloader from the 04_04_00_01 HDVPSS binary package (which fails to load our DSP binary)?
    2. Why is the display turned off, when loading the DSP after the VPSS binary is loaded?
    3. Currently we use the memory map from http://processors.wiki.ti.com/index.php/EZSDK_Memory_Map#Memory_Map_in_the_current_EZSDK_.28version_5.02_onwards.29 with some modifications. But if the notifyk.vpssm3_sva is 0xA0000000 ("Second memory segment given…") this memory map cannot be valid for the new VPSS binary, is it?

     

    Best regards,

    Karl