Displaying 20 results from an estimated 20 matches for "nvkm_fuse_read".
2018 Dec 14
1
[PATCH] drm/nouveau/falcon: avoid touching registers if engine is off
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=108980
Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu>
---
drivers/gpu/drm/nouveau/nvkm/engine/falcon.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/falcon.c b/drivers/gpu/drm/nouveau/nvkm/engine/falcon.c
index 816ccaedfc73..8675613e142b 100644
---
2020 Sep 16
2
[PATCH v2 1/2] drm/nouveau: return temperatures in temp_get() via parameter
...veau/nvkm/subdev/therm/g84.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/therm/g84.c
@@ -27,14 +27,15 @@
#include <subdev/fuse.h>
int
-g84_temp_get(struct nvkm_therm *therm)
+g84_temp_get(struct nvkm_therm *therm, int *temp)
{
struct nvkm_device *device = therm->subdev.device;
- if (nvkm_fuse_read(device->fuse, 0x1a8) == 1)
- return nvkm_rd32(device, 0x20400);
- else
+ if (nvkm_fuse_read(device->fuse, 0x1a8) != 1)
return -ENODEV;
+
+ *temp = nvkm_rd32(device, 0x20400);
+ return 0;
}
void
@@ -115,7 +116,7 @@ g84_therm_threshold_hyst_emulation(struct nvkm_therm *therm,
}
/*...
2020 Sep 16
2
[PATCH v2 1/2] drm/nouveau: return temperatures in temp_get() via parameter
...5 @@
> > #include <subdev/fuse.h>
> >
> > int
> > -g84_temp_get(struct nvkm_therm *therm)
> > +g84_temp_get(struct nvkm_therm *therm, int *temp)
> > {
> > struct nvkm_device *device = therm->subdev.device;
> >
> > - if (nvkm_fuse_read(device->fuse, 0x1a8) == 1)
> > - return nvkm_rd32(device, 0x20400);
> > - else
> > + if (nvkm_fuse_read(device->fuse, 0x1a8) != 1)
> > return -ENODEV;
> > +
> > + *temp = nvkm_rd32(device, 0x20400);
> >...
2017 Nov 22
2
[PATCH 03/32] therm: Split return code and value in nvkm_get_temp
...m/nouveau/nvkm/subdev/therm/g84.c
> @@ -27,14 +27,15 @@
> #include <subdev/fuse.h>
>
> int
> -g84_temp_get(struct nvkm_therm *therm)
> +g84_temp_get(struct nvkm_therm *therm, int *val)
> {
> struct nvkm_device *device = therm->subdev.device;
>
> - if (nvkm_fuse_read(device->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_thresh...
2019 Jan 13
1
[PATCH v2] drm/nouveau/volt/gf117: fix speedo readout register
...* Authors: Ilia Mirkin
+ */
+#include "priv.h"
+
+#include <subdev/fuse.h>
+
+static int
+gf117_volt_speedo_read(struct nvkm_volt *volt)
+{
+ struct nvkm_device *device = volt->subdev.device;
+ struct nvkm_fuse *fuse = device->fuse;
+
+ if (!fuse)
+ return -EINVAL;
+
+ return nvkm_fuse_read(fuse, 0x3a8);
+}
+
+static const struct nvkm_volt_func
+gf117_volt = {
+ .oneinit = gf100_volt_oneinit,
+ .vid_get = nvkm_voltgpio_get,
+ .vid_set = nvkm_voltgpio_set,
+ .speedo_read = gf117_volt_speedo_read,
+};
+
+int
+gf117_volt_new(struct nvkm_device *device, int index, struct nvkm_volt **pvolt...
2017 Oct 08
1
[RFC PATCH 01/29] therm: split return code and value in nvkm_get_temp
...m/nouveau/nvkm/subdev/therm/g84.c
> @@ -27,14 +27,15 @@
> #include <subdev/fuse.h>
>
> int
> -g84_temp_get(struct nvkm_therm *therm)
> +g84_temp_get(struct nvkm_therm *therm, int *val)
> {
> struct nvkm_device *device = therm->subdev.device;
>
> - if (nvkm_fuse_read(device->fuse, 0x1a8) == 1)
> - return nvkm_rd32(device, 0x20400);
> - else
> + if (nvkm_fuse_read(device->fuse, 0x1a8) != 1)
> return -ENODEV;
> +
> + *val = nvkm_rd32(device, 0x20400);
You could allow passing NULL values for `val` for when you are not interested
by the...
2017 Sep 15
0
[RFC PATCH 01/29] therm: split return code and value in nvkm_get_temp
...--- a/drm/nouveau/nvkm/subdev/therm/g84.c
+++ b/drm/nouveau/nvkm/subdev/therm/g84.c
@@ -27,14 +27,15 @@
#include <subdev/fuse.h>
int
-g84_temp_get(struct nvkm_therm *therm)
+g84_temp_get(struct nvkm_therm *therm, int *val)
{
struct nvkm_device *device = therm->subdev.device;
- if (nvkm_fuse_read(device->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
@@ -115,7 +116,7 @@ g84_therm_threshold_hyst_emulation(struct nvkm_therm *therm,
}
/*...
2017 Nov 22
1
[PATCH 03/32] therm: Split return code and value in nvkm_get_temp
...clude <subdev/fuse.h>
>>>
>>> int
>>> -g84_temp_get(struct nvkm_therm *therm)
>>> +g84_temp_get(struct nvkm_therm *therm, int *val)
>>> {
>>> struct nvkm_device *device = therm->subdev.device;
>>>
>>> - if (nvkm_fuse_read(device->fuse, 0x1a8) == 1)
>>> - return nvkm_rd32(device, 0x20400);
>>> - else
>>> + if (nvkm_fuse_read(device->fuse, 0x1a8) != 1)
>>> return -ENODEV;
>>> +
>>> + *val = nvkm_rd32(device, 0x20400);
>...
2016 Apr 18
0
[PATCH v4 36/37] WIP volt/gk104: readout speedo
...ruct nvkm_volt *base, u32 uv)
return 0;
}
+static int
+gk104_volt_speedo_read(struct nvkm_volt *volt)
+{
+ struct nvkm_device *device = volt->subdev.device;
+ struct nvkm_fuse *fuse = device->fuse;
+ int ret;
+
+ if (!fuse)
+ return -EINVAL;
+
+ nvkm_wr32(device, 0x122634, 0x0);
+ ret = nvkm_fuse_read(fuse, 0x3a8);
+ nvkm_wr32(device, 0x122634, 0x41);
+ return ret;
+}
+
static const struct nvkm_volt_func
gk104_volt_pwm = {
.volt_get = gk104_volt_get,
.volt_set = gk104_volt_set,
+ .speedo_read = gk104_volt_speedo_read,
}, gk104_volt_gpio = {
.vid_get = nvkm_voltgpio_get,
.vid_set = nvk...
2020 Sep 16
0
[PATCH v2 1/2] drm/nouveau: return temperatures in temp_get() via parameter
.../nvkm/subdev/therm/g84.c
> @@ -27,14 +27,15 @@
> #include <subdev/fuse.h>
>
> int
> -g84_temp_get(struct nvkm_therm *therm)
> +g84_temp_get(struct nvkm_therm *therm, int *temp)
> {
> struct nvkm_device *device = therm->subdev.device;
>
> - if (nvkm_fuse_read(device->fuse, 0x1a8) == 1)
> - return nvkm_rd32(device, 0x20400);
> - else
> + if (nvkm_fuse_read(device->fuse, 0x1a8) != 1)
> return -ENODEV;
> +
> + *temp = nvkm_rd32(device, 0x20400);
> + return 0;
> }
>
>...
2017 Nov 17
0
[PATCH 03/32] therm: Split return code and value in nvkm_get_temp
...--- a/drm/nouveau/nvkm/subdev/therm/g84.c
+++ b/drm/nouveau/nvkm/subdev/therm/g84.c
@@ -27,14 +27,15 @@
#include <subdev/fuse.h>
int
-g84_temp_get(struct nvkm_therm *therm)
+g84_temp_get(struct nvkm_therm *therm, int *val)
{
struct nvkm_device *device = therm->subdev.device;
- if (nvkm_fuse_read(device->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_sta...
2020 Sep 17
0
[PATCH v2 1/2] drm/nouveau: return temperatures in temp_get() via parameter
....h>
> > >
> > > int
> > > -g84_temp_get(struct nvkm_therm *therm)
> > > +g84_temp_get(struct nvkm_therm *therm, int *temp)
> > > {
> > > struct nvkm_device *device = therm->subdev.device;
> > >
> > > - if (nvkm_fuse_read(device->fuse, 0x1a8) == 1)
> > > - return nvkm_rd32(device, 0x20400);
> > > - else
> > > + if (nvkm_fuse_read(device->fuse, 0x1a8) != 1)
> > > return -ENODEV;
> > > +
> > > + *temp = nvkm_rd3...
2017 Nov 22
0
[PATCH 03/32] therm: Split return code and value in nvkm_get_temp
...@ -27,14 +27,15 @@
>> #include <subdev/fuse.h>
>>
>> int
>> -g84_temp_get(struct nvkm_therm *therm)
>> +g84_temp_get(struct nvkm_therm *therm, int *val)
>> {
>> struct nvkm_device *device = therm->subdev.device;
>>
>> - if (nvkm_fuse_read(device->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;
&g...
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 Apr 18
0
[PATCH v4 19/37] volt: add gf100 subdev with speedo
...Authors: Karol Herbst
+ */
+#include "priv.h"
+
+#include <subdev/fuse.h>
+
+static int
+gf100_volt_speedo_read(struct nvkm_volt *volt)
+{
+ struct nvkm_device *device = volt->subdev.device;
+ struct nvkm_fuse *fuse = device->fuse;
+
+ if (!fuse)
+ return -EINVAL;
+
+ return nvkm_fuse_read(fuse, 0x1cc);
+}
+
+static const struct nvkm_volt_func
+gf100_volt = {
+ .vid_get = nvkm_voltgpio_get,
+ .vid_set = nvkm_voltgpio_set,
+ .speedo_read = gf100_volt_speedo_read,
+};
+
+int
+gf100_volt_new(struct nvkm_device *device, int index, struct nvkm_volt **pvolt)
+{
+ struct nvkm_volt *volt;
+...
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 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,
2016 Aug 16
21
[PATCH v5 00/20] Engine Reclocking Fixes for Fermi-Maxwell2
I've splitted my big series between the part which actually fixes the
engine reclocking bits and the part handling voltage/clock updates on
temperature change, so that the more reviewed parts can be merged in
faster.
This series fixes a lot of Engine reclocking issues found on Fermi, Kepler
and all Maxwell generation GPUs. It does _not_ fix memory reclocking on
Fermi.
It mostly contains of
2017 Sep 15
42
[RFC PATCH 00/29] Current State of my clk patches
Just wanted to post updated versions of my last series/patches. Reviews
welcomed.
It would be also nice if we agree on features I should focus upstreaming, so
that this work can be better splitted or reordered.
Sadly most of my patches depend on the rather big clk subdev rework and I think
those patches shows best, why I think this rework is actually needed and makes
things much easier to add
2016 Apr 18
63
[PATCH v4 00/37] Volting/Clocking improvements for Fermi and newer
We are slowly getting there!
v4 of the series with some realy good improvements, so I am sure this is like
95% done and only needs some proper polishing and proper Reviews!
I also added the NvVoltOffsetmV module parameter, so that a user is able to
over and !under!-volt the GPU. Overvolting makes sense, when there are still
some reclocking issues left, which might be solved by a higher voltage.