Skip to content

Commit e8686e1

Browse files
Zhen Chenrkhuangtao
authored andcommitted
MALI: bifrost_for_linux: ipa: make poll_temperature_thread freezable
Change-Id: I378dae2ce5d53a32d90df6bcc29950d61d8924cf Signed-off-by: Zhen Chen <chenzhen@rock-chips.com>
1 parent d26da80 commit e8686e1

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

drivers/gpu/arm/bifrost_for_linux/ipa/mali_kbase_ipa_simple.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515

1616

1717

18+
#include <linux/freezer.h>
1819
#include <linux/thermal.h>
1920
#ifdef CONFIG_DEVFREQ_THERMAL
2021
#include <linux/devfreq_cooling.h>
@@ -148,6 +149,8 @@ static int poll_temperature(void *data)
148149
int temp;
149150
#endif
150151

152+
set_freezable();
153+
151154
while (!kthread_should_stop()) {
152155
struct thermal_zone_device *tz = ACCESS_ONCE(model_data->gpu_tz);
153156

@@ -167,6 +170,8 @@ static int poll_temperature(void *data)
167170
ACCESS_ONCE(model_data->current_temperature) = temp;
168171

169172
msleep_interruptible(ACCESS_ONCE(model_data->temperature_poll_interval_ms));
173+
174+
try_to_freeze();
170175
}
171176

172177
return 0;

0 commit comments

Comments
 (0)