Skip to content

Commit

Permalink
Throttle down cpu/gpu on maguro.
Browse files Browse the repository at this point in the history
  • Loading branch information
joneschrisg committed Mar 16, 2012
1 parent 4165094 commit ff130fe
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 9 deletions.
20 changes: 11 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -256,8 +256,16 @@ config-galaxy-s2: config-gecko adb-check-version $(APNS_CONF)
./extract-files.sh && \
echo OK

# Hack! Upstream boot/msm is RO at the moment and forking isn't
# a nice alternative at the moment...
.patches.applied:
cd boot/msm && \
$(GIT) apply $(abspath glue/patch)/yaffs_vfs.patch && \
$(GIT) apply $(abspath glue/patch)/downscale_gpu.patch
touch $@

.PHONY: config-maguro
config-maguro: config-gecko adb-check-version $(APNS_CONF)
config-maguro: .patches.applied config-gecko adb-check-version $(APNS_CONF)
@echo "KERNEL = msm" > .config.mk && \
echo "KERNEL_PATH = ./boot/msm" >> .config.mk && \
echo "GONK = maguro" >> .config.mk && \
Expand All @@ -267,14 +275,8 @@ config-maguro: config-gecko adb-check-version $(APNS_CONF)
./extract-files.sh && \
echo OK

# Hack! Upstream boot/msm is RO at the moment and forking isn't
# a nice alternative at the moment...
.patches.applied:
cd boot/msm && $(GIT) apply $(abspath glue/patch)/yaffs_vfs.patch
touch $@

.PHONY: config-akami
config-akami: .patches.applied config-gecko $(APNS_CONF)
config-akami: .patches.applied config-gecko adb-check-version $(APNS_CONF)
@echo "KERNEL = msm" > .config.mk && \
echo "KERNEL_PATH = ./boot/msm" >> .config.mk && \
echo "GONK = akami" >> .config.mk && \
Expand Down Expand Up @@ -711,7 +713,7 @@ op_setup:
$(ADB) shell opcontrol --setup; \
$(ADB) shell opcontrol --vmlinux=$(PWD)/$(KERNEL_DIR)/vmlinux; \
$(ADB) shell opcontrol --kernel-range=0x`$(ADB) shell cat /proc/kallsyms | grep ' _text' | cut -c 1-8`,0x`$(ADB) shell cat /proc/kallsyms | grep ' _etext' | cut -c 1-8`; \
$(ADB) shell opcontrol --event=CPU_CYCLES & \
$(ADB) shell opcontrol --event=CPU_CYCLES & \
else \
$(ADB) shell opcontrol --vmlinux=$(PWD)/$(KERNEL_DIR)/vmlinux; \
$(ADB) shell opcontrol --kernel-range=0x`$(ADB) shell cat /proc/kallsyms | grep ' _text' | cut -c 1-8`,0x`$(ADB) shell cat /proc/kallsyms | grep ' _etext' | cut -c 1-8`;\
Expand Down
4 changes: 4 additions & 0 deletions glue/gonk/device/toro/maguro/rootdir/init.rc
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,10 @@ loglevel 3
write /proc/sys/kernel/sched_compat_yield 1
write /proc/sys/kernel/sched_child_runs_first 0

# XXX for development only
write /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq 600000
write /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq 600000

# Create cgroup mount points for process groups
mkdir /dev/cpuctl
mount cgroup none /dev/cpuctl cpu
Expand Down
15 changes: 15 additions & 0 deletions glue/patch/downscale_gpu.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
diff --git a/arch/arm/mach-msm/devices-msm7x27a.c b/arch/arm/mach-msm/devices-msm7x27a.c
index 672c225..64212f5 100644
--- a/arch/arm/mach-msm/devices-msm7x27a.c
+++ b/arch/arm/mach-msm/devices-msm7x27a.c
@@ -622,8 +622,8 @@ static struct kgsl_device_platform_data kgsl_3d0_pdata = {
.pwr_data = {
.pwrlevel = {
{
- .gpu_freq = 245760000,
- .bus_freq = 200000000,
+ .gpu_freq = 133330000,
+ .bus_freq = 0,
},
{
.gpu_freq = 133330000,

0 comments on commit ff130fe

Please sign in to comment.