Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 358276
b: refs/heads/master
c: 07df304
h: refs/heads/master
v: v3
  • Loading branch information
Marcin Slusarz authored and Ben Skeggs committed Feb 20, 2013
1 parent 018af4f commit 986c3e1
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d0a5191dcf5f37cf0942c4b65fa4a2c975631c0b
refs/heads/master: 07df30435eecce98961dabbac16787969975a080
18 changes: 16 additions & 2 deletions trunk/drivers/gpu/drm/nouveau/core/subdev/therm/temp.c
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,13 @@ nouveau_therm_sensor_get_threshold_state(struct nouveau_therm *therm,
return priv->sensor.alarm_state[thrs];
}

static void
nv_poweroff_work(struct work_struct *work)
{
orderly_poweroff(true);
kfree(work);
}

void nouveau_therm_sensor_event(struct nouveau_therm *therm,
enum nouveau_therm_thrs thrs,
enum nouveau_therm_thrs_direction dir)
Expand Down Expand Up @@ -128,8 +135,15 @@ void nouveau_therm_sensor_event(struct nouveau_therm *therm,
priv->emergency.pause(therm, active);
break;
case NOUVEAU_THERM_THRS_SHUTDOWN:
if (active)
orderly_poweroff(true);
if (active) {
struct work_struct *work;

work = kmalloc(sizeof(*work), GFP_ATOMIC);
if (work) {
INIT_WORK(work, nv_poweroff_work);
schedule_work(work);
}
}
break;
case NOUVEAU_THERM_THRS_NR:
break;
Expand Down

0 comments on commit 986c3e1

Please sign in to comment.