[Galaxy 3 Android Development] Arakmar:
@tom3q:

Hi,

I investigate a bit more the freeze during driver initialisation (with your kernel module).

First, I debug s3c_g3d_probe and everything is ok. All registers (S3C_G3D_PA (0xD8000000)) and the IRQ (IRQ_3D) are ok.

But, in s3c_g3d_mmap, it seems that the data structure isn't correct anymore.

I hardcoded the register like that (samsung does that in their module ...) : pfn = __phys_to_pfn(0xD8000000);

With that, fimgCreateContext() passed without any problem but it freezes a bit later in s3c_g3d_lock I think.

Have you any idea what is the problem with mmap?

Here is the logcat output with the register hardcoded until the freeze :

I/SurfaceFlinger( 2760): SurfaceFlinger is starting
I/SurfaceFlinger( 2760): SurfaceFlinger's main thread ready to run. Initializing graphics H/W...
I/gralloc ( 2760): using (fd=24)
I/gralloc ( 2760): id = s3cfb
I/gralloc ( 2760): xres = 240 px
I/gralloc ( 2760): yres = 400 px
I/gralloc ( 2760): xres_virtual = 240 px
I/gralloc ( 2760): yres_virtual = 800 px
I/gralloc ( 2760): bpp = 24
I/gralloc ( 2760): r = 16:8
I/gralloc ( 2760): g = 8:8
I/gralloc ( 2760): b = 0:8
I/gralloc ( 2760): width = 42 mm (145.142853 dpi)
I/gralloc ( 2760): height = 70 mm (145.142853 dpi)
I/gralloc ( 2760): refresh rate = 87.50 Hz
D/libEGL ( 2760): loaded /system/lib/egl/libGLES_fimg.so
I/SurfaceFlinger( 2760): EGL informations:
I/SurfaceFlinger( 2760): # of configs : 8
I/SurfaceFlinger( 2760): vendor : Android
I/SurfaceFlinger( 2760): version : 1.4 Android META-EGL
I/SurfaceFlinger( 2760): extensions: EGL_KHR_image EGL_KHR_image_base EGL_KHR_image_pixmap EGL_KHR_gl_texture_2D_image EGL_KHR_gl_texture_cubemap_image EGL_KHR_gl_renderbuffer_image EGL_ANDROID_image_native_buffer EGL_ANDROID_swap_rectangle EGL_ANDROID_get_render_buffer
I/SurfaceFlinger( 2760): Client API: OpenGL ES
I/SurfaceFlinger( 2760): EGLSurface: 8-8-8-8, config=0x4
I/SurfaceFlinger( 2760): flags : 00180000
I/libfimg ( 2760): fimgCreateContext
I/libfimg ( 2760): fimgCreateContext 01
I/libfimg ( 2760): fimgCreateContext02
I/libfimg ( 2760): fimgCreateContext 03
I/libfimg ( 2760): debut fimgDeviceOpen
I/libfimg ( 2760): fimgDeviceOpen : s3c-g3d ouvert
I/libfimg ( 2760): fimgDeviceOpen : s3c-g3d mmap
I/libfimg ( 2760): Opened /dev/s3c-g3d (31).
I/libfimg ( 2760): fimgCreateContext : deviceOpen fini
I/libfimg ( 2760): fimgCreateContext 1
I/libfimg ( 2760): fimgCreateContext 2
I/libfimg ( 2760): fimgCreateContext 3
I/libfimg ( 2760): fimgCreateContext 4
I/libfimg ( 2760): fimgCreateContext 5
I/libfimg ( 2760): fimgCreateContext fin
I/SurfaceFlinger( 2760): OpenGL informations:
I/SurfaceFlinger( 2760): vendor : OpenFIMG
I/SurfaceFlinger( 2760): renderer : FIMG-3DSE
I/SurfaceFlinger( 2760): version : OpenGL ES-CM 1.1
I/SurfaceFlinger( 2760): extensions: GL_OES_byte_coordinates GL_OES_fixed_point GL_OES_single_precision GL_OES_read_format GL_OES_draw_texture GL_OES_EGL_image GL_OES_EGL_image_external GL_EXT_texture_format_BGRA8888 GL_ARB_texture_non_power_of_two GL_OES_point_size_array
I/SurfaceFlinger( 2760): GL_MAX_TEXTURE_SIZE = 2047
I/SurfaceFlinger( 2760): GL_MAX_VIEWPORT_DIMS = 2047
D/SensorService( 2760): nuSensorService starting...
D/Sensors ( 2760): using /dev/input/event4 (name=compass)
I/SensorService( 2760): BMA150 3-axis Accelerometer
I/SensorService( 2760): AK8973 3-axis Magnetic field sensor
I/SensorService( 2760): AK8973 Orientation sensor
I/SensorService( 2760): AK8973 Temperature sensor
I/SensorService( 2760): GP2A Proximity sensor
I/sysproc ( 2760): System server: starting Android runtime.
I/sysproc ( 2760): System server: starting Android services.
I/SystemServer( 2760): Entered the Android system server!
D/SensorService( 2760): nuSensorService thread starting...
I/sysproc ( 2760): System server: entering thread pool.
I/SystemServer( 2760): Entropy Service
I/SystemServer( 2760): Power Manager
I/SystemServer( 2760): Activity Manager

Another thing, where do you get this size ?

#define FIMG_SFR_SIZE 0x80000 (in system.c)

If I reduce it to SZ_4K (0x00001000), the library loads fine with samsung kernel module.

But there is some errors after due to IOCTL incompatiblity with lock/unlock but no freeze, just a bootloop which is normal.