Skip to content

Commit d26da80

Browse files
author
Zhen Chen
committed
MALI: bifrost: ipa: make poll_temperature_thread freezable
Change-Id: I27343b919271be4618687a2311b6bf54e24cefce Signed-off-by: Zhen Chen <chenzhen@rock-chips.com>
1 parent cd4d306 commit d26da80

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
*
2121
*/
2222

23+
#include <linux/freezer.h>
2324
#include <uapi/linux/thermal.h>
2425
#include <linux/thermal.h>
2526
#ifdef CONFIG_DEVFREQ_THERMAL
@@ -154,6 +155,8 @@ static int poll_temperature(void *data)
154155
int temp;
155156
#endif
156157

158+
set_freezable();
159+
157160
while (!kthread_should_stop()) {
158161
struct thermal_zone_device *tz = READ_ONCE(model_data->gpu_tz);
159162

@@ -173,6 +176,8 @@ static int poll_temperature(void *data)
173176
WRITE_ONCE(model_data->current_temperature, temp);
174177

175178
msleep_interruptible(READ_ONCE(model_data->temperature_poll_interval_ms));
179+
180+
try_to_freeze();
176181
}
177182

178183
return 0;

0 commit comments

Comments
 (0)