Reply
Thread Tools
Stskeeps's Avatar
Posts: 1,586 | Thanked: 10,165 times | Joined on Jun 2008 @ Warsaw, Poland
#491
Right, small tutorial:

You need to flash the zImage that is there, it is basically Diablo kernel + higher DMA memory available.


Copy lib*.so lib*.a to /usr/lib, run ldconfig
Copy glinfo, egl_test, mbxdaemon, ovg_demos, ovg_test, power_test, pvr2d_test, services_test, xegl_test, xovg_test, xtest to /usr/bin


You have two .ko's, mbxaccess and omaplcd.ko. You need to insmod mbxaccess.ko first, then omaplcd.ko

You need to then set up some device nodes (after mbxaccess and omaplcd is loaded);

mbxaccess_maj=`grep ""mbx"$" /proc/devices | cut -b1,2,3`
/bin/rm -f /dev/mbx
/bin/mknod /dev/mbx c $mbxaccess_maj 0

disp_maj=`grep "omaplcd$" /proc/devices | cut -b1,2,3`
/bin/rm -f /dev/omaplcd
/bin/mknod /dev/omaplcd c $disp_maj 0
chmod a+rw /dev/mbx /dev/omaplcd

You can now start mbxdaemon

Verify with ./glinfo. Perhaps ./services_test. Perhaps test ./xegltest as 'user' in X-terminal. Nothing fancy will show, but at least the drivers seem to work. Keep in mind that this is first step, it's now up to you to see if you can get something sane out of it. I stated some potential things above (cairo accelerated?)
__________________
As you go on to other communities, remember to build them around politeness, respect, trust and humility. Be wary of poisonous people and deal with them before they end up killing your community.. Seen it happen to too many IRC channels, forums, open source projects.

Last edited by Stskeeps; 02-22-2010 at 08:08 AM.
 

The Following 9 Users Say Thank You to Stskeeps For This Useful Post:
nowave7's Avatar
Posts: 241 | Thanked: 56 times | Joined on Jan 2009 @ Novi Sad, Serbia
#492
This is exactly what I was doing, but it doesn't seem to be working on my device, for some reason. Tried strace, and gdb on glinfo, but came up with nothing.
__________________
Save the whales, feed the hungry, free the mallocs!
 
Stskeeps's Avatar
Posts: 1,586 | Thanked: 10,165 times | Joined on Jun 2008 @ Warsaw, Poland
#493
Originally Posted by fanoush View Post
That would be great :-) Maybe a Wiki page would do too.

Also what are ideas about further cooperation and code sharing wrt fixing the GPL-ed kernel part? Wiki page with progress/developer comments, IRC, some mailing list?
Well, I'm up for anything - I guess a wiki page would be useful and a mailing list, maybe a garage project would be in order?
__________________
As you go on to other communities, remember to build them around politeness, respect, trust and humility. Be wary of poisonous people and deal with them before they end up killing your community.. Seen it happen to too many IRC channels, forums, open source projects.
 
Stskeeps's Avatar
Posts: 1,586 | Thanked: 10,165 times | Joined on Jun 2008 @ Warsaw, Poland
#494
Originally Posted by nowave7 View Post
This is exactly what I was doing, but it doesn't seem to be working on my device, for some reason. Tried strace, and gdb on glinfo, but came up with nothing.
Posted it a little too early, try again?
__________________
As you go on to other communities, remember to build them around politeness, respect, trust and humility. Be wary of poisonous people and deal with them before they end up killing your community.. Seen it happen to too many IRC channels, forums, open source projects.
 
nowave7's Avatar
Posts: 241 | Thanked: 56 times | Joined on Jan 2009 @ Novi Sad, Serbia
#495
Would have helped had I known the test programs require regular user account, and not root Anyway, still hitting some problems:

Code:
----------------------- Start -----------------------
Try calling PVRSRVConnect an invalid argument:
PVR_SRVUM:(Error): PVRSRVConnect: Invalid parameter [119, /home/girish/Graphics/Nokia/embedded/services_um/env/linux/pvr_glue.c]
 OK
Call PVRSRVConnect a valid argument:
PVR_SRVUM:(Error): Cannot open device driver /dev/pvrsrv.
 [79, /home/girish/Graphics/Nokia/embedded/services_um/env/linux/pvr_bridge_u.c]
 FAIL - PVRSRV_ERROR_INIT_FAILURE
PVR_SRVUM:
PVR_SRVUM:Memory Stats
PVR_SRVUM:------------
PVR_SRVUM:
PVR_SRVUM:High Water Mark = 0 bytes
Can not open device /dev/pvrsrv . Where did this come from?
EDIT:
My bad. The device in question appears to be /dev/mbx for which I did not set proper permissions. After doing so, glinfo just hangs again...
It appears root/user has no effect after all...
__________________
Save the whales, feed the hungry, free the mallocs!

Last edited by nowave7; 02-22-2010 at 09:18 AM.
 
Stskeeps's Avatar
Posts: 1,586 | Thanked: 10,165 times | Joined on Jun 2008 @ Warsaw, Poland
#496
Originally Posted by nowave7 View Post
Would have helped had I known the test programs require regular user account, and not root Anyway, still hitting some problems:

Can not open device /dev/pvrsrv . Where did this come from?
Which test app does this come from?
__________________
As you go on to other communities, remember to build them around politeness, respect, trust and humility. Be wary of poisonous people and deal with them before they end up killing your community.. Seen it happen to too many IRC channels, forums, open source projects.
 
nowave7's Avatar
Posts: 241 | Thanked: 56 times | Joined on Jan 2009 @ Novi Sad, Serbia
#497
Originally Posted by Stskeeps View Post
Which test app does this come from?
It was from services_test.
An interesting point. When running glinfo and services_test, through strace, they both seem to hang at the very same spot:
Code:
open("/tmp/mbx/txfifo", O_WRONLY
This time I double checked the file in question has permissions set to read/write for all users/groups.
__________________
Save the whales, feed the hungry, free the mallocs!

Last edited by nowave7; 02-22-2010 at 09:25 AM.
 
Posts: 207 | Thanked: 27 times | Joined on Apr 2008
#498
Stskeeps
I did what you wrote.
I compiled kernel with
CONFIG_FB_OMAP_CONSISTENT_DMA_SIZE=8
and flashed it.
I compiled and installed kernel modules (debug version),
created and set perms for devices.
When I start glinfo kernel crashed
[ 999.296875] No flipbuffers
[ 999.304687] mbxdaemon: page allocation failure. order:8, mode:0xd0
[ 999.304687] [<c002c168>] (dump_stack+0x0/0x14) from [<c008204c>] (__alloc_pages+0x2c0/0x2d4)
[ 999.304687] [<c0081d8c>] (__alloc_pages+0x0/0x2d4) from [<c002dd20>] (__dma_alloc+0x184/0x3e4)
[ 999.304687] [<c002db9c>] (__dma_alloc+0x0/0x3e4) from [<c002dfa4>] (dma_alloc_coherent+0x24/0x30)
[ 999.304687] [<c002df80>] (dma_alloc_coherent+0x0/0x30) from [<bf072c2c>] (AllocContiguousMemory+0x30/0x6c [omaplcd])
[ 999.304687] [<bf072bfc>] (AllocContiguousMemory+0x0/0x6c [omaplcd]) from [<bf072d3c>] (GetBackBuffer+0xa8/0xc0 [omaplcd])
[ 999.304687] r6 = 00000001 r5 = 00000000 r4 = 00000000
[ 999.304687] [<bf072c94>] (GetBackBuffer+0x0/0xc0 [omaplcd]) from [<bf07243c>] (InitMain+0x19c/0x250 [omaplcd])
[ 999.304687] r6 = C890C00C r5 = C890C000 r4 = 00000000
[ 999.304687] [<bf0722a0>] (InitMain+0x0/0x250 [omaplcd]) from [<bf073544>] (OMAPLCDBridgeDispatch+0x408/0x460 [omaplcd])
[ 999.304687] [<bf07313c>] (OMAPLCDBridgeDispatch+0x0/0x460 [omaplcd]) from [<c00a9bf4>] (do_ioctl+0x74/0x84)
[ 999.304687] r6 = BEF400CC r5 = FFFFFFE7 r4 = C3FD50C0
[ 999.304687] [<c00a9b80>] (do_ioctl+0x0/0x84) from [<c00a9e9c>] (vfs_ioctl+0x298/0x2b8)
[ 999.304687] r6 = 00000000 r5 = BEF400CC r4 = C3FD50C0
[ 999.304687] [<c00a9c04>] (vfs_ioctl+0x0/0x2b8) from [<c00a9f28>] (sys_ioctl+0x6c/0x94)
[ 999.304687] r7 = 00000008 r6 = BEF400CC r5 = 00000000 r4 = C3FD50C0
[ 999.304687] [<c00a9ebc>] (sys_ioctl+0x0/0x94) from [<c0027be0>] (ret_fast_syscall+0x0/0x2c)
[ 999.304687] r8 = C0027D88 r7 = 00000036 r6 = 00009190 r5 = 0000B478
[ 999.304687] r4 = 40022DB8
[ 999.304687] Mem-info:
[ 999.304687] DMA per-cpu:
[ 999.304687] CPU 0: Hot: hi: 42, btch: 7 usd: 0 Cold: hi: 14, btch: 3 usd: 13
[ 999.304687] Active:20332 inactive:6234 dirty:1 writeback:0 unstable:0
[ 999.304687] free:471 slab:1598 mapped:7451 pagetables:551 bounce:0
[ 999.304687] DMA free:1884kB min:1440kB low:1800kB high:2160kB active:81328kB inactive:24936kB present:130048kB pages_scanned:16 all_unreclaimable? no
[ 999.304687] lowmem_reserve[]: 0 0
[ 999.304687] DMA: 21*4kB 11*8kB 7*16kB 6*32kB 0*64kB 1*128kB 1*256kB 0*512kB 1*1024kB 0*2048kB 0*4096kB = 1884kB
[ 999.304687] Swap cache: add 0, delete 0, find 0/0, race 0+0
[ 999.304687] Free swap = 250712kB
[ 999.304687] Total swap = 250712kB
[ 999.304687] Free swap: 250712kB
[ 999.328125] 32768 pages of RAM
[ 999.328125] 794 free pages
[ 999.328125] 2728 reserved pages
[ 999.328125] 1598 slab pages
[ 999.328125] 28692 pages shared
[ 999.328125] 0 pages swap cached
[ 999.328125] AllocContiguousMemory: unable to allocate contiguous memory of bb800
[ 999.328125] request OMAPLCD IRQ failedrequest OMAPLCD IRQ failed<6>PVR_KERNLError): Failed to find offset struct (KVAddress=c8abd000)
[ 1000.671875] [567, /opt/3d/MBX_Linux_KM/embedded//services/env/linux/mmap.c]
[ 1000.671875] PVR_KERNLError): Failed to find offset struct (KVAddress=c891a000)
[ 1000.671875] [567, /opt/3d/MBX_Linux_KM/embedded//services/env/linux/mmap.c]
[ 1000.671875] PVR_KERNLError): Failed to find offset struct (KVAddress=c8914000)
[ 1000.671875] [567, /opt/3d/MBX_Linux_KM/embedded//services/env/linux/mmap.c]
[ 1000.679687] PVR_KERNLError): Failed to find offset struct (KVAddress=c8912000)
[ 1000.679687] [567, /opt/3d/MBX_Linux_KM/embedded//services/env/linux/mmap.c]


glinfo output:
glinfo
PVR_SRVUMWarning): Hint: Setting WindowSystem to libpvrX11WSEGL.so [192, /home/girish/Graphics/Nokia/embedded/services_um/env/linux/pvr_apphint.c]
PVR_DMSRV:HostMapPhysToLin: Mapped 0x48050000, 0x1000 bytes to 0xc8910000
PVR_DMSRV:HostMapPhysToLin: Mapped 0x80600000, 0xbc000 bytes to 0xc8a00000

**********************************
Config num 1
EGL vendor string: Imagination Technologies
EGL version string: 1.2 build 3.5.35.630
EGL extensions:
EGL_IMG_power_management
EGL config Attributes:
EGL_CONFIG_ID = 0x1
EGL_BUFFER_SIZE = 0x10
EGL_ALPHA_SIZE = 0x0
EGL_BLUE_SIZE = 0x5
EGL_GREEN_SIZE = 0x6
EGL_RED_SIZE = 0x5
EGL_DEPTH_SIZE = 0x18
EGL_STENCIL_SIZE = 0x0
EGL_CONFIG_CAVEAT = 0x3038
EGL_LEVEL = 0x0
EGL_MAX_PBUFFER_HEIGHT = 0x400
EGL_MAX_PBUFFER_PIXELS = 0x1fc000
EGL_MAX_PBUFFER_WIDTH = 0x7f0
EGL_NATIVE_RENDERABLE = 0x0
EGL_NATIVE_VISUAL_ID = 0x21
EGL_NATIVE_VISUAL_TYPE = 0x151a8
EGL_SAMPLES = 0x0
EGL_SAMPLE_BUFFERS = 0x0
EGL_SURFACE_TYPE = 0x5
EGL_TRANSPARENT_TYPE = 0x3038
EGL_TRANSPARENT_BLUE_VALUE = 0x0
EGL_TRANSPARENT_GREEN_VALUE = 0x0
EGL_TRANSPARENT_RED_VALUE = 0x0
PVR_SRVUMError): GLESTimeNow: not implemented [81, linux_os.c]
PVR_DMSRV:ui32PageTableBase = 8c2000
PVR_DMSRV:ui32StartPage = 1
PVR_DMSRV:ui32EndPage = 200
PVR_DMSRV:ui32ParamBase = 0
X Error of failed request: BadWindow (invalid Window parameter)
Major opcode of failed request: 3 (X_GetWindowAttributes)
Resource id in failed request: 0x0
Serial number of failed request: 7
Current serial number in output stream: 8
PVR_SRVUM:
PVR_SRVUM:Memory Stats
PVR_SRVUM:------------
PVR_SRVUM:
PVR_SRVUM:High Water Mark = 25304 bytes
PVR_SRVUM:
PVR_SRVUM:18088 bytes still allocated in 35 allocations
PVR_SRVUM:
PVR_SRVUM:1 - 40 bytes at 0x1F128 - services_calls.c:39
PVR_SRVUM:2 - 32 bytes at 0x1EF88 - cfg_core.c:267
PVR_SRVUM:3 - 24 bytes at 0x1EFB0 - cfg_core.c:54
PVR_SRVUM:4 - 128 bytes at 0x1F0A0 - cfg_core.c:267
PVR_SRVUM:5 - 24 bytes at 0x1EF48 - cfg_core.c:54
PVR_SRVUM:6 - 24 bytes at 0x1EF08 - cfg_core.c:54
PVR_SRVUM:7 - 104 bytes at 0x1EE78 - khronos_egl.c:2220
PVR_SRVUM:8 - 40 bytes at 0x1EE28 - ./common/heapman.c:56
PVR_SRVUM:9 - 1288 bytes at 0x1E8F8 - ./common/dvcgen.c:1016
PVR_SRVUM:10 - 12 bytes at 0x15380 - names.c:631
PVR_SRVUM:11 - 508 bytes at 0x1E6B8 - names.c:585
PVR_SRVUM:12 - 28 bytes at 0x1E678 - names.c:578
PVR_SRVUM:13 - 648 bytes at 0x1E3C8 - vprogram.c:1424
PVR_SRVUM:14 - 12 bytes at 0x14E30 - names.c:631
PVR_SRVUM:15 - 508 bytes at 0x1E188 - names.c:585
PVR_SRVUM:16 - 28 bytes at 0x1E148 - names.c:578
PVR_SRVUM:17 - 524 bytes at 0x1DF18 - tex.c:7172
PVR_SRVUM:18 - 524 bytes at 0x1DCE8 - tex.c:7172
PVR_SRVUM:19 - 12 bytes at 0x1AAC0 - names.c:631
PVR_SRVUM:20 - 508 bytes at 0x1DAA8 - names.c:585
PVR_SRVUM:21 - 28 bytes at 0x1DA68 - names.c:578
PVR_SRVUM:22 - 48 bytes at 0x1AA88 - /home/girish/Graphics/Nokia/embedded/services_um/env/linux/pvr_glue.c:686
PVR_SRVUM:23 - 524 bytes at 0x1D838 - tex.c:7368
PVR_SRVUM:24 - 32 bytes at 0x14DC8 - tex.c:7354
PVR_SRVUM:25 - 11480 bytes at 0x1AB58 - eglglue.c:60
PVR_SRVUM:26 - 32 bytes at 0x14DA0 - cfg_core.c:267
PVR_SRVUM:27 - 24 bytes at 0x1A938 - cfg_core.c:54
PVR_SRVUM:28 - 128 bytes at 0x1AAD0 - cfg_core.c:267
PVR_SRVUM:29 - 24 bytes at 0x14D80 - cfg_core.c:54
PVR_SRVUM:30 - 24 bytes at 0x1A978 - cfg_core.c:54
PVR_SRVUM:31 - 140 bytes at 0x1A9D8 - khronos_egl.c:3743
PVR_SRVUM:32 - 40 bytes at 0x15330 - ./common/pvr2dinit.c:485
PVR_SRVUM:33 - 48 bytes at 0x14E70 - /home/girish/Graphics/Nokia/embedded/services_um/env/linux/mbx/mbx_glue.c:679
PVR_SRVUM:34 - 356 bytes at 0x1A500 - ./common/pvr2dinit.c:356
PVR_SRVUM:35 - 144 bytes at 0x12018 - tls.c:47
PVR_SRVUM:
Problems reading from a client. Disconnecting
Disconnecting client 133
PVR_DMSRVWarning): Free stale HW Context ID [1224, /home/girish/Graphics/Nokia/embedded/services/devices/devclass_3d/mbx/mbxinit.c]
PVR_DMSRVWarning): Free stale HW Context ID [1224, /home/girish/Graphics/Nokia/embedded/services/devices/devclass_3d/mbx/mbxinit.c]
 
Posts: 207 | Thanked: 27 times | Joined on Apr 2008
#499
Messages while compiling modules:
make BUILD=debug KBUILD=1 all
! ======================= MBX GPL BUILD ==============================:
! DATE: пн фев 22 2010 16:46:19 MSK
! PWD: /opt/3d/MBX_Linux_KM/embedded/build/omap2420_linux
!
! SETTINGS:
!
! PVRVERSION: 3.5.35.630
! KERNELVERSION: 2.6.21
! BUILD=debug
! PVR_BUILD_DIR=omap2420_linux
! SYSTEM=omap24xx
! CROSS_COMPILE=arm-none-linux-gnueabi-
! TOOLCHAIN=/DATA/toolchain/arm-2007q3
! KERNELDIR=/usr/src/kernel-source-diablo
!
! ALL_CFLAGS=-DLINUX -DPVR_BUILD_DIR="omap2420_linux" -DPVR_BUILD_DATE="пн фев 22 2010 16:46:18 MSK" -DPVR_BUILD_TYPE="debug" -DDEBUG -g -O0 -DBLIT -DMONTAVISTA_PM -DOMAP2420 -DVIPT_MMAP_COLOUR -DREENTRANCY_PROTECTION -DUSE_TERMINATE_WORD -DSUPPORT_XWS -UUSE_TERMINATE_WORD -DOPENGLES1_1 -DSUPPORT_POWER_MANAGEMENT -DEXTENDED_COLOR_MATERIAL -DPVRTC -DSINGLE_PRECISION -DUSER_CLIPPLANES -DTEXENVCOMBINE -DTEXENVDOT3 -DQUERY_MATRIX -DVERTEX_PROGRAM -DTEXTURE_STREAM -DMATRIX_PALETTE -DRENDER_TO_TEXTURE -DDRAW_TEXTURE -DSUPPORT_DYNAMIC_PBRESIZE -DUSE_FBDEV -DFBDEV_NAME="/dev/fb/0" -DREAD_FORMAT -DSUPPORT_MBX_1_5_FEATURES -DTEXTURE_FORMAT_8888 -DSCHEDULER_CONTROL_SUPPORT -DUSE_IMG_POWER_DOMAIN_FUNCTION -DMULTI_DRAW_ARRAYS -DDYNAMIC_VERTEX_CODE_GEN -DEGL1_2 -DFAST_TWIDDLE_16BPP -DFAST_TWIDDLE_32BPP -DSUPPORT_OPENGL -DSUPPORT_OPENVG -DSUPPORT_HW_RECOVERY -DKBUILD -DMBX_GPL -DUPCONVERT_SINGLE_CHANNEL_TEXTURES -DPRN_ENABLE=defined -Wall -fno-strict-aliasing
!
! ALL_INCLUDES=
!
! SYSBIN is
! /opt/3d/MBX_Linux_KM/embedded/binary_omap2420_linux_debug
!
! TARGET=all
!
+gpl/driver
Compiling mbxaccess.c
mbxaccess.c:172: warning: 'powervr_device' defined but not used
Compiling malloc_debug.c
Compiling /opt/3d/MBX_Linux_KM/embedded/services/env/linux/mmap.c
/opt/3d/MBX_Linux_KM/embedded/services/env/linux/mmap.c: In function `PVRMMapRegisterArea':
/opt/3d/MBX_Linux_KM/embedded/services/env/linux/mmap.c:455: warning: return from incompatible pointer type
/opt/3d/MBX_Linux_KM/embedded/services/env/linux/mmap.c:479: warning: return from incompatible pointer type

Compiling mbxaccess_iowrapper.c
Compiling mbxaccess_mbxmem.c
Compiling mbxaccess_memwrapper.c
Compiling mbxaccess_mmapwrapper.c
Compiling mbxaccess_procwrapper.c
Compiling mbxaccess_pvrclassjtable.c
Compiling mbxaccess_timerwrapper.c
Compiling mbxaccess_virtmemwrapper.c
Compiling /opt/3d/MBX_Linux_KM/embedded/services/env/linux/mm.c
Compiling /opt/3d/MBX_Linux_KM/embedded/services/env/linux/mutex.c
Compiling /opt/3d/MBX_Linux_KM/embedded/services/env/linux/pvr_debug.c
Linking pre-processed kernel module tmp_omap2420_linux_debug_mbxaccess.ko/mbxaccess.core.o
Performing module post processing
Compiling mbxaccess.core.mod.c
Linking post-processed kernel module bin_omap2420_linux_debug_mbxaccess.ko/mbxaccess.ko
Copying bin_omap2420_linux_debug_mbxaccess.ko/mbxaccess.ko to /opt/3d/MBX_Linux_KM/embedded/binary_omap2420_linux_debug
-gpl/driver
+3rdparty/omap24xx_lcd/kernel
Compiling omaplcd_displayclass.c
Compiling omaplcd_linux.c
omaplcd_linux.c: In function `AllocContiguousMemory':
omaplcd_linux.c:261: warning: unsigned int format, IMG_UINT32 arg (arg 2)
omaplcd_linux.c: In function `InstallVsyncISR':
omaplcd_linux.c:498: warning: passing arg 2 of `request_irq' from incompatible pointer type

Linking pre-processed kernel module tmp_omap2420_linux_debug_omaplcd.ko/omaplcd.core.o
Performing module post processing
Compiling omaplcd.core.mod.c
Linking post-processed kernel module bin_omap2420_linux_debug_omaplcd.ko/omaplcd.ko
Copying bin_omap2420_linux_debug_omaplcd.ko/omaplcd.ko to /opt/3d/MBX_Linux_KM/embedded/binary_omap2420_linux_debug
-3rdparty/omap24xx_lcd/kernel
Creating /opt/3d/MBX_Linux_KM/embedded/binary_omap2420_linux_debug/install.sh
Creating /opt/3d/MBX_Linux_KM/embedded/binary_omap2420_linux_debug/rc.pvr
 
nowave7's Avatar
Posts: 241 | Thanked: 56 times | Joined on Jan 2009 @ Novi Sad, Serbia
#500
I did use a custom built kernel, but with it, the device could not even boot. This is the config I used for it http://inz.fi/nokia_2420_defconfig. Of course I set the CONFIG_FB_OMAP_CONSISTENT_DMA_SIZE to 8.
__________________
Save the whales, feed the hungry, free the mallocs!
 
Reply

Thread Tools

 
Forum Jump


All times are GMT -4. The time now is 01:24 AM.