search for: nvkm_therm_temp_get

Displaying 20 results from an estimated 75 matches for "nvkm_therm_temp_get".

2020 Sep 16
2
[PATCH v2 1/2] drm/nouveau: return temperatures in temp_get() via parameter
...subdev/therm.h b/drivers/gpu/drm/nouveau/include/nvkm/subdev/therm.h index 62c34f98c930..bfe9779216fc 100644 --- a/drivers/gpu/drm/nouveau/include/nvkm/subdev/therm.h +++ b/drivers/gpu/drm/nouveau/include/nvkm/subdev/therm.h @@ -99,7 +99,7 @@ struct nvkm_therm { bool clkgating_enabled; }; -int nvkm_therm_temp_get(struct nvkm_therm *); +int nvkm_therm_temp_get(struct nvkm_therm *therm, int *temp); int nvkm_therm_fan_sense(struct nvkm_therm *); int nvkm_therm_cstate(struct nvkm_therm *, int, int); void nvkm_therm_clkgate_init(struct nvkm_therm *, diff --git a/drivers/gpu/drm/nouveau/nouveau_hwmon.c b/drive...
2020 Sep 16
2
[PATCH v2 1/2] drm/nouveau: return temperatures in temp_get() via parameter
...62c34f98c930..bfe9779216fc 100644 > > --- a/drivers/gpu/drm/nouveau/include/nvkm/subdev/therm.h > > +++ b/drivers/gpu/drm/nouveau/include/nvkm/subdev/therm.h > > @@ -99,7 +99,7 @@ struct nvkm_therm { > > bool clkgating_enabled; > > }; > > > > -int nvkm_therm_temp_get(struct nvkm_therm *); > > +int nvkm_therm_temp_get(struct nvkm_therm *therm, int *temp); > > int nvkm_therm_fan_sense(struct nvkm_therm *); > > int nvkm_therm_cstate(struct nvkm_therm *, int, int); > > void nvkm_therm_clkgate_init(struct nvkm_therm *, > > diff --git...
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 function, a second interface has been added to line up with hwmon's native unit of temperature. Signed-off-by: Jeremy Cline <jcline at redhat.com> --- .....
2020 Sep 16
0
[PATCH v2 1/2] drm/nouveau: return temperatures in temp_get() via parameter
...lude/nvkm/subdev/therm.h > index 62c34f98c930..bfe9779216fc 100644 > --- a/drivers/gpu/drm/nouveau/include/nvkm/subdev/therm.h > +++ b/drivers/gpu/drm/nouveau/include/nvkm/subdev/therm.h > @@ -99,7 +99,7 @@ struct nvkm_therm { > bool clkgating_enabled; > }; > > -int nvkm_therm_temp_get(struct nvkm_therm *); > +int nvkm_therm_temp_get(struct nvkm_therm *therm, int *temp); > int nvkm_therm_fan_sense(struct nvkm_therm *); > int nvkm_therm_cstate(struct nvkm_therm *, int, int); > void nvkm_therm_clkgate_init(struct nvkm_therm *, > diff --git a/drivers/gpu/drm/nouvea...
2020 Sep 17
0
[PATCH v2 1/2] drm/nouveau: return temperatures in temp_get() via parameter
...> > > --- a/drivers/gpu/drm/nouveau/include/nvkm/subdev/therm.h > > > +++ b/drivers/gpu/drm/nouveau/include/nvkm/subdev/therm.h > > > @@ -99,7 +99,7 @@ struct nvkm_therm { > > > bool clkgating_enabled; > > > }; > > > > > > -int nvkm_therm_temp_get(struct nvkm_therm *); > > > +int nvkm_therm_temp_get(struct nvkm_therm *therm, int *temp); > > > int nvkm_therm_fan_sense(struct nvkm_therm *); > > > int nvkm_therm_cstate(struct nvkm_therm *, int, int); > > > void nvkm_therm_clkgate_init(struct nvkm_therm *,...
2017 Oct 08
1
[RFC PATCH 01/29] therm: split return code and value in nvkm_get_temp
...return value of `temp_get()` to solely be the error code, or absence of an error, I would change all those tests that checked whether the returned value was strictly less, or greater than, 0 to now only compare against 0 (no error). For example, if (therm && therm->attr_get && nvkm_therm_temp_get(therm, &val) < 0) if (therm->func->temp_get(therm, &val) >= 0) could become if (therm && therm->attr_get && nvkm_therm_temp_get(therm, &val)) if (!therm->func->temp_get(therm, &val)) to match other error checking code. More comments bel...
2017 Nov 22
2
[PATCH 03/32] therm: Split return code and value in nvkm_get_temp
...subdev/therm.h > index 9841f076..8c84017f 100644 > --- a/drm/nouveau/include/nvkm/subdev/therm.h > +++ b/drm/nouveau/include/nvkm/subdev/therm.h > @@ -86,7 +86,7 @@ struct nvkm_therm { > int (*attr_set)(struct nvkm_therm *, enum nvkm_therm_attr_type, int); > }; > > -int nvkm_therm_temp_get(struct nvkm_therm *); > +int nvkm_therm_temp_get(struct nvkm_therm *, int *); > int nvkm_therm_fan_sense(struct nvkm_therm *); > int nvkm_therm_cstate(struct nvkm_therm *, int, int); > > diff --git a/drm/nouveau/nouveau_hwmon.c b/drm/nouveau/nouveau_hwmon.c > index 7c965648..7...
2017 Sep 15
0
[RFC PATCH 01/29] therm: split return code and value in nvkm_get_temp
...bdev/therm.h b/drm/nouveau/include/nvkm/subdev/therm.h index 9841f076..8c84017f 100644 --- a/drm/nouveau/include/nvkm/subdev/therm.h +++ b/drm/nouveau/include/nvkm/subdev/therm.h @@ -86,7 +86,7 @@ struct nvkm_therm { int (*attr_set)(struct nvkm_therm *, enum nvkm_therm_attr_type, int); }; -int nvkm_therm_temp_get(struct nvkm_therm *); +int nvkm_therm_temp_get(struct nvkm_therm *, int *); int nvkm_therm_fan_sense(struct nvkm_therm *); int nvkm_therm_cstate(struct nvkm_therm *, int, int); diff --git a/drm/nouveau/nouveau_hwmon.c b/drm/nouveau/nouveau_hwmon.c index 7c965648..f1914d9a 100644 --- a/drm/nouve...
2020 Sep 09
2
[PATCH] drm/nouveau: Add fine-grain temperature reporting
...> wrote: > > > > 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 > > function, a second interface has been added to line up with hwmon's > > native unit of temperature. > Hey Jeremy,...
2017 Nov 22
1
[PATCH 03/32] therm: Split return code and value in nvkm_get_temp
...t;> --- a/drm/nouveau/include/nvkm/subdev/therm.h >>> +++ b/drm/nouveau/include/nvkm/subdev/therm.h >>> @@ -86,7 +86,7 @@ struct nvkm_therm { >>> int (*attr_set)(struct nvkm_therm *, enum nvkm_therm_attr_type, int); >>> }; >>> >>> -int nvkm_therm_temp_get(struct nvkm_therm *); >>> +int nvkm_therm_temp_get(struct nvkm_therm *, int *); >>> int nvkm_therm_fan_sense(struct nvkm_therm *); >>> int nvkm_therm_cstate(struct nvkm_therm *, int, int); >>> >>> diff --git a/drm/nouveau/nouveau_hwmon.c b/drm/nouveau/...
2017 Nov 17
0
[PATCH 03/32] therm: Split return code and value in nvkm_get_temp
...bdev/therm.h b/drm/nouveau/include/nvkm/subdev/therm.h index 9841f076..8c84017f 100644 --- a/drm/nouveau/include/nvkm/subdev/therm.h +++ b/drm/nouveau/include/nvkm/subdev/therm.h @@ -86,7 +86,7 @@ struct nvkm_therm { int (*attr_set)(struct nvkm_therm *, enum nvkm_therm_attr_type, int); }; -int nvkm_therm_temp_get(struct nvkm_therm *); +int nvkm_therm_temp_get(struct nvkm_therm *, int *); int nvkm_therm_fan_sense(struct nvkm_therm *); int nvkm_therm_cstate(struct nvkm_therm *, int, int); diff --git a/drm/nouveau/nouveau_hwmon.c b/drm/nouveau/nouveau_hwmon.c index 7c965648..7486e4af 100644 --- a/drm/nouve...
2020 Sep 09
0
[PATCH] drm/nouveau: Add fine-grain temperature reporting
...<jcline at redhat.com> wrote: > > 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 > function, a second interface has been added to line up with hwmon's > native unit of temperature. Hey Jeremy, Sorry this slipped past me u...
2017 Nov 22
0
[PATCH 03/32] therm: Split return code and value in nvkm_get_temp
...f076..8c84017f 100644 >> --- a/drm/nouveau/include/nvkm/subdev/therm.h >> +++ b/drm/nouveau/include/nvkm/subdev/therm.h >> @@ -86,7 +86,7 @@ struct nvkm_therm { >> int (*attr_set)(struct nvkm_therm *, enum nvkm_therm_attr_type, int); >> }; >> >> -int nvkm_therm_temp_get(struct nvkm_therm *); >> +int nvkm_therm_temp_get(struct nvkm_therm *, int *); >> int nvkm_therm_fan_sense(struct nvkm_therm *); >> int nvkm_therm_cstate(struct nvkm_therm *, int, int); >> >> diff --git a/drm/nouveau/nouveau_hwmon.c b/drm/nouveau/nouveau_hwmon.c >...
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
2016 Feb 20
0
[PATCH v4 5/6] hwmon: don't require therm to be valid to get any data
...;attr_set) - return -ENODEV; - hwmon_dev = hwmon_device_register(&dev->pdev->dev); if (IS_ERR(hwmon_dev)) { ret = PTR_ERR(hwmon_dev); @@ -659,26 +656,28 @@ nouveau_hwmon_init(struct drm_device *dev) if (ret) goto error; - /* if the card has a working thermal sensor */ - if (nvkm_therm_temp_get(therm) >= 0) { - ret = sysfs_create_group(&hwmon_dev->kobj, &hwmon_temp_attrgroup); - if (ret) - goto error; - } - - /* if the card has a pwm fan */ - /*XXX: incorrect, need better detection for this, some boards have - * the gpio entries for pwm fan control even when there...
2017 Sep 15
0
[RFC PATCH 14/29] therm: Trigger reclock in temperature daemon
...diff --git a/drm/nouveau/nvkm/subdev/therm/base.c b/drm/nouveau/nvkm/subdev/therm/base.c index 59f01fec..c90b9cfc 100644 --- a/drm/nouveau/nvkm/subdev/therm/base.c +++ b/drm/nouveau/nvkm/subdev/therm/base.c @@ -23,6 +23,8 @@ */ #include "priv.h" +#include <subdev/clk.h> + int nvkm_therm_temp_get(struct nvkm_therm *therm, int *val) { @@ -168,9 +170,15 @@ nvkm_therm_alarm(struct nvkm_alarm *alarm) int temp; struct nvkm_therm *therm = container_of(alarm, struct nvkm_therm, alarm); + struct nvkm_clk *clk = therm->subdev.device->clk; + if (nvkm_therm_temp_get(therm, &t...
2018 Apr 22
0
[PATCH] drm/nouveau: fix temp/pwm visibility, skip hwmon when no sensors exist
...ouveau/nouveau_hwmon.c @@ -327,7 +327,7 @@ nouveau_temp_is_visible(const void *data, u32 attr, int channel) struct nouveau_drm *drm = nouveau_drm((struct drm_device *)data); struct nvkm_therm *therm = nvxx_therm(&drm->client.device); - if (therm && therm->attr_get && nvkm_therm_temp_get(therm) < 0) + if (!therm || !therm->attr_get || nvkm_therm_temp_get(therm) < 0) return 0; switch (attr) { @@ -351,8 +351,8 @@ nouveau_pwm_is_visible(const void *data, u32 attr, int channel) struct nouveau_drm *drm = nouveau_drm((struct drm_device *)data); struct nvkm_therm *ther...
2020 Sep 09
0
[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 > > > function, a second interface has been added to line up with hwmon's > > > native unit of temp...
2020 Sep 16
0
[PATCH v2 0/2] Add fine-grain temperature reporting
...the users and implementations I realized that Pascal's temp_get() implementation didn't include turning negative temperatures to 0 like other implementations, so I separated error reporting from the temperature in the API. Couple of things I'm on the fence about here: * I allowed the nvkm_therm_temp_get() functions to accept NULL as a way to check if temperature reading is available rather than adding a separate helper, but was torn about whether this is clearer than a separate helper function. * I added a WARN_ON in places that previously called nvkm_therm_temp_get() and didn't check...
2016 Apr 18
0
[PATCH v4 11/37] volt: add temperature parameter to nvkm_volt_map
...nged, 12 insertions(+), 6 deletions(-) diff --git a/bin/nv_cmp_volt.c b/bin/nv_cmp_volt.c index c63d91b..34147b9 100644 --- a/bin/nv_cmp_volt.c +++ b/bin/nv_cmp_volt.c @@ -117,7 +117,7 @@ main(int argc, char **argv) new_voltage = nvkm_volt_get(volt); new_temp = nvkm_rd32(device, 0x20400);//nvkm_therm_temp_get(therm); - new_nouveau_voltage = max(nvkm_volt_map(volt, best_cstate->voltage), nvkm_volt_map(volt, best_pstate->base.voltage)); + new_nouveau_voltage = max(nvkm_volt_map(volt, best_cstate->voltage, new_temp), nvkm_volt_map(volt, best_pstate->base.voltage, new_temp)); new_pstate = b...