yashsingh1/xdaforums huggingface dataset:
[Galaxy 3 Android Development] hillbeast:
Sounds like incorrect memory addresses. It'll be trying to use something that would make sense on the Spica but not on our phone, and the size thing will be the same deal: the Spica might have a larger buffer for the FIMG whereas our phone probably wants to spend more RAM on CPU usage which could explain why people say the Spica has better GPU performance.
[Galaxy 3 Android Development] Arakmar:
Memory addresses are correct.

Spica (S3C6410) : 0x72000000

Apollo (S5P6443) : 0xD8000000

S5PC1XX : 0xEF000000

With tom3q's kernel module, they are retrieved from a resource in plat-s5p644x/dev.c. Look at s3c_g3d_resource in this file.

I think it's a size issue. FIMG_SFR_SIZE 0x80000 is really weird.
[Galaxy 3 Android Development] hillbeast:
You need to find how much is allocated to FIMG on Samsungs module.
[Galaxy 3 Android Development] hillbeast:
@tom3q, this is off-topic, but does the Spica have a OneNAND in it, and if so does it use /lib/modules/storage.ko? Did you port this when you made kernel 3.0 or how have you gotten around it if it is there?
[Galaxy 3 Android Development] satishynd:
is S3C6410 used in our phones??

if so FIMG_SFR_SIZE 0x80000 is correct (http://goo.gl/B7E67)

it's global declared so defined according to size alloted to FIMG on spica..

PS: i am on high-talk here.. i dont know much about these..just little here-and-there about programming..

so sorry if i sound stupid :p :)
[Galaxy 3 Android Development] cdesai:
Nope, it's s5p6442

From my fingers to your eyez
[Galaxy 3 Android Development] satishynd:
ohh .... my bad
[Galaxy 3 Android Development] Arakmar:
Good news !!

With some hacks OpenFIMG is loading !
[Galaxy 3 Android Development] TearsDontFalls:
That means it's working?
[Galaxy 3 Android Development] turboblaz:
Good news :DDD

Sent from ICS_Nexus S using XDA App
[Galaxy 3 Android Development] Arakmar:
Yes. Everything is working, even 3D. I just tested with Quadrant and it seems to be "a bit" better.

EDIT: Just a color format issue but I think it'll be easy to solve.
[Galaxy 3 Android Development] akoshun:
Good news!!!:)

Good luck to solve the problem!:)

Sent from my Galaxy 3 using kyorarom ascendency with miui 1.4.5 theme
[Galaxy 3 Android Development] sohail77:
What's the 3d score in quadrant
[Galaxy 3 Android Development] :
Does the open FIMG driver even support all of the OpenGL features tested in Quadrant?
[Galaxy 3 Android Development] dhirend_6d:
That indeed is good news. :):)

---------- Post added at 08:21 PM ---------- Previous post was at 08:19 PM ----------

I suppose not since the original port done by TOM3Q also doesn t have it.
[Galaxy 3 Android Development] Piraze91:
How many fps have you got in quadrant
[Galaxy 3 Android Development] Arakmar:
150

I think so. Quadrant detects the required extensions at startup and disable 3d test if not found.

But all three animations run without any problem. The DNA animation result in a white screen but it's because of wrong color format.
[Galaxy 3 Android Development] D@rekills4:
Haven't been around this thread much....

Don't actually know what's happening here.... :X

So how exactly is this project gonna benefit the G3?

What's gonna happen?
[Galaxy 3 Android Development] rickslick:
Wow.. awesome work Arakmar
[Galaxy 3 Android Development] andreapier:
This is great stuff!

Hope we will see it running on CM7 by marcellusbe and ics soon! Thanks a ton!
[Galaxy 3 Android Development] Piraze91:
I have 219in 3d with cpu rendering :)

Sent from CM7 A7
[Galaxy 3 Android Development] PersianSphinx:
do you use quadrant? ever seen how we always get low 3d scores there? this project increases our 3d score. (to 300-350 approximately)

also, this is how the ICS project would go forward, apollo said he wont do anything else on ICS until he fixes these fimg stuff here :D

@ above post: i get 250 :p :D using cm7a6, g3mod v2.3 OC @ 1.2 GHz

---------- Post added at 10:04 PM ---------- Previous post was at 10:02 PM ----------

bro, that is what i normally get with samsung drivers!! ive even gotten 170 and 190... :cool:
[Galaxy 3 Android Development] sharukins:
arakmar, thanks for your awesome work! will the FIMG driver now work in ics or is there still work (maybe porting) to be done?
[Galaxy 3 Android Development] Piraze91:
So we just have to wait :) if i get 400p i think that i'll be the man the most happy of the world :) :) with CM9 it can be dellicious :) :) :)

Sent from CM7 A7
[Galaxy 3 Android Development] PersianSphinx:
according to tom3q, we will probably get 300-350 point. not 400 :( sorry :(
[Galaxy 3 Android Development] nishant_713:
That means that now ICS/cm9 project can continue ??
[Galaxy 3 Android Development] dilzo:
As long as it doesn't hard brick my phone then I don't mind.
[Galaxy 3 Android Development] tom3q:
May I ask some moderator to make this thread sticky or even move it to the development section?

I'm looking for some interested developers, so it will be really nice if this topic gets some attention.
[Galaxy 3 Android Development] ghiurtuv:
+1 Haree pls move it to development and hope someone will help you cuz i need a better gpu on my galaxy3

Sent from my GT-I5800
[Galaxy 3 Android Development] mohnishgs:
great job man, we really need some developers for g3 who can take initiative and successfully complete the project

i hope you get all the support you need from other developers
[Galaxy 3 Android Development] dhirend_6d:
Wow!! This is an interesting development taking place here!! This may help in the CM7 port for Galaxy 3.
[Galaxy 3 Android Development] pflorin:
ive read all the post so far .. so hows this project going right now?? anything new??
[Galaxy 3 Android Development] tom3q:
The project has been suspended since some time as it was targeted for i5700, but it turned out that the phone needed proper support in kernel first so I started a project to port some current kernel version for it (spica-2.6.38) and I didn't have time to work on two projects in the same time.

As for now, none of the projects is progressing as I'm a student and it's exams time at the moment. I'm going to continue my work after passing last exam, which will hopefully be on 17th June.

The kernel is already in a very advanced state and so it won't take too much time to finish it and then I will return back to this project.

You can get a bit more information about the status on project wiki:

https://github.com/tom3q/openfimg/wiki
[Galaxy 3 Android Development] dilzo:
Thanks and good luck in your exam :)
[Galaxy 3 Android Development] hillbeast:
I'm not sure what to think on this as I was always under the impression that the G3 only had a 2D hardware accelerator, and not a 3D one. If it had 3D acceleration then we would have seen better speed in games in the stock firmware, let alone all the custom firmware we are seeing. I'm not saying don't do this, as if you can even edge a little bit more power out of whatever the heck is in there, then I say go for it.
[Galaxy 3 Android Development] tom3q:
Same goes for Galaxy Spica. Everyone thought that it didn't have a GPU. But it can be confirmed in S3C6410 User's Manual that it has one indeed. It isn't a most powerful one, but it's still better than software rendering, even with stock drivers, which are really broken (not only on Spica, also on other Android and Windows Mobile based phones with the same chip).

You can confirm the existence of the GPU by looking at /proc/interrupts (g3d interrupt is there), OpenGL renderer string (it introduces itself as FIMG 3DSE, same as on Spica), same bugs (like white textures or poor performance in some games) and even file names in /system/lib/egl (lib*_fimg.so and the famous chunkalloc).
[Galaxy 3 Android Development] aarrun:
dont worry tom this thread will get attention the mod will surely help and support ur development.....i think marcellusbe will be the first 1 to get ur thing to work he is the real hero of g3development.
[Galaxy 3 Android Development] V!KR@M:
Change the title as project. U will get lot of attention then. All the best Tom
[Galaxy 3 Android Development] akash.gpta:
Gr8 work ahead, I'm looking upto ur project.

Will u be implementing OpenGL 2.0 support?
[Galaxy 3 Android Development] Rapier07:
Just PMed haree to move this to the dev section :)
[Galaxy 3 Android Development] haree:
hi

its already done chek ur PM:D
[Galaxy 3 Android Development] tom3q:
It depends. Generally, implementing OpenGL ES 2.0 support would need implementing a runtime shader compiler and this isn't an easy task, possibly even harder than implementing the whole OpenGL ES 1.1 support. Maybe I could use some existing infrastructure for it, like LLVM with GLSL front end, but still it would require developing a back end for FIMG shader code. Chance of having OpenGL ES 2.0 would probably increase if somebody joins the project as it's really enough (or even too much) work for one person at the moment.

Thanks

By the way, I've added an attachment containing documents about the FIMG 3DSE to the first post.
[Galaxy 3 Android Development] vishnu:
Woah! Definitely uppin this one! :D
[Galaxy 3 Android Development] djjonastybe:
Well hurry up the project then :D
[Galaxy 3 Android Development] tom3q:
Well, I have an exam session right now, so I will get back to work after passing the last exam (hopefully on 17th June).

However, I don't have a G3, only a Spica (as the project was initially targeted for phones based on s3c6410), so I need someone to check what is needed to make the driver work on G3 and preferably also to do the needed work.
[Galaxy 3 Android Development] devilgod18:
Wow awesome Tom..waiting for your hard work...

Galaxy 3 complete blog
[Galaxy 3 Android Development] Arakmar:
It works in ICS too. But same color format problem as CM7.
[Galaxy 3 Android Development] Montoyatok:
Sorry to repeat this, but it only works on froyo right?
[Galaxy 3 Android Development] Arakmar:
Look at the post just before ...

It works on Froyo, GB and ICS. (and probably future versions of Android)
[Galaxy 3 Android Development] rickslick:
@ Arakmar I saw in samdroid tom3q released updated version of driver last month. Are you working on the updated version?
[Galaxy 3 Android Development] :
Thanks for the update dude, as far as i can say (as a tech noob :D) it's a good decision to get this thing to work before continuing development of this ROM. Anything that helps getting more performance out of this phone just can be a benefit i guess.
[Galaxy 3 Android Development] unreal3000:
to the devs...

taking the previous alpha builds of marcellusbe's cm7, if we get better results with the cpu rendering graphics, why not just use the cpu?

if we get better performance than open-fimg then why not?

or are we getting this performance because it has still not been ported fully?

and also someone mentioned spica getting better performance and quadrant scores then g3. as far as iv searched, the spica seems to get lower than us in gpu.

can anyone clarify? tks!
[Galaxy 3 Android Development] Arakmar:
Yes, I have compiled the latest version from tom3q's git repo : https://github.com/tom3q/openfimg

---------- Post added at 05:44 PM ---------- Previous post was at 05:25 PM ----------

GPU performance isn't only a matter of benchmark.

For instance, even if Quadrant produces a good 3D score in first alpha build of CM7 (and ICS too), everything seems to be laggy in the UI.

And some extensions are missing with software rendering. Don't expect to see Angry Birds running with that ...

I think OpenFIMG will get similar performance than Samsung driver, maybe a wee bit better. We shoudln't expect too much from our GPU.

But the main advantage of OpenFIMG for the G3, is that it'll make a lot easier the port of new version of Android (instead of hacking Android code to get Samsung's driver to work)
[Galaxy 3 Android Development] andreapier:
This is the first attempt to run openfigm in our devidez. Surely it is not fully ported. It will have more performance when tom3q work is finished!

However, using the cpu for graphic is not a good idea as your battery will last less... And you have to overclock the cpu itself, which is something that not everyone wants to do
[Galaxy 3 Android Development] PersianSphinx:
+1.

the gpu and fimg are there for a reason :))
[Galaxy 3 Android Development] Piraze91:
I know but i'm dreaming :)
[Galaxy 3 Android Development] PersianSphinx:
shine on you crazy diamond :D
[Galaxy 3 Android Development] hillbeast:
Because the CPU sucks for drawing anything more than a user interface. It's only a tiny little ARMv6 core. If we had a Core i7 in our phone then it wouldn't be a bad idea, but ARM chips have nowhere near the performance of x86 chips.
[Galaxy 3 Android Development] PersianSphinx:
lol at core i7 xD

i dont think there even is any unique thing that our cpu can do that something like hummingbird or snapdragon cant :(
[Galaxy 3 Android Development] unreal3000:
well actualy.... our cpu itself is quite powerful compared to the other cpus of it range. our cpu does do quite well. and the fact that we can push it to 1.4ghz

makes me think our cpu was actualy designed for running at 1ghz.

if u compare it to g5 or gpop or gfit.....they have the similar qualcomm 600mhz cpu.

its cpu itself is realy weak compared to ours. but the fact that it has a decent gpu makes it performance go up alot. ours isnt the best but it definitly holds its own in the arena.

also, if we achieve a proper port of open-fimg and properly oc it, if we do get scores close to 300 in quadrent in 3d, then our gpu would be performing as well as the adreno 200 which can handle hd games quite decently!

tom3q i think u can update ur to-do list as we have managed to get open-fimg on the s5p6442 :D or atleast its loading up :D

sorry if i keep mentioning gaming.....im a gamer myself :P

sry for long post guys :P
[Galaxy 3 Android Development] sharukins:
G3 doesn't have a Qualcomm CPU, it's an ARM reference design which is manufactured by samsung itself.

the core is indeed designed for frequencies up to 1GHz but it depends on the manufacturing process which freuqencies you really can achieve. some users already have problems with 800MHz OC..

the spica has the same CPU core while qualcomm designs its SoCs completely by themselves and therefore have tweaks which other processors don't have.

because of that qualcomm CPU's are mostly faster than ARM reference designs when running at the same frequency.

sry for offtopic ^^
[Galaxy 3 Android Development] tom3q:
Yes, Spica has 512 MB of OneNAND memory. By default it used Samsung's proprietary (and broken) XSR (xsr.ko, xsr_stl.ko and company), but there was a driver in mainline kernel for the OneNAND controller of S3C6410, so I improved it a bit to fix some problems and improve the performance and now it's used in my kernel without a need for any proprietary modules. Of course the way of accessing flash memory changed a bit as now it's using the MTD API as most of HTC phones and only flash file systems can be used (which is a benefit of course).
[Galaxy 3 Android Development] tom3q:
Kind of low. On Spica with about 2 times more pixels on the screen we get ~210 with volumetric shadows in the corridor test and ~250 without them.

Possibly some additional changes are still needed. I would look into gralloc (might cause the problem with color format as well), recheck g3d kernel module again and make sure that pmem-gpu1 has buffered and cached set to 1.
[Galaxy 3 Android Development] tom3q:
CPU has many more things to do other than rendering graphics. You can have better score in Quadrant using CPU rendering as (almost) the only thing the phones does is rendering the benchmark. Any real tasks usually involve much more work for the CPU and so it's much better to offload it using a dedicated graphics processor.

// Sorry for multiple posts, but I'm used to automatic post merging of Samdroid, it makes replying to (parts of) multiple posts scattered over several pages much easier. Moderators please feel free to join my posts into one.
[Galaxy 3 Android Development] PersianSphinx:
I don't know about that 150 either, its not kind of low, its really low. i get over 150 with samsung drivers all the time! yesterday i got 159, and today whith test i got 152. on my device, the DNA test has a fps of 3-4 fps. the room has 7-10 on going forward, 4-6 on turning and 5-9 when the lights go off and on in the end. the planet fluctuates between 17-22.

i have got 250+ with CPU rendering. only the DNA test was affected, and the other tests lost all their textures. the DNA test ran at 8 FPS all the time. hope this helps?
[Galaxy 3 Android Development] Arakmar:
Thanks for all infos. :)

I still use samsung's gralloc to run openFIMG so it's probably that which causes color format issue. But there is some problem with yours on G3 due to some IOCTL incompatibility with the G2D driver. (maybe with openFIMG too as it uses G2D for glTexImage2D)

So, do we need to port this kernel module too ?

The problem is that our G2D module uses completely different registers than the Spica ...

https://raw.github.com/sg3/G3MOD/master/Kernel/drivers/media/s5p6442/g2d_drv/g2d.h

https://raw.github.com/sg3/G3MOD/master/Kernel/drivers/media/s5p6442/g2d_drv/g2d_dev.c

https://raw.github.com/sg3/G3MOD/master/Kernel/arch/arm/plat-s5p64xx/include/plat/regs-g2d.h
[Galaxy 3 Android Development] tom3q:
OpenFIMG doesn't currently use G2D in any way. It used to use it for generating mipmaps, but it didn't work correctly so it's now done in software. Not a big deal as textures are usually specified once and then just used whenever needed.

As for my gralloc, commenting all the code related to G2D should do the thing. It shouldn't have any negative effects as I checked that all code paths using it aren't actually used by Android.

I will think about using G2D wherever possible, preferably in glClear, but it doesn't have any priority right now and won't even be required for normal operation.
[Galaxy 3 Android Development] PersianSphinx:
does this mean arakmar's work was mistaken? too bad :(:( im sure one of you guys will come up with something cool soon :D
[Galaxy 3 Android Development] Arakmar:
Still the same color format problem with your gralloc, it's weird.

I'll recheck the G3D kernel module ...

By the way, the screen flickers a lot with your gralloc (same problem in our first ICS test build). Does the spica have the same issue ?

No, G2D isn't the same as G3D. What tom3q said is that his G2D isn't required to run OpenFIMG and his gralloc. So it's a good news because porting G2D too could be harder than what I do to G3D.
[Galaxy 3 Android Development] PersianSphinx:
i see. I don't understand what we would miss (I'm sure there is something) without this G2D? can you explain? :)
[Galaxy 3 Android Development] hillbeast:
G2D is the 2D graphics accelerator, but it was hardly used anyway. Most of the 2D graphics before were done on the CPU or the FIMG GPU so it is no loss.
[Galaxy 3 Android Development] tom3q:
Hmm, maybe also check the framebuffer driver in G3 kernel. I saw in some logs posted before in this thread that it reports 24 bits per pixel, which is incorrect, because even if no alpha channel is used, one pixel always has 32 bits in all formats with bpp higher than 16.

Nope. Might be something with FBIOWAIT_FOR_VSYNC call in fb_post. My current gralloc is written for my 3.0 kernel which uses mainline s3c-fb framebuffer driver, which impements the call correctly. The driver from original kernel of Spica didn't, this may be the case with G3 kernel too.
[Galaxy 3 Android Development] marcellusbe:
if swapNeeded is set to false for HAL_PIXEL_FORMAT_RGBA_8888 and HAL_PIXEL_FORMAT_RGBX_8888, that seems to be a lot better (pic1) in eglCreateImageKHR.

but i'm still having bad colors with some pixel format (pic2).
[Galaxy 3 Android Development] tom3q:
Well, don't modify OpenFIMG as it's not the source of problems. I already said what it could be. The format used on Samsung phones (the format of framebuffer supported by hardware) is BGRA not RGBA/RGBX and such must be reported by gralloc.
[Galaxy 3 Android Development] marcellusbe:
that help me to understand. how can I check if BGRA is used on galaxy 3 ? because, if I change s3c-fb in BGR mode (fbdev->rgb_mode = MODE_BGR_P ), there is still a problem with alpha (opaque surface are transparent).
[Galaxy 3 Android Development] tom3q:
The FIMD IP (display interface) in all S3C and S5P SoCs supports only little endian ARGB format, which in GL convention is called BGRA (in addition to packed 16bpp formats and some rarely used indexed formats, irrelevant here).

I already said that s3c-fb driver from G3 kernel should be fixed to report bpp of pixel format correctly, as 32 bits instead of 24 bits and gralloc should always report BGRA8888 when bpp of active pixel format is 32. The format itself in the hardware is most probably set properly.
[Galaxy 3 Android Development] Arakmar:
@tom3q:

Do you think the mainline s3c-fb driver of linux can be ported to the G3 ?

I saw somewhere that there is some little differences between framebuffers of nearly all S3C and S5P SoCs.

About PMEM, does my changes seems to be correct ?

https://github.com/Arakmar/G3MOD/commit/a91cf2d26901d6c574328cdd92b34bd752e57900

And in devs.c

static struct android_pmem_platform_data pmem_pdata = {
.name	= "pmem",
.no_allocator	= 1,
.cached	= 1,
};

static struct android_pmem_platform_data pmem_gpu1_pdata = {
.name	= "pmem_gpu1",
.no_allocator	= 1,
.cached	= 1,
.buffered	= 1,
};
[Galaxy 3 Android Development] tom3q:
Well, my kernel for Spica uses the mainline driver and the driver itself supports all the S3C and S5P SoCs currently available, so hardware support shouldn't be a problem here, rather your kernel version and possible API changes.

The line ".no_allocator	= 1," in pmem_gpu1_data is invalid. It should be removed or changed to ".no_allocator = 0,".
[Galaxy 3 Android Development] stubborn_d0nkey:
Are there any other computer science students that feel very noobish when reading this, or am I the only one?
[Galaxy 3 Android Development] aropop:
Same here :p I'm specialised in web design so no big worries ;)
[Galaxy 3 Android Development] rdass3646:
Same here too I am Computer science. engineering student and have 8 months training in C but Tom3q just seems to be too good for us to understand. My respect to him
[Galaxy 3 Android Development] andreapier:
Are there any other peolpe that feel very off topic reading this?

Seriously, why do you people start this questions?? Don't you know thatthere are even more people that just wait for something likr this to give their opinion about nothing?

Please, you 3, ask mod to delete your post and make a favour to everyone here in the community..

Oh yes, i didn't mean to offend you but this simply is to much for me
[Galaxy 3 Android Development] m1trand1r:
^^^^+1:)

Sent from Galaxy

Kyrillos' ROM GWK74 Alpha4

powered by

CM7- ultra kernel 1.2
[Galaxy 3 Android Development] stubborn_d0nkey:
Yeah, you're right, sorry guys about the off topic, can a mod please delete these off topic posts.

I haven't been active here in a while, and the other forums I've been on are very off-topic tolerant so I guess I just got used to posting off topic, it wont happen again ;)

P.S. I didn't expect people to reply :D
[Galaxy 3 Android Development] Shree_Jamdar:
gup bas re anrapier
[Galaxy 3 Android Development] marcellusbe:
this has been fixed by using FBIOWAIT_FOR_VSYNC in gralloc like this :

#define FBIO_WAITFORVSYNC	_IO ('F', 32)

ioctl(m->framebuffer->fd, FBIO_WAITFORVSYNC)

vsync work now and no more screen flickering.
[Galaxy 3 Android Development] TearsDontFalls:
That means it works fine? Is the 3d performance better(quadrant score)?
[Galaxy 3 Android Development] sharukins:
that means the screen isn't flickering anymore :rolleyes:

as far as I know there are still issues on the colors

the reason to port this driver is mainly to off load the CPU not to gain highscores in benchmarks :cool:
[Galaxy 3 Android Development] TearsDontFalls:
I also want no high scores in quadrant, i want to play games like pes.
[Galaxy 3 Android Development] hillbeast:
Guys, stop asking for Quadrant scores. Seriously, if you BADLY need to play a game, get a computer and play a game on there. Stop asking for quadrant scores and let them develop.