Response in-line:
Op 22-04-17 om 13:22 schreef Karol Herbst:
info.min and info.max doesn't always represent the actual voltage range we
can use. Do the same as with the entry based volting.
Fixes "ERROR: Can't get value of subfeature in0_min: Can't read" errors
in sensors.
Signed-off-by: Karol Herbst <karolher...@gmail.com>
---
drm/nouveau/nvkm/subdev/volt/base.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drm/nouveau/nvkm/subdev/volt/base.c
b/drm/nouveau/nvkm/subdev/volt/base.c
index e344901c..61b29c7a 100644
--- a/drm/nouveau/nvkm/subdev/volt/base.c
+++ b/drm/nouveau/nvkm/subdev/volt/base.c
@@ -195,14 +195,16 @@ nvkm_volt_parse_bios(struct nvkm_bios *bios, struct
nvkm_volt *volt)
data = nvbios_volt_parse(bios, &ver, &hdr, &cnt, &len, &info);
if (data && info.vidmask && info.base && info.step && info.ranged) {
nvkm_debug(subdev, "found ranged based VIDs\n");
- volt->min_uv = info.min;
- volt->max_uv = info.max;
+ volt->min_uv = 0xffffffff;
+ volt->max_uv = 0;
for (i = 0; i < info.vidmask + 1; i++) {
if (info.base >= info.min &&
info.base <= info.max) {
How bogus are info.min and info.max when you get that error? Is this
if-statement still valid?
volt->vid[volt->vid_nr].uv = info.base;
volt->vid[volt->vid_nr].vid = i;
volt->vid_nr++;
+ volt->min_uv = min(volt->min_uv, info.base);
+ volt->max_uv = max(volt->max_uv, info.base);
}
info.base += info.step;
}
_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau