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.

Porting the SGX Graphic to the ipnc

Dear all, 

When i porting the graphic engine to the IPNC Project(TI8148) it occurs and error and i don't know how to solve it.

Does anyone can help me to fix the problem? 

the setting in our board as below:

Because of the IPNC memory setting(512MB),and our memoey size is (1GMB). I Change the memory size form the uboot.

#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 0x20000000 /*modify 256 MB-->512MB 20120305*/
#define PHYS_DRAM_2 0xB0000000 /* DRAM Bank #2 */
#define PHYS_DRAM_2_SIZE 0x20000000 /*modify 256 MB-->512MB 20120305*/
and My bootargs.
bootargs=mem=80M@0x80000000 mem=256M@0x90000000 vram=50M ti814xfb.vram=0:48M,1:1M,2:1M notifyk.vpssm3_sva=0xBFD00000 console=ttyO0,1
15200n8 root=/dev/nfs nfsroot=192.168.3.205:/home/sw/Project/workdir/DM8148_v1.8/ipnc_rdk/target/filesys,nolock rw ip=dhcp eth=$(eth
addr) earlyprintk
I also modify the the filesys/opt/ipnc/autorun.sh
cd /opt/ipnc

insmod sbull.ko
umount /mnt/ramdisk 2>/dev/null
rmmod sbull.ko 2>/dev/null
insmod sbull.ko
sleep 1
mkdosfs -v /dev/sbulla 2>/dev/null
mkdir /mnt/ramdisk 2>/dev/null
mount -t vfat /dev/sbulla /mnt/ramdisk 2>/dev/null
insmod g_file_storage.ko file=/dev/sbulla stall=0 removable=1

amixer sset 'PGA' 80
sleep 2

cd /opt/ipnc
./init.sh
sleep 2
#./system_server& //Disable the setting below.
#sleep 28
#./boot_proc 1&
#sleep 2
#./boa -c /etc &
#sleep 4
#./wis-streamer &
#Sleep 2
#./boot_proc 2&
#sleep 2
the i follow the wiki to build the SGX driver and example.
http://processors.wiki.ti.com/index.php/Graphics_SDK_Quick_installation_and_user_guide
make BUILD=release OMAPES=6.x SUPPORT_XORG=0 all 
make BUILD=release OMAPES=6.x SUPPORT_XORG=1 install

then i power on the target board then set-->
./scripts/load_vpss.sh
./scripts/load_video.sh
./scripts/load_c6xdsp.sh
./scripts/wait_cmd.sh s m3vpss
./scripts/wait_cmd.sh s m3video
./scripts/wait_cmd.sh s c6xdsp
./scripts/osa_kermod_load.sh
insmod ./kermod/vpss.ko mode=hdmi:1080p-60 sbufaddr=0xbfb00000
reply--->VPSS_FVID2: M3 firmware version 0x1000133 is newer,driver may not work properly.

insmod ./kermod/ti81xxfb.ko vram=0:24M,1:1M,2:1M
insmod ./kermod/ti81xxhdmi.ko 2> /dev/null
/etc/init.d/38xx-demo
/dev/mem opened.
Memory mapped at address 0x403c7000.
Value at address 0x48180F04 (0x403c7f04): 0x1
Written 0x0; readback 0x0
/dev/mem opened.
Memory mapped at address 0x40387000.
Value at address 0x48180900 (0x40387900): 0x1
Written 0x2; readback 0x2
/dev/mem opened.
Memory mapped at address 0x40363000.
Value at address 0x48180920 (0x40363920): 0x70000
Written 0x2; readback 0x2
Unhandled fault: external abort on non-linefetch (0x1018) at 0x40437014
Bus error

release6.x
sh: 0x10201: unknown operand
sh: 0x10003: unknown operand
sh: 0x10205: unknown operand
Module pvrsrvkm failed to load. Retrying.
Running /sbin/depmod

then I execute the script:
./sgxperf_check.sh
WSEGL settings
[default]
WindowSystem=libpvrPVR2D_FRONTWSEGL.so
#WindowSystem=libpvrPVR2D_FLIPWSEGL.so

------
ARM CPU information
Processor : ARMv7 Processor rev 2 (v7l)
BogoMIPS : 598.01
Features : swp half thumb fastmult vfp edsp neon vfpv3
CPU implementer : 0x41
CPU architecture: 7
CPU variant : 0x3
CPU part : 0xc08
CPU revision : 2

Hardware : ti8148ipnc
Revision : 0000
Serial : 0000000000000000
------
SGX driver information
cat: can't open '/proc/pvr/version': No such file or directory
------
Framebuffer settings

mode "1920x1080-60"
# D: 148.500 MHz, H: 67.500 kHz, V: 60.000 Hz
geometry 1920 1080 1920 1080 32
timings 6734 148 88 36 4 44 5
rgba 8/16,8/8,8/0,8/24
endmode

Frame buffer device information:
Name : ti81xxfb
Address : 0x9ce00000
Size : 25165824
Type : PACKED PIXELS
Visual : TRUECOLOR
XPanStep : 1
YPanStep : 1
YWrapStep : 0
LineLength : 7680
Accelerator : No
------
Rotation settings
0
------
Kernel Module information
Module Size Used by
ti81xxhdmi 14758 0
ti81xxfb 21799 0
vpss 60444 2 ti81xxhdmi,ti81xxfb
osa_kermod 8797 0
cmemk 20279 0
syslink 1106815 0
g_file_storage 22871 0
ipv6 222567 10
sbull 2890 1
------
Boot settings
mem=80M@0x80000000 mem=256M@0x90000000 vram=50M ti814xfb.vram=0:48M,1:1M,2:1M notifyk.vpssm3_sva=0xBFD00000 console=ttyO0,115200n8 r
oot=/dev/nfs nfsroot=192.168.3.205:/home/sw/Project/workdir/DM8148_v1.8/ipnc_rdk/target/filesys,nolock rw ip=dhcp eth=$(ethaddr) ear
lyprintk
------
Linux Kernel version
Linux dm814x-evm 2.6.37_IPNC_DM812x_1.8.4 #1 PREEMPT Mon Mar 5 09:29:40 CST 2012 armv7l unknown


  • >> make BUILD=release OMAPES=6.x SUPPORT_XORG=0 all 
    >> make BUILD=release OMAPES=6.x SUPPORT_XORG=1 install

     

    the arguments are not matching between make and make install

     

    But in any case, the error mentioned happens because SGX_REVISION is not obtained – can you run below line and post what happens (after running /etc/init,d/38xx-demo) ?

     

    /etc/init.d/devmem2 0x56000014

  • I copy the command line from wiki and forget to change the setting.
    My setting==>SUPPORT_XORG=0
    make BUILD=release OMAPES=6.x SUPPORT_XORG=0 all
    make BUILD=release OMAPES=6.x SUPPORT_XORG=0 install

    And I am not follow all of the wiki to porting the Graphic engine, Because Some setting in the IPNC is different from the Ezsdk
    Like:
    a.
    wiki-->./slaveloader
    ipnc-->./bin/fw_load.out
    b.
    wiki-->insmod vpss.ko sbufaddr=0xA0200000
    ipnc-->insmod ./kermod/vpss.ko mode=hdmi:1080p-60 sbufaddr=0xbfb00000
    and others,

    When I execute the command line: /etc/init.d/devmem2 0x56000014
    I got the information.
    root@dm814x-evm:/opt/ipnc# /etc/init.d/devmem2 0x56000014
    /dev/mem opened.Unhandled fault: external abort on non-linefetch (0x1018) at 0x40379014
    Memory mapped at address 0x40379000.
    Bus error

    And I execute the command again:
    root@dm814x-evm:/opt/ipnc# /etc/init.d/devmem2 0x56000014
    /dev/mem opened.Unhandled fault: external abort on non-linefetch (0x1018) at 0x4049b014
    Memory mapped at address 0x4049b000.
    Bus error

    root@dm814x-evm:/opt/ipnc# /etc/init.d/devmem2 0x56000014
    /dev/mem opened.Unhandled fault: external abort on non-linefetch (0x1018) at 0x40402014
    Memory mapped at address 0x40402000.

    The Memory mapped address is always not the same.
  • Kao U Lin said:

    root@dm814x-evm:/opt/ipnc# /etc/init.d/devmem2 0x56000014
    /dev/mem opened.Unhandled fault: external abort on non-linefetch (0x1018) at 0x40402014
    Memory mapped at address 0x40402000.

     

    Gidday there,

     I am seeing the same bus error with a custom 8148 board. Did you find a solution to getting the SGX responding to memory accesses correctly?

     Thanks in advance

     Joshua

    p.s. I ran the linux_prcm_ipcam application, after rebuilding it to remove the 'SGX_Disable()' operation and the SGX clock seems to be disabled.  I ran the sgxperf_check script mentioned earlier and got the following output:

    WSEGL settings
    cat: can't open '/etc/powervr.ini': No such file or directory
    ------
    ARM CPU information
    Processor : ARMv7 Processor rev 2 (v7l)
    BogoMIPS : 598.01
    Features : swp half thumb fastmult vfp edsp neon vfpv3
    CPU implementer : 0x41
    CPU architecture: 7
    CPU variant : 0x3
    CPU part : 0xc08
    CPU revision : 2
    ...
    ------
    SGX driver information
    cat: can't open '/proc/pvr/version': No such file or directory
    ------
    Framebuffer settings
    VPSS_FVID2: contrl event 0x10040018 timeout
    Jan 23 12:35:58VPSS_DCTRL: failed to get node input status
    XXXX vmunix: VPSS_GRPX : failed to set grpx0 nodes
    VPSS_FVID2: contti81xxfb ti81xxfb: fvid2 create failed.
    rl event 0x10040018 timeout
    open /dev/fb0: Connection timed out

  • Since my previous post I have established that the SGXPLL_CLKCTRL register is not writable from Linux.  I am able to set this register from u-boot and it retains the value once booted.  This allowed me to be able to enable the CLKOUT for the SGX PLL, but the status still reports the PLL as in bypass (not locked) mode.  I am able to modify the CM_SGX and PM_SGX registers from Linux (with devmem2) but never the SGXPLL_CLKCTRL.  When I load the pvrsrvkm module, the kernel reports that it is unable to enable the SGX clock, because it never enters the 'locked' state (always in bypass).

    Very odd.

  • In my project I am providing primarily Linux support, and eventually the hardware manufacturer discovered that uboot was explicitly disabling the SGX component.  Once that was fixed, the SGX became functional.

    One note, though, is that because the IPNC uses different stuff in the VPSS, this only works with FBDEV=no.  This way only pvrsrvkm.ko and omaplfb.ko are required.  No vpss.ko, nor ti81hdmi.ko are required.  For rendering you need to use egl calls and render to a pixmap.  Lookaround for the gleslayer code from TI for examples of how to configure it.