We talked about overclocking the CPU of the S4 (SGH-M919) before, but today I wanted to point out some great work by Faux123 that showed me exactly what to do to overclock the Graphics Processor Unit (GPU) of my S4. Faux123’s work was far more impressive then my own, with if/then statements and options to compile with and without it. However, for a simpleton like myself, I just put it straight in, without all the options. I put it in without options because I want it to be in there! Here is a link to Faux123’s commit:


I am including it here so that you can review it and see a true master at work, as well as to give credit where it is due. Below is my adaptation of that work.

Faux123 started by making some edits and changes to the kconfig file. This allowed the option of compiling a kernel with, or without the GPU overclocking. However, as I stated earlier, I want to compile it with the GPU overclocked every time, so I didn’t add that in. Because of this, I didn’t need all of the if/then statements that were seen in the rest of the work. Also, Faux123 was working with a board-mako, but I am working with an S4, so I used differnt files. Here is what I did change, though:


static struct msm_bus_vectors grp3d_max_vectors[] = {
.ab = 0,
.ab = 0,
static struct kgsl_device_platform_data kgsl_3d0_pdata = {
.pwrlevel = {
.gpu_freq = 487500000,
.bus_freq = 4,
.io_fraction = 0,
.gpu_freq = 320000000,
.bus_freq = 3,
.io_fraction = 33,

That line:


used to say a lower number:


, and the

[CODE].gpu_freq = 487500000,[/CODE]

used to say

[CODE].gpu_freq = 450000000,[/CODE]


Then I simply added a line to kernel_samsung_jf/arch/arm/mach-msm/clock-8960.c:

/*Shared by 8064, 8930, and 8960ab*/
static struct clk_freq_tbl clk_tbl_gfx3d[] = {
F_GFX3D( 0, gnd, 0, 0),
F_GFX3D( 1800000, pxo, 1, 15),
F_GFX3D( 27000000, pxo, 0, 0),
F_GFX3D( 48000000, pll8, 1, 8),
F_GFX3D( 54857000, pll8, 1, 7),
F_GFX3D( 64000000, pll8, 1, 6),
F_GFX3D( 76800000, pll8, 1, 5),
F_GFX3D( 96000000, pll8, 1, 4),
F_GFX3D(128000000, pll8, 1, 3),
F_GFX3D(145455000, pll2, 2, 11),
F_GFX3D(160000000, pll2, 1, 5),
F_GFX3D(177778000, pll2, 2, 9),
F_GFX3D(192000000, pll8, 1, 2),
F_GFX3D(200000000, pll2, 1, 4),
F_GFX3D(228571000, pll2, 2, 7),
F_GFX3D(266667000, pll2, 1, 3),
F_GFX3D(320000000, pll2, 2, 5),
F_GFX3D(400000000, pll2, 1, 2),
F_GFX3D(450000000, pll15, 1, 2),
F_GFX3D(487500000, pll15, 1, 2),

This line added the 487MHz frequency as an option in the GPU table. Then I changed the old “high” from 450000000 to 487500000, like so:

static unsigned long fmax_gfx3d_8064[VDD_DIG_NUM] = {
[VDD_DIG_LOW] = 128000000,
[VDD_DIG_NOMINAL] = 325000000,
[VDD_DIG_HIGH] = 487500000

That was all there was to it! Faux123 has several more additions/subtractions, but I didn’t need to specify different tables and such, because I just edited the original table, rather than make new tables specific for overclocking the GPU. Praise God! After compiling, it worked!

Linux – keep it simple.

Leave a Reply

Your email address will not be published. Required fields are marked *