GPU: allow SYSFS control over MAX gpu clock

file:bec5ffe9cefefc5553a165f77b33958020ead839 -> file:61e0beb185734294661d10a5d9b443d15cb5ce1e
--- a/arch/arm/mach-msm/devices-8960.c
+++ b/arch/arm/mach-msm/devices-8960.c
@@ -2813,6 +2813,7 @@ static struct kgsl_device_platform_data
},
},
.init_level = 1,
+ .max_level = 0,
.num_levels = 5,
.set_grp_async = NULL,
.idle_timeout = HZ/12,
@@ -2866,6 +2867,7 @@ static struct kgsl_device_platform_data
},
},
.init_level = 0,
+ .max_level = 0,
.num_levels = 3,
.set_grp_async = NULL,
.idle_timeout = HZ/5,
@@ -2919,6 +2921,7 @@ static struct kgsl_device_platform_data
},
},
.init_level = 0,
+ .max_level = 0,
.num_levels = 3,
.set_grp_async = NULL,
.idle_timeout = HZ/5,
file:ef2cf18c7e97f01ebac1fc7689afb5bc393f87df -> file:d727222052133f77d371a906b02c4d6ef5eab053
--- a/drivers/gpu/msm/kgsl_pwrctrl.c
+++ b/drivers/gpu/msm/kgsl_pwrctrl.c
@@ -494,6 +494,7 @@ int kgsl_pwrctrl_init(struct kgsl_device
}
pwr->num_pwrlevels = pdata->num_levels;
pwr->active_pwrlevel = pdata->init_level;
+ pwr->thermal_pwrlevel = pdata->max_level;
for (i = 0; i < pdata->num_levels; i++) {
pwr->pwrlevels[i].gpu_freq =
(pdata->pwrlevel[i].gpu_freq > 0) ?
file:baef1cc44092610585911df8e978d5f49b1a32a5 -> file:ec4fa6ac6fb79af6201823e92ebbc53de4dce9e7
--- a/include/linux/msm_kgsl.h
+++ b/include/linux/msm_kgsl.h
@@ -154,6 +154,7 @@ struct kgsl_version {
struct kgsl_device_platform_data {
struct kgsl_pwrlevel pwrlevel[KGSL_MAX_PWRLEVELS];
int init_level;
+ int max_level;
int num_levels;
int (*set_grp_async)(void);
unsigned int idle_timeout;