Displaying 20 results from an estimated 21 matches for "inttemp".
2018 Jan 25
3
[PATCH] drm/nouveau/therm/gp100: Do not report temperature when subdev is shadowed
...eau/nvkm/subdev/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
2020 Aug 12
6
[PATCH] drm/nouveau: Add fine-grain temperature reporting
...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;
+}
+
+static int
+gp100_temp_get(struct n...
2018 Jan 26
2
[PATCH] drm/nouveau/therm/gp100: Do not report temperature when subdev is shadowed
...eau/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");
>> +...
2020 Sep 09
0
[PATCH] drm/nouveau: Add fine-grain temperature reporting
...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)
&...
2017 Sep 01
0
[PATCH v2] drm/nouveau/therm: initial implementation of new gp1xx temperature sensor
...S 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, 0x020460);
+ u32 inttemp = (tsensor & 0x0001fff8);
+
+ /* device SHADOWed */
+ if (tsensor & 0x40000000)
+ nvkm_info(subdev, "Reading temperature from SHADOWed sensor\n");
+
+ /* device valid */
+ if (tsensor & 0x20000000)
+ return (inttemp >> 8);
+ else
+ return -ENODEV;
+}
+
+static const s...
2020 Sep 16
2
[PATCH v2 1/2] drm/nouveau: return temperatures in temp_get() via parameter
...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;
+ return 0;
}
static const struct nvkm_therm_func
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/therm/nv40.c b/drivers/gpu/drm/nouveau/nvkm/subdev/therm/nv40.c
ind...
2020 Sep 16
2
[PATCH v2 1/2] drm/nouveau: return temperatures in temp_get() via parameter
...t 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;
> > + return 0;
> > }
> >
> > static cons...
2017 Nov 22
2
[PATCH 03/32] therm: Split return code and value in nvkm_get_temp
...vice;
> 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 10064...
2017 Oct 08
1
[RFC PATCH 01/29] therm: split return code and value in nvkm_get_temp
...vice;
> 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 10064...
2017 Sep 15
0
[RFC PATCH 01/29] therm: split return code and value in nvkm_get_temp
...evice *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/nouveau/nvkm/subdev/therm/nv40.c
+++ b...
2020 Sep 09
2
[PATCH] drm/nouveau: Add fine-grain temperature reporting
...ce = 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...
2017 Nov 22
1
[PATCH 03/32] therm: Split return code and value in nvkm_get_temp
...; @@ -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 --gi...
2018 Jan 26
0
[PATCH] drm/nouveau/therm/gp100: Do not report temperature when subdev is shadowed
.../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;
> +...
2018 Jan 26
0
[PATCH] drm/nouveau/therm/gp100: Do not report temperature when subdev is shadowed
...m/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...
2017 Aug 31
4
[RFC PATCH] drm/nouveau/therm: initial implementation of new gp1xx temperature sensor
Signed-off-by: Rhys Kidd <rhyskidd at gmail.com>
---
.../gpu/drm/nouveau/include/nvkm/subdev/therm.h | 1 +
drivers/gpu/drm/nouveau/nvkm/engine/device/base.c | 6 +++
drivers/gpu/drm/nouveau/nvkm/subdev/therm/Kbuild | 1 +
drivers/gpu/drm/nouveau/nvkm/subdev/therm/base.c | 3 +-
drivers/gpu/drm/nouveau/nvkm/subdev/therm/gp100.c | 57 ++++++++++++++++++++++
5 files changed, 67
2020 Sep 16
0
[PATCH v2 1/2] drm/nouveau: return temperatures in temp_get() via parameter
...+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;
> + return 0;
> }
>
> static const struct nvkm_therm_func
> diff --git a/drivers...
2017 Nov 17
0
[PATCH 03/32] therm: Split return code and value in nvkm_get_temp
...evice *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/nouveau/nvkm/subdev/therm/nv40.c
+++ b...
2020 Sep 17
0
[PATCH v2 1/2] drm/nouveau: return temperatures in temp_get() via parameter
...> 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;
> > > + return 0;
> >...
2017 Nov 22
0
[PATCH 03/32] therm: Split return code and value in nvkm_get_temp
...->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/nv...
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,