search for: tsensor

Displaying 20 results from an estimated 21 matches for "tsensor".

Did you mean: sensor
2018 Jan 25
3
[PATCH] drm/nouveau/therm/gp100: Do not report temperature when subdev is shadowed
...bdev/therm/gp100.c b/drivers/gpu/drm/nouveau/nvkm/subdev/therm/gp100.c index 9f0dea3f61dc..45d0ec632b5a 100644 --- a/drivers/gpu/drm/nouveau/nvkm/subdev/therm/gp100.c +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/therm/gp100.c @@ -32,8 +32,10 @@ gp100_temp_get(struct nvkm_therm *therm) u32 inttemp = (tsensor & 0x0001fff8); /* device SHADOWed */ - if (tsensor & 0x40000000) + if (tsensor & 0x40000000) { nvkm_trace(subdev, "reading temperature from SHADOWed sensor\n"); + return -ENODEV; + } /* device valid */ if (tsensor & 0x20000000) -- 2.16.1
2018 Jan 26
2
[PATCH] drm/nouveau/therm/gp100: Do not report temperature when subdev is shadowed
...bdev/therm/gp100.c >> index 9f0dea3f61dc..45d0ec632b5a 100644 >> --- a/drivers/gpu/drm/nouveau/nvkm/subdev/therm/gp100.c >> +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/therm/gp100.c >> @@ -32,8 +32,10 @@ gp100_temp_get(struct nvkm_therm *therm) >> u32 inttemp = (tsensor & 0x0001fff8); >> >> /* device SHADOWed */ >> - if (tsensor & 0x40000000) >> + if (tsensor & 0x40000000) { >> nvkm_trace(subdev, "reading temperature from SHADOWed sensor\n"); >> + return -...
2017 Aug 31
4
[RFC PATCH] drm/nouveau/therm: initial implementation of new gp1xx temperature sensor
...THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + * + * Authors: Rhys Kidd + */ +#include "priv.h" + +static int +gp100_temp_get(struct nvkm_therm *therm) +{ + struct nvkm_device *device = therm->subdev.device; + struct nvkm_subdev *subdev = &therm->subdev; + u32 tsensor = nvkm_rd32(device, 0x20460); + u32 status = (tsensor & 0x60000000) >> 29; + u32 t_f24_8 = (tsensor & 0x0001fff8); + + /* device SHADOWed */ + if (status & 0x00000002) + nvkm_error(subdev, "Reading temperature from SHADOWed sensor\n"); + + /* device valid */ + if (stat...
2018 Jan 26
0
[PATCH] drm/nouveau/therm/gp100: Do not report temperature when subdev is shadowed
...u/drm/nouveau/nvkm/subdev/therm/gp100.c > index 9f0dea3f61dc..45d0ec632b5a 100644 > --- a/drivers/gpu/drm/nouveau/nvkm/subdev/therm/gp100.c > +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/therm/gp100.c > @@ -32,8 +32,10 @@ gp100_temp_get(struct nvkm_therm *therm) > u32 inttemp = (tsensor & 0x0001fff8); > > /* device SHADOWed */ > - if (tsensor & 0x40000000) > + if (tsensor & 0x40000000) { > nvkm_trace(subdev, "reading temperature from SHADOWed sensor\n"); > + return -ENODEV; > + } &gt...
2018 Jan 26
0
[PATCH] drm/nouveau/therm/gp100: Do not report temperature when subdev is shadowed
...gt;>> index 9f0dea3f61dc..45d0ec632b5a 100644 >>> --- a/drivers/gpu/drm/nouveau/nvkm/subdev/therm/gp100.c >>> +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/therm/gp100.c >>> @@ -32,8 +32,10 @@ gp100_temp_get(struct nvkm_therm *therm) >>> u32 inttemp = (tsensor & 0x0001fff8); >>> >>> /* device SHADOWed */ >>> - if (tsensor & 0x40000000) >>> + if (tsensor & 0x40000000) { >>> nvkm_trace(subdev, "reading temperature from SHADOWed >>> sensor\n");...
2017 Sep 01
0
[PATCH v2] drm/nouveau/therm: initial implementation of new gp1xx temperature sensor
v2: - add nv138 and drop nv13b chipsets (Ilia Mirkin) - refactor out status variable and instead mask tsensor (Ilia Mirkin) - switch SHADOWed state message away from nvkm_error() (Ilia Mirkin) - rename internal temperature variable (Karol Herbst) Signed-off-by: Rhys Kidd <rhyskidd at gmail.com> --- .../gpu/drm/nouveau/include/nvkm/subdev/therm.h | 1 + drivers/gpu/drm/nouveau/nvkm/engine/devi...
2020 Sep 16
2
[PATCH v2 1/2] drm/nouveau: return temperatures in temp_get() via parameter
...iv.h" static int -gp100_temp_get(struct nvkm_therm *therm) +gp100_temp_get(struct nvkm_therm *therm, int *temp) { struct nvkm_device *device = therm->subdev.device; struct nvkm_subdev *subdev = &therm->subdev; @@ -35,11 +35,12 @@ gp100_temp_get(struct nvkm_therm *therm) if (tsensor & 0x40000000) nvkm_trace(subdev, "reading temperature from SHADOWed sensor\n"); - /* device valid */ - if (tsensor & 0x20000000) - return (inttemp >> 8); - else + /* device invalid */ + if (!(tsensor & 0x20000000)) return -ENODEV; + + *temp = inttemp >> 8;...
2020 Sep 16
2
[PATCH v2 1/2] drm/nouveau: return temperatures in temp_get() via parameter
...gp100_temp_get(struct nvkm_therm *therm, int *temp) > > { > > struct nvkm_device *device = therm->subdev.device; > > struct nvkm_subdev *subdev = &therm->subdev; > > @@ -35,11 +35,12 @@ gp100_temp_get(struct nvkm_therm *therm) > > if (tsensor & 0x40000000) > > nvkm_trace(subdev, "reading temperature from SHADOWed sensor\n"); > > > > - /* device valid */ > > - if (tsensor & 0x20000000) > > - return (inttemp >> 8); > > - else > &...
2020 Sep 16
0
[PATCH v2 1/2] drm/nouveau: return temperatures in temp_get() via parameter
...nvkm_therm *therm) > +gp100_temp_get(struct nvkm_therm *therm, int *temp) > { > struct nvkm_device *device = therm->subdev.device; > struct nvkm_subdev *subdev = &therm->subdev; > @@ -35,11 +35,12 @@ gp100_temp_get(struct nvkm_therm *therm) > if (tsensor & 0x40000000) > nvkm_trace(subdev, "reading temperature from SHADOWed sensor\n"); > > - /* device valid */ > - if (tsensor & 0x20000000) > - return (inttemp >> 8); > - else > + /* device invalid */ &g...
2020 Aug 12
6
[PATCH] drm/nouveau: Add fine-grain temperature reporting
...atic int -gp100_temp_get(struct nvkm_therm *therm) +gp100_temp_get_raw(struct nvkm_therm *therm) { struct nvkm_device *device = therm->subdev.device; struct nvkm_subdev *subdev = &therm->subdev; @@ -37,14 +37,35 @@ gp100_temp_get(struct nvkm_therm *therm) /* device valid */ if (tsensor & 0x20000000) - return (inttemp >> 8); + return inttemp; else return -ENODEV; } +static int +gp100_temp_millidegree_get(struct nvkm_therm *therm) +{ + int raw_temp = gp100_temp_get_raw(therm); + + if (raw_temp < 0) + return raw_temp; + return raw_temp * 1000 >> 8; +} +...
2020 Sep 17
0
[PATCH v2 1/2] drm/nouveau: return temperatures in temp_get() via parameter
...m_therm *therm, int *temp) > > > { > > > struct nvkm_device *device = therm->subdev.device; > > > struct nvkm_subdev *subdev = &therm->subdev; > > > @@ -35,11 +35,12 @@ gp100_temp_get(struct nvkm_therm *therm) > > > if (tsensor & 0x40000000) > > > nvkm_trace(subdev, "reading temperature from SHADOWed sensor\n"); > > > > > > - /* device valid */ > > > - if (tsensor & 0x20000000) > > > - return (inttemp >> 8); >...
2017 Nov 22
2
[PATCH 03/32] therm: Split return code and value in nvkm_get_temp
...nvkm_device *device = therm->subdev.device; > struct nvkm_subdev *subdev = &therm->subdev; > @@ -36,9 +36,10 @@ gp100_temp_get(struct nvkm_therm *therm) > nvkm_trace(subdev, "reading temperature from SHADOWed sensor\n"); > > /* device valid */ > - if (tsensor & 0x20000000) > - return (inttemp >> 8); > - else > + if (tsensor & 0x20000000) { > + *val = inttemp >> 8; > + return 0; > + } else > return -ENODEV; > } > > diff --git a/drm/nouveau/nvkm/subdev/therm/nv40.c b/drm/nouveau/nvkm/subdev/therm/...
2017 Oct 08
1
[RFC PATCH 01/29] therm: split return code and value in nvkm_get_temp
...nvkm_device *device = therm->subdev.device; > struct nvkm_subdev *subdev = &therm->subdev; > @@ -36,9 +36,10 @@ gp100_temp_get(struct nvkm_therm *therm) > nvkm_trace(subdev, "reading temperature from SHADOWed sensor\n"); > > /* device valid */ > - if (tsensor & 0x20000000) > - return (inttemp >> 8); > - else > + if (tsensor & 0x20000000) { > + *val = inttemp >> 8; > + return 0; > + } else > return -ENODEV; > } > > diff --git a/drm/nouveau/nvkm/subdev/therm/nv40.c b/drm/nouveau/nvkm/subdev/therm/...
2017 Sep 15
0
[RFC PATCH 01/29] therm: split return code and value in nvkm_get_temp
...*therm, int *val) { struct nvkm_device *device = therm->subdev.device; struct nvkm_subdev *subdev = &therm->subdev; @@ -36,9 +36,10 @@ gp100_temp_get(struct nvkm_therm *therm) nvkm_trace(subdev, "reading temperature from SHADOWed sensor\n"); /* device valid */ - if (tsensor & 0x20000000) - return (inttemp >> 8); - else + if (tsensor & 0x20000000) { + *val = inttemp >> 8; + return 0; + } else return -ENODEV; } diff --git a/drm/nouveau/nvkm/subdev/therm/nv40.c b/drm/nouveau/nvkm/subdev/therm/nv40.c index 2c92ffb5..cfd5b215 100644 --- a/drm/n...
2017 Nov 22
1
[PATCH 03/32] therm: Split return code and value in nvkm_get_temp
...ruct nvkm_subdev *subdev = &therm->subdev; >>> @@ -36,9 +36,10 @@ gp100_temp_get(struct nvkm_therm *therm) >>> nvkm_trace(subdev, "reading temperature from SHADOWed sensor\n"); >>> >>> /* device valid */ >>> - if (tsensor & 0x20000000) >>> - return (inttemp >> 8); >>> - else >>> + if (tsensor & 0x20000000) { >>> + *val = inttemp >> 8; >>> + return 0; >>> + } else >>> return...
2017 Nov 17
0
[PATCH 03/32] therm: Split return code and value in nvkm_get_temp
...*therm, int *val) { struct nvkm_device *device = therm->subdev.device; struct nvkm_subdev *subdev = &therm->subdev; @@ -36,9 +36,10 @@ gp100_temp_get(struct nvkm_therm *therm) nvkm_trace(subdev, "reading temperature from SHADOWed sensor\n"); /* device valid */ - if (tsensor & 0x20000000) - return (inttemp >> 8); - else + if (tsensor & 0x20000000) { + *val = inttemp >> 8; + return 0; + } else return -ENODEV; } diff --git a/drm/nouveau/nvkm/subdev/therm/nv40.c b/drm/nouveau/nvkm/subdev/therm/nv40.c index 2c92ffb5..cfd5b215 100644 --- a/drm/n...
2017 Nov 22
0
[PATCH 03/32] therm: Split return code and value in nvkm_get_temp
...e; >> struct nvkm_subdev *subdev = &therm->subdev; >> @@ -36,9 +36,10 @@ gp100_temp_get(struct nvkm_therm *therm) >> nvkm_trace(subdev, "reading temperature from SHADOWed sensor\n"); >> >> /* device valid */ >> - if (tsensor & 0x20000000) >> - return (inttemp >> 8); >> - else >> + if (tsensor & 0x20000000) { >> + *val = inttemp >> 8; >> + return 0; >> + } else >> return -ENODEV; >> } >&g...
2020 Sep 09
0
[PATCH] drm/nouveau: Add fine-grain temperature reporting
..._temp_get_raw(struct nvkm_therm *therm) > { > struct nvkm_device *device = therm->subdev.device; > struct nvkm_subdev *subdev = &therm->subdev; > @@ -37,14 +37,35 @@ gp100_temp_get(struct nvkm_therm *therm) > > /* device valid */ > if (tsensor & 0x20000000) > - return (inttemp >> 8); > + return inttemp; > else > return -ENODEV; > } > > +static int > +gp100_temp_millidegree_get(struct nvkm_therm *therm) > +{ > + int raw_temp = gp100_temp_get...
2020 Sep 09
2
[PATCH] drm/nouveau: Add fine-grain temperature reporting
...erm) > > { > > struct nvkm_device *device = therm->subdev.device; > > struct nvkm_subdev *subdev = &therm->subdev; > > @@ -37,14 +37,35 @@ gp100_temp_get(struct nvkm_therm *therm) > > > > /* device valid */ > > if (tsensor & 0x20000000) > > - return (inttemp >> 8); > > + return inttemp; > > else > > return -ENODEV; > > } > > > > +static int > > +gp100_temp_millidegree_get(struct nvkm_therm *therm) > >...
2017 Nov 17
35
[PATCH 00/32] Updated State of my clk patches
Last update here: https://lists.freedesktop.org/archives/nouveau/2017-September/028848.html Basically big cleanup, reordering, simplifications and some renaming to make the code easier to read and to review. I also moved some bugfixes to the front so they can be merged prior the other patches. There was also a bug related to the therm daemon triggering a pstate change leading to PMU lockups,