yashsingh1/xdaforums huggingface dataset:
[Nexus One Android Development] Geniusdog254:
I know for sure 2 of the 3 are set in the kernel. The EBI1 clock of course is the one I'm trying to modify now, it has no effect. Then there is the "imem" clock which I haven't seen any code to set it, and then there is the "grp" clock.

If you see my first post, in board-mahimahi.c it defines PWR_RAIL_GRP_CLK which is the GRP clock. It is set at 8 as I just discovered. Here is that code:

#define PWR_RAIL_GRP_CLK	8
static int mahimahi_kgsl_power_rail_mode(int follow_clk)
{
int mode = follow_clk ? 0 : 1;
int rail_id = PWR_RAIL_GRP_CLK;

return msm_proc_comm(PCOM_CLKCTL_RPC_RAIL_CONTROL, &rail_id, &mode);
}

The only thing that leaves is the imem clock which may be a memory clock? I haven't found it set anywhere, but it could be in the kgsl_sharedmem.c & .h files. I haven't checked there yet. That covers 2 of the 3 clocks. I don't know what the 8 value on the grp clock means, or even what the grp clock is. But so far, those 2 are for sure set in the kernel...
[Nexus One Android Development] dictionary:
I forget his username, but maybe the guy who got use all the mem hacks would be of great service? I think it's c00l something
[Nexus One Android Development] dictionary:
Who got us* damnit I hate these typos. I'm going to bed. Too tired, and tapatalk has no flipping edit button lol
[Nexus One Android Development] Geniusdog254:
Coolbho3000. He posted in the original thread or the MSM7500 chip about how it was handled differently on Snapdragon chips and that we may be able to change it, but that's all he said.
[Nexus One Android Development] dictionary:
Yup him. I see. I'll have my bro look over this and see if he can find anything relevant, or help in any way

I'm not so advanced with my dev
[Nexus One Android Development] intersectRaven:
According to clock.h, imem_clk is the clock source for the internal graphics memory so that seems right. :)
[Nexus One Android Development] Geniusdog254:
Hey look at that! It just nicely lays out what all those clocks are! :cool:

grp_clock = Graphics clock

ebi1_clock = External Bus Interface 1 clock

imem_clock = Internal Graphics Memory clock

Not sure what the ebi1_clock is linked to, but kgsl sure sees it as important enough to set it every time it runs. It's the only one set in a recognizable format (hz).

I'm not sure where the imem_clock is set or if it even is. Intersect, did you happen to see it set anywhere? It may be important to change though, it would allow more memory throughput and we could increase the graphic memory size in the board file and that may boost performance.

The grp_clock seems to be actually the real GPU clock according to clock.h. It's set 8 in board-mahimahi.c but I'm not sure what the 8 means. But then it may be that PWR_RAIL_GRP_CLK is setting a voltage or other power level to the graphics bus? Maybe the clock is set somewhere else. That'll take some more digging.
[Nexus One Android Development] intersectRaven:
The EBI clock is the external bus interface clock so I don't think we should mess with it. Anyways, it's set I think to ensure that it's working when the GPU is rendering something. If you'll look at the things that set it, it's usually set to 0 when entering suspend or sleep. Anyways, the variables in clock.h are used as sort of pointers to where the system will actually try to set the clock. (from what I can read at least) As for the imem_clk, I didn't find it set anywhere so it may be that it's on the radio or hardcoded. As for the graphics memory size, I think coolbho3k already knows more about resizing it since he's studied the N1's memory layout in further detail. (he did create that mod which increased the size of the available memory AND also figured out how to get charansingh's camera more memory) Anyways, I'll take a look further. :)
[Nexus One Android Development] johnnie93:
Interesting, but can we activate hardware acceleration in the device? i think if you can think of a way to do that you will be able to overclock the GPU just like on a PC and easily access the clocking just like the CPU.

I'm no expert on overclocking Phones only PC's.
[Nexus One Android Development] Geniusdog254:
I just woke back up. I guess I will remove the EBI1 overclock since I'm not sure what it does. I'm also not sure what increasing the GPU memory will do, but it's worth a shot.

I had noticed EBI1 is being set to 0 whenever it's diabled, and then setting it back at the time it's enabled. I'm gunna go back through and try to find another setting for the grp clock & a setting for the imem clock.
[Nexus One Android Development] storm99999:
Using phys_to_virt() it crashes as well, in the same place, same way. System reboots after I get into adb to monitor dmesg for my kgsl signal. Happens regardless of whether or not I use adb.
[Nexus One Android Development] Jack_R1:
Ok, I'll try to check it too. Hopefully I'll have some time for that on Sunday.
[Nexus One Android Development] tolis626:
@Jack_R1

Don't you know anyone from the SW department that might be willing to help you guys out?Without endangering your career of course! :)

@All

Really great work guys!I've been tracking your thread since the beginning and am quite impressed!

But from the whole situation it crosses my mind that there is some security mechanism functioning here...Isn't this likely?
[Nexus One Android Development] Geniusdog254:
That's the conclusion storm & I came to last night. We can't be sure, but it seems like changing it causes the system to not boot, even if we try and manually set it to the stock freqs. That either tells me that we're implementing msm_proc_comm wrong (which I doubt, we're doing it the same way the stock system does) or that they don't want us messing with it, and it locks up.

EDIT: Also, as storm pointed out to me last night, Qualcomm probably doesn't want us screwing with this. If we can just overclock our old chips to no end, then what incentive do we have to upgrade to their newer chips? (By the way, the QSD8672 can't get here fast enough lol dual core 1.5ghz 45nm CPU, 5x the GPU performance of the first gen Snapdragons :D) They want to keep us stuck with this until we upgrade to their newer hardware.
[Nexus One Android Development] storm99999:
Well, there's 3 likely security mechanisms. Either it's set in the radio and we have no chance to get in from the kernel, there's a specific code sequence to access the clock, or it's in the binary-only part of the driver (which I think is the radio anyways). All of them could be circumvented given time and some way to reset the device in the case of the radio, but only the second one gives us much hope.

There's indications of this, but as of this moment, we can't get information out of the one mechanism that could tell us.

Edit: I hate to ask this, but is there any indication of a JTAG port on the phone?
[Nexus One Android Development] Geniusdog254:
It's probably doable, but I'm sure not gunna try it :P

Check out some of the Dream JTAG threads
[Nexus One Android Development] Jack_R1:
If I didn't have SW friends, I wouldn't attempt this.

It can be said about any deviation from specs, which move the device to "unsupported" category, and it's never supported by manufacturers, since it gets the device to the limits that weren't tested and weren't accounted for. When you overclock anything, you do it at your own risk.

It doesn't have much to do with buying newer, though. There's only that much that can be gained from overclocking, considering that the device is created with relatively small safety freq boundaries, and that also applies to any overclocking.
[Nexus One Android Development] storm99999:
Has anyone made any progress on the CodeAurora driver yet? I'm tempted to email someone who's committed a patch and asking for implementation details.

Currently, the newest top of the line, the Galaxy S is only 2x as fast on the GPU front. Just implementing the new driver would make ours just as fast (theoretically). After that, any OC is icing on the cake.

Geniusdog256, any news on extracting the binary from Liquid E's? I still don't know the feasibility, as there are very few authoritative people on the subject and I don't know who they are.

EDIT: I did more research on this, and it looks like it's just a binary blob in userspace with user access. Great! Though it brings up another problem, does the radio have to be designed specifically to facilitate this or does getting this file and putting it in the right framework make us home free?
[Nexus One Android Development] fstluxe:
thank you guys,,

I Really like the involvement in this ... I,m just not capable enough to help.. however I really like to..
[Nexus One Android Development] tolis626:
Ok,just thought I'd ask!It's good to have someone like you on our side! :)

Woah!You mean that if and when we get the new driver working on our devices we will no longer have anything to be jealous of?Will we be getting the same or at least similar results at Benchmarks?
[Nexus One Android Development] storm99999:
Theoretically. Clock for clock, the Liquid E is 2x as fast as the Nexus One for the GPU. If we can port it, which is at best unlikely, our superior clock speed would put it in the ballpark of the Galaxy S. Any overclocks would allow us to supersede it.

EDIT: The only reason we think it's the driver is that the kernel source for the Liquid E uses the new driver that Qualcomm put out a bit ago. We don't think the gpu is overclocked on the Liquid E, but there is the possibility. It's definitely not a 2x overclock, so at least some performance can be had from the new driver, and in addition, the new driver is theoretically easier to overclock, as the userspace driver isn't loaded as early as it needs to be.
[Nexus One Android Development] Geniusdog254:
Yeah I knew the userpace portion was accessible. I said that before but no one seemed to believe me :p

And I've emailed some folks at CodeAurora but haven't got a response. I emailed them about 36 hours ago and I'd give it a couple more days before I say that I've been ignored. You should shoot them an email too, maybe it'll give them a little more reason to not ignore us if they get several emails.

Well said. I think it's a problem with the kernel version. What kernel are you building storm? The Qualcomm one is built for a .32 kernel, and my builds are either a .29 on Evo or a .34 on Nexus.

Anyone know what kernel version the Liquid has?
[Nexus One Android Development] storm99999:
I wanted to believe, but I had no evidence. The problem now is where is the one on the Nexus?

That's unfortunate that they're not responding. I hope you didn't ask too much out of them, I personally would have asked two things: for one, is there anything specifically preventing the kernel from setting the clock, and two

is there anything on the Nexus One preventing us from porting this driver? Looks like an HTC engineer may be more useful to ask, though for the second one.

Anyways, I use Cyanogen's kernel for my testing as it's easy to build, but the Acer one, let me download that and check. I need it anyways.

Oh, and also, well said? That was one of the most awkward sentences I've ever written. :P
[Nexus One Android Development] Geniusdog254:
Hah I didn't mean grammar wise, I was referring more to the content :p

I don't think I asked too much, heres a copy of what I sent to the 2. There were a few differences between them but they were pretty much both this:
[Nexus One Android Development] storm99999:
Well, the Acer Liquid E is .29. In a fit of insanity, I'm going to see if I can even build it for the N1, if I can, well, we have our base. Also, I fear mentioning overclocking may have put them off... We'll know if they don't respond.

EDIT: The normal source throws out tons of garbage, but it looks like there are already kernel devs over in the Liquid forum. Should be able to get better source from there.

EDIT2: Here's a git source where most people get their Liquid E kernel, git://gitorious.org/liquide/kernel.git, basically it was the first kernel that actually built for the Acer. And yay, for having been a member for nearly 3 years, I finally lost my "Junior" tag.

EDIT3: This kernel does build, but it's asking me if my SoC is normal or Rev. A. I've never encountered this before, maybe we don't have the chip for the new kernel...

EDIT4: It's asking too many questions, probably related to me saying nay to it being a Liquid E and then not asking me if I wanted any other board file. So yeah, either port it from there or port the Mahimahi boards back. The kernel is unusable as is.
[Nexus One Android Development] tolis626:
Well,I'm not much of a programmer,but why don't you try values that don't differ so much from stock?I mean 128 is half the stock and 384 is 50% higher than stock...With a CPU we go as far as to overclock it to 40-45% which isn't stable in most of the cases.Try underclocking to 192 or overclocking at about 320 and see if that works.

Also,is it impossible to set the clock later at the process,after the kernel has been initialized?If there is any way to do it then we might be able to at least start the phone and see! :)
[Nexus One Android Development] storm99999:
That's exactly the problem. Later on, no kernel function can reset the clock, but if we force it to set it early, it crashes the phone. No matter what we set it at. We even tried 256, the stock frequency, and that locks it up. Until we can figure out what goes on at boot, we won't be able to set anything.
[Nexus One Android Development] dogiedogie:
So that is suggesting that there is something physically different. I honestly cant see Q making a hardware revision on the same model, think how complicated it would make keeping older phones (N1/Desire) up to date and stable when theres two sets of unidentifiable hardware. I would say though that if there IS anything, which is a good possibility, its some sort of chip soft/firmware, and NOT something physically different with the chip.

Might be an idea to pop an email off to ifixit [the people who do the teardowns if i havnt got that mega wrong?] to see if they can verify if a Liquid E is using the same chip.
[Nexus One Android Development] tolis626:
Just to get to speed,can we implement the new driver in the kernel and have a successful boot or does it lock up too?If yes,is there any noticeable difference?If no,isn't it worth trying to make it work first and see how it turns out and then get to the overclocking part?
[Nexus One Android Development] Geniusdog254:
Alright I don't want to sound snippy, but I've had a stressful day, so be prepared. Don't take what I say personal, you were just the latest poor soul to set me off :o

We aren't to the point we can set the clock and have it boot yet. If we were, all of the last 3 or so pages would be moot. Also, we can't use the new driver yet because we haven't yet gotten it to build properly in our kernels. IntersectRaven actually managed to get it to build, but it wouldn't boot. That leaves us at a standstill until we can either make the new driver work, or make it change the clock and still boot.

Those are the two things were working on right now, and either way should lead to better performance, although we have no promises.

We're all pretty much amateurs when it comes to C, the only real kernel dev here is coolbho, and he hasn't really been that active with it, he's just thrown a couple ideas in. Storm, Paul_R1, and myself are all brand new to C. Paul isn't even a coder, he's just a hardware brain at Qualcomm who is trying to help. I've never done any real C in my life, I'm just a moderate Java dev, and I'm not sure about storm's coding background, but he isn't exactly a pro here either.

If you had read the whole thread, then you would know that those were our 2 options, and the point we're at currently on both.
[Nexus One Android Development] Dany0:
Just small calculations:

Adreno OC'd to max is able to push out 180 MPOLY/s

It should be able to put out bit more then twice it's current power without need to higher the voltage.

It's still stable at around 45 Celsius

We can optimize the qualcomm drivers so that it can bring about 1,5x the power now on the same clock.
[Nexus One Android Development] Jack_R1:
Checked, as promised. Bad news. If I sum it up in one sentence - GPU overclock w/o touching the rest of the system is plain impossible, and GPU overclock while trying to play with the whole system is most probably still impossible (pending further deeper check), and it's definitely impossible for anyone that doesn't have the clock diagram, which is NDA, thus won't be available. The reason isn't software, and don't ask, what it is - I won't give direct explanations.

I've written a long post with some explanations of clock networks, to educate those that want to learn and prevent some of big mistakes that I've seen along this thread, and it's pending approval, since I don't want to accidentally spill more than I can share. I hope it gets approved and I'll post it. It should give some more insight.

The only good news is - global overclocking that affects 1GHz CPU clock will affect GPU too.
[Nexus One Android Development] Geniusdog254:
Well that's a bummer... Thanks for the heads up though

I sure hope it gets approved too! Even though it now seems impossible (at least for me and most likely storm too) it should be an interesting (if a bit over my head) read.

That's what I had suspected all along, but had no proof.

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

Also, is there anything you can explain about why the Acer drivers get better performance? Can we bring them over to the Nexus? Or is that outside you're area of expertise?
[Nexus One Android Development] Jack_R1:
I guess it's pure SW optimizations (which aren't negligible, since sometimes they find improved ways to utilize existing HW). I'm too far from that area, so I can only guess.
[Nexus One Android Development] storm99999:
Well, I suppose it's a bit disappointing, but I'm glad to have an exact answer on the matter. I'd rather not keep trying for another few weeks just to come to the same conclusion.

So, that means that only moving to the Acer drivers has any chance of improvement. Too bad it's out of my skill range to port it, but... I'll get more research in, see if anyone knows how this driver is currently set up.
[Nexus One Android Development] coolbho3000:
Hey Jack_R1, this is kind of unrelated (but also kind of related), I had the crazy idea a while ago that our efforts so far in overclocking the main CPU clock is hampered by some kind of hardware lock and not the quality of the silicon itself, since most N1s hit such a hard wall at ~1113-1152MHz no matter how much voltage we try to pump in, and a select few can get to 1267MHz very easily. What do you think?
[Nexus One Android Development] Geniusdog254:
That's a good question. It could just be a QSD8250 thing, since the 8650's in the Evo typically has no problem reaching the theoretical max of 1.267ghz. My Evo (I'm unlucky apparently lol) won't hit above 1190mhz without crashing, but I seem to be an odd case.
[Nexus One Android Development] coolbho3000:
I know on the qsd8x50a (from Code Aurora) you can "re-calibrate" the PLL limits. I tried doing the same thing on my Evo and Nexus One, but it simply crashed.
[Nexus One Android Development] dogiedogie:
Semi unrelated, but is the test to see if your phone can go to 1.267 simple flashing one of those faster kernals and see if its stable?
[Nexus One Android Development] jlevy73:
You would need to build your own 1.267ghz kernel because in order to achieve the speed it requires over-volting, something XDA will remove the moment it gets posted.
[Nexus One Android Development] Jack_R1:
I don't want to talk about MSMs, so let's take another platform for example. What happens if you speed up FSB on a PC, and not just a PC, but specifically older AMD64 CPU with integrated controllers? Bumping enough voltage into CPU to keep it steady and taking care of the cooling, the system would still fail at some point... Why? Because the controllers that are speeding up with the FSB, are driving external devices (PCIe, memory), and those might fail. Moreover, on some older PCs without many separate frequency controls overclocking FSB would overclock PCI, and the limiting factor could be PCI device. You'd take it out of the computer and discover a fully functional system, you put it back - and it fails booting.

If you extrapolate it to other chips, you might have another version of what's hampering overclocking.

This is a (maybe a bit educated) guess, not any concrete data, and there are other possible reasons too - but you asked what I think... :)
[Nexus One Android Development] Dany0:
HEY GUYS! I think I found how to overclock the GPU! But only for very very VERY brave guys!

The answer is easy! Has anyone of you guys ever overclocked a Pentium II? Well, there is a set of joints near the snapdragon. Now you know what to do :)
[Nexus One Android Development] dogiedogie:
*revs the chainsaw* someones going to tell me very soon ;)

EDIT: and yes ive OCed a pentium 2 :) about 85%
[Nexus One Android Development] Dany0:
Cool :D Well maybe if someone has already another phone and doesn't really care of his desire/n1/x10 or any other snap! dragon device... :D
[Nexus One Android Development] dogiedogie:
I have one which I am going to pay for a new mobo for to relock and sell on, so can use that one :D
[Nexus One Android Development] fstluxe:
Dany0,

who are you trying to convince ?? You're only speculating very much.. With 0% evidence or technical Data..
[Nexus One Android Development] Dany0:
That was more helpful then The Hitchhiker's Guide to the Galaxy :)

Thank you Mr. Jack_R1.
[Nexus One Android Development] fstluxe:
Sadly:confused::mad::(
[Nexus One Android Development] fstluxe:
hmm Okey,

What we at least could try to do is trying to make the Acer driver to work by that we may get some increase in performance.. its better then nothing for the moment..
[Nexus One Android Development] fstluxe:
Guys,,

Anny body thoued about this ??

The accer liquid performs on opengl 1.1 much better +-34/35 fps (neocore) while the nexus +-27/28 on eclair

can this difference be due the fact the phones have other color amount

Accer liquid	256.000 colors.

Nexus 16 Bit ..

its much difference can this be the performance difference? or should it be The newer drivers...
[Nexus One Android Development] Geniusdog254:
That doesn't really matter. It might have been a valid theory, but we already know that the Liquid has different drivers in both the kernel and userspace, so that's the logical place to look.

Compiling the new drivers into my kernel is over my head though, so I'm afraid at this point I can't be much help
[Nexus One Android Development] fstluxe:
Okey,

So we need real Linux kernel Devs..
[Nexus One Android Development] Geniusdog254:
Essentially, yes. IntersectRaven already tried putting them in his kernel, and fixing all the compile errors, but it wouldn't boot on the device.

Maybe getting coolbho, pershoot, or Cyanogen to look at them would be the way to go
[Nexus One Android Development] babijoee:
Running modaco sense 2.2 desire port 15/jul for n1 and gave me very interesting results.

For Neocore: 31.4

For nenamark: 12.8

For glbenchmark: Runs all the way and when i click upload it fcs -.-

Could be something you guys could look into. If you need any drivers or more info feel free to pm or ask in the thread :p
[Nexus One Android Development] Dany0:
cool! but first we should contact the guys Geniusdog254 mentioned
[Nexus One Android Development] tolis626:
Well,judging the matter linux-wise,my guess would be that the new driver crashes when the device first runs the GUI(Graphical User Interface for the newbies),as was happening with some proprietary drivers from ATI on my HP laptop running Ubuntu.I am using an ATI 4650.While the older driver was working ok,it was lacking in performance.The newer crashed.However,when linux devs updated Xorg(again for newbies,this is linux's windowing system) to the next version it worked ok and the new driver was working wonders.I must have got something like an 80% boost in performance.I know it's somehow off-topic but it might be a logical explanation.