lkml.org 
[lkml]   [2024]   [Apr]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Date
Subject[PATCH v2 3/3] thermal: gov_power_allocator: Suppress sustainable_power warning without trip_points
From: Nikita Travkin <nikita@trvn.ru>

IPA warns if the thermal zone it was attached to doesn't define
sustainable_power value. In some cases though IPA may be bound to an
"empty" TZ, in which case the lack of sustainable_power doesn't matter.

Suppress the warning in case when IPA is bound to an empty TZ to make it
easier to see the warnings that actually matter.

Signed-off-by: Nikita Travkin <nikita@trvn.ru>
---

I've decided to add this along to supress those warnings for some TZ on
sc7180. Feel free to drop this patch if you think the warning should
always appear.
---
drivers/thermal/gov_power_allocator.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/thermal/gov_power_allocator.c b/drivers/thermal/gov_power_allocator.c
index e25e48d76aa7..05a40f6b5928 100644
--- a/drivers/thermal/gov_power_allocator.c
+++ b/drivers/thermal/gov_power_allocator.c
@@ -704,7 +704,7 @@ static int power_allocator_bind(struct thermal_zone_device *tz)
params->allocated_tzp = true;
}

- if (!tz->tzp->sustainable_power)
+ if (!tz->tzp->sustainable_power && params->trip_max)
dev_warn(&tz->device, "power_allocator: sustainable_power will be estimated\n");
else
params->sustainable_power = tz->tzp->sustainable_power;
--
2.44.0



\
 
 \ /
  Last update: 2024-05-27 16:22    [W:0.102 / U:2.072 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site