yashsingh1/xdaforums huggingface dataset:
[Galaxy 3 Android Development] tom3q:
Well, you can't expect it to run with samsung's g3d module. You have to use a module compatible with OpenFIMG and currently the there is only a module for Spica and my 3.0.x kernel available. It has to be ported for G3 and its kernel.
[Galaxy 3 Android Development] PersianSphinx:
interesting....

i wonder, can you just port the kernel and write the driver more easily by using that kernel? or am i being very stupid? :confused:

it would be very nice if you could find someone that would help you... i will start searching for someone to help you in this project.

again, im sorry for my ignorance, but what set of programming skills would one have to possess to be able to help you in this project?

tnx for the help man :)
[Galaxy 3 Android Development] tom3q:
OpenFIMG kernel module is pretty simple, it just manages things that can't be managed in user space by main parts of the project, low level libfimg and high level library implementing OpenGL ES API.

Porting it would mean basically replacing power management operations with something that is available on G3 kernels and adding appropriate platform device definition to board support code (mach-whatever.c). Some adjustments in PMEM configuration might be also needed to enable pmem_gpu1 with internal memory allocator. It has been already described several pages ago, but nobody succeeded in doing it properly.

For porting the kernel module alone you need to have some basic idea about Linux kernel internals, like platform drivers/devices, resources, clock and power domain management (which implies some ability to read and create C sources).

For helping in implementing the high level part good knowledge of C++ is required and also some idea about OpenGL, writing optimal code for given architecture (ARM) and KISS principle (http://en.wikipedia.org/wiki/KISS_principle).

Developing the low level part requires experience in C programming, knowledge about computer architecture and programming device drivers.
[Galaxy 3 Android Development] hillbeast:
Is there anything in the userspace libraries that would be hardware specific or would the only porting be in the kernel?
[Galaxy 3 Android Development] tom3q:
I suppose that there shouldn't be any major hardware differences in FIMG-3DSE, but it's possible that there can be some minor ones since revisions of GPUs in S3C6410 and S5P6442 are slightly different (1.5.0 vs 1.5.3).
[Galaxy 3 Android Development] PersianSphinx:
good stuff...

i wouldn't know too much about c language prgoramming (i went as far as pretty simple ideas like functions and whatnot, and my class term ended, i never renewed as i was too busy at the time) but my friend is professional... lets see if i can force him to write me some kickass codes >:-D
[Galaxy 3 Android Development] antaine:
How is the project for today, is it nearly finished??

Great work Tom ;)
[Galaxy 3 Android Development] EdisDee:
https://github.com/tom3q/openfimg/wiki/Status
[Galaxy 3 Android Development] pante5:
Yes but this github has sense to me like nuclear physics so it would be better if someone can say something in plain words. :)
[Galaxy 3 Android Development] tom3q:
It really depends on what you consider complete.

No, it can't run advanced OpenGL applications yet (Angry Birds neither, as it requires more OpenGL extensions than many 3D games.), so if you consider playing 3D games as complete, then it isn't. Yes, it can accelerate Android 2.3 and ICS on Spica (without modifying Android sources), so in terms of its basic application it's nearly complete. In terms of i5800, it's useless at the moment, until someone makes it work on this phone.

I'm the only person developing it currently, along with 3.0.x kernel for Spica, CM7 port and experimental ICS port, so I have to choose things that are of the highest priority at given time. For now, OpenFIMG is considered as a library providing hardware acceleration to Android and things to implement first are things that can improve it (like Framebuffer Objects for CRT screen off animation). 3D games don't have any priority currently. From games, the target is to run Angry Birds correctly.
[Galaxy 3 Android Development] hillbeast:
After Christmas I wish to work on this.
[Galaxy 3 Android Development] andreapier:
I really hope to see fimg 3dse done some times in the future.

With this and CM7/9 is done our phone will be super!

I'm sure you 2 together will speed up the project a lot.

Thanks!
[Galaxy 3 Android Development] alen1901:
If you manage to make all this for our g3.. The worst thing on it would only be a low res lcd. :D

------------------------------------------------

Sent from Kyorarom Ascendency;

Don't be shy, press thanks to anyone who helped you in any way.. People appreciate that. :)
[Galaxy 3 Android Development] hillbeast:
I'm just looking through old messages in this thread from when Dharam and tom3q were trying to get it going, and here is what I have established:

1: The system is starting to boot into Android, it loads the EGL library, and starts Surface flinger, and then stops.

2: The reason it seems to be stopping is a kernel panic (I think that's what it's called in Linux)

3: The reason for the kernel panic is unknown without a serial console, but my guess is that it (the kernel module) has accessed something in the memory that it shouldn't.

4: I don't think the library could be causing the kernel panic. It should just crash and reload again.

It seems to me that the memory addresses are all wrong and they are different between the G3 and the Spica. I believe marcellusbe has figured out some of the addresses through a lot of work so I will ask him to give me what he has done so far so I can continue it after Christmas.
[Galaxy 3 Android Development] moikop:
Shouldn't we port OpenFIMG first?
[Galaxy 3 Android Development] tom3q:
I'm not sure whether I understood your point.

Aren't we talking in this thread about OpenFIMG?
[Galaxy 3 Android Development] moikop:
As far as I know, everybody's been trying to port only the kernel part (modules-new). As I understand, modules-new is the kernel part, and OpenFIMG is the android part, am I right? So we'd need both parts ported.. because modules-new apparently isn't working with samsung's fimg..

Or have I messed up big? :D
[Galaxy 3 Android Development] tom3q:
You are mostly right. Kernel module must fit user space libs, so Samsung's FIMG libs will work only with Samsung's kernel module and OpenFIMG will work only with its module.

However, the user space part of OpenFIMG should work fine on G3 in its current state (or at least just produce something on the screen), so just the module needs to be ported.

EDIT: Also I'm not sure how video memory allocation is done on G3. OpenFIMG uses /dev/pmem_gpu1 to allocate video memory and it must be configured with allocator enabled. (This is going to change, though, as I'm going to rework the kernel module to use the in-kernel Direct Rendering Manager subsystem, which provides memory allocation.)

Also one more thing. It might be needed to remove all the customization to Android sources and configuration done to make original GL libs work and use a clean gralloc implementation, like the one I wrote for Spica.
[Galaxy 3 Android Development] tom3q:
I'm not sure if it was a kernel panic, but it's possible. A library can't cause it, but a kernel module can. There are no memory addresses hardcoded inside the module, though. Everything is taken from resources provided by board code and AFAIK it expects same resources as Samsung's module.

Another thing, as far as I'm aware of, G3 has the same FSA9x80 microUSB switch chip as Spica, so it might be possible to get access to serial console using a home made cable with proper resistance connecting two microUSB pins and, of course, a level converter, like max3232 or ft232r.
[Galaxy 3 Android Development] hillbeast:
We need the kernel module first so that we can use OpenFIMG. We must do both at the same time.

Have you made a serial cable for it? If so how did you do it?
[Galaxy 3 Android Development] tom3q:
http://forum.samdroid.net/f38/odd-serial-port-spica-fsa9480-attached-3127/
[Galaxy 3 Android Development] unreal3000:
WOW!

and the chances are that this would probably work on ours too!

hillbeast im sure u have already started trying.

any luck :D

good luck!
[Galaxy 3 Android Development] hillbeast:
I want to try it tonight.
[Galaxy 3 Android Development] apollo5801:
tom, i am testing opengles with ICS. we got froyo gralloc working in ics. did you face this error in spica. how did you get registers in spica.

E/libfimg ( 2530): Couldn't mmap FIMG registers (Invalid argument).

D/libsgl ( 2530): EGL error EGL_BAD_ALLOC in void* eglCreateContext(void*, void*, void*, const EGLint*) in line 1222

E/libEGL ( 2530): eglMakeCurrent:627 error 3009 (EGL_BAD_MATCH)

E/SurfaceFlinger( 2530): Couldn't create a working GLES context. check logs. exiting...
[Galaxy 3 Android Development] tom3q:
Are you maybe trying to run OpenFIMG on Samsung's kernel module?

One more thing, Samsung's gralloc is likely to break OpenFIMG, so the preferred one is from my android_device_samsung_spica repo, as it should work just fine on G3.

And well, I've got a feeling that all those things were already written on this page.
[Galaxy 3 Android Development] apollo5801:
Don't know how this stuff works at all. Just trying to figure out. Did not change anything on kernel side. Can you point any changes to spica kernel. Will try with spica gralloc.

Errors are not already written on this page. They may be different.
[Galaxy 3 Android Development] tom3q:
Please read this post, I quoted specially for you.

Memory configuration of Spica: https://github.com/tom3q/spica-3.0/blob/android-s3c64xx/arch/arm/mach-s3c64xx/mach-gt_i5700.c#L648

PMEM configuration of Spica: https://github.com/tom3q/spica-3.0/blob/android-s3c64xx/arch/arm/mach-s3c64xx/mach-gt_i5700.c#L694

G3D resources of Spica: https://github.com/tom3q/spica-3.0/blob/android-s3c64xx/arch/arm/mach-s3c64xx/mach-gt_i5700.c#L1988

You should have similar things in G3 sources, but very likely scattered all over arch/arm/mach-s5p* and arch/arm/plat-s5p*.
[Galaxy 3 Android Development] apollo5801:
Thanks. I will try to figure out kernel changes and gralloc.
[Galaxy 3 Android Development] Keinbockwurst:
I am so excited about this :) Its would be some awesome to get this working on our phone :)
[Galaxy 3 Android Development] Piraze91:
Open fimg while realy improve graphics performances ?
[Galaxy 3 Android Development] Keinbockwurst:
Yep, there should be a lot more performance if we use this driver.. I am wondering if any of our devs has looked into it and is trying to get it working?! I think this is more usefull than x-thousand roms :(
[Galaxy 3 Android Development] kRishtalysis:
hillbeast has said he would be working on it after christmas! all we gotta do is have patience :)
[Galaxy 3 Android Development] Keinbockwurst:
Dont worry, I am patient. I was just asking if anyone looked into it ;)
[Galaxy 3 Android Development] PersianSphinx:
hillbeast taking 10 day break starting from 25 december

also the devs working on ICS (apollo5801 in particular i think) are working on this. apollo said they wont touch anything else until they fix this fimg issue... TAKE THAT LAZY SAMSUNG SG3 MAKERS!!!!! TAKE THAT AND STARE AT IT WITH AWE!
[Galaxy 3 Android Development] Keinbockwurst:
I did not want to be unpatient :( I am sorry if u got that wrong. I was just a bit dissapointed, because this awesome work seemed to be "death". ;) I am very happy that hillbeast wants to try to port this. :)

Sorry, if anyone got me wrong! :D
[Galaxy 3 Android Development] PersianSphinx:
i think you got this wrong that i got you wrong because i didn' get you wrong! confusing? no! ;)

no, i was saying that samsung (the brand) sucks with its ummm.... what do you call it? ummm.... oh its costumer service. the costumer service sucks when you're with samsung :p
[Galaxy 3 Android Development] hillbeast:
I didn't say 10 days, just said a break in general.
[Galaxy 3 Android Development] unreal3000:
hillbeast did u manage to get the kernel log through usb working? the one that tom3q suggested?
[Galaxy 3 Android Development] hillbeast:
Haven't tried yet. Been on holiday.
[Galaxy 3 Android Development] PersianSphinx:
I'm pretty sure you did otherwise I wouldn't say you did, no good spreading rumours, eh?

That's irrelevant though. I was so pleased with your kyorarom, it was very fast so added kyraapp v1. 2 to cm7 a7 and it was super effective :P

And is kyorakernel the same kernel tom3q suggested? So many questions, sorry :D
[Galaxy 3 Android Development] Piraze91:
Maybe, because we can oc the galaxy 3 at 1300mhz in average, the gpu will be more used than the galaxy spica. Sorry if I'm wrong :)
[Galaxy 3 Android Development] PersianSphinx:
are you suggesting that we use cpu rendering instead of fimg because our cpu is good anyway? i still don't know what to expect from this fimg project, can anyone help me out here? question: if i use cpu rendering and the cpu is overclocked to 1200, i get a score of about 250 in quadrant (not too bad i suppose) and if i use fimg, i get something along the lines of 150. how much do you think this 150 will increase if we improve our fimg? :D
[Galaxy 3 Android Development] tom3q:
Well, don't expect too much from this project. The GPU itself isn't a speed daemon and it's nowhere close to GPUs like Adreno 200. The goal of the project is to provide an OpenGL ES implementation with as little as possible CPU overhead and without the bugs and missing features of Samsung's implementation. In current state, we get about 250 points in Quadrant 3D test on Spica with the GPU overclocked to 166 MHz (stock frequency of G3) and volumetric shadows disabled in the corridor test as they don't work correctly yet.
[Galaxy 3 Android Development] PersianSphinx:
if you achieve 250 with our phone's stock, i would think we can expect something like 300-350 at least after we overclock our own gpu and finish this project? :confused:
[Galaxy 3 Android Development] tom3q:
Well, this might be possible. Overclocking and lower screen resolution may make the score on G3 higher. What's the top frequency you can overclock the GPU on G3 to?
[Galaxy 3 Android Development] PersianSphinx:
i have no idea :( im really noob when it comes to graphics stuff... i know a thing or two here but not the good stuff :( sorry
[Galaxy 3 Android Development] Piraze91:
I think Marcellusce overclock it at 195mhz on the fugumod ultra kernel
[Galaxy 3 Android Development] hillbeast:
Did I? Oh well. But no I don't have a set time to come back. Just when I feel like coding again. Sorry if I said something else.

Anywhere between 180MHz-200MHz. Depends on the phone though, but I think mine got to about 200MHz once. It plays up with the sound and stuff though because some of the PLLs are linked.
[Galaxy 3 Android Development] tom3q:
A very rough estimation, assuming that the score scales linearly with GPU frequency and with the inverse of screen pixel count, then even 450 points would be possible on G3 with GPU at 200 MHz. Probably it isn't the case, though, but the range between 300 and 350 is pretty likely.

Still, there is a lot of things to be implemented yet, lighting, fog, compressed texture formats. Also a shader compiler would be needed to support OpenGL ES 2.0, which we lack currently, so only OpenGL ES 1.1 is supported.
[Galaxy 3 Android Development] unreal3000:
oh ok! u said u would try it that night itself so i thought u had :D
[Galaxy 3 Android Development] hillbeast:
Yeah but before we can put the GPU at 200MHz we have to sort out the issue of both stability and the connected PLLs. That severely limits what we can do to the GPU.
[Galaxy 3 Android Development] PersianSphinx:
excuse my ignorance but what are these plls you speak of?
[Galaxy 3 Android Development] D@rekills4:
PLL = Prelinked Library....

Would be like a file extension....
[Galaxy 3 Android Development] hillbeast:
http://en.wikipedia.org/wiki/CPU_multiplier

They are clock generators. They are used in anything that needs a clock speed. For example on a Core i7 (mine for example) the default PLL is 133MHz, but to overclock the computer I set it to 166MHz, and everything uses a multiplier based on that.

CPU: 22 x 166MHz = 3.66GHz

RAM: 8 x 166MHz = 1333MHz

Our phone has about 4 or 5 PLLs. One for the ARM core, a few for other things in the SoC, and one controls the GPU and surrounding devices. I am not sure if they are linked by hardware or software, but I took a look a while back with Dharam and we had no luck.
[Galaxy 3 Android Development] nishant_713:
so is the project heading towards success?? I mean some projects like CM9 are on a hold for FIMG drivers.. so any Estimated time of completion... sorry if I disturbed...
[Galaxy 3 Android Development] PersianSphinx:
i see...

can you not tamper with these plls? to make them compatible with the overclocking? or is the problem that you cant tamper with them in the first place...?
[Galaxy 3 Android Development] unreal3000:
basicaly, when we try to overclock, other parts of the phone also get overclocked.

although gpu can be clocked at a higher speed some of the other parts cannot function properly at these speeds.......so we need to find a way to overclock only the gpu without the other parts also getting overclocked with it...
[Galaxy 3 Android Development] tom3q:
I don't know if it's done the same way on S5P6442 as on S3C6410, but on S3C6410 the GPU is clocked with AHB bus clock and so are most of the peripherals connected to AHB bus. Only the bus frequency can be changed, so all the peripherals have to be overclocked. Same goes for APB bus clock, which is just the AHB clock divided by some integer divisor (usually 2), so all the peripherals connected to APB bus get overclocked too.

Also when playing with PLLs, you must make sure that you reconfigre them before the kernel initializes all the clocks (for example in machine_init). Otherwise it will report different clocks than are set.
[Galaxy 3 Android Development] hillbeast:
Well Dharam and I have tried playing with them, and do you remember back when G3MOD had the GPU overclocking? That's the result. Yes it's faster but it's unstable and causes glitches.

There surely is a way around it, but nobody has spent enough time on it to figure it out.
[Galaxy 3 Android Development] alen1901:
Why should we overclock gpu..? I know we get boost in performance and better playable 3D games, maybe better scores. but with better drivers only, it will work better as i remember. In my opinion no oc is needed. It would be nice to have oc, but its not on 1st place.

Sent from my GT-I5800
[Galaxy 3 Android Development] PersianSphinx:
hmmm.... but isnt the whole point trying to get the phone to run better games/render better 3d? also ICS relies too much on the GPU so if we get to make it faster by overclicking it it would be nice. I THINK.
[Galaxy 3 Android Development] Keinbockwurst:
I am very pleased that people are starting to look into this. :) But in my opinion both would be nice, OC and the new driver from tom3q. Both of these ideas,

Want to have the Same result: BETTER PERFORMANCE :) (+tom3q's driver adding some new feautures). If this would be running, many projects would get helped. For example the ics Port or our CM 7.1 Port. :)
[Galaxy 3 Android Development] hillbeast:
Performance should be the lowest priority. The point of me wanting to port this is not for better speed in games (I have no need for games on my phone as I have a tablet), rather to have open source drivers for our phone so we can get different versions of Android on it. I really wish Google didn't go and change how the drivers work in every version. Windows 7 32 bit can use GPU drivers from Windows 2000. If Windows 8 exists on 32 bit, then it will be able to use those drivers as well... TAKE NOTE GOOGLE.
[Galaxy 3 Android Development] unreal3000:
guys dont forget even with tom3q's driver fully ported and working, his drivers themselves arnt complete yet.......we will see better performance like the videos of the spica running his drivers but games and benchmarks still will not work properly....
[Galaxy 3 Android Development] dhirend_6d:
You don t have any need for games on tablet as well as you have an i7. And I am pretty sure you must have a great graphics card.
[Galaxy 3 Android Development] hillbeast:
The games on the tablet are for when I'm out of the house, such as lunch breaks.

And yes I have a good graphics card. I have the choice between an MSI Radeon HD5770 HAWK, a Gigabyte Geforce GTX285, or a Sapphire Radeon HD5870 Vapor-X in my computer. I'm using the 5770 right now as it's hot in NZ and it is my coolest temperature card (barely touches 55C in FurMark).
[Galaxy 3 Android Development] PersianSphinx:
skyrim for the win :D ultra graphics option :D :D :eek:

have you started coding yet? it would be nice to know how hard it was if you wanted to start this thing and what you thought of it....
[Galaxy 3 Android Development] dhirend_6d:
:eek::eek:Sweet man that s insane.
[Galaxy 3 Android Development] hillbeast:
I don't play Skyrim or any Bethesda games.

But enough off topic, I haven't started on it yet. I was out all night last night celebrating new years.
[Galaxy 3 Android Development] PersianSphinx:
isnt new years tonight? :D oh.... your in new zealand... my bad, sorry :o happy new years everyone, although the persian new years isnt until 2 months from now :p

now on topic, what programming language do i need to learn to be able to write android codes? i already know really simple C++ up until the starting point of functions, so i know how to work with while loops and for loops and if and else, and i have started to try and learn myself to use java SE to write android apps and games. any recommendations you may have for me to learn? as youre an awsome programmer i know you will have some good advice for me should you wish to give it... :D
[Galaxy 3 Android Development] hillbeast:
Android itself needs C++ and Java, Android apps need Java and the kernel needs C.
[Galaxy 3 Android Development] PersianSphinx:
hmm... i think im going to skip learning C for now... maybe later... Can you recommend any eBooks that teach Java SE or C++? Actually do you have any you can send me? I'm saying this here because i know you get tons of messages and its a real bother for me to add my one to your ton :)

thanks in advance for this, its really helpful for me. I always dreamed of programming but never really had a chance :(
[Galaxy 3 Android Development] hillbeast:
Nope. I learnt it by just doing it.
[Galaxy 3 Android Development] PersianSphinx:
okay :( guess i have to work real hard then >_<
[Galaxy 3 Android Development] dilzo:
You can't just learn it out of thin air. Try doing somewhere research then start building. I remember a kernel guide from dharam. You can try that aswell.
[Galaxy 3 Android Development] moole:
Don't skip C if you want to be a proper programmer. :-)
[Galaxy 3 Android Development] PersianSphinx:
thanks for the advice. im not trying to do anything for any kernel now, as i said i will skip learning the C language. i am trying to learn java off youtube, but the tutorials are really bad. the guy explaining them isnt good enough as a teacher. i already went to a few C++ lessons and thats where i learned C++, but the class finished early and i was too busy to join in the next term :( i really regret not joining on there... in fact, hard java lessons for me from now on!
[Galaxy 3 Android Development] hillbeast:
Eew no don't use YouTube. Here's what you need to do (and this is enough off topic because I don't want Prateek to come in here angry about us going off topic, so sorry Prateek):

Come up with an idea for a simple application, something that you want to solve. For instance I made a text editor called teamKscripter and I use that for writing scripts for my YouTube show so I have macros and line locators and such in it because I got tired of typing names all the time and having to hunt through scripts for lines.

Don't make a program with no purpose, make something you want and learn how you would go about doing it.