mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-09 04:10:18 +09:00
thermal: fix thermal issue
PD#166068: thermal: fix cpu cooldev work issue and gpupp not match Change-Id: I26f4626b309cad984e59f3c2f30eb60f1ec5121b Signed-off-by: Huan Biao <huan.biao@amlogic.com>
This commit is contained in:
@@ -21,7 +21,7 @@
|
||||
interrupts = <0 160 4>, <0 161 4>, <0 162 4>;
|
||||
interrupt-names = "GPU", "MMU", "JOB";
|
||||
|
||||
num_of_pp = <3>;
|
||||
num_of_pp = <2>;
|
||||
sc_mpp = <1>; /* number of shader cores used most of time. */
|
||||
clocks = <&clkc CLKID_GPU_MUX &clkc CLKID_GP0_PLL>;
|
||||
clock-names = "gpu_mux","gp0_pll";
|
||||
|
||||
@@ -1525,7 +1525,7 @@
|
||||
cooling_devices {
|
||||
cpufreq_cool_cluster0 {
|
||||
min_state = <1000000>;
|
||||
dyn_coeff = <140>;
|
||||
dyn_coeff = <115>;
|
||||
cluster_id = <0>;
|
||||
node_name = "cpufreq_cool0";
|
||||
device_type = "cpufreq";
|
||||
@@ -1539,7 +1539,8 @@
|
||||
};
|
||||
gpufreq_cool {
|
||||
min_state = <400>;
|
||||
dyn_coeff = <437>;
|
||||
dyn_coeff = <358>;
|
||||
gpu_pp = <2>;
|
||||
cluster_id = <0>;
|
||||
node_name = "gpufreq_cool0";
|
||||
device_type = "gpufreq";
|
||||
@@ -1571,7 +1572,7 @@
|
||||
soc_thermal: soc_thermal {
|
||||
polling-delay = <1000>;
|
||||
polling-delay-passive = <100>;
|
||||
sustainable-power = <2150>;
|
||||
sustainable-power = <1460>;
|
||||
thermal-sensors = <&p_tsensor 0>;
|
||||
trips {
|
||||
pswitch_on: trip-point@0 {
|
||||
|
||||
@@ -45,6 +45,7 @@ enum cool_dev_type {
|
||||
struct cool_dev {
|
||||
int min_state;
|
||||
int coeff;
|
||||
int gpupp;
|
||||
int cluster_id;
|
||||
char *device_type;
|
||||
struct device_node *np;
|
||||
@@ -264,7 +265,6 @@ static int register_cool_dev(struct platform_device *pdev, int index)
|
||||
{
|
||||
struct meson_cooldev *mcooldev = platform_get_drvdata(pdev);
|
||||
struct cool_dev *cool = &mcooldev->cool_devs[index];
|
||||
int pp;
|
||||
struct cpumask *mask;
|
||||
int id = cool->cluster_id;
|
||||
|
||||
@@ -284,9 +284,7 @@ static int register_cool_dev(struct platform_device *pdev, int index)
|
||||
break;
|
||||
/* GPU is KO, just save these parameters */
|
||||
case COOL_DEV_TYPE_GPU_FREQ:
|
||||
if (of_property_read_u32(cool->np, "num_of_pp", &pp))
|
||||
pr_err("thermal: read num_of_pp failed\n");
|
||||
save_gpu_cool_para(cool->coeff, cool->np, pp);
|
||||
save_gpu_cool_para(cool->coeff, cool->np, cool->gpupp);
|
||||
return 0;
|
||||
|
||||
case COOL_DEV_TYPE_GPU_CORE:
|
||||
@@ -342,6 +340,11 @@ static int parse_cool_device(struct platform_device *pdev)
|
||||
else
|
||||
cool->coeff = temp;
|
||||
|
||||
if (of_property_read_u32(child, "gpu_pp", &temp))
|
||||
pr_err("thermal: read gpupp failed\n");
|
||||
else
|
||||
cool->gpupp = temp;
|
||||
|
||||
if (of_property_read_u32(child, "cluster_id", &temp))
|
||||
pr_err("thermal: read cluster_id failed\n");
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user