From 9c9255c8c173eafc463f187c33ff4c4e57cb263b Mon Sep 17 00:00:00 2001 From: Huan Biao Date: Mon, 7 Jan 2019 10:49:26 +0800 Subject: [PATCH] arm: dts: gxl: optimize ipa parameter [1/1] PD#SWPL-3726 Problem: game cannot run smoothly Solution: 1:modify cooling devices min status cpufreq 1000Mhz-->1200Mhz gpufreq 400MHz -->500MHz 2:modify switch trippoint freq trippoint hotplug trippoint 70000-->80000 80000-->90000 85000-->100000 3:fix gpupp get fail issue Verify: p215 pass Change-Id: Id0a1e1ac9619f0d9a20e2aad172ba0c84c7a2e9d Signed-off-by: Huan Biao --- arch/arm/boot/dts/amlogic/gxl_p212_1g.dts | 16 ++++++++-------- .../boot/dts/amlogic/gxl_p212_1g_buildroot.dts | 16 ++++++++-------- arch/arm/boot/dts/amlogic/gxl_p212_2g.dts | 16 ++++++++-------- .../boot/dts/amlogic/gxl_p212_2g_buildroot.dts | 16 ++++++++-------- drivers/amlogic/thermal/aml_thermal_hw.c | 4 ++++ 5 files changed, 36 insertions(+), 32 deletions(-) diff --git a/arch/arm/boot/dts/amlogic/gxl_p212_1g.dts b/arch/arm/boot/dts/amlogic/gxl_p212_1g.dts index 52302e0513d4..0edc32403125 100644 --- a/arch/arm/boot/dts/amlogic/gxl_p212_1g.dts +++ b/arch/arm/boot/dts/amlogic/gxl_p212_1g.dts @@ -426,7 +426,7 @@ #thermal-sensor-cells = <1>; cooling_devices { cpufreq_cool_cluster0 { - min_state = <1000000>; + min_state = <1200000>; dyn_coeff = <140>; cluster_id = <0>; node_name = "cpufreq_cool0"; @@ -440,7 +440,7 @@ device_type = "cpucore"; }; gpufreq_cool { - min_state = <400>; + min_state = <500>; dyn_coeff = <437>; cluster_id = <0>; node_name = "gpufreq_cool0"; @@ -477,17 +477,17 @@ trips { switch_on: trip-point@0 { - temperature = <70000>; - hysteresis = <1000>; - type = "passive"; - }; - control: trip-point@1 { temperature = <80000>; hysteresis = <1000>; type = "passive"; }; + control: trip-point@1 { + temperature = <90000>; + hysteresis = <1000>; + type = "passive"; + }; hot: trip-point@2 { - temperature = <85000>; + temperature = <100000>; hysteresis = <5000>; type = "hot"; }; diff --git a/arch/arm/boot/dts/amlogic/gxl_p212_1g_buildroot.dts b/arch/arm/boot/dts/amlogic/gxl_p212_1g_buildroot.dts index bbbfda5986be..e7333d8637ae 100644 --- a/arch/arm/boot/dts/amlogic/gxl_p212_1g_buildroot.dts +++ b/arch/arm/boot/dts/amlogic/gxl_p212_1g_buildroot.dts @@ -401,7 +401,7 @@ #thermal-sensor-cells = <1>; cooling_devices { cpufreq_cool_cluster0 { - min_state = <1000000>; + min_state = <1200000>; dyn_coeff = <140>; cluster_id = <0>; node_name = "cpufreq_cool0"; @@ -415,7 +415,7 @@ device_type = "cpucore"; }; gpufreq_cool { - min_state = <400>; + min_state = <500>; dyn_coeff = <437>; cluster_id = <0>; node_name = "gpufreq_cool0"; @@ -452,17 +452,17 @@ trips { switch_on: trip-point@0 { - temperature = <70000>; - hysteresis = <1000>; - type = "passive"; - }; - control: trip-point@1 { temperature = <80000>; hysteresis = <1000>; type = "passive"; }; + control: trip-point@1 { + temperature = <90000>; + hysteresis = <1000>; + type = "passive"; + }; hot: trip-point@2 { - temperature = <85000>; + temperature = <100000>; hysteresis = <5000>; type = "hot"; }; diff --git a/arch/arm/boot/dts/amlogic/gxl_p212_2g.dts b/arch/arm/boot/dts/amlogic/gxl_p212_2g.dts index 1279b513e544..c03256ed4713 100644 --- a/arch/arm/boot/dts/amlogic/gxl_p212_2g.dts +++ b/arch/arm/boot/dts/amlogic/gxl_p212_2g.dts @@ -520,7 +520,7 @@ #thermal-sensor-cells = <1>; cooling_devices { cpufreq_cool_cluster0 { - min_state = <1000000>; + min_state = <1200000>; dyn_coeff = <140>; cluster_id = <0>; node_name = "cpufreq_cool0"; @@ -534,7 +534,7 @@ device_type = "cpucore"; }; gpufreq_cool { - min_state = <400>; + min_state = <500>; dyn_coeff = <437>; cluster_id = <0>; node_name = "gpufreq_cool0"; @@ -571,17 +571,17 @@ trips { switch_on: trip-point@0 { - temperature = <70000>; - hysteresis = <1000>; - type = "passive"; - }; - control: trip-point@1 { temperature = <80000>; hysteresis = <1000>; type = "passive"; }; + control: trip-point@1 { + temperature = <90000>; + hysteresis = <1000>; + type = "passive"; + }; hot: trip-point@2 { - temperature = <85000>; + temperature = <100000>; hysteresis = <5000>; type = "hot"; }; diff --git a/arch/arm/boot/dts/amlogic/gxl_p212_2g_buildroot.dts b/arch/arm/boot/dts/amlogic/gxl_p212_2g_buildroot.dts index 82f0fd9fee99..f8abcbe4568d 100644 --- a/arch/arm/boot/dts/amlogic/gxl_p212_2g_buildroot.dts +++ b/arch/arm/boot/dts/amlogic/gxl_p212_2g_buildroot.dts @@ -479,7 +479,7 @@ #thermal-sensor-cells = <1>; cooling_devices { cpufreq_cool_cluster0 { - min_state = <1000000>; + min_state = <1200000>; dyn_coeff = <140>; cluster_id = <0>; node_name = "cpufreq_cool0"; @@ -493,7 +493,7 @@ device_type = "cpucore"; }; gpufreq_cool { - min_state = <400>; + min_state = <500>; dyn_coeff = <437>; cluster_id = <0>; node_name = "gpufreq_cool0"; @@ -530,17 +530,17 @@ trips { switch_on: trip-point@0 { - temperature = <70000>; - hysteresis = <1000>; - type = "passive"; - }; - control: trip-point@1 { temperature = <80000>; hysteresis = <1000>; type = "passive"; }; + control: trip-point@1 { + temperature = <90000>; + hysteresis = <1000>; + type = "passive"; + }; hot: trip-point@2 { - temperature = <85000>; + temperature = <100000>; hysteresis = <5000>; type = "hot"; }; diff --git a/drivers/amlogic/thermal/aml_thermal_hw.c b/drivers/amlogic/thermal/aml_thermal_hw.c index 15bd241ffffd..04fdada7eaa7 100644 --- a/drivers/amlogic/thermal/aml_thermal_hw.c +++ b/drivers/amlogic/thermal/aml_thermal_hw.c @@ -67,6 +67,7 @@ struct aml_thermal_sensor { }; static struct aml_thermal_sensor soc_sensor; +static struct gpufreq_cooling_device *gf_cdev_s; int thermal_firmware_init(void) { @@ -175,10 +176,13 @@ int aml_thermal_min_update(struct thermal_cooling_device *cdev) gc_cdev = (struct gpucore_cooling_device *)cdev->devdata; cdev->ops->get_max_state(cdev, &min_state); min_state = min_state - cool->min_state; + if (gf_cdev_s != NULL) + gf_cdev_s->max_pp = gc_cdev->max_gpu_core_num; break; case COOL_DEV_TYPE_GPU_FREQ: gf_cdev = (struct gpufreq_cooling_device *)cdev->devdata; + gf_cdev_s = (struct gpufreq_cooling_device *)cdev->devdata; min_state = gf_cdev->get_gpu_freq_level(cool->min_state); break;