search for: nvkm_therm_thr

Displaying 20 results from an estimated 22 matches for "nvkm_therm_thr".

Did you mean: nvkm_therm_thrs
2017 Jun 27
1
[PATCH] drm/nouveau/therm: fix spelling mistake on array thresolds
.../nvkm/subdev/therm/temp.c b/drivers/gpu/drm/nouveau/nvkm/subdev/therm/temp.c index e93b2410c38b..6449771b9dc6 100644 --- a/drivers/gpu/drm/nouveau/nvkm/subdev/therm/temp.c +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/therm/temp.c @@ -83,7 +83,7 @@ nvkm_therm_sensor_event(struct nvkm_therm *therm, enum nvkm_therm_thrs thrs, { struct nvkm_subdev *subdev = &therm->subdev; bool active; - const char *thresolds[] = { + static const char * const thresholds[] = { "fanboost", "downclock", "critical", "shutdown" }; int temperature = therm->func->temp_get(t...
2016 Oct 25
2
noveau: emergency shutdown handling is overcomplex and broken
...nouveau/nvkm/subdev/therm/temp.c b/drivers/gpu/drm/nouveau/nvkm/subdev/therm/temp.c index b9703c0..adb1deb 100644 --- a/drivers/gpu/drm/nouveau/nvkm/subdev/therm/temp.c +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/therm/temp.c @@ -120,6 +120,11 @@ nvkm_therm_sensor_event(struct nvkm_therm *therm, enum nvkm_therm_thrs thrs, struct work_struct *work; work = kmalloc(sizeof(*work), GFP_ATOMIC); + /* FIXME: + 1) this is total overkill, orderly_poweroff() already + uses schedule_work internally + 2) it would be good to at least printk what is going on + */ if (work) { INIT_WORK...
2016 Oct 25
0
noveau: emergency shutdown handling is overcomplex and broken
...therm/temp.c b/drivers/gpu/drm/nouveau/nvkm/subdev/therm/temp.c > index b9703c0..adb1deb 100644 > --- a/drivers/gpu/drm/nouveau/nvkm/subdev/therm/temp.c > +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/therm/temp.c > @@ -120,6 +120,11 @@ nvkm_therm_sensor_event(struct nvkm_therm *therm, enum nvkm_therm_thrs thrs, > struct work_struct *work; > > work = kmalloc(sizeof(*work), GFP_ATOMIC); > + /* FIXME: > + 1) this is total overkill, orderly_poweroff() already > + use...
2017 Sep 23
0
drivers/gpu/drm/nouveau/nvkm/subdev/therm/temp.c: broken emergency poweroff handling
...location can fail.. and then you fail to shut down the machine. Someone please fix this. Thanks, Pavel --- a/drivers/gpu/drm/nouveau/nvkm/subdev/therm/temp.c +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/therm/temp.c @@ -120,6 +120,11 @@ nvkm_therm_sensor_event(struct nvkm_therm *therm, enum nvkm_therm_thrs thrs, struct work_struct *work; work = kmalloc(sizeof(*work), GFP_ATOMIC); + /* FIXME: + 1) this is total overkill, orderly_poweroff() already + uses schedule_work internally +...
2020 Sep 16
2
[PATCH v2 1/2] drm/nouveau: return temperatures in temp_get() via parameter
...0400); + return 0; } void @@ -115,7 +116,7 @@ g84_therm_threshold_hyst_emulation(struct nvkm_therm *therm, } /* fix the state (in case someone reprogrammed the alarms) */ - cur = therm->func->temp_get(therm); + WARN_ON(nvkm_therm_temp_get(therm, &cur) < 0); if (new_state == NVKM_THERM_THRS_LOWER && cur > thrs->temp) new_state = NVKM_THERM_THRS_HIGHER; else if (new_state == NVKM_THERM_THRS_HIGHER && diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/therm/gp100.c b/drivers/gpu/drm/nouveau/nvkm/subdev/therm/gp100.c index 9f0dea3f61dc..4c32e4f21bec 100644 --- a...
2020 Sep 16
2
[PATCH v2 1/2] drm/nouveau: return temperatures in temp_get() via parameter
...uct nvkm_therm *therm, > > } > > > > /* fix the state (in case someone reprogrammed the alarms) */ > > - cur = therm->func->temp_get(therm); > > + WARN_ON(nvkm_therm_temp_get(therm, &cur) < 0); > > if (new_state == NVKM_THERM_THRS_LOWER && cur > thrs->temp) > > new_state = NVKM_THERM_THRS_HIGHER; > > else if (new_state == NVKM_THERM_THRS_HIGHER && > > diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/therm/gp100.c b/drivers/gpu/drm/nouveau/nvkm/subdev/therm/gp10...
2017 Nov 22
2
[PATCH 03/32] therm: Split return code and value in nvkm_get_temp
...x20400); > - else > + if (nvkm_fuse_read(device->fuse, 0x1a8) != 1) > return -ENODEV; > + > + *val = nvkm_rd32(device, 0x20400); > + return 0; > } > > void > @@ -114,8 +115,10 @@ g84_therm_threshold_hyst_emulation(struct nvkm_therm *therm, > new_state = NVKM_THERM_THRS_LOWER; > } > > + if (therm->func->temp_get(therm, &cur)) > + return; > + > /* fix the state (in case someone reprogrammed the alarms) */ > - cur = therm->func->temp_get(therm); > if (new_state == NVKM_THERM_THRS_LOWER && cur > thrs->te...
2017 Oct 08
1
[RFC PATCH 01/29] therm: split return code and value in nvkm_get_temp
...would always be false, whereas now, it’s undecided as `cur` will not even be initialised in that case! I am not sure whether it should be the caller of `temp_get()` or `temp_get()` itself which should initialise a default value for the `val` argument (probably the latter). > if (new_state == NVKM_THERM_THRS_LOWER && cur > thrs->temp) > new_state = NVKM_THERM_THRS_HIGHER; > else if (new_state == NVKM_THERM_THRS_HIGHER && > diff --git a/drm/nouveau/nvkm/subdev/therm/gp100.c b/drm/nouveau/nvkm/subdev/therm/gp100.c > index 9f0dea3f..d8206748 100644 > --- a/drm/no...
2017 Sep 15
0
[RFC PATCH 01/29] therm: split return code and value in nvkm_get_temp
...ice, 0x20400); + return 0; } void @@ -115,7 +116,7 @@ g84_therm_threshold_hyst_emulation(struct nvkm_therm *therm, } /* fix the state (in case someone reprogrammed the alarms) */ - cur = therm->func->temp_get(therm); + therm->func->temp_get(therm, &cur); if (new_state == NVKM_THERM_THRS_LOWER && cur > thrs->temp) new_state = NVKM_THERM_THRS_HIGHER; else if (new_state == NVKM_THERM_THRS_HIGHER && diff --git a/drm/nouveau/nvkm/subdev/therm/gp100.c b/drm/nouveau/nvkm/subdev/therm/gp100.c index 9f0dea3f..d8206748 100644 --- a/drm/nouveau/nvkm/subdev/therm/g...
2017 Nov 22
1
[PATCH 03/32] therm: Split return code and value in nvkm_get_temp
...return -ENODEV; >>> + >>> + *val = nvkm_rd32(device, 0x20400); >>> + return 0; >>> } >>> >>> void >>> @@ -114,8 +115,10 @@ g84_therm_threshold_hyst_emulation(struct nvkm_therm *therm, >>> new_state = NVKM_THERM_THRS_LOWER; >>> } >>> >>> + if (therm->func->temp_get(therm, &cur)) >>> + return; >>> + >>> /* fix the state (in case someone reprogrammed the alarms) */ >>> - cur = therm->func->temp_get(ther...
2020 Sep 16
0
[PATCH v2 1/2] drm/nouveau: return temperatures in temp_get() via parameter
...m_threshold_hyst_emulation(struct nvkm_therm *therm, > } > > /* fix the state (in case someone reprogrammed the alarms) */ > - cur = therm->func->temp_get(therm); > + WARN_ON(nvkm_therm_temp_get(therm, &cur) < 0); > if (new_state == NVKM_THERM_THRS_LOWER && cur > thrs->temp) > new_state = NVKM_THERM_THRS_HIGHER; > else if (new_state == NVKM_THERM_THRS_HIGHER && > diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/therm/gp100.c b/drivers/gpu/drm/nouveau/nvkm/subdev/therm/gp100.c > index...
2017 Apr 26
1
[PATCH] drm/nouveau: Add support for clockgating on Fermi+
...drm/nouveau/nvkm/subdev/therm/priv.h > > index 235a5d8..80367a7 100644 > > --- a/drivers/gpu/drm/nouveau/nvkm/subdev/therm/priv.h > > +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/therm/priv.h > > @@ -81,6 +81,9 @@ void nvkm_therm_sensor_event(struct nvkm_therm *, > > enum nvkm_therm_thrs, > >                              enum nvkm_therm_thrs_direction); > >  void nvkm_therm_program_alarms_polling(struct nvkm_therm *); > > > > +int  nvkm_therm_clkgate_engine(struct nvkm_therm *, enum > > nvkm_devidx); > > +void nvkm_therm_clkgate_set(struct nvkm...
2017 Nov 17
0
[PATCH 03/32] therm: Split return code and value in nvkm_get_temp
...ce->fuse, 0x1a8) == 1) - return nvkm_rd32(device, 0x20400); - else + if (nvkm_fuse_read(device->fuse, 0x1a8) != 1) return -ENODEV; + + *val = nvkm_rd32(device, 0x20400); + return 0; } void @@ -114,8 +115,10 @@ g84_therm_threshold_hyst_emulation(struct nvkm_therm *therm, new_state = NVKM_THERM_THRS_LOWER; } + if (therm->func->temp_get(therm, &cur)) + return; + /* fix the state (in case someone reprogrammed the alarms) */ - cur = therm->func->temp_get(therm); if (new_state == NVKM_THERM_THRS_LOWER && cur > thrs->temp) new_state = NVKM_THERM_THRS_HIGHE...
2020 Sep 17
0
[PATCH v2 1/2] drm/nouveau: return temperatures in temp_get() via parameter
...t; > } > > > > > > /* fix the state (in case someone reprogrammed the alarms) */ > > > - cur = therm->func->temp_get(therm); > > > + WARN_ON(nvkm_therm_temp_get(therm, &cur) < 0); > > > if (new_state == NVKM_THERM_THRS_LOWER && cur > thrs->temp) > > > new_state = NVKM_THERM_THRS_HIGHER; > > > else if (new_state == NVKM_THERM_THRS_HIGHER && > > > diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/therm/gp100.c b/drivers/gpu/drm/nouveau/nvkm/su...
2017 Nov 22
0
[PATCH 03/32] therm: Split return code and value in nvkm_get_temp
...0x1a8) != 1) >> return -ENODEV; >> + >> + *val = nvkm_rd32(device, 0x20400); >> + return 0; >> } >> >> void >> @@ -114,8 +115,10 @@ g84_therm_threshold_hyst_emulation(struct nvkm_therm *therm, >> new_state = NVKM_THERM_THRS_LOWER; >> } >> >> + if (therm->func->temp_get(therm, &cur)) >> + return; >> + >> /* fix the state (in case someone reprogrammed the alarms) */ >> - cur = therm->func->temp_get(therm); >> if (new_s...
2017 Apr 25
0
[PATCH] drm/nouveau: Add support for clockgating on Fermi+
...ev/therm/priv.h b/drivers/gpu/drm/nouveau/nvkm/subdev/therm/priv.h > index 235a5d8..80367a7 100644 > --- a/drivers/gpu/drm/nouveau/nvkm/subdev/therm/priv.h > +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/therm/priv.h > @@ -81,6 +81,9 @@ void nvkm_therm_sensor_event(struct nvkm_therm *, enum nvkm_therm_thrs, > enum nvkm_therm_thrs_direction); > void nvkm_therm_program_alarms_polling(struct nvkm_therm *); > > +int nvkm_therm_clkgate_engine(struct nvkm_therm *, enum nvkm_devidx); > +void nvkm_therm_clkgate_set(struct nvkm_therm *, int gate_idx, bool enable)...
2017 Sep 02
3
[PATCH 0/3] Several hwmon fixes
We should simply return errors while the GPU is turned off, because the sensors aren't accessable and setting any kind of value doesn't make any sense. Fixes sensors values reported by "sensors" Before: nouveau-pci-0100 Adapter: PCI adapter GPU core: +0.60 V (min = +0.60 V, max = +1.20 V) temp1: -0.0°C (high = +95.0°C, hyst = +3.0°C) (crit
2017 Apr 25
6
[PATCH] drm/nouveau: Add support for clockgating on Fermi+
...rm/nouveau/nvkm/subdev/therm/priv.h b/drivers/gpu/drm/nouveau/nvkm/subdev/therm/priv.h index 235a5d8..80367a7 100644 --- a/drivers/gpu/drm/nouveau/nvkm/subdev/therm/priv.h +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/therm/priv.h @@ -81,6 +81,9 @@ void nvkm_therm_sensor_event(struct nvkm_therm *, enum nvkm_therm_thrs, enum nvkm_therm_thrs_direction); void nvkm_therm_program_alarms_polling(struct nvkm_therm *); +int nvkm_therm_clkgate_engine(struct nvkm_therm *, enum nvkm_devidx); +void nvkm_therm_clkgate_set(struct nvkm_therm *, int gate_idx, bool enable); + struct nvkm_therm_func { void (*init...
2020 Aug 12
6
[PATCH] drm/nouveau: Add fine-grain temperature reporting
Commit d32656373857 ("drm/nouveau/therm/gp100: initial implementation of new gp1xx temperature sensor") added support for reading finer-grain temperatures, but continued to report temperatures in 1 degree Celsius increments via nvkm_therm_temp_get(). Rather than altering nvkm_therm_temp_get() to report finer-grain temperatures, which would be inconvenient for other users of the
2017 Apr 25
0
[PATCH] drm/nouveau: Add support for clockgating on Fermi+
...ev/therm/priv.h b/drivers/gpu/drm/nouveau/nvkm/subdev/therm/priv.h > index 235a5d8..80367a7 100644 > --- a/drivers/gpu/drm/nouveau/nvkm/subdev/therm/priv.h > +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/therm/priv.h > @@ -81,6 +81,9 @@ void nvkm_therm_sensor_event(struct nvkm_therm *, enum nvkm_therm_thrs, > enum nvkm_therm_thrs_direction); > void nvkm_therm_program_alarms_polling(struct nvkm_therm *); > > +int nvkm_therm_clkgate_engine(struct nvkm_therm *, enum nvkm_devidx); > +void nvkm_therm_clkgate_set(struct nvkm_therm *, int gate_idx, bool enable); > + >...