我们有一个嵌入式系统,它使用基于 TI 8168 的硬件。该 SOC 使用 SGX 530 作为其 GPU。我们在这个平台上运行 Android 4.0.3。我们发现 Android 应用程序的帧速率似乎低于在类似功率的平板电脑上运行的相同应用程序。
在对 Android Activity、Android 平台代码中的各种功能进行计时后,我们注意到 eglSwapBuffer() 大部分时间都需要 45+ 毫秒。我在各种论坛上看到的是它不应该超过 16ms。帧缓冲区的分辨率为 1920x1080。
我感谢任何解决此瓶颈的建议。
驱动程序版本(即 /proc/pvr/version 内容)
版本 blaze_android_sgx_ogles1_ogles2_GPL sgxddk 18 1.8@789263 (release) omap4430_android
系统版本字符串:SGX 修订版 = 1.2.5
/system/lib/egl 文件夹中 egl.cfg 的内容:
0 0 安卓
0 1 POWERVR_SGX530_125
/system/lib/egl 文件夹的内容
egl.cfg
libEGL_POWERVR_SGX530_125.so
libGLES_android.so
libGLESv1_CM_POWERVR_SGX530_125.so
libGLESv2_POWERVR_SGX530_125.so
/system/bin/sgx 文件夹中 rc.pvr 脚本的内容
#!/system/bin/sh
# PowerVR SGX DDK for Embedded Linux - installation script
#
# Copyright 2004-2006 by Imagination Technologies Limited.
# All rights reserved. No part of this software, either
# material or conceptual may be copied or distributed,
# transmitted, transcribed, stored in a retrieval system
# or translated into any human or computer language in any
# form by any means, electronic, mechanical, manual or
# other-wise, or disclosed to third parties without the
# express written permission of Imagination Technologies
# Limited, Unit 8, HomePark Industrial Estate,
# King's Langley, Hertfordshire, WD4 8LZ, U.K.
# Auto-generated for omap4430_android from
# $RCSfile: common.m4 $ $Revision: 1.8 $
# $RCSfile: rc.pvr.m4 $ $Revision: 1.26 $
# $RCSfile: rc.pvr.m4 $ $Revision: 1.5 $
#
load_pvr()
{
/system/bin/devmem2 0x48180F04 w 0x0
/system/bin/devmem2 0x48180900 w 0x2
/system/bin/devmem2 0x48180920 w 0x2
insmod /system/bin/sgx/pvrsrvkm.ko
insmod /system/bin/sgx/omaplfb.ko
sleep 1
chmod 0666 /dev/pvrsrvkm
/system/bin/pvrsrvinit
echo "Loaded PowerVR consumer services."
return 0;
}
unload_pvr()
{
if rmmod omaplfb; then :; else return 1; fi
if rmmod pvrsrvkm; then :; else return 1; fi
echo "Unloaded PowerVR consumer services."
return 0;
}
# Deal with the type of invocation we get.
#
case "$1" in
"start")
load_pvr
;;
stop)
if ! unload_pvr; then
echo "Couldn't unload modules" >&2;
fi
;;
reload|restart)
if unload_pvr; then
load_pvr
else
echo "Couldn't unload modules" >&2;
fi
;;
*)
echo "$0: unknown argument $1." >&2;
;;
esac
Surfaceflinger 出现时会记录:
SurfaceFlinger(687): starting up service SurfaceFlinger
SurfaceFlinger(687): SurfaceFlinger is starting
SurfaceFlinger(687): Initializing thread for: SurfaceFlinger
SurfaceFlinger(687): SurfaceFlinger's main thread ready to run. Initializing graphics H/W...
SurfaceFlinger(687): ro.sf.lcd_density not defined, using 160 dpi by default.
SurfaceFlinger(687): EGL informations:
SurfaceFlinger(687): # of configs : 30
SurfaceFlinger(687): vendor : Android
SurfaceFlinger(687): version : 1.4 Android META-EGL
SurfaceFlinger(687): extensions: EGL_KHR_image EGL_KHR_image_base EGL_KHR_image_base EGL_KHR_gl_texture_2D_image EGL_KHR_gl_texture_cubemap_image EGL_KHR_gl_renderbuffer_image EGL_KHR_fence_sync EGL_ANDROID_image_native_buffer EGL_ANDROID_image_native_buffer
SurfaceFlinger(687): Client API: OpenGL ES
SurfaceFlinger(687): EGLSurface: 8-8-8-8, config=0x1
SurfaceFlinger(687): OpenGL informations:
SurfaceFlinger(687): vendor : Imagination Technologies
SurfaceFlinger(687): renderer : PowerVR SGX 530
SurfaceFlinger(687): version : OpenGL ES-CM 1.1
SurfaceFlinger(687): extensions: GL_OES_byte_coordinates GL_OES_fixed_point GL_OES_single_precision GL_OES_matrix_get GL_OES_read_format GL_OES_compressed_paletted_texture GL_OES_point_sprite GL_OES_point_size_array GL_OES_matrix_palette GL_OES_draw_texture GL_OES_query_matrix GL_OES_texture_env_crossbar GL_OES_texture_mirrored_repeat GL_OES_texture_cube_map GL_OES_blend_subtract GL_OES_blend_func_separate GL_OES_blend_equation_separate GL_OES_stencil_wrap GL_OES_extended_matrix_palette GL_OES_framebuffer_object GL_OES_rgb8_rgba8 GL_OES_depth24 GL_OES_stencil8 GL_OES_compressed_ETC1_RGB8_texture GL_OES_mapbuffer GL_OES_EGL_image GL_OES_EGL_image_external GL_EXT_multi_draw_arrays GL_OES_required_internalformat GL_IMG_read_format GL_IMG_texture_compression_pvrtc GL_IMG_texture_format_BGRA8888 GL_EXT_texture_format_BGRA8888 GL_OES_egl_sync GL_IMG_vertex_array_object
SurfaceFlinger(687): GL_MAX_TEXTURE_SIZE = 2048
SurfaceFlinger(687): GL_MAX_VIEWPORT_DIMS = 2048 x 2048
SurfaceFlinger(687): flags = 00010000
SurfaceFlinger(687): This platform does not support HW composer