Patch "thermal: gov_power_allocator: Allow binding without trip points" has been added to the 6.8-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    thermal: gov_power_allocator: Allow binding without trip points

to the 6.8-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     thermal-gov_power_allocator-allow-binding-without-tr.patch
and it can be found in the queue-6.8 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit f796d9e785ac9b6165a85580effd02ac867242ac
Author: Nikita Travkin <nikita@xxxxxxx>
Date:   Wed Apr 3 16:31:41 2024 +0500

    thermal: gov_power_allocator: Allow binding without trip points
    
    [ Upstream commit da781936e7c301e6197eb6513775748e79fb2575 ]
    
    IPA probe function was recently refactored to perform extra error checks
    and make sure the thermal zone has trip points necessary for the IPA
    operation. With this change, if a thermal zone is probed such that it
    has no trip points that IPA can use, IPA will fail and the TZ won't be
    created. This is the case if a platform defines a TZ without cooling
    devices and only with "hot"/"critical" trip points, often found on some
    Qualcomm devices [1].
    
    Documentation across IPA code (notably get_governor_trips() kerneldoc)
    suggests that IPA is supposed to handle such TZ even if it won't
    actually do anything.
    
    This commit partially reverts the previous change to allow IPA to bind
    to such "empty" thermal zones.
    
    Fixes: e83747c2f8e3 ("thermal: gov_power_allocator: Set up trip points earlier")
    Link: arch/arm64/boot/dts/qcom/sc7180.dtsi#n4776 # [1]
    Signed-off-by: Nikita Travkin <nikita@xxxxxxx>
    Reviewed-by: Lukasz Luba <lukasz.luba@xxxxxxx>
    Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@xxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/thermal/gov_power_allocator.c b/drivers/thermal/gov_power_allocator.c
index 207a6a3936b54..38581583ad289 100644
--- a/drivers/thermal/gov_power_allocator.c
+++ b/drivers/thermal/gov_power_allocator.c
@@ -679,11 +679,6 @@ static int power_allocator_bind(struct thermal_zone_device *tz)
 		return -ENOMEM;
 
 	get_governor_trips(tz, params);
-	if (!params->trip_max) {
-		dev_warn(&tz->device, "power_allocator: missing trip_max\n");
-		kfree(params);
-		return -EINVAL;
-	}
 
 	ret = check_power_actors(tz, params);
 	if (ret < 0) {
@@ -712,9 +707,10 @@ static int power_allocator_bind(struct thermal_zone_device *tz)
 	if (!tz->tzp->sustainable_power)
 		dev_warn(&tz->device, "power_allocator: sustainable_power will be estimated\n");
 
-	estimate_pid_constants(tz, tz->tzp->sustainable_power,
-			       params->trip_switch_on,
-			       params->trip_max->temperature);
+	if (params->trip_max)
+		estimate_pid_constants(tz, tz->tzp->sustainable_power,
+				       params->trip_switch_on,
+				       params->trip_max->temperature);
 
 	reset_pid_controller(params);
 




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux