OESF | ELSI | pdaXrom | OpenZaurus | Zaurus Themes | Community Links | Ibiblio

IPB

Welcome Guest ( Log In | Register )

3 Pages V  < 1 2 3 >  
Reply to this topicStart new topic
> Porting M5rc14 To Real Hardware
cortez
post Feb 27 2008, 01:40 AM
Post #16





Group: Members
Posts: 376
Joined: 18-March 04
From: The Netherlands
Member No.: 2,380



QUOTE(Android Zaurus @ Feb 27 2008, 02:32 AM) *
My guess for now. Let the Android use drivers/video/pxafb.c not platform driver in arch/arm/mach-pxa. I'm working on another project for now and my Zaurus is configured for m3 Android. Later I'd like to try to build the kernel with CONFIG_FB_PXA=m and see what happens.

By the way, I found this wiki is very informational.

Android on OMAP - Embeddedlinux
http://elinux.org/Android_on_OMAP


Setting CONFIG_FB_PXA=m changes the behavior indeed... it turns the screen to white instead of black tongue.gif
To be precise, the screen is white all the time, not only when switching to graphics mode, but also at startup and in console.
So, this seems not to be the solution either.

Look at the interesting part (sorry, it's a bit long) in the trace output below. It says "page flipping not supported (yres_virtual=640, requested=1280". I think this is the problem we're facing.

CODE
02:53:16.651373 writev(4, [{"\4", 1}, {"SurfaceFlinger\", 15}, {"SurfaceFlinger\'s main thread ready to run. Initializing graphics H/W...\", 72}], 3) = 88
02:53:16.655210 open("/dev/tty0", O_RDWR|O_SYNC|O_LARGEFILE) = 20
02:53:16.657091 ioctl(20, VT_GETSTATE, 0x43145e92) = 0
02:53:16.658640 ioctl(20, VIDIOC_QUERYCAP or VT_OPENQRY, 0x43145e9c) = 0
02:53:16.660192 ioctl(20, VIDIOC_G_COMP or VT_ACTIVATE, 0x2) = 0
02:53:16.676678 ioctl(20, VIDIOC_S_COMP or VT_WAITACTIVE, 0x2) = 0
02:53:16.678243 close(20)               = 0
02:53:16.679822 open("/dev/tty0", O_RDWR|O_SYNC|O_LARGEFILE) = 20
02:53:16.706815 ioctl(20, SNDCTL_TMR_TIMEBASE or TCGETS, {B38400 opost isig icanon echo ...}) = 0
02:53:16.713156 ioctl(20, SNDCTL_TMR_START or TCSETS, {B38400 opost -isig -icanon -echo ...}) = 0
02:53:16.717340 ioctl(20, VIDIOC_ENUM_FMT or VT_SETMODE, 0x43145e8a) = 0
02:53:16.720475 sigaction(SIGUSR2, {0xacd132d1, [], 0}, NULL, 0xc4268) = 0
02:53:16.726764 sigaction(SIGSYS, {0xacd13335, [], 0}, NULL, 0xc4268) = 0
02:53:16.730505 sigprocmask(SIG_UNBLOCK, [USR2 SYS], NULL) = 0
02:53:16.733692 ioctl(20, KDSETMODE, 0x1) = 0
02:53:16.737202 open("libagl.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
02:53:16.739228 open("/system/lib/libagl.so", O_RDONLY|O_LARGEFILE) = 21
02:53:16.741405 lseek(21, -8, SEEK_END) = 96024
02:53:16.742915 read(21, "\\300\254PRE ", 8) = 8
02:53:16.780406 mmap2(0xacc00000, 98304, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE, 21, 0) = 0xacc00000
02:53:16.782040 close(21)               = 0
02:53:16.835776 mprotect(0xacc00000, 94208, PROT_READ|PROT_EXEC) = 0
02:53:16.838281 writev(4, [{"\5", 1}, {"\", 1}, {"<eglQueryStringConfigANDROID> not found in libagl.so\", 53}], 3) = 55
02:53:16.841546 access("/dev/hw3d", R_OK) = -1 ENOENT (No such file or directory)
02:53:16.843565 writev(4, [{"\5", 1}, {"\", 1}, {"can\'t access 3D hardware (No such file or directory)\", 53}], 3) = 55
02:53:16.847058 brk(0x142000)           = 0x142000
02:53:16.848999 writev(4, [{"\4", 1}, {"SurfaceFlinger\", 15}, {"EGL informations:\", 18}], 3) = 34
02:53:16.851889 writev(4, [{"\4", 1}, {"SurfaceFlinger\", 15}, {"# of configs : 4\", 17}], 3) = 33
02:53:16.854875 writev(4, [{"\4", 1}, {"SurfaceFlinger\", 15}, {"vendor    : Google Inc.\", 24}], 3) = 40
02:53:16.857839 writev(4, [{"\4", 1}, {"SurfaceFlinger\", 15}, {"version   : 1.2 Android META-EGL\", 33}], 3) = 49
02:53:16.860992 writev(4, [{"\4", 1}, {"SurfaceFlinger\", 15}, {"extensions: EGL_ANDROID_swap_rectangle EGL_ANDROID_copy_front_to_back EGL_ANDROID_get_render_buffer_address EGL_ANDROID_query_string_config\", 140}], 3) = 156
02:53:16.865904 writev(4, [{"\4", 1}, {"SurfaceFlinger\", 15}, {"ext/config: EGL_ANDROID_swap_rectangle EGL_ANDROID_copy_front_to_back EGL_ANDROID_get_render_buffer_address\", 108}], 3) = 124
02:53:16.870221 writev(4, [{"\4", 1}, {"SurfaceFlinger\", 15}, {"Client API: OpenGL ES\", 22}], 3) = 38
02:53:16.873291 open("/dev/graphics/fb0", O_RDWR|O_LARGEFILE) = 21
02:53:16.875388 ioctl(21, FBIOGET_FSCREENINFO, 0x43145d9c) = 0
02:53:16.876931 ioctl(21, FBIOGET_VSCREENINFO, 0x43145cfc) = 0
02:53:16.878477 ioctl(21, FBIOPUT_VSCREENINFO, 0x43145cfc) = 0
02:53:16.925453 writev(4, [{"\5", 1}, {"EGLDisplaySurface\", 18}, {"page flipping not supported (yres_virtual=640, requested=1280)\", 63}], 3) = 82
02:53:16.929119 ioctl(21, FBIOGET_VSCREENINFO, 0x43145cfc) = 0
02:53:16.930807 writev(4, [{"\4", 1}, {"EGLDisplaySurface\", 18}, {"using (fd=21)\nid           = PXA\nxres         = 480 px\nyres         = 640 px\nxres_virtual = 480 px\nyres_virtual = 640 px\nbpp          = 16\nr            = 11:5\ng            =  5:6\nb            =  0:5\n\", 200}], 3) = 219
02:53:16.967995 writev(4, [{"\4", 1}, {"EGLDisplaySurface\", 18}, {"width        = 51 mm (239.058823 dpi)\nheight       = 38 mm (427.789459 dpi)\nrefresh rate = 124.61 Hz\n\", 102}], 3) = 121
02:53:16.972517 ioctl(21, FBIOGET_FSCREENINFO, 0x43145d9c) = 0
02:53:16.974061 mmap2(NULL, 614400, PROT_READ|PROT_WRITE, MAP_SHARED, 21, 0) = 0x43146000
02:53:17.028820 mmap2(NULL, 618496, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x431dc000
02:53:17.030696 mmap2(NULL, 618496, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x43273000
02:53:17.032605 brk(0x143000)           = 0x143000
02:53:17.034701 brk(0x145000)           = 0x145000
02:53:17.036760 brk(0x146000)           = 0x146000
02:53:17.038532 writev(4, [{"\4", 1}, {"SurfaceFlinger\", 15}, {"OpenGL informations:\", 21}], 3) = 37
02:53:17.041493 writev(4, [{"\4", 1}, {"SurfaceFlinger\", 15}, {"vendor    : Google Inc.\", 24}], 3) = 40
02:53:17.046048 writev(4, [{"\4", 1}, {"SurfaceFlinger\", 15}, {"renderer  : Android PixelFlinger 1.0\", 37}], 3) = 53
02:53:17.049257 writev(4, [{"\4", 1}, {"SurfaceFlinger\", 15}, {"version   : OpenGL ES-CM 1.0\", 29}], 3) = 45
02:53:17.052344 writev(4, [{"\4", 1}, {"SurfaceFlinger\", 15}, {"extensions: GL_OES_byte_coordinates GL_OES_fixed_point GL_OES_single_precision GL_OES_read_format GL_OES_compressed_paletted_texture GL_OES_draw_texture GL_OES_matrix_get GL_OES_query_matrix GL_ARB_te"..., 277}], 3) = 293
02:53:17.058395 access("/dev/hw3d", R_OK) = -1 ENOENT (No such file or directory)
02:53:17.060899 getpid()                = 2289
02:53:17.062402 getuid32()              = 0
02:53:17.063969 getpid()                = 2289
02:53:17.065639 open("/tmp/android-shared_heap.2289.0x145ab0", O_RDWR|O_CREAT|O_TRUNC|O_LARGEFILE, 0666) = 22
02:53:17.068031 ftruncate(22, 19660800) = 0
02:53:17.069588 mmap2(NULL, 19660800, PROT_READ|PROT_WRITE, MAP_SHARED, 22, 0) = 0x4330a000
02:53:17.071229 unlink("/tmp/android-shared_heap.2289.0x145ab0") = 0
02:53:17.073566 getpid()                = 2289
02:53:17.075242 open("/tmp/android-shared_heap.2289.0x145df8", O_RDWR|O_CREAT|O_TRUNC|O_LARGEFILE, 0666) = 23
02:53:17.077626 ftruncate(23, 4096)     = 0
02:53:17.079201 mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_SHARED, 23, 0) = 0x445ca000
02:53:17.080843 unlink("/tmp/android-shared_heap.2289.0x145df8") = 0
02:53:17.083728 open("/tmp/android-SurfaceFlingerSynchro", O_WRONLY|O_NONBLOCK|O_LARGEFILE) = 24
02:53:17.086224 brk(0x147000)           = 0x147000
02:53:17.088069 mmap2(0x10000000, 1048576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_NORESERVE, -1, 0) = 0x445cb000
02:53:17.089681 mprotect(0x445cb000, 4096, PROT_NONE) = 0
02:53:17.091435 clone(child_stack=0x446caf80, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLO
E_DETACHED) = 2300
02:53:17.094168 mmap2(0x10000000, 1048576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_NORESERVE, -1, 0) = 0x446cb000
02:53:17.097904 mprotect(0x446cb000, 4096, PROT_NONE) = 0
02:53:17.101337 clone(child_stack=0x447caf80, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLO
E_DETACHED) = 2301
02:53:17.108176 futex(0x140d98, FUTEX_WAKE, 2147483647)                = 1
02:53:17.115013 futex(0x140d94, FUTEX_WAKE, 1)              = 0
02:53:17.122600 read(15, "\", 4096) = 1
02:53:17.333882 futex(0x140c04, FUTEX_WAKE, 1) = 0
02:53:17.344042 futex(0x445ca004, FUTEX_WAKE, 2147483647) = 0
02:53:17.352317 writev(4, [{"\6", 1}, {"SurfaceFlinger\", 15}, {"GL error 0x0500\", 16}], 3) = 32
Go to the top of the page
 
+Quote Post
Android Zaurus
post Feb 27 2008, 02:39 AM
Post #17





Group: Members
Posts: 45
Joined: 30-December 07
From: Japan
Member No.: 21,136



Cortez,

Thanks for trying to make a module.

QUOTE(cortez @ Feb 27 2008, 06:40 PM) *
It says "page flipping not supported (yres_virtual=640, requested=1280". I think this is the problem we're facing.


Gee. We need a double buffer capable driver. Means a bit of work to modify current pxafb driver code.
Go to the top of the page
 
+Quote Post
cortez
post Feb 27 2008, 04:10 AM
Post #18





Group: Members
Posts: 376
Joined: 18-March 04
From: The Netherlands
Member No.: 2,380



Would it be possible to make the second page (the second mmap2 call) point to the same address as the first?
That would mean patching (or rebuilding if source is available) libagl.
Anyone know a good ARM disassembler that could be used to find the right spot?

CODE
02:53:16.967995 writev(4, [{"\4", 1}, {"EGLDisplaySurface\", 18}, {"width        = 51 mm (239.058823 dpi)\nheight       = 38 mm (427.789459 dpi)\nrefresh rate = 124.61 Hz\n\", 102}], 3) = 121
02:53:16.972517 ioctl(21, FBIOGET_FSCREENINFO, 0x43145d9c) = 0
02:53:16.974061 mmap2(NULL, 614400, PROT_READ|PROT_WRITE, MAP_SHARED, 21, 0) = 0x43146000
02:53:17.028820 mmap2(NULL, 618496, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x431dc000
02:53:17.030696 mmap2(NULL, 618496, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x43273000


Go to the top of the page
 
+Quote Post
zaurick
post Feb 27 2008, 05:29 AM
Post #19





Group: Members
Posts: 19
Joined: 2-October 06
Member No.: 11,617



QUOTE(cortez @ Feb 27 2008, 01:10 PM) *
Would it be possible to make the second page (the second mmap2 call) point to the same address as the first?
That would mean patching (or rebuilding if source is available) libagl.
Anyone know a good ARM disassembler that could be used to find the right spot?

CODE
02:53:16.967995 writev(4, [{"\4", 1}, {"EGLDisplaySurface\", 18}, {"width        = 51 mm (239.058823 dpi)\nheight       = 38 mm (427.789459 dpi)\nrefresh rate = 124.61 Hz\n\", 102}], 3) = 121
02:53:16.972517 ioctl(21, FBIOGET_FSCREENINFO, 0x43145d9c) = 0
02:53:16.974061 mmap2(NULL, 614400, PROT_READ|PROT_WRITE, MAP_SHARED, 21, 0) = 0x43146000
02:53:17.028820 mmap2(NULL, 618496, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x431dc000
02:53:17.030696 mmap2(NULL, 618496, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x43273000


Can we try starting android in QVGA mode ?
In that mode 320*240 it will be possible to have a double buffer for screen.
I think that the requested value yres*2 is calculated from the actual résolution from FSCREENINFO like it work in tomtom navigation software.

Go to the top of the page
 
+Quote Post
speculatrix
post Feb 27 2008, 06:00 AM
Post #20





Group: Admin
Posts: 3,281
Joined: 29-July 04
From: Cambridge, England
Member No.: 4,149



ask the angstrom kernel guy, (richard purdie?), he added a feature we needed when getting tomtom to run on it, so hopefully that would avoid any bodges that would come back to haunt us.
Go to the top of the page
 
+Quote Post
cortez
post Feb 27 2008, 07:43 AM
Post #21





Group: Members
Posts: 376
Joined: 18-March 04
From: The Netherlands
Member No.: 2,380



I guess I need to adjust the default pxafb framebuffer code to see if this can be tweaked easily.
We'll see if this works wink.gif
Go to the top of the page
 
+Quote Post
Android Zaurus
post Feb 27 2008, 05:01 PM
Post #22





Group: Members
Posts: 45
Joined: 30-December 07
From: Japan
Member No.: 21,136



Is there anyone who is familliar with OpenEZX?
http://www.openezx.org/

Their wiki mentions double buffer support.
  • video/pxafb.c MV file, changes for backlight timer, 18bpp/19bpp and double buffering support
http://wiki.openezx.org/CodeAnalysis

I looked around their svn, but I couldn't find paticullar patch or source code.
Go to the top of the page
 
+Quote Post
cortez
post Feb 28 2008, 01:09 PM
Post #23





Group: Members
Posts: 376
Joined: 18-March 04
From: The Netherlands
Member No.: 2,380



I did it, it works! The problem was the unsupported page flipping in the frame buffer.
More info later, it needs some more tweaking before I can upload a new image.
Check out my blog for more info.
Go to the top of the page
 
+Quote Post
matthis
post Feb 29 2008, 06:12 AM
Post #24





Group: Members
Posts: 218
Joined: 12-February 06
From: Tokyo
Member No.: 9,124



>>More info later, it needs some more tweaking before I can upload a new image.
WOW~~! Looking forward to it!
Go to the top of the page
 
+Quote Post
Android Zaurus
post Mar 1 2008, 11:56 PM
Post #25





Group: Members
Posts: 45
Joined: 30-December 07
From: Japan
Member No.: 21,136



Today I implemented my version of double buffer and pan in pxafb. It works. m5_rc14 booted up on my Zaurus finally. My patch is very primitive. Any suggestions make it better are very welcome.

o Android Zaurus: m5_rc14 works on my Zaurus C3000

Cortez,
Is your keyboard working correctly? Something funny with mine. I can't navigate on the menu by cursor keys. It's like a jumping around.
Go to the top of the page
 
+Quote Post
zaurick
post Mar 2 2008, 02:36 AM
Post #26





Group: Members
Posts: 19
Joined: 2-October 06
Member No.: 11,617



QUOTE(Android Zaurus @ Mar 2 2008, 08:56 AM) *
Today I implemented my version of double buffer and pan in pxafb. It works. m5_rc14 booted up on my Zaurus finally. My patch is very primitive. Any suggestions make it better are very welcome.

o Android Zaurus: m5_rc14 works on my Zaurus C3000


It works for me too.
Just a litle thing in your patch, your panning function only toggle FB base adresse.
The result can be inverted.
Normaly the base adresse is calculated with the var.yoffset value from var_screeninfo.
I'm going to work on that !

Thanks !



Go to the top of the page
 
+Quote Post
Android Zaurus
post Mar 2 2008, 04:24 AM
Post #27





Group: Members
Posts: 45
Joined: 30-December 07
From: Japan
Member No.: 21,136



QUOTE(zaurick @ Mar 2 2008, 07:36 PM) *
Normaly the base adresse is calculated with the var.yoffset value from var_screeninfo.
I'm going to work on that !


Big thanks from me. I'm not familliar with fb driver. Please make the patch better. I noticed that some long cycle flickerings while I tried a couple of times booting Android up. I guess I need exclusiveness to change DMA address.
Go to the top of the page
 
+Quote Post
matthis
post Mar 2 2008, 05:58 AM
Post #28





Group: Members
Posts: 218
Joined: 12-February 06
From: Tokyo
Member No.: 9,124



is touchscreen any better in this version?
Go to the top of the page
 
+Quote Post
cortez
post Mar 2 2008, 06:34 AM
Post #29





Group: Members
Posts: 376
Joined: 18-March 04
From: The Netherlands
Member No.: 2,380



QUOTE(Android Zaurus @ Mar 2 2008, 08:56 AM) *
Today I implemented my version of double buffer and pan in pxafb. It works. m5_rc14 booted up on my Zaurus finally. My patch is very primitive. Any suggestions make it better are very welcome.

o Android Zaurus: m5_rc14 works on my Zaurus C3000

Cortez,
Is your keyboard working correctly? Something funny with mine. I can't navigate on the menu by cursor keys. It's like a jumping around.


The cursor keys are working, no problems there.
Go to the top of the page
 
+Quote Post
zaurick
post Mar 2 2008, 12:46 PM
Post #30





Group: Members
Posts: 19
Joined: 2-October 06
Member No.: 11,617



QUOTE(Android Zaurus @ Mar 2 2008, 01:24 PM) *
QUOTE(zaurick @ Mar 2 2008, 07:36 PM) *
Normaly the base adresse is calculated with the var.yoffset value from var_screeninfo.
I'm going to work on that !


Big thanks from me. I'm not familliar with fb driver. Please make the patch better. I noticed that some long cycle flickerings while I tried a couple of times booting Android up. I guess I need exclusiveness to change DMA address.


Can you try to replace your fb_pan _display portion of code with this one :
CODE
+static int pxafb_pan_display(struct fb_var_screeninfo *var, struct fb_info *info)
+{
+       struct pxafb_info *fbi = (struct pxafb_info *)info;
+               fbi->dmadesc_fbhigh_cpu->fsadr = fbi->screen_dma + (var->xres * var->yoffset * var->bits_per_pixel/8);
+       return 0;
+}


It work for me.
Go to the top of the page
 
+Quote Post

3 Pages V  < 1 2 3 >
Reply to this topicStart new topic
2 User(s) are reading this topic (2 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 25th October 2014 - 08:23 PM