Android and GPU on i.MX53 board -> green screen

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Android and GPU on i.MX53 board -> green screen

9,030 Views
FlorianBoor
Contributor II
Hello @all, I'm working on Android for a i.MX535 based TX53 board using the Freescale LVDS display on DI0. I'm using the Adroid SDK release 10.4 including the kernel from this release. I even managed to make the GPU work - e.g. the GLES demos work in a regular Linux filesystem. Android without GPU support works as well - its just the GPU that fails to work with it: As soon as I try to use the GPU Android comes up but the screen become orange (while the boot animation is running) green (when the android GUI comes up) with some 'shades' that might be the status bar or similar. No obvious error messages and pmem for GPU and VPU is available as well. The only suspicious messages I see are like these starting a while after the system is up: WARNING: at drivers/mxc/amd-gpu/platform/hal/linux/misc.c:102 kgsl_device_inactive+0x48/ 0x84() GPU Device 1 is already inactive The most interesting thing is that the regular framebuffer works pretty fine all the time. The Linux logo gets displayed correctly and writing data to fb0 gives resonable output as well. Anyone with an idea what might be wrong here? Greetings Florian I/sysproc ( 955): Entered system_init() I/sysproc ( 955): ServiceManager: 0x8f500 I/SurfaceFlinger( 955): SurfaceFlinger is starting I/SurfaceFlinger( 955): SurfaceFlinger's main thread ready to run. Initializing graphic s H/W... I/imx5x.gralloc( 955): using (fd=27) I/imx5x.gralloc( 955): id = DISP3 BG I/imx5x.gralloc( 955): xres = 1024 px I/imx5x.gralloc( 955): yres = 768 px I/imx5x.gralloc( 955): xres_virtual = 1024 px I/imx5x.gralloc( 955): yres_virtual = 2304 px I/imx5x.gralloc( 955): bpp = 16 I/imx5x.gralloc( 955): r = 11:5 I/imx5x.gralloc( 955): g = 5:6 I/imx5x.gralloc( 955): b = 0:5 I/imx5x.gralloc( 955): width = 163 mm (159.568100 dpi) I/imx5x.gralloc( 955): height = 122 mm (159.895081 dpi) I/imx5x.gralloc( 955): refresh rate = 63.60 Hz I/FslOverlay( 955): /dev/graphics/fb0 fb_var: bits_per_pixel 16,xres 1024,yres 768,xres _virtual 1024,yres_virtual 2304 I/FslOverlay( 955): save default fb resolution: 1024,768 I/FslOverlay( 955): Overlay HAL control device Created successfully D/libEGL ( 955): loaded /system/lib/egl/libGLES_android.so D/libEGL ( 955): loaded /system/lib/egl/libEGL_imx51.so D/libEGL ( 955): loaded /system/lib/egl/libGLESv1_CM_imx51.so D/libEGL ( 955): loaded /system/lib/egl/libGLESv2_imx51.so W/SurfaceFlinger( 955): ro.sf.lcd_density not defined, using 160 dpi by default. I/SurfaceFlinger( 955): EGL informations: I/SurfaceFlinger( 955): # of configs : 35 I/SurfaceFlinger( 955): vendor : Advanced Micro Devices, Inc I/SurfaceFlinger( 955): version : 1.4 Internal version 1.4.1 I/SurfaceFlinger( 955): extensions: eglCreatePbufferFromClientBuffer EGL_KHR_image EGL_ KHR_image_base EGL_KHR_image_pixmap EGL_ANDROID_image_native_buffer EGL_AMD_create_image I/SurfaceFlinger( 955): Client API: NULL I/SurfaceFlinger( 955): EGLSurface: 5-6-5-0, config=0x6 I/SurfaceFlinger( 955): OpenGL informations: I/SurfaceFlinger( 955): vendor : Advanced Micro Devices, Inc. I/SurfaceFlinger( 955): renderer : AMD Z430 I/SurfaceFlinger( 955): version : OpenGL ES-CM 1.1 I/SurfaceFlinger( 955): extensions: GL_AMD_compressed_3DC_texture GL_AMD_compressed_ATC _texture GL_AMD_performance_monitor GL_ATI_compressed_texture_atitc GL_ATI_texture_compr ession_atitc GL_OES_blend_equation_separate GL_OES_blend_func_separate GL_OES_blend_subt ract GL_OES_compressed_ETC1_RGB8_texture GL_OES_compressed_paletted_texture GL_OES_draw_ texture GL_OES_extended_matrix_palette GL_OES_EGL_image GL_OES_EGL_image_external GL_OES _framebuffer_object GL_OES_matrix_palette GL_OES_point_size_array GL_OES_point_sprite GL _OES_read_format GL_OES_stencil_wrap GL_OES_texture_cube_map GL_OES_texture_env_crossbar GL_OES_texture_mirrored_repeat I/SurfaceFlinger( 955): GL_MAX_TEXTURE_SIZE = 2048 I/SurfaceFlinger( 955): GL_MAX_VIEWPORT_DIMS = 2048 I/SurfaceFlinger( 955): flags = 00000000 D/SensorService( 955): nuSensorService starting... E/SensorService( 955): couldn't load sensors module (No such file or directory) I/sysproc ( 955): System server: starting Android runtime. I/sysproc ( 955): System server: starting Android services. I/sysproc ( 955): System server: entering thread pool. I/SystemServer( 955): Entered the Android system server! I/SystemServer( 955): Entropy Service I/SystemServer( 955): Power Manager I/SystemServer( 955): Activity Manager D/libEGL ( 970): loaded /system/lib/egl/libGLES_android.so D/libEGL ( 970): loaded /system/lib/egl/libEGL_imx51.so D/libEGL ( 970): loaded /system/lib/egl/libGLESv1_CM_imx51.so D/libEGL ( 970): loaded /system/lib/egl/libGLESv2_imx51.so I/ActivityManager( 955): Memory class: 128
Tags (1)
5 Replies

1,598 Views
FlorianBoor
Contributor II
Okay - I found the solution. In case someone else runs into this: The access permissions to the pmem device nodes were insuficient. Changing these to 666 makes it work. Greetings Florian

1,598 Views
ujalakumar
Contributor II

Hi Florian,

I ma facing a similar issue while porting the JB4.2.2_1.0.0 on my i.MX6 board.   The screen becomes green while Android animation is running and afterwards some shades...  

request you to pl. elaborate and let me know how did you solve your problem ?   where exactly we have to change the pmem permission..

thanks

Ujala 

0 Kudos
Reply

1,598 Views
florianboor2
Contributor I

It was just a  chmod entry in init.rc initially. I don't know offhand any more if there was a better solution, but this was the initial change that made it work.

Greetings

Florian

0 Kudos
Reply

1,598 Views
maxmustermann
Contributor I

Folks, do NOT USE the proprietary kgsl drivers in production - don't even apply the patches.

It's DANGEROUS - it's allows userland to directly write into kernel memory !

[imx53] WARNING! Do NOT use the proprietary GPU drivers / KGSL stuff - MAJOR RISK!

That's an design issue - cannot be fixed, without a complete rewrite.

0 Kudos
Reply

1,598 Views
cphealy1
Senior Contributor I

For both the i.MX51 and i.MX53, it is now possible to run with a stock mainline kernel and have full HW acceleration of 3D graphics as well as HW video decode.  The HW acceleration of 3D graphics are provided by Freedreno in Mesa.  The video decode is provided by a kernel v4l2 driver that stock gstreamer works with.

The mainline kernel driver for the 3D GPU in the i.MX51 and i.MX53 has full support for the 3D GPU's MMU and should have improved security isolation over older kernel drivers for the 3D GPU in the i.MX51 and i.MX53.

0 Kudos
Reply