Pergunta

Temos um sistema embarcado que usa h/w baseado em TI 8168.Este SOC tem SGX 530 como GPU.Estamos executando o Android 4.0.3 nesta plataforma.Descobrimos que a taxa de quadros dos aplicativos Android parece ser baixa em comparação com o mesmo aplicativo executado em um tablet com tecnologia semelhante.

Depois de cronometrar várias funções na atividade do Android, código da plataforma Android, notamos que eglSwapBuffer() leva mais de 45 ms na maioria das vezes.O que li em vários fóruns é que não deve ultrapassar 16ms.A resolução do buffer de quadros é 1920x1080.

Agradeço qualquer sugestão para corrigir esse gargalo.

A versão do driver (ou seja, conteúdo /proc/pvr/version)

Versão blaze_android_sgx_ogles1_ogles2_GPL sgxddk 18 1.8@789263 (lançamento) omap4430_android
Cadeia de versão do sistema:Revisão SGX = 1.2.5

O conteúdo de egl.cfg da pasta /system/lib/egl:

0 0 andróide
0 1 POWERVR_SGX530_125

O conteúdo da pasta /system/lib/egl

egl.cfg
libEGL_POWERVR_SGX530_125.so
libGLES_android.so
libGLESv1_CM_POWERVR_SGX530_125.so
libGLESv2_POWERVR_SGX530_125.so

O conteúdo do script rc.pvr da pasta /system/bin/sgx

#!/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

O Surfaceflinger registra quando está chegando:

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
Foi útil?

Solução

Certifique-se de que o SGX tenha clock de 333 MHz (consulte http://processors.wiki.ti.com/index.php/AM35x-OMAP35x_Graphics_SDK_Getting_Started_Guide).Além disso, há pouco que você possa fazer para ultrapassar os limites do sgx530 nesta plataforma.16 mseg se traduz em 60 fps, e o SGX530 pode gerar resolução de 1080P nessa taxa, apenas para blits, sem qualquer processamento adicional.Este não é o caso do Android, onde o SGX é usado praticamente para tudo.

Observe que nesta plataforma, todo o sorteio realmente acontece em swapbuffers devido à arquitetura.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top