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.

SGX drivers for OMAP3530 for Linux-omap-2.6.33

Other Parts Discussed in Thread: SYSCONFIG, OMAP3530

Hi

I have downlaoded Graphics SDK 3_01_00_06 version.

i  build pvrsrvkm and omaplfb drivers for linux-omap-2.6.35 and was sucessful.

when when i tried to install omaplfb module with displayClassJTableAddress it shows below error

cat /proc/kallsyms | grep "T PVRGetDisplayClassJTable" | cut -c0-8
bf005744
# insmod omaplfb.ko displayClassJTableAddress=0xbf005744
omaplfb: Unknown parameter `displayClassJTableAddress'
insmod: cannot insert 'omaplfb.ko': unknown symbol in module

When i tried to install module without displayClassJTableAddress it was sucessful.

When i tried to run demo applications  it shows below error. 

root@beagleboard:/Demo# ./OGLESEvilSkull 0

Can't open keypad input device (/dev/input/event0)

Exit message has been set to: "PVRShell: Unable to initialise EGL

".PVRShell: EGL Error (EGL_BAD_ALLOC)

InitAPI failed!

PVRShell: Unable to initialise EGL

root@beagleboard:/Demo#

root@beagleboard:/usr/local/bin# ./pvr2d_test
PowerVR device not found

Please let me known if iam missing something  and use of  displayClassJTableAddress in omaplfb.

Regards,

Reddy

 

  • Can you confirm you are using the toplevel Makefile (in the root folder of the Graphics SDK), to build the modules  ?

     

  • Yes iam using top level makefile

    make OMAPES=3.x all

    it will build pvrsrvkm module only...

    to build omaplfb.ko

    cd OMAP35x_Graphics_SDK_3_01_00_06/GFX_LINUX_KM/eurasion/build/linux/omap3630_linux/kbuild

    make BUILD=debug all

    it build omaplfb.ko in GFX_LINUX_KM/services4/3rdparty/dc_omap3430_linux/kbuild/omaplfb.ko

     

    Regards,

    Ashok

     

     

  • This method will not work.

    Can you find out why the toplevel makefile does not build omaplfb as expected ? Also please read the Getting Started Guide online, for the proper options for building the SDK.

     

  • Hi

    Now with Top make file the omaplfb & pvrsrvkn modules are build .

    But iam getting below errors when i insert the omaplfb modules.

    root@beagleboard:~# /etc/init.d/rc.pvr start

    PVR: PVRCore_Init

    PVR: Setting Debug Level = 0x4

    PVR: Setting Debug Level = 0x4

    PVR_K:(Warning): _SetDispatchTableEntry: There is a gap in the dispatch table be

    tween indices 104 (PVRSRV_BRIDGE_SGX_READ_HWPERF_CB) and 102 (PVRSRV_BRIDGE_SGX_

    SCHEDULE_PROCESS_QUEUES) [2807, /home/rse1cob/OMAP35x_Graphics_SDK_3_01_00_06/GF

    X_Linux_KM/services4/srvkm/env/linux/kbuild/../../../../srvkm/bridged/bridged_pv

    r_bridge.c]

    PVR_K:(Error): NOTE: Enabling DEBUG_BRIDGE_KM_DISPATCH_TABLE may help debug this

    issue. [2814, /home/rse1cob/OMAP35x_Graphics_SDK_3_01_00_06/GFX_Linux_KM/servic

    es4/srvkm/env/linux/kbuild/../../../../srvkm/bridged/bridged_pvr_bridge.c]

    PVR: PVRSRVDriverProbe(pDevice=bf0ae8b0)

    PVR_K:(Warning): SysInitialise: Entering... [180, /home/rse1cob/OMAP35x_Graphics

    _SDK_3_01_00_06/GFX_Linux_KM/services4/srvkm/env/linux/kbuild/../../../../../ser

    vices4/system/omap3630/sysconfig.c]

    PVR: EnableSystemClocks: Enabling System Clocks

    PVR: GPTIMER11 clock is 13MHz

    PVR: OSUnMapPhysToLin: unmapping 4 bytes from 0xfa088040

    PVR: OSUnMapPhysToLin: unmapping 4 bytes from 0xfa088024

    PVR: PVRCore_Init: major device 253

    omaplfb: Unknown parameter `displayClassJTableAddress'

    insmod: cannot insert 'omaplfb.ko': unknown symbol in module

    PVR_K:(Error): BridgedDispatchKM: Driver initialisation not completed yet. [3197

    , /home/rse1cob/OMAP35x_Graphics_SDK_3_01_00_06/GFX_Linux_KM/services4/srvkm/env

    /linux/kbuild/../../../../srvkm/bridged/bridged_pvr_bridge.c]

    Installing omaplfb module With out passing parameter  (displayClassJTableAddress)

    ty/kernel/drivers/char# insmod omaplfb.ko

    omaplfb: Framebuffer physical address: 0x8f400000

    omaplfb: Framebuffer virtual address: 0xd0a00000

    omaplfb: Framebuffer size: 1228800

    omaplfb: Framebuffer virtual width: 640

    omaplfb: Framebuffer virtual height: 480

    omaplfb: Framebuffer width: 640

    omaplfb: Framebuffer height: 480

    omaplfb: Framebuffer stride: 2560

    PVRSRV_PIXEL_FORMAT_ARGB8888

    omaplfb: Maximum number of swap chain buffers: 1

    ty/kernel/drivers/char# lsmod

    Module Size Used by Not tainted

    omaplfb 15322 0 - Live 0xbf0d2000

    pvrsrvkm 314324 1 omaplfb, Live 0xbf069000

     

    When i run demo applications iam getting below error.

    root@beagleboard:/usr/local/bin# ./eglinfo

    egl error 'EGL_BAD_ALLOC' (0x3003)

    root@beagleboard:/usr/local/bin# ./gles1test1

    'eglInitialize' returned egl error 'EGL_BAD_ALLOC' (0x3003)

    Please let me know iam missing something .

    Regards,

    Ashok

     

     

     

     

     

     

     

  • Can you please try this on 2.6.32 ? We have also tried this on 2.6.34, but not on 2.6.35. It would be good to confirm a working version first before we look at causes.

     

  • My kernel source is  linux-omap-2.6  (someone get it through git, and give it to me, so I don't know whether it get from)

     

    I Modify Rules.make under  /home/terry/Desktop/beagle/SDK_BIN/OMAP35x_Graphics_SDK_setuplinux_3_01_00_07

     

    HOME=/home/terry/Desktop/beagle

    # Set installation folder (typically, OMAP35x_Graphics_***)
    GRAPHICS_INSTALL_DIR=$(HOME)/SDK_BIN/OMAP35x_Graphics_SDK_setuplinux_3_01_00_07

    # Location of demo executables and install information
    GFX_DEMOS_EXECPATH=$(GRAPHICS_INSTALL_DIR)/gfxsdkdemos

    # Toolchain path
    CSTOOL_DIR=/home/terry/Desktop/beagle/kernel/Sourcery_G++_Lite
    CSTOOL_PREFIX=arm-none-linux-gnueabi-
    CSTOOL_PATH=$(CSTOOL_DIR)/bin
    CSTOOL_LIBSTDC++_PATH=$(CSTOOL_DIR)/arm-none-linux-gnueabi/libc/usr/lib

    # Set the kernel installation path
    KERNEL_INSTALL_DIR=/home/terry/Desktop/beagle/kernel/linux-omap-2.6

    # Target NFS root file system location
    TARGETFS_INSTALL_DIR=$(KERNEL_INSTALL_DIR)

    # Kernel dependent module installation path
    GFX_TARGETFS_KERMOD_PATH=$(TARGETFS_INSTALL_DIR)/lib/modules/2.6.32


    I'm sure I pointer to the right place, but when I make OMAPES=3.x all, it shows error as follow

    make[2]: Entering directory `/home/terry/Desktop/beagle/kernel/linux-omap-2.6'
      LD      /home/terry/Desktop/beagle/SDK_BIN/OMAP35x_Graphics_SDK_setuplinux_3_01_00_07/GFX_Linux_KM/services4/3rdparty/bufferclass_ti/built-in.o
      CC [M]  /home/terry/Desktop/beagle/SDK_BIN/OMAP35x_Graphics_SDK_setuplinux_3_01_00_07/GFX_Linux_KM/services4/3rdparty/bufferclass_ti/bc_cat.o
    /home/terry/Desktop/beagle/SDK_BIN/OMAP35x_Graphics_SDK_setuplinux_3_01_00_07/GFX_Linux_KM/services4/3rdparty/bufferclass_ti/bc_cat.c:122: error: unknown field 'ioctl' specified in initializer
    /home/terry/Desktop/beagle/SDK_BIN/OMAP35x_Graphics_SDK_setuplinux_3_01_00_07/GFX_Linux_KM/services4/3rdparty/bufferclass_ti/bc_cat.c:122: warning: initialization from incompatible pointer type
    /home/terry/Desktop/beagle/SDK_BIN/OMAP35x_Graphics_SDK_setuplinux_3_01_00_07/GFX_Linux_KM/services4/3rdparty/bufferclass_ti/bc_cat.c: In function 'bc_cat_init':
    /home/terry/Desktop/beagle/SDK_BIN/OMAP35x_Graphics_SDK_setuplinux_3_01_00_07/GFX_Linux_KM/services4/3rdparty/bufferclass_ti/bc_cat.c:490: error: implicit declaration of function 'omap_rev_lt_3_0'
    /home/terry/Desktop/beagle/SDK_BIN/OMAP35x_Graphics_SDK_setuplinux_3_01_00_07/GFX_Linux_KM/services4/3rdparty/bufferclass_ti/bc_cat.c: In function 'BCAllocKernelMem':
    /home/terry/Desktop/beagle/SDK_BIN/OMAP35x_Graphics_SDK_setuplinux_3_01_00_07/GFX_Linux_KM/services4/3rdparty/bufferclass_ti/bc_cat.c:559: error: implicit declaration of function 'kmalloc'
    /home/terry/Desktop/beagle/SDK_BIN/OMAP35x_Graphics_SDK_setuplinux_3_01_00_07/GFX_Linux_KM/services4/3rdparty/bufferclass_ti/bc_cat.c:559: warning: return makes pointer from integer without a cast
    /home/terry/Desktop/beagle/SDK_BIN/OMAP35x_Graphics_SDK_setuplinux_3_01_00_07/GFX_Linux_KM/services4/3rdparty/bufferclass_ti/bc_cat.c: In function 'BCFreeKernelMem':
    /home/terry/Desktop/beagle/SDK_BIN/OMAP35x_Graphics_SDK_setuplinux_3_01_00_07/GFX_Linux_KM/services4/3rdparty/bufferclass_ti/bc_cat.c:564: error: implicit declaration of function 'kfree'
    make[4]: *** [/home/terry/Desktop/beagle/SDK_BIN/OMAP35x_Graphics_SDK_setuplinux_3_01_00_07/GFX_Linux_KM/services4/3rdparty/bufferclass_ti/bc_cat.o] Error 1
    make[3]: *** [/home/terry/Desktop/beagle/SDK_BIN/OMAP35x_Graphics_SDK_setuplinux_3_01_00_07/GFX_Linux_KM/services4/3rdparty/bufferclass_ti] Error 2
    make[2]: *** [_module_/home/terry/Desktop/beagle/SDK_BIN/OMAP35x_Graphics_SDK_setuplinux_3_01_00_07/GFX_Linux_KM] Error 2
    make[2]: Leaving directory `/home/terry/Desktop/beagle/kernel/linux-omap-2.6'
    make[1]: *** [all] Error 2
    make[1]: Leaving directory `/home/terry/Desktop/beagle/SDK_BIN/OMAP35x_Graphics_SDK_setuplinux_3_01_00_07/GFX_Linux_KM'
    make: *** [buildkernel] Error 2

    It seems that it cannot find the right include path, so I modify Makefile.KM

     make -C $(GFX_KERNMOD_SRCPATH) KERNELDIR=$(KERNEL_INSTALL_DIR) TI_PLATFORM=omap3430 BUILD=debug EXTRA_CFLAGS=-I/home/terry/Desktop/beagle/kernel/Sourcery_G++_Lite/arm-none-linux-gnueabi/libc/usr/include EXTRA_CFLAGS+=-I/home/terry/Desktop/beagle/SDK_BIN/OMAP35x_Graphics_SDK_setuplinux_3_01_00_07/GFX_Linux_KM/include4 EXTRA_CFLAGS+=/home/terry/Desktop/beagle/SDK_BIN/OMAP35x_Graphics_SDK_setuplinux_3_01_00_07/GFX_Linux_KM/services4/include

    It still get an error

     CC [M]  /home/terry/Desktop/beagle/SDK_BIN/OMAP35x_Graphics_SDK_setuplinux_3_01_00_07/GFX_Linux_KM/services4/3rdparty/bufferclass_ti/bc_cat.o
    In file included from /home/terry/Desktop/beagle/SDK_BIN/OMAP35x_Graphics_SDK_setuplinux_3_01_00_07/GFX_Linux_KM/include4/img_defs.h:30,
                     from /home/terry/Desktop/beagle/SDK_BIN/OMAP35x_Graphics_SDK_setuplinux_3_01_00_07/GFX_Linux_KM/services4/3rdparty/bufferclass_ti/bc_cat.c:33:
    /home/terry/Desktop/beagle/SDK_BIN/OMAP35x_Graphics_SDK_setuplinux_3_01_00_07/GFX_Linux_KM/include4/img_types.h:54: error: #error ("define an OS")
    /home/terry/Desktop/beagle/SDK_BIN/OMAP35x_Graphics_SDK_setuplinux_3_01_00_07/GFX_Linux_KM/services4/3rdparty/bufferclass_ti/bc_cat.c:35: fatal error: kernelbuffer.h: No such file or directory
    compilation terminated.
    make[4]: *** [/home/terry/Desktop/beagle/SDK_BIN/OMAP35x_Graphics_SDK_setuplinux_3_01_00_07/GFX_Linux_KM/services4/3rdparty/bufferclass_ti/bc_cat.o] Error 1
    make[3]: *** [/home/terry/Desktop/beagle/SDK_BIN/OMAP35x_Graphics_SDK_setuplinux_3_01_00_07/GFX_Linux_KM/services4/3rdparty/bufferclass_ti] Error 2
    make[2]: *** [_module_/home/terry/Desktop/beagle/SDK_BIN/OMAP35x_Graphics_SDK_setuplinux_3_01_00_07/GFX_Linux_KM] Error 2
    make[2]: Leaving directory `/home/terry/Desktop/beagle/kernel/linux-omap-2.6'
    make[1]: *** [all] Error 2
    make[1]: Leaving directory `/home/terry/Desktop/beagle/SDK_BIN/OMAP35x_Graphics_SDK_setuplinux_3_01_00_07/GFX_Linux_KM'
    make: *** [buildkernel] Error 2


    Is there anything I do wrong?

  • Hi

     

    Do the below modifications in source problem will be solved , no need to  make changes in  Makefile.KM

    1) /home/terry/Desktop/beagle/SDK_BIN/OMAP35x_Graphics_SDK_setuplinux_3_01_00_07/GFX_Linux_KM/services4/3rdparty/bufferclass_ti/bc_cat.c

    replace

    .ioctl = bc_ioctl

    to

    .unlocked_ioctl = bc_ioctl

     

    2) comment width_align

     //width_align = cpu_is_omap3530() && omap_rev_lt_3_0() ? 32 : 8; and replace with
     width_align = 8; ( depends on OMAP  for OMAP3530 it is 8)

     

    3) in bc_cat.c   & bufferclass_example.h

     include<linux/slab.h>

     

     

     

  • Thanks very much! It almost works, original errors totally disappear, but the compiler complain that:

     

    /home/terry/Desktop/beagle/SDK_BIN/OMAP35x_Graphics_SDK_setuplinux_3_01_00_07/GFX_Linux_KM/services4/system/omap3430/sysutils_linux.c:36: fatal error: plat/resource.h: No such file or directory

     

    Does it mean I miss resource.h in my kernel source?

  • I found resouce.h in other kernel source, so I think it's due to this missing file in my kernel source

  • resource.h will be in  asm/resource.h in linux-2.6.33 replace in place of plat/resource.h

  • linux-omap-2.6 git is in: http://git.kernel.org/?p=linux/kernel/git/tmlind/linux-omap.git;a=summary

    some errors comes from kernel version  changes

     ioctl  relplace with unblock_ioctl 

    omap_rev_lt_3_0:   width_align = cpu_is_omap3530() && (omap_rev() < OMAP3430_REV_ES3_0) ? 32 : 8;

    kfree kmalloc :  #include <linux/slab.h>

  •   linux-omap-2.6  git is: http://git.kernel.org/?p=linux/kernel/git/tmlind/linux-omap.git;a=summary