Reply
Thread Tools
Posts: 839 | Thanked: 3,386 times | Joined on Mar 2009
#1
I made version-0001 for open source 3d-graphics driver for N900. This is actually just template using Vincent software rasterizer, but at least there are now something. I have idea that next step is to start using hardware one function at a time, but I'm really in dead end and don't know how to do that.

Is reverse engineering needed in next step? How to start that? (Latest reverse engineered GPU took 4 months: https://gitorious.org/lima )
Is there any use of (GPL) kernel modules for omaplfb and pvrsrvkm (drivers/gpu/pvr)?


------------
Code:
git clone https://git.gitorious.org/vincent-n900/vincent-n900.git
cd vincent-n900/
./autogen.sh
./configure
make
rcp -r  .libs/*so* user@n900:vin
(Works with sb1 and sb2 (with gcc-4.2 and gcc-4.6)).

Roadmap/Checklist:
*Open source. OK
*Compilable. OK
*Produces libGLES_CM.so. OK
*Produces libEGL.so. OK
#Drop-in replacement for libraries on device (binaries using stock version, doesn't need recompilation). OK
*On real device can run NeheGles examples. OK
#...correctly. FAIL, minor glitches
#...fast. FAIL, damn slow
(it draws upside-down, but this is not critical on this moment)

*Replacement for libGLESv2.so. MISSING
---
Testing on device:
Code:
sudo apt-get install nehegles
cd /opt/nehegles
LD_LIBRARY_PATH=~/vin ./lesson02
Results with Nehe:
lesson-number (description) | fps with stock hardware driver : fps with Vincent (other issues)
02 (static image) | 91 : 29
03 (static image) | 91 : 31
04 (rotating shapes) | 91 : 42
05 (rotating objects) | 80 : 13 (cube flickers)
06 (rotating cube with texture) | 63 : 5
07 (cube with texture, rotated with arrows) | 72 : 11
08 (cube with texture, rotated with arrows) | 79 : 11
09 (flare-glare) | 30 : 2
10 (corridor walking) | 46 : 3 (glitches on roof)
11 (textured flag) | 45 : 3
12 (static multiple boxes) | 71 : 4
16 (fog, cube with texture, rotated with arrows) | 67 : 8 (minor glitches)
18 (drawing) | 74 : 13
19 (fireworks) | 26 : 2
20 (two moving layers, first one transparency) 20 : 0.6 (badly broken, first layer is small and second big)

Last edited by AapoRantalainen; 2012-02-20 at 09:20. Reason: git with https
 

The Following 17 Users Say Thank You to AapoRantalainen For This Useful Post:
Posts: 470 | Thanked: 399 times | Joined on Jul 2011 @ Croatia
#2
Originally Posted by AapoRantalainen View Post
I made version-0001 for open source 3d-graphics driver for N900. This is actually just template using Vincent software rasterizer, but at least there are now something. I have idea that next step is to start using hardware one function at a time, but I'm really in dead end and don't know how to do that.

Is reverse engineering needed in next step? How to start that? (Latest reverse engineered GPU took 4 months: https://gitorious.org/lima )
Is there any use of (GPL) kernel modules for omaplfb and pvrsrvkm (drivers/gpu/pvr)?
omg, if you actually manage to do this i will love you till i die(infact i might die as soon as you do it as ill probably get a heart attack or a stroke from overwhelming emotions)

Last edited by GrimyHR; 2012-02-20 at 11:57.
 

The Following 2 Users Say Thank You to GrimyHR For This Useful Post:
Posts: 1,397 | Thanked: 2,126 times | Joined on Nov 2009 @ Dublin, Ireland
#3
I think this could be a very big task and too difficult to achieve. It would be better to have a newer 3.x kernel with up to date binary drivers for GPU and DSP (with support for Vsync!) and for that task, there is also a lot of work to do.
 
Posts: 839 | Thanked: 3,386 times | Joined on Mar 2009
#4
Originally Posted by ivgalvez View Post
It would be better to have a newer 3.x kernel with up to date binary drivers for GPU and DSP (with support for Vsync!)
GPU on N900 is PowerVR SGX530.
Is there binary drivers for 3.x kernel?

Seems to me that kernel-power team is separating huge Nokia kernel-patches and when they are ready, these patches can be applied to the kernel 3.x. (So 3.x kernel on N900 'is coming', but not related to this thread).
---
I just found that Writing open source drivers for PowerVR is a project on the FSF's high priority list.
http://libreplanet.org/wiki/Group:PowerVR_drivers

It is not providing anything to download, but there are links to read more information about whole topic.
 

The Following 4 Users Say Thank You to AapoRantalainen For This Useful Post:
Posts: 1,397 | Thanked: 2,126 times | Joined on Nov 2009 @ Dublin, Ireland
#5
Good luck if you are really planning to jump into this. To me it seems like a very long time effort.
 
Posts: 839 | Thanked: 3,386 times | Joined on Mar 2009
#6
Some points I have learned:
*Software rasterizer was not first step (It can't be used as starting point)
*gles1 is not (system) critical part, it is not even installed on stock device

--
I think this is the data flow
Code:
application (e.g. HelloWorld)
      |
library (libgles2-sgx-img)
      |
kernel modules (omaplfb.ko and pvrsrvkm.ko)
      |
Hardware
I got kernel modules compiled with additional (debug) messages, so next step could be print everything what is passed through modules (there will be much of cryptic data).

-------
I checked what (stock) packages we will miss if libgles2-sgx-img is dropped (as I think debian is runned on N900):

Code:
xserver-xomap
hildon-desktop (because libclutter-0.8-0)
(libqt4-gui and much of other qt4-packages)
So with patched hildon-desktop and xserver-xomap it would be possible to run Maemo5 on N900 without closed source graphics driver. (Strictly speaking this is offtopic)
 

The Following 10 Users Say Thank You to AapoRantalainen For This Useful Post:
Posts: 839 | Thanked: 3,386 times | Joined on Mar 2009
#7
So with patched hildon-desktop and xserver-xomap it would be possible to run Maemo5 on N900 without closed source graphics driver. (Strictly speaking this is offtopic)
I realised that 'debugging' graphics driver will be much easier if there are only one application currently using gles, so I got gles2 entirely disabled. Hildon-desktop is then run on software-GL.

Read more on here: http://talk.maemo.org/showthread.php?p=1187842
 

The Following 4 Users Say Thank You to AapoRantalainen For This Useful Post:
Reply

Thread Tools

 
Forum Jump


All times are GMT. The time now is 00:48.