[PROJ] Overclocking the Adreno GPU on Snapdragon Devices

Search This thread

Geniusdog254

Retired Recognized Developer
Jan 2, 2009
1,110
169
St. Louis
I already posted this in the Nexus dev forum, and I hate to clutter the boards, but I know that there are a bunch of talented devs here that may not see it on those forums. If we can bust the 30fps cap for good, and get the GPU overclocked, then we could see some serious gaming performance out of our Snapdragon devices.

I'm sure we all heard about being able to overclock the GPU on some of the old MSM devices, but the Snapdragon handles the graphics chip in a different way. The goal of this thread is to try and overclock the GPU on Snapdragon devices as well.

There is nothing GPU related in acpuclock-scorpion.c (the Snapdragon cpu clock settings) at least for setting gpu clock speed as far as I can tell.

In board-mahimahi.c (Nexus board file) and board-supersonic.c (Evo board file) there is some kgsl init code, but so far as I can tell it isn't setting the clock there, instead it seems to be pointing to PWR_RAIL_GRP_CLK to set the clock in both devices. It defines the variable in each of those files but I'm not sure where that variable is set, since it doesn't seem to be in any of the other board files as far as I can tell. I could be completely off here too though.

In drivers/video/msm/gpu/kgsl/kgsl.c there is a method called kgsl_clk_enable that seems to be called whenever the GPU is enabled. It looks like this:

Code:
/* the hw and clk enable/disable funcs must be either called from softirq or
 * with mutex held */
static void kgsl_clk_enable(void)
{
	//clk_set_rate(kgsl_driver.ebi1_clk, 128000000);
	clk_set_rate(kgsl_driver.ebi1_clk, 245000000); // Looks like it sets the GPU clock, right? Wrong.
	clk_enable(kgsl_driver.imem_clk); // Enable the clock
	clk_enable(kgsl_driver.grp_clk); // Enable another clock, but why?
}

The line that's been commented out is the original value, I replaced it with my value on the line below it in a failed attempt to overclock it. Probably a stupid effort on my part, I doubt it's that simple, but it was worth a shot. The comments at the end of the line are also my additions.

According to the clk.h files in the standard linux kernel, clk_set_rate is obviously a method to set the clock rate. The first variable is a struct that tells it which clock to set, and the second variable is a long value that is the rate you want it set at. Is it setting the right clock there for Snapdragon chips? Or is it only the clock for older chips?

I'm in way over my head with this source, I'm but a lowly Java dev, but I really wanna solve this. Can anyone with a little more experience than me throw in a little more info? Sorry if it doesn't make much sense, if it isn't clear just ask me & I'll try to explain a little more.

Regards,
Jesse C.

EDIT: Okay I did a little more digging and those kgsl settings should work for QSD8x50 chips. In the config file, under Drivers, Graphics Support, it allows you to enable 3D accelleration for QSD8x50 & MSM7x27 chips. The tag for that is CONFIG_MSM_KGSL_MMU. If you check in kgsl.c it checks to see if that is enabled in the config, and if it is then it compiles and uses kgsl.c & all of the kgsl code. That tells me that the clock is either not being set, or the wrong clock is being set. I'm adding some debug code right now so I can see in dmesg what code is actually being run.
 
Last edited:

Shadow591

Senior Member
Feb 3, 2010
261
0
Dude I have no idea how to do this but bump and best of luck

Sent from my PC36100 using XDA App
 

Geniusdog254

Retired Recognized Developer
Jan 2, 2009
1,110
169
St. Louis

Yeah I saw that, but that won't work for us, because it is for one of the old MSM7500 chips instead of the new QSD chips we have in Snapdragon devices.

I am working on a few things now and I recommend you check the Nexus forum since that thread is a lot more active.
 
  • Like
Reactions: edfernandez2

fstluxe

Senior Member
Sep 15, 2009
226
13
New York
Yeah I saw that, but that won't work for us, because it is for one of the old MSM7500 chips instead of the new QSD chips we have in Snapdragon devices.

I am working on a few things now and I recommend you check the Nexus forum since that thread is a lot more active.


okey, But as far as I know that code is not standard... Becouse the Vugue msm7500 device is originally WM device.. so the Smart dzo managed this custom code.

I wil follow the nexus form .. This is Damn interesting :)!
 
J

jigglywiggly

Guest
I'm going to bump this, would be nice if more people were working on this.
 

frettfreak

Senior Member
Jan 19, 2010
795
111
Apple Valley, CA
Man... I absolutely love my phone. It really sux that this even needs to be asked. This device is so much more capable and I cannot understand why HTC would cripple it so badly. Look at the Samsung galaxy s or the Droid x. Or even a more similar phone like the nexus or incredible. They all stomp this phone when it comes to anything graphics wise even if it is just swiping home screens. It makes me sad. Lol
 

topdnbass

Senior Member
Jan 13, 2009
464
9
I love how it makes you sad, but you still lol. Lol (correctly placed)
This is big but first let's get a true cap fix!

Sent from my Evo 4G
 
J

jigglywiggly

Guest
How is there such little interest in this subject? This intergrated gpu will probably overclock like a beast... and maybe we can get actual fps.
 

psych2l

Senior Member
May 25, 2010
535
85
Boston
How is there such little interest in this subject? This intergrated gpu will probably overclock like a beast... and maybe we can get actual fps.

I'm thinking this is also one of those things awaiting source. Even the overclocked kernals make my phone reset so I'm waiting for a more stable release myself. Since you're still posting here does that mean you decided to keep your evo? :D
 
J

jigglywiggly

Guest
I'm thinking this is also one of those things awaiting source. Even the overclocked kernals make my phone reset so I'm waiting for a more stable release myself. Since you're still posting here does that mean you decided to keep your evo? :D

I don't know, yet I am in deep havoc lol. I activated my phone on the 20th. I have till 13th of July to pay my bill, so don't know.

I mean the locked bootloader of the Droid X is kind of lame. Also on the Evo, I have a 10$ discount because of the IO conference... unlimited texts too, and I bought two batteries for it with a charger(for 10$ lol, and they actually last a long time 1500ma, I put the 2 extras in my wallet)
Also I think I can upgrade my phone right away already if I read things right, so if Sprint gets an awesome phone I can upgrade to that whenever.

Verizon is more expensive, but I like how they let me do a 1 year contract. The Droid X is also nicer, I mean it has a better camera, and the mic quality when taking videos isn't piss, hopefully someone fixes that. It also has a real graphics card.

So yeah, it's hard to decide. A better phone, vs saving me some money. Though I plan to attend the IO conference once again. I'm still porting my distrubuted prime client onto Android, hopefully it will be high performance. So it's not like I just go there for a phone ^^. Hell I didn't even know about the phones till they said "Where do you want the Droid delivered" I lol'd. Though my time is limited, summer classes at UC Berkeley are tough : /
 

topdnbass

Senior Member
Jan 13, 2009
464
9
How is there such little interest in this subject? This intergrated gpu will probably overclock like a beast... and maybe we can get actual fps.

Yep, looks like til we get the kernel in our hands they're tied.

Also what's the point of overclocking if their is still a limit on FPS..

Eventually this will be the next thing on our todo list :)
 

joeykrim

Inactive Recognized Developer
Jan 9, 2009
1,978
1,311
J

jigglywiggly

Guest
Yep, looks like til we get the kernel in our hands they're tied.

Also what's the point of overclocking if their is still a limit on FPS..

Eventually this will be the next thing on our todo list :)

There isn't really a fps cap with the novatek kernel hack. It made the display much smoother for me and I am using it on EvolutionX. So beast.

Good news about the drivers, maybe we can actually see some overclocking now.
 

patelkedar91

Senior Member
Jun 20, 2010
433
11
I want this to happen!
Nova runs pretty well on the Evo. Gameloft updated it recently.

I would just like for iphone ports to run well.

I hear the Palm Pixi has the same GPU. It is clocked at 190mhz. What about the Evo?
 

Geniusdog254

Retired Recognized Developer
Jan 2, 2009
1,110
169
St. Louis
I hear the Palm Pixi has the same GPU. It is clocked at 190mhz. What about the Evo?

The Pixi doesn't have the same GPU, it has one of the low/mid-range MSM7227 (I think thats the model?) chips. It's similar as it's one of Qualcomms latest gen chips, but it is NOT a Snapdragon so it's different.

Also, the Snapdragon GPU's on HTC devices are clocked as follows:

GRP_CLK: The actual graphics clock, 256mhz
IMEM_CLK: The gpu memory clock, 256mhz
EBI1_CLK: As best I can tell, the bus that the GPU is on is EBI1, this is the clock for it, 128mhz

If you want more info, look here: http://xdaforums.com/showthread.php?t=710850 since that thread is a lot more active, but please don't clutter it, there's actual devving going on there ;)
 

patelkedar91

Senior Member
Jun 20, 2010
433
11
Thanks for the info. I just wonder how they're going to get 3d games to work on the Pixi then... weird.
It was announced that the Pixi would get 3d gaming with the 1.4.5 update.
 

Top Liked Posts