search for: best_vid

Displaying 1 result from an estimated 1 matches for "best_vid".

Did you mean: best_id
2014 Jan 02
0
[PATCH] drm/nvc0-: Fix voltage obtained from vbios.
...index 32794a999106..7bf716b048bd 100644 --- a/drivers/gpu/drm/nouveau/core/subdev/volt/base.c +++ b/drivers/gpu/drm/nouveau/core/subdev/volt/base.c @@ -50,12 +50,23 @@ nouveau_volt_set(struct nouveau_volt *volt, u32 uv) { if (volt->vid_set) { int i, ret = -EINVAL; + u32 best_uv = INT_MAX, best_vid = 0; + for (i = 0; i < volt->vid_nr; i++) { - if (volt->vid[i].uv == uv) { - ret = volt->vid_set(volt, volt->vid[i].vid); - nv_debug(volt, "set %duv: %d\n", uv, ret); + s32 delta = volt->vid[i].uv - uv; + + if (delta < 0 || best_uv < volt->vid[i]....