diff options
author | Karol Herbst <karolherbst@gmail.com> | 2017-04-23 20:06:37 +0200 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2017-06-16 14:04:19 +1000 |
commit | 4dc33b12229fc540dc69b0d4aced60672bab142d (patch) | |
tree | d5cf20f859e101fbfd0bef81d7a76f900225a2f2 /drivers/gpu/drm/nouveau | |
parent | c0cd04700f5c88145602b35c24e9128767a4ad69 (diff) | |
download | talos-op-linux-4dc33b12229fc540dc69b0d4aced60672bab142d.tar.gz talos-op-linux-4dc33b12229fc540dc69b0d4aced60672bab142d.zip |
drm/nouveau/bios/iccsense: rails for power sensors have a mask of 0xf8 for version 0x10
I only saw those values inside the vbios: 0xff, 0xfd, 0xfc, 0xfa for valid
rails.
No idea what the lower value does, but at least we get power readings on
a lot of Fermi GPUs with that.
v2: add missing parentheses
Signed-off-by: Karol Herbst <karolherbst@gmail.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau')
-rw-r--r-- | drivers/gpu/drm/nouveau/nvkm/subdev/bios/iccsense.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/bios/iccsense.c b/drivers/gpu/drm/nouveau/nvkm/subdev/bios/iccsense.c index 3953d11844ea..23caef8df17f 100644 --- a/drivers/gpu/drm/nouveau/nvkm/subdev/bios/iccsense.c +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/bios/iccsense.c @@ -87,7 +87,10 @@ nvbios_iccsense_parse(struct nvkm_bios *bios, struct nvbios_iccsense *iccsense) switch(ver) { case 0x10: - rail->mode = nvbios_rd08(bios, entry + 0x1); + if ((nvbios_rd08(bios, entry + 0x1) & 0xf8) == 0xf8) + rail->mode = 1; + else + rail->mode = 0; rail->extdev_id = nvbios_rd08(bios, entry + 0x2); res_start = 0x3; break; |