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.

Linux/TMS320DM8148: vpss fail lead to DSP CORE interrupt disable

Part Number: TMS320DM8148
Other Parts Discussed in Thread: ADS7846, TPS65910, THS8200

Tool/software: Linux

I meet this strage problem in my DM8148 custom board.

Normally,  a program run in A8 -LINUX as gui , BIOS/6 program run in the dsp core. DSP program has a extend interrupt  from a FPGA happen every 1ms.

It work fine for most of my product at most time.

Occasionally,  I found the DSP interrupt  was disabled. and it was connect the VPSS fail.

when this happend , dmesg show that a log of  VPSS fail happend every 10-50 ms.

It said:  "failed to set tied venc  ",  or "failed to enable venc" (I forgot to record the acctual message ,just remember the word  "venc" at the end) 

The GUI program and window manager of linux  seems good when this vpss error happend.

After I found this message ,I stop the VPSS module, and the Dsp program seem to function correctly after vpss is stoped.

It seem the vpss module will do some thing to the CPU(maybe stop the NVIC globally) at error, case the DSP lost the interrupt at that time. 

How could I debug this problem?

  • Hi,

    Which software release are you using?

    Regards,

    Anuj

    Pathpartner Technology Pvt Ltd.

  • I use the linux kernel-2.6.37-psp4 come with the EZSDK-5.05, SYSLINK-2.02.
    An Ubuntu 12.04 for arm (armel) is used for system.
  • Hi Biao Yang,

    I am not verymuch familiar with DM8148 EZSDK.
    However, we can look into the issues if you can post complete logs starting from the boot till you face the error.
  • Thank you for you concern! I had fix the problem! I had fix the problem by change the vpss init script!

    I upload the log and the script (new fixed ,and old problem version in one file ). holp you can figureout the source of the problem.

    I think the interrupt handleing code had some bug. It case the ext int  blocked for a long time both in ARM and DSP.   

    I found that when I insert a USB disk  , the same problem (ext INT blocked) happend in DSP core.  I had to warning  the user no to do USB Insert and file copy when the board working

    //dmesg log

    Linux version 2.6.37 (kzw@kzw-virtual-machine) (gcc version 4.3.3 (Sourcery G++ Lite 2009q1-203) ) #5 Tue Jun 7 15:06:16 CST 2016
    CPU: ARMv7 Processor [413fc082] revision 2 (ARMv7), cr=10c53c7f
    CPU: VIPT nonaliasing data cache, VIPT aliasing instruction cache
    Machine: ct8148
    TI81xx: reserved VRAM size = 106954752 at -1386217472
    Memory policy: ECC disabled, Data cache writeback
    OMAP chip is TI8148 3.0
    SRAM: Mapped pa 0x402f1000 to va 0xfe400000 size: 0xf000
    On node 0 totalpages: 145920
    free_area_init_node: node 0, pgdat c05a5a5c, node_mem_map c05e0000
      Normal zone: 704 pages used for memmap
      Normal zone: 0 pages reserved
      Normal zone: 89408 pages, LIFO batch:15
      HighMem zone: 952 pages used for memmap
      HighMem zone: 54856 pages, LIFO batch:15
    pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
    pcpu-alloc: [0] 0
    Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 144264
    Kernel command line: root=/dev/mmcblk0p3 rootfstype=ext4 rw rootwait ip=off  console=ttyO0,115200n8 mem=352M mem=320M@0x9FC00000 notifyk.vpssm3_sva=0xBF900000 vmalloc=500M vram=102M ti814xfb.vram=0:48M,1:1M,2:1M ip=off printk.time=y earlyprink noinitrd
    [    0.000000] PID hash table entries: 2048 (order: 1, 8192 bytes)
    [    0.000000] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
    [    0.000000] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
    [    0.000000] Memory: 352MB 218MB = 570MB total
    [    0.000000] Memory: 571840k/571840k available, 116288k reserved, 223232K highmem
    [    0.000000] Virtual kernel memory layout:
    [    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
    [    0.000000]     fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)
    [    0.000000]     DMA     : 0xffc00000 - 0xffe00000   (   2 MB)
    [    0.000000]     vmalloc : 0xd6800000 - 0xf8000000   ( 536 MB)
    [    0.000000]     lowmem  : 0xc0000000 - 0xd6000000   ( 352 MB)
    [    0.000000]     pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
    [    0.000000]     modules : 0xbf000000 - 0xbfe00000   (  14 MB)
    [    0.000000]       .init : 0xc0008000 - 0xc0034000   ( 176 kB)
    [    0.000000]       .text : 0xc0034000 - 0xc0560000   (5296 kB)
    [    0.000000]       .data : 0xc0560000 - 0xc05a6400   ( 281 kB)
    [    0.000000] SLUB: Genslabs=11, HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
    [    0.000000] NR_IRQS:375
    [    0.000000] omap_hwmod: gpio2: softreset failed (waited 10000 usec)
    [    0.000000] omap_hwmod: gpio3: softreset failed (waited 10000 usec)
    [    0.000000] omap_hwmod: gpio4: softreset failed (waited 10000 usec)
    [    0.000000] IRQ: Found an INTC at 0xfa200000 (revision 5.0) with 128 interrupts
    [    0.000000] Total of 128 interrupts on 1 active controller
    [    0.000000] GPMC revision 6.0
    [    0.000000] Trying to install interrupt handler for IRQ368
    [    0.000000] Trying to install interrupt handler for IRQ369
    [    0.000000] Trying to install interrupt handler for IRQ370
    [    0.000000] Trying to install interrupt handler for IRQ371
    [    0.000000] Trying to install interrupt handler for IRQ372
    [    0.000000] Trying to install interrupt handler for IRQ373
    [    0.000000] Trying to install interrupt handler for IRQ374
    [    0.000000] Trying to install type control for IRQ375
    [    0.000000] Trying to set irq flags for IRQ375
    [    0.000000] OMAP clockevent source: GPTIMER1 at 20000000 Hz
    [    0.000000] Console: colour dummy device 80x30
    [    0.000000] Calibrating delay loop... 999.42 BogoMIPS (lpj=4997120)
    [    0.260000] pid_max: default: 32768 minimum: 301
    [    0.260000] Security Framework initialized
    [    0.260000] Mount-cache hash table entries: 512
    [    0.260000] CPU: Testing write buffer coherency: ok
    [    0.260000] devtmpfs: initialized
    [    0.260000] omap_voltage_early_init: voltage driver support not added
    [    0.260000] regulator: core version 0.5
    [    0.260000] regulator: dummy:
    [    0.260000] NET: Registered protocol family 16
    [    0.260000] OMAP GPIO hardware version 0.1
    [    0.260000] OMAP GPIO hardware version 0.1
    [    0.260000] OMAP GPIO hardware version 0.1
    [    0.260000] OMAP GPIO hardware version 0.1
    [    0.260000] omap_mux_init: Add partition: #1: core, flags: 4
    [    0.260000] registered ti814x_vpss device
    [    0.260000] registered TI814x on-chip HDMI device
    [    0.260000] 00000630 000008e9 00000634 9dfdf6a0
    [    0.270000] registered ti81xx_vidout device
    [    0.280000] bio: create slab <bio-0> at 0
    [    0.280000] SCSI subsystem initialized
    [    0.280000] usbcore: registered new interface driver usbfs
    [    0.280000] usbcore: registered new interface driver hub
    [    0.280000] usbcore: registered new device driver usb
    [    0.280000] USBSS revision 4ea2080b
    [    0.280000] omap_i2c omap_i2c.1: bus 1 rev4.0 at 400 kHz
    [    0.300000] omap_i2c omap_i2c.2: bus 2 rev4.0 at 400 kHz
    [    0.320000] omap_i2c omap_i2c.4: bus 4 rev4.0 at 400 kHz
    [    0.320000] Advanced Linux Sound Architecture Driver Version 1.0.23.
    [    0.320000] Switching to clocksource gp timer
    [    0.320000] musb-hdrc: version 6.0, host, debug=0
    [    0.320000] musb-hdrc musb-hdrc.0: dma type: pio
    [    0.320000] MUSB controller-0 revision 4ea20800
    [    0.320000] usb2phy: computed values rxcalib(15)DACs(33 15 16)
    [    0.320000] usb2phy: override computed values rxcalib(15)DACs(33 15 16)
    [    0.320000] usb2phy_config: musb(0) rxcalib done, rxcalib read value 6f70df86
    [    0.320000] musb-hdrc: ConfigData=0xde (UTMI-8, dyn FIFOs, bulk combine, bulk split, HB-ISO Rx, HB-ISO Tx, SoftConn)
    [    0.320000] musb-hdrc: MHDRC RTL version 2.0
    [    0.320000] musb-hdrc: setup fifo_mode 4
    [    0.320000] musb-hdrc: 28/31 max ep, 16384/16384 memory
    [    0.320000] musb-hdrc musb-hdrc.0: MUSB HDRC host driver
    [    0.320000] musb-hdrc musb-hdrc.0: new USB bus registered, assigned bus number 1
    [    0.320000] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
    [    0.320000] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
    [    0.320000] usb usb1: Product: MUSB HDRC host driver
    [    0.320000] usb usb1: Manufacturer: Linux 2.6.37 musb-hcd
    [    0.320000] usb usb1: SerialNumber: musb-hdrc.0
    [    0.330000] hub 1-0:1.0: USB hub found
    [    0.330000] hub 1-0:1.0: 1 port detected
    [    0.330000] musb-hdrc musb-hdrc.0: USB Host mode controller at d681e000 using PIO, IRQ 18
    [    0.330000] Registered /proc/driver/musb_hdrc.0
    [    0.330000] musb-hdrc musb-hdrc.1: dma type: pio
    [    0.330000] MUSB controller-1 revision 4ea20800
    [    0.330000] usb2phy: computed values rxcalib(15)DACs(22 13 14)
    [    0.330000] usb2phy: override computed values rxcalib(15)DACs(22 13 14)
    [    0.330000] usb2phy_config: musb(1) rxcalib done, rxcalib read value 6f6b5b76
    [    0.330000] musb-hdrc: ConfigData=0xde (UTMI-8, dyn FIFOs, bulk combine, bulk split, HB-ISO Rx, HB-ISO Tx, SoftConn)
    [    0.330000] musb-hdrc: MHDRC RTL version 2.0
    [    0.330000] musb-hdrc: setup fifo_mode 4
    [    0.330000] musb-hdrc: 28/31 max ep, 16384/16384 memory
    [    0.330000] musb-hdrc musb-hdrc.1: MUSB HDRC host driver
    [    0.330000] musb-hdrc musb-hdrc.1: new USB bus registered, assigned bus number 2
    [    0.330000] usb usb2: New USB device found, idVendor=1d6b, idProduct=0002
    [    0.330000] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
    [    0.330000] usb usb2: Product: MUSB HDRC host driver
    [    0.330000] usb usb2: Manufacturer: Linux 2.6.37 musb-hcd
    [    0.330000] usb usb2: SerialNumber: musb-hdrc.1
    [    0.330000] hub 2-0:1.0: USB hub found
    [    0.330000] hub 2-0:1.0: 1 port detected
    [    0.330000] musb-hdrc musb-hdrc.1: USB Host mode controller at d6822800 using PIO, IRQ 19
    [    0.330000] Registered /proc/driver/musb_hdrc.1
    [    0.330000] NET: Registered protocol family 2
    [    0.330000] IP route cache hash table entries: 16384 (order: 4, 65536 bytes)
    [    0.330000] TCP established hash table entries: 65536 (order: 7, 524288 bytes)
    [    0.330000] TCP bind hash table entries: 65536 (order: 6, 262144 bytes)
    [    0.330000] TCP: Hash tables configured (established 65536 bind 65536)
    [    0.330000] TCP reno registered
    [    0.330000] UDP hash table entries: 256 (order: 0, 4096 bytes)
    [    0.330000] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
    [    0.330000] NET: Registered protocol family 1
    [    0.330000] RPC: Registered udp transport module.
    [    0.330000] RPC: Registered tcp transport module.
    [    0.330000] RPC: Registered tcp NFSv4.1 backchannel transport module.
    [    0.330000] NetWinder Floating Point Emulator V0.97 (double precision)
    [    0.330000] PMU: registered new PMU device of type 0
    [    0.330000] omap-iommu omap-iommu.0: ducati registered
    [    0.330000] omap-iommu omap-iommu.1: sys registered
    [    0.410000] highmem bounce pool size: 64 pages
    [    0.410000] NTFS driver 2.1.29 [Flags: R/W].
    [    0.410000] JFFS2 version 2.2. (NAND) \xffffffc2\xffffffa9\xffffffa9 2001-2006 Red Hat, Inc.
    [    0.420000] fuse init (API version 7.15)
    [    0.420000] msgmni has been set to 680
    [    0.420000] io scheduler noop registered
    [    0.420000] io scheduler deadline registered
    [    0.420000] io scheduler cfq registered (default)
    [    0.500000] [drm] Initialized drm 1.1.0 20060810
    [    0.500000] Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled
    [    0.500000] omap_uart.0: ttyO0 at MMIO 0x48020000 (irq = 72) is a OMAP UART0
    [    1.260000] console [ttyO0] enabled
    [    1.260000] omap_uart.1: ttyO1 at MMIO 0x48022000 (irq = 73) is a OMAP UART1
    [    1.270000] Cfg gpio 46 as OMAP UART1's RTS signal
    [    1.270000] omap_uart.2: ttyO2 at MMIO 0x48024000 (irq = 74) is a OMAP UART2
    [    1.280000] omap_uart.3: ttyO3 at MMIO 0x481a6000 (irq = 44) is a OMAP UART3
    [    1.290000] omap_uart.4: ttyO4 at MMIO 0x481a8000 (irq = 45) is a OMAP UART4
    [    1.290000] omap_uart.5: ttyO5 at MMIO 0x481aa000 (irq = 46) is a OMAP UART5
    [    1.310000] brd: module loaded
    [    1.310000] loop: module loaded
    [    1.320000] m25p80 spi1.0: found mx25l3205d, expected m25p80
    [    1.320000] m25p80 spi1.0: mx25l3205d (4096 Kbytes)
    [    1.330000] Creating 6 MTD partitions on "spi_flash":
    [    1.330000] 0x000000000000-0x000000020000 : "U-Boot-min"
    [    1.340000] 0x000000020000-0x000000060000 : "U-Boot"
    [    1.340000] 0x000000060000-0x000000070000 : "U-Boot ENV"
    [    1.350000] 0x000000070000-0x000000080000 : "Mac"
    [    1.360000] 0x000000080000-0x000000090000 : "Reserve"
    [    1.360000] 0x000000090000-0x000000400000 : "Recovery"
    [    1.370000] m25p80 spi3.1: found fm25v10, expected m25p80
    [    1.370000] m25p80 spi3.1: fm25v10 (128 Kbytes)
    [    1.380000] Creating 1 MTD partitions on "spi_flash":
    [    1.380000] 0x000000000000-0x000000020000 : "fm25v10_fram"
    [    1.390000] usb 2-1: new high speed USB device using musb-hdrc and address 2
    [    1.450000] davinci_mdio davinci_mdio.0: davinci mdio revision 1.6
    [    1.450000] davinci_mdio davinci_mdio.0: detected phy mask fffffffe
    [    1.460000] davinci_mdio.0: probed
    [    1.460000] davinci_mdio davinci_mdio.0: phy[0]: device 0:00, driver unknown
    [    1.470000] usbcore: registered new interface driver cdc_ether
    [    1.480000] usbcore: registered new interface driver dm9601
    [    1.480000] Initializing USB Mass Storage driver...
    [    1.490000] usbcore: registered new interface driver usb-storage
    [    1.490000] USB Mass Storage support registered.
    [    1.500000] mice: PS/2 mouse device common for all mice
    [    1.500000] ads7846 spi2.0: touchscreen, irq 274
    [    1.510000] input: ADS7846 Touchscreen as /devices/platform/omap2_mcspi.2/spi2.0/input/input0
    [    1.520000] input: tps65910_pwrbutton as /devices/platform/omap/omap_i2c.1/i2c-1/1-002d/tps65910-pwrbutton/input/input1
    [    1.530000] rtc-pcf8563 1-0051: chip found, driver version 0.4.3
    [    1.540000] rtc-pcf8563 1-0051: rtc core: registered rtc-pcf8563 as rtc0
    [    1.540000] i2c /dev entries driver
    [    1.550000] Linux video capture interface: v2.00
    [    1.550000] usbcore: registered new interface driver uvcvideo
    [    1.560000] USB Video Class driver (v1.0.0)
    [    1.560000] Registered led device: usr0
    [    1.560000] Registered led device: usr1
    [    1.560000] Registered led device: usr2
    [    1.560000] Registered led device: usr3
    [    1.560000] Registered led device: usr4
    [    1.560000] Registered led device: usr5
    [    1.560000] notify_init : notify drivercreated  for  remote proc id 2 at physical Address 0xbf900000
    [    1.570000] usbcore: registered new interface driver snd-usb-audio
    [    1.580000] asoc: HDMI-DAI-CODEC <-> hdmi-dai mapping ok
    [    1.590000] ALSA device list:
    [    1.590000]   #0: TI81XX EVM
    [    1.590000] TCP cubic registered
    [    1.600000] NET: Registered protocol family 17
    [    1.600000] lib80211: common routines for IEEE802.11 drivers
    [    1.610000] lib80211_crypt: registered algorithm 'NULL'
    [    1.610000] lib80211_crypt: registered algorithm 'WEP'
    [    1.610000] lib80211_crypt: registered algorithm 'CCMP'
    [    1.610000] lib80211_crypt: registered algorithm 'TKIP'
    [    1.610000] Registering the dns_resolver key type
    [    1.610000] VFP support v0.3: implementor 41 architecture 3 part 30 variant c rev 3
    [    1.620000] omap_voltage_late_init: Voltage driver support not added
    [    1.630000] Power Management for TI81XX.
    [    1.630000] cpsw: Disable CPRGMII internal delay.
    [    1.640000] Detected MACID=a0:f6:fd:9d:e9:08
    [    1.640000] rtc-pcf8563 1-0051: setting system clock to 2017-04-06 15:37:47 UTC (1491493067)
    [    1.650000] Waiting for root device /dev/mmcblk0p3...
    [    1.660000] usb 2-1: New USB device found, idVendor=0409, idProduct=005a
    [    1.670000] usb 2-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
    [    1.670000] hub 2-1:1.0: USB hub found
    [    1.680000] hub 2-1:1.0: 4 ports detected
    [    1.720000] mmc0: new high speed MMC card at address 0001
    [    1.720000] mmcblk0: mmc0:0001 S10004 3.56 GiB
    [    1.730000]  mmcblk0: p1 p2 p3
    [    1.840000] EXT4-fs (mmcblk0p3): warning: maximal mount count reached, running e2fsck is recommended
    [    1.850000] EXT4-fs (mmcblk0p3): recovery complete
    [    1.850000] EXT4-fs (mmcblk0p3): mounted filesystem with ordered data mode. Opts: (null)
    [    1.860000] VFS: Mounted root (ext4 filesystem) on device 179:3.
    [    1.870000] devtmpfs: mounted
    [    1.870000] Freeing init memory: 176K
    [    2.720000] <30>udevd[133]: starting version 175
    [    4.110000]
    [    4.110000] CPSW phy found : id is : 0x4dd074
    [    4.120000] PHY 0:01 not found
    [    5.410000] EXT4-fs (mmcblk0p2): warning: maximal mount count reached, running e2fsck is recommended
    [    5.410000] EXT4-fs (mmcblk0p2): recovery complete
    [    5.410000] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
    [    7.770000] fpga_init()
    [    7.770000] sysclk_out : 0x82
    [    7.770000] clk1 mux : 0x0
    [    7.770000] GPMC revision 6.0
    [    7.770000] GPMC config  0x10
    [    7.770000] Got CS1, address = 1000000, at 8 cycle speed
    [    7.770000] GPMC_CS_CONFIG7 value 0xf41
    [    7.770000] Got CS2, address = 2000000 , at 8 cycle speed
    [    7.770000] GPMC_CS2_CONFIG7 value 0xf42--SIZE 0X10000
    [    7.770000] Got CS3, address = 3000000 , at  10 cycle speed
    [    7.770000] GPMC_CS3_CONFIG7 value 0xf43--SIZE 0X10000
    [    7.770000] going to test m3 cs3
    [    7.770000] m3 chip ID is 0x216
    [    7.830000] usbcore: registered new interface driver usbhid
    [    7.830000] usbhid: USB HID core driver
    [    8.140000] SysLink version : 2.00.05.85
    [    8.140000] SysLink module created on Date:Apr 24 2013 Time:15:38:22
    [    8.290000] CMEMK module: built on Apr 24 2013 at 15:38:17
    [    8.290000]   Reference Linux version 2.6.37
    [    8.290000]   File /opt/d500/ti-ezsdk_dm814x-evm_5_03_01_15/component-sources/linuxutils_3_21_00_04/packages/ti/sdo/linuxutils/cmem/src/module/cmemk.c
    [    8.290000] CMEM Range Overlaps Kernel Physical - allowing overlap
    [    8.290000] CMEM phys_start (0x96000000) overlaps kernel (0x80000000 -> 0xa3a00000)
    [    8.290000] allocated heap buffer 0xde000000 of size 0x2000000
    [    8.290000] heap fallback enabled - will try heap if pool buffer is not available
    [    8.290000] cmemk initialized
    [   14.230000] init: failsafe main process (440) killed by TERM signal
    [   15.560000] VPSS_GRPX : please stop grpx0 before continue.
    [   15.590000] VPSS_DCTRL: failed to disable the venc.
    [   15.600000] VPSS_DCTRL: failed to disable the venc.
    [   15.630000] VPSS_DCTRL: failed to disable the venc.
    [   15.640000] VPSS_DCTRL: failed to disable the venc.
    [   15.660000] VPSS_DCTRL: failed to disable the venc.
    [   15.680000] VPSS_DCTRL: failed to disable the venc.

    ################################################################################################

    //my init script

    ################################################################################################

    #/bin/sh
    insmod /lib/modules/2.6.37/kernel/drivers/char/gpmc/fpgamlink.ko
    insmod /lib/modules/2.6.37/kernel/drivers/hid/usbhid/usbhid.ko
    insmod  /lib/modules/2.6.37/kernel/drivers/dsp/syslink.ko
    until [ -e /dev/syslinkipc_ProcMgr ] && [ -e /dev/syslinkipc_ClientNotifyMgr ];
    do
    sleep 0.1
    done
    insmod  /lib/modules/2.6.37/kernel/drivers/dsp/cmemk.ko phys_start=0x96000000 phys_end=0x97ffffff allowOverlap=1 useHeapIfPoolUnavailable=1
    #/etc/init.d/ti-codec-setup hdvicp2 start
    /usr/bin/vpdma-abort
    /etc/init.d/ti-codec-setup vpss start    
    insmod /lib/modules/2.6.37/kernel/drivers/video/ti81xx/vpss/vpss.ko sbufaddr=0xBFB00000
    until [ -e /sys/devices/platform/vpss/graphics0/ ] && [ -e /sys/devices/platform/vpss/display1/ ];
    do
    sleep 0.1
    done
    echo '0' > /sys/devices/platform/vpss/graphics0/enabled
    echo '0' > /sys/devices/platform/vpss/graphics1/enabled
    echo '0' > /sys/devices/platform/vpss/graphics2/enabled
    echo '0' > /sys/devices/platform/vpss/display0/enabled
    echo '0' > /sys/devices/platform/vpss/display1/enabled
    echo '0' > /sys/devices/platform/vpss/display2/enabled
    insmod /lib/modules/2.6.37/kernel/drivers/video/ti81xx/ti81xxfb/ti81xxfb.ko vram=0:32M,1:16M,2:16M
    /usr/bin/prcm_config_app s
    #"Configuring fb1 to LCD"
    echo '1' > /sys/devices/platform/vpss/display1/enabled
    echo '1:dvo2' > /sys/devices/platform/vpss/graphics0/nodes
    echo '0' > /sys/devices/platform/vpss/display1/enabled
    echo '1080p-60' > /sys/devices/platform/vpss/display1/mode
    echo 'triplediscrete,rgb888' > /sys/devices/platform/vpss/display1/output
    echo '65000,1024/20/160/136,768/3/29/6,1' > /sys/devices/platform/vpss/display1/timings
    echo '1' > /sys/devices/platform/vpss/display1/enabled
    fbset -xres 1024 -yres 768 -vxres 1024 -vyres 768 -fb /dev/fb0
    echo '1' > /sys/devices/platform/vpss/graphics0/enabled
    exit


    #################################################
    #old load driver
    description "DM814x firmwares and modules "

    start on virtual-filesystems
    stop on runlevel [06]

    script
        echo "load the firmware of 8148"
        # load syslink and wait until syslink has finished loading
        echo "load syslink"
        kernelname=`/bin/uname -r`
        insmod  /lib/modules/"${kernelname}"/kernel/drivers/dsp/syslink.ko
        
        until [ -e /dev/syslinkipc_ProcMgr ] && [ -e /dev/syslinkipc_ClientNotifyMgr ];
        do
          sleep 0.1
        done
        #sleep 1
        # LVDS BL
        echo 1 > /sys/class/gpio/gpio19/value
        
        echo "vpss start"
        
        # load vpss firmware
        /usr/bin/vpdma-abort
        /etc/init.d/ti-codec-setup vpss start        

        # TODO: do we really need to wait here before loading vpss modules ???
        # sleep 2

        # load display kernel modules
        insmod  /lib/modules/"${kernelname}"/kernel/drivers/video/ti81xx/vpss/vpss.ko sbufaddr=0xBFB00000
        #modprobe ths8200
        #modprobe ti81xxhdmi
        #modprobe ti81xx
        insmod  /lib/modules/"${kernelname}"/kernel/drivers/video/ti81xx/ti81xxfb/ti81xxfb.ko vram=0:32M,1:16M,2:16M
        #modprobe ti81xxfb vram=0:32M,1:16M,2:16M

        initctl emit vpss-loaded

        # reset IVA's
        /usr/bin/prcm_config_app s

        # load HDVICP2 firmware
        /etc/init.d/ti-codec-setup hdvicp2 start

        # load DSP firmware
        #/etc/init.d/ti-codec-setup dsp start

        echo "Configuring fb1 to LCD"
        echo '1:dvo2' > /sys/devices/platform/vpss/graphics0/nodes
        echo '0' > /sys/devices/platform/vpss/display1/enabled
        #echo 800x600@60 >/sys/devices/platform/vpss/display1/mode    
        #echo 'aclk/aclkdiv2/aclkdiff' > /sys/devices/platform/vpss/display1/clksrc
        echo '1080p-60' > /sys/devices/platform/vpss/display1/mode
        #echo single/double/doublediscrete/triple/triplediscrete,rgb888/yuv444p/yuv422spuv,(0/1)/(0/1)/(0/1)/(0/1) > /sys/devices/platform/vpss/display1/output
        #the first part is the sync mode, the second part is output data format, the last part is the polarity of the DE/FID/HS/VS, 1:ACTIVE_LOW(inverted),0:ACTIVE_HIGH(non_inverted).
        echo 'triplediscrete,rgb888' > /sys/devices/platform/vpss/display1/output
        #ModeLine "1920x1080" 148.50 1920 2008 2052 2200 1080 1084 1088 1125 -HSync -VSync
        #echo '148500,1920/88/148/44,1080/4/36/5,1' > /sys/devices/platform/vpss/display1/timings
        #148500: display pixel clock(KHz)
        #1920: display width
        #88: horizontal front porch
        #148: horizontal back porch
        #44: horizontal sync width
        #1080: display height
        #4: vertical front porch
        #36: vertical back porch
        #5: vertical sync width
        #1: progressive output
        //M121GNX2 R1 ModeLine "1024x768" 65.00 1024 1048 1184 1344 768 771 777 806 -HSync -VSync
        echo '65000,1024/20/160/136,768/3/29/6,1' > /sys/devices/platform/vpss/display1/timings
        echo '1' > /sys/devices/platform/vpss/display1/enabled
        fbset -xres 1024 -yres 768 -vxres 1024 -vyres 768 -fb /dev/fb0
        fbset --timings
        
        # load codec specific kernel modules
        insmod  /lib/modules/"${kernelname}"/kernel/drivers/dsp/cmemk.ko phys_start=0x96000000 phys_end=0x97ffffff allowOverlap=1 useHeapIfPoolUnavailable=1
        #modprobe cmemk phys_start=0x96000000 phys_end=0x97ffffff allowOverlap=1 useHeapIfPoolUnavailable=1
        #modprobe rfxtiling
        #insmod  /lib/modules/"${kernelname}"/kernel/drivers/dsp/rfxtiling.ko
        initctl emit firmware-loaded
        
        
        insmod  /lib/modules/"${kernelname}"/kernel/drivers/char/gpmc/fpgamlink.ko
        #modprobe fpga
        #modprobe uinput
        #modprobe usbhid
        insmod  /lib/modules/"${kernelname}"/kernel/drivers/hid/usbhid/usbhid.ko
        #insmod  /lib/modules/"${kernelname}"/kernel/drivers/gpu/drm/drm_kms_helper.ko
        #insmod  /lib/modules/"${kernelname}"/kernel/drivers/gpu/drm/ti81xx/ti81xx.ko
    end script