hi
recently I build a Qt application with SGX Opengles support to rendering video with QGLwidget, but
find the performance is not good, and I get to know that there is a way to make it faster with
OMAP35x_AM35x_Video_Texture_Streaming( link:http://software-dl.ti.com/dsps/dsps_public_sw/apps_processors/OMAP35x_AM35x_Video_Texture_Streaming/1_0/index_FDS.html)
I had tried to build the example bc_cat-0.2, but when run the test. if failded as the below:
# ./gles2_bc_mmap
gles2_bc_mmap: page allocation failure. order:5, mode:0xd0
[<c0343730>] (dump_stack+0x0/0x14) from [<c0095af0>] (__alloc_pages_internal+0x398/0x3b8)
[<c0095758>] (__alloc_pages_internal+0x0/0x3b8) from [<c0095b7c>] (__get_free_pages+0x20/0x54)
[<c0095b5c>] (__get_free_pages+0x0/0x54) from [<c0095be4>] (alloc_pages_exact+0x34/0xa0)
[<c0095bb0>] (alloc_pages_exact+0x0/0xa0) from [<bf0697a4>] (bc_ioctl+0x2ec/0x488 [bc_cat])
r7:becffa50 r6:c5c16320 r5:00000038 r4:c5c16bc0
[<bf0694b8>] (bc_ioctl+0x0/0x488 [bc_cat]) from [<c00c0634>] (vfs_ioctl+0x68/0x78)
[<c00c05cc>] (vfs_ioctl+0x0/0x78) from [<c00c0b4c>] (do_vfs_ioctl+0x4dc/0x520)
r7:c59ed6c0 r6:c0086703 r5:c59ed6c0 r4:00000003
[<c00c0670>] (do_vfs_ioctl+0x0/0x520) from [<c00c0bd0>] (sys_ioctl+0x40/0x64)
[<c00c0b90>] (sys_ioctl+0x0/0x64) from [<c0031e40>] (ret_fast_syscall+0x0/0x2c)
r7:00000036 r6:becffa50 r5:00000000 r4:ffffffff
Mem-info:
Normal per-cpu:
CPU 0: hi: 42, btch: 7 usd: 0
Active_anon:109 active_file:918 inactive_anon:171
inactive_file:7200 unevictable:0 dirty:11 writeback:0 unstable:0
free:778 slab:935 mapped:299 pagetables:36 bounce:0
Normal free:3112kB min:1268kB low:1584kB high:1900kB active_anon:436kB inactive_anon:684kB active_file:3672kB inactive_file:28800kB unevictable:0kB present:100584kB pages_scanned:0 all_unreclaimable? no
lowmem_reserve[]: 0 0
Normal: 54*4kB 34*8kB 50*16kB 27*32kB 13*64kB 1*128kB 0*256kB 0*512kB 0*1024kB 0*2048kB 0*4096kB 0*8192kB = 3112kB
8143 total pagecache pages
0 pages in swap cache
Swap cache stats: add 0, delete 0, find 0/0
Free swap = 0kB
Total swap = 0kB
25344 pages of RAM
2023 free pages
13122 reserved pages
935 slab pages
4927 pages shared
0 pages swap cached
Unable to handle kernel NULL pointer dereference at virtual address 00000000
pgd = c5e84000
[00000000] *pgd=85e1a031, *pte=00000000, *ppte=00000000
Internal error: Oops: 0 [#1]
Modules linked in: cmemk bc_cat omaplfb pvrsrvkm sdmak lpm_omap3530 dsplinkk [last unloaded: cmemk]
CPU: 0 Not tainted (2.6.29-rc3-omap1 #1)
PC is at 0x0
LR is at BM_CreateContext+0xe8/0x1d0 [pvrsrvkm]
pc : [<00000000>] lr : [<bf04329c>] psr: a0000013
sp : c5f61dd0 ip : c5805a00 fp : c5f61e04
r10: c5f61e14 r9 : 00000000 r8 : c5f61e5c
r7 : c5f81a60 r6 : 00000000 r5 : c5dac740 r4 : c5f81ac0
r3 : c5f81ae0 r2 : c5f61e14 r1 : c5f81ac0 r0 : c5dac740
Flags: NzCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment user
Control: 10c5387d Table: 85e84019 DAC: 00000015
Process gles2_bc_mmap (pid: 1809, stack limit = 0xc5f602e0)
Stack: (0xc5f61dd0 to 0xc5f62000)
1dc0: bf044a24 bf03f324 c5b975a0 c5f81ac0
1de0: 00000000 c5df1da0 00000000 c5ea2000 c5ea300c 00000000 c5f61e44 c5f61e08
1e00: bf046d2c bf0431c0 c5ea3008 c5f61e60 00000021 c5df1da0 c5ea2000 c5ea3000
1e20: c5df1da0 00000000 c5ea2000 00000003 c5f60000 00000000 c5f61e84 c5f61e48
1e40: bf051250 bf046d04 c5ea300c c5f61e5c bf05bb6c c5f61eb0 c5df1da0 00000000
1e60: 00000003 c5dac740 c5ea2000 c5f61eb0 c5df1da0 c5ea3000 c5f61eac c5f61e88
1e80: bf04e0a8 bf0511d0 becff314 c01c6703 00000711 c5990f20 becff314 c5f60000
1ea0: c5f61eec c5f61eb0 bf049d4c bf04dfe0 00000003 0000001c becff5d0 00000008
1ec0: becff344 0000028c 00000002 c5df1da0 00000201 c5990f20 becff314 c01c6703
1ee0: c5f61f0c c5f61ef0 c00c0634 bf049c94 00000004 c5990f20 c01c6703 c5990f20
1f00: c5f61f7c c5f61f10 c00c0b4c c00c05d8 00000000 00000000 fffffffd 00000000
1f20: c5f61f54 c5f61f30 c0076350 c0052f14 c598a01c c59b2980 00000017 c5db5e20
1f40: c5f60000 c0031e94 c5f61f6c c5f61f58 c00763e0 00000004 becff314 c01c6703
1f60: c5990f20 c0031fe8 c5f60000 00000000 c5f61fa4 c5f61f80 c00c0bd0 c00c067c
1f80: c0343ee4 00000000 40289860 becff94c becff344 00000036 00000000 c5f61fa8
1fa0: c0031e40 c00c0b9c 40289860 becff94c 00000004 c01c6703 becff314 0000001c
1fc0: 40289860 becff94c becff344 00000036 becff5f4 00000000 00000000 00000100
1fe0: 402897d0 becff310 4028c6d4 40158aec a0000010 00000004 00000000 00000000
Backtrace:
[<bf0431b4>] (BM_CreateContext+0x0/0x1d0 [pvrsrvkm]) from [<bf046d2c>] (PVRSRVCreateDeviceMemContextKM+0x34/0x11c [pvrsrvkm])
[<bf046cf8>] (PVRSRVCreateDeviceMemContextKM+0x0/0x11c [pvrsrvkm]) from [<bf051250>] (PVRSRVCreateDeviceMemContextBW+0x8c/0x1a4 [pvrsrvkm])
[<bf0511c4>] (PVRSRVCreateDeviceMemContextBW+0x0/0x1a4 [pvrsrvkm]) from [<bf04e0a8>] (BridgedDispatchKM+0xd4/0x144 [pvrsrvkm])
r7:c5ea3000 r6:c5df1da0 r5:c5f61eb0 r4:c5ea2000
[<bf04dfd4>] (BridgedDispatchKM+0x0/0x144 [pvrsrvkm]) from [<bf049d4c>] (PVRSRV_BridgeDispatchKM+0xc4/0xec [pvrsrvkm])
r9:c5f60000 r8:becff314 r7:c5990f20 r6:00000711 r5:c01c6703
r4:becff314
[<bf049c88>] (PVRSRV_BridgeDispatchKM+0x0/0xec [pvrsrvkm]) from [<c00c0634>] (vfs_ioctl+0x68/0x78)
r6:c01c6703 r5:becff314 r4:c5990f20
[<c00c05cc>] (vfs_ioctl+0x0/0x78) from [<c00c0b4c>] (do_vfs_ioctl+0x4dc/0x520)
r7:c5990f20 r6:c01c6703 r5:c5990f20 r4:00000004
[<c00c0670>] (do_vfs_ioctl+0x0/0x520) from [<c00c0bd0>] (sys_ioctl+0x40/0x64)
[<c00c0b90>] (sys_ioctl+0x0/0x64) from [<c0031e40>] (ret_fast_syscall+0x0/0x2c)
r7:00000036 r6:becff344 r5:becff94c r4:40289860
Code: bad PC value.
--------------------------------------
my platform env is : Linux-psp-02.01.03.11, OMAP35x_Graphics_SDK_3_00_00_09.
note that INSTALL said that it should patch sgx-gfx-sdk with
--- ./GFX_Linux_KM/services4/system/omap3430/sysinfo.h.orig 2009-10-30 01:13:26.000000000 -0500
+++ ./GFX_Linux_KM/services4/system/omap3430/sysinfo.h 2010-02-12 11:20:59.000000000 -0600
@@ -38,7 +38,7 @@
} SYS_DEVICE_TYPE;
-#define SYS_DEVICE_COUNT 3
+#define SYS_DEVICE_COUNT 15
#define PRM_REG32(offset) (offset)
#define CM_REG32(offset) (offset
--- ./GFX_Linux_KM/services4/srvkm/common/deviceclass.c.orig 2009-10-30 01:13:26.000000000 -0500
+++ ./GFX_Linux_KM/services4/srvkm/common/deviceclass.c 2010-02-12 11:19:55.000000000 -0600
@@ -417,7 +417,12 @@
psDeviceNode->psSysData = psSysData;
- AllocateDeviceID(psSysData, &psDeviceNode->sDevId.ui32DeviceIndex);
+ if (AllocateDeviceID(psSysData, &psDeviceNode->sDevId.ui32DeviceIndex)
+ != PVRSRV_OK) {
+ PVR_DPF((PVR_DBG_ERROR,"PVRSRVRegisterBCDeviceKM: Failed deviceId alloc"));
+ goto ErrorExit;
+ }
+
psBCInfo->ui32DeviceID = psDeviceNode->sDevId.ui32DeviceIndex;
if (pui32DeviceID)
{
--------------------------------
I tried it but failed.
anybody can help me make bc_cat example succeed to run?
thanks