search for: nvkm_volt_map

Displaying 20 results from an estimated 35 matches for "nvkm_volt_map".

2016 Apr 18
0
[PATCH v4 11/37] volt: add temperature parameter to nvkm_volt_map
...nv_cmp_volt.c b/bin/nv_cmp_volt.c index c63d91b..34147b9 100644 --- a/bin/nv_cmp_volt.c +++ b/bin/nv_cmp_volt.c @@ -117,7 +117,7 @@ main(int argc, char **argv) new_voltage = nvkm_volt_get(volt); new_temp = nvkm_rd32(device, 0x20400);//nvkm_therm_temp_get(therm); - new_nouveau_voltage = max(nvkm_volt_map(volt, best_cstate->voltage), nvkm_volt_map(volt, best_pstate->base.voltage)); + new_nouveau_voltage = max(nvkm_volt_map(volt, best_cstate->voltage, new_temp), nvkm_volt_map(volt, best_pstate->base.voltage, new_temp)); new_pstate = best_pstate->pstate; new_cstate = best_cstate-...
2016 Apr 18
0
[PATCH v4 37/37] volt: add NvVoltOffsetmV option
...nv_cmp_volt.c b/bin/nv_cmp_volt.c index e61056c..d1a0402 100644 --- a/bin/nv_cmp_volt.c +++ b/bin/nv_cmp_volt.c @@ -117,7 +117,7 @@ main(int argc, char **argv) new_voltage = nvkm_volt_get(volt); new_temp = nvkm_rd32(device, 0x20400);//nvkm_therm_temp_get(therm); - new_nouveau_voltage = max(nvkm_volt_map(volt, best_cstate->voltage, new_temp), nvkm_volt_map(volt, best_pstate->base.voltage, new_temp)); + new_nouveau_voltage = max(nvkm_volt_map(volt, best_cstate->voltage, new_temp, true), nvkm_volt_map(volt, best_pstate->base.voltage, new_temp, false)); new_pstate = best_pstate->pst...
2016 Apr 18
0
[PATCH v4 08/37] clk: export nvkm_volt_map
...tions(+), 1 deletion(-) diff --git a/drm/nouveau/include/nvkm/subdev/volt.h b/drm/nouveau/include/nvkm/subdev/volt.h index ec9d87d..870d212 100644 --- a/drm/nouveau/include/nvkm/subdev/volt.h +++ b/drm/nouveau/include/nvkm/subdev/volt.h @@ -22,6 +22,7 @@ struct nvkm_volt { u8 max2_id; }; +int nvkm_volt_map(struct nvkm_volt *volt, u8 id); int nvkm_volt_map_min(struct nvkm_volt *volt, u8 id); int nvkm_volt_get(struct nvkm_volt *); int nvkm_volt_set_id(struct nvkm_volt *, u8 id, u8 min_id, int condition); diff --git a/drm/nouveau/nvkm/subdev/volt/base.c b/drm/nouveau/nvkm/subdev/volt/base.c index 169...
2016 Mar 17
22
[PATCH 00/19] Volting/Clocking improvements for Fermi and newer
...t (19): bios/volt: handle voltage table version 0x50 with 0ed header volt: properly detect entry based voltage tables bios: add parsing of BASE CLOCK table clk: print the base clocks clk: allow boosting only when NvBoost is set volt: save the voltage range we are able to set volt: add nvkm_volt_map_min function clk: don't create cstates which voltage is higher than what the gpu can do volt: parse the both max voltage entries volt: add min_id parameter to nvkm_volt_set_id clk: export nvkm_volt_map clk: add index field to nvkm_cstate add daemon to compare nouveau with blob v...
2016 Apr 18
63
[PATCH v4 00/37] Volting/Clocking improvements for Fermi and newer
...sed on speedo refactor some code in clk to not affect pre-fermi chips add NvVoltOffsetmV option Karol Herbst (37): bios/volt: handle voltage table version 0x50 with 0ed header volt: properly detect entry based voltage tables volt: save the voltage range we are able to set volt: add nvkm_volt_map_min function clk: don't create cstates whit voltages higher than what the gpu can do volt: parse the max voltage map entries volt: add min_id parameter to nvkm_volt_set_id clk: export nvkm_volt_map clk: add index field to nvkm_cstate add daemon to compare nouveau with blob volta...
2016 Mar 21
28
[PATCH v2 00/22] Volting/Clocking improvements for Fermi and newer
...on most Kepler cards without any issues v2: boost_mode can now be changed at runtime minor fixups Karol Herbst (22): bios/volt: handle voltage table version 0x50 with 0ed header volt: properly detect entry based voltage tables volt: save the voltage range we are able to set volt: add nvkm_volt_map_min function clk: don't create cstates which voltage is higher than what the gpu can do volt: parse the both max voltage entries volt: add min_id parameter to nvkm_volt_set_id clk: export nvkm_volt_map clk: add index field to nvkm_cstate add daemon to compare nouveau with blob v...
2016 Mar 21
0
[PATCH v2 18/22] volt: add coefficients I found on my gpu
...++++++++++++++++++++----- 1 file changed, 48 insertions(+), 6 deletions(-) diff --git a/drm/nouveau/nvkm/subdev/volt/base.c b/drm/nouveau/nvkm/subdev/volt/base.c index 58738e3..2b3f460 100644 --- a/drm/nouveau/nvkm/subdev/volt/base.c +++ b/drm/nouveau/nvkm/subdev/volt/base.c @@ -117,13 +117,55 @@ nvkm_volt_map(struct nvkm_volt *volt, u8 id, u8 temp) vmap = nvbios_vmap_entry_parse(bios, id, &ver, &len, &info); if (vmap) { - if (info.link != 0xff) { - int ret = nvkm_volt_map(volt, info.link, temp); - if (ret < 0) - return ret; - info.min += ret; + switch (ver) { + case 0x10...
2016 Apr 18
0
[PATCH v4 13/37] clk: respect voltage limits in nvkm_cstate_prog
...**********************************************************************/ +static bool +nvkm_cstate_valid(struct nvkm_clk *clk, struct nvkm_cstate *cstate, u32 max_volt, int temp) +{ + struct nvkm_volt *volt = clk->subdev.device->volt; + int voltage; + + if (!volt) + return true; + + voltage = nvkm_volt_map(volt, cstate->voltage, temp); + if (voltage < 0) + return false; + return voltage <= min(max_volt, volt->max_uv) && + voltage >= volt->min_uv; +} + +static struct nvkm_cstate * +nvkm_cstate_find_best(struct nvkm_clk *clk, struct nvkm_pstate *pstate, + struct...
2016 Apr 07
29
[PATCH v3 00/29] Volting/Clocking improvements for Fermi and newer
...e sure we don't exceed any power budgets. v3: adjust to temperature and minor fixes in the commits Karol Herbst (29): bios/volt: handle voltage table version 0x50 with 0ed header volt: properly detect entry based voltage tables volt: save the voltage range we are able to set volt: add nvkm_volt_map_min function clk: don't create cstates whit voltages higher than what the gpu can do volt: parse the max voltage map entries volt: add min_id parameter to nvkm_volt_set_id clk: export nvkm_volt_map clk: add index field to nvkm_cstate add daemon to compare nouveau with blob volta...
2016 Aug 16
21
[PATCH v5 00/20] Engine Reclocking Fixes for Fermi-Maxwell2
...clk: Don't create cstates with voltages higher than what the gpu can do volt: Parse the max voltage map entries volt: Add min_id parameter to nvkm_volt_set_id clk: Add index field to nvkm_cstate clk: Let nvkm_clk_tstate take a temperature value volt: Add temperature parameter to nvkm_volt_map clk: Fixup cstate selection clk: Respect voltage limits in nvkm_cstate_prog bios: Add parsing of VPSTATE table clk: Allow boosting only when NvBoost is set volt: Don't require perfect fit bios/vmap: unk0 field is the mode volt: Add implementation for gf100 volt/gf100-: Add speed...
2018 Mar 26
2
[PATCH v2 2/2] gpu: drm: nouveau: Use list_{next/prev}_entry instead of list_entry
...bdev/clk/base.c > index e4c8d31..81c3567 100644 > --- a/drivers/gpu/drm/nouveau/nvkm/subdev/clk/base.c > +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/clk/base.c > @@ -134,7 +134,7 @@ nvkm_cstate_find_best(struct nvkm_clk *clk, struct nvkm_pstate *pstate, > nvkm_volt_map(volt, volt->max2_id, clk->temp)); > > for (cstate = start; &cstate->head != &pstate->list; > - cstate = list_entry(cstate->head.prev, typeof(*cstate), head)) { > + cstate = list_prev_entry(cstate, head)) { > if (nvk...
2018 Mar 27
2
[PATCH] gpu: drm: nouveau: Use list_for_each_entry_from_reverse
...ruct nvkm_device *device = clk->subdev.device; struct nvkm_volt *volt = device->volt; - struct nvkm_cstate *cstate; int max_volt; if (!pstate || !start) @@ -133,13 +132,12 @@ nvkm_cstate_find_best(struct nvkm_clk *clk, struct nvkm_pstate *pstate, max_volt = min(max_volt, nvkm_volt_map(volt, volt->max2_id, clk->temp)); - for (cstate = start; &cstate->head != &pstate->list; - cstate = list_prev_entry(cstate, head)) { - if (nvkm_cstate_valid(clk, cstate, max_volt, clk->temp)) + list_for_each_entry_from_reverse(start, &pstate->list, head) { + i...
2015 Nov 23
2
[PATCH 0/2] Fix some voltage issues found on Kepler cards
With these both patches, most of the kepler cards should be able to reclock their core clock without issues. These patches should be tested carefully among nouveau devs, so that these don't break reclocking on other cards (especially Teslas). Particularly the second one might break reclocking here and there. Karol Herbst (2): bios/volt: handle voltage table version 0x50 with 0ed header
2015 Dec 31
2
[RFC PATCH v2 0/7] stabilize kepler reclocking
...'t freeze when not using 0f? > That's right. >I suspect that nouveau currently just sets the voltage too low, but >this is >another issue >and this issue will be tackled next year. > >You could replace info.min with info.max in >drm/nouveau/nvkm/subdev/volt/base.c:nvkm_volt_map >but this will result in more heat generated by your gpu and nouveau >currently >does not verifies if the >ovearheating protection is setup sanely (though it should be setup >already by >the gpu itself) > What's your recommendation to determine suitable values? I could try...
2016 Apr 18
0
[PATCH v4 20/37] volt: add coefficients
...+++++++++++++++++++++++-- 1 file changed, 36 insertions(+), 2 deletions(-) diff --git a/drm/nouveau/nvkm/subdev/volt/base.c b/drm/nouveau/nvkm/subdev/volt/base.c index cecfac6..5e35d96 100644 --- a/drm/nouveau/nvkm/subdev/volt/base.c +++ b/drm/nouveau/nvkm/subdev/volt/base.c @@ -110,13 +110,47 @@ nvkm_volt_map(struct nvkm_volt *volt, u8 id, u8 temp) vmap = nvbios_vmap_entry_parse(bios, id, &ver, &len, &info); if (vmap) { + s64 result; + + if (volt->speedo < 0) + return volt->speedo; + + if (ver == 0x10 || (ver == 0x20 && info.mode == 0)) { + result = (s64)info....
2016 Mar 21
0
[PATCH v2 07/22] volt: add min_id parameter to nvkm_volt_set_id
...changed, 9 insertions(+), 4 deletions(-) diff --git a/drm/nouveau/include/nvkm/subdev/volt.h b/drm/nouveau/include/nvkm/subdev/volt.h index 3e0f8da..e966266 100644 --- a/drm/nouveau/include/nvkm/subdev/volt.h +++ b/drm/nouveau/include/nvkm/subdev/volt.h @@ -21,7 +21,7 @@ struct nvkm_volt { int nvkm_volt_map_min(struct nvkm_volt *volt, u8 id); int nvkm_volt_get(struct nvkm_volt *); -int nvkm_volt_set_id(struct nvkm_volt *, u8 id, int condition); +int nvkm_volt_set_id(struct nvkm_volt *, u8 id, u8 min_id, int condition); int nv40_volt_new(struct nvkm_device *, int, struct nvkm_volt **); int gk104_v...
2018 Mar 19
4
[PATCH] gpu: drm: Use list_{next/prev}_entry instead of list_entry
.../clk/base.c b/drivers/gpu/drm/nouveau/nvkm/subdev/clk/base.c index e4c8d31..81c3567 100644 --- a/drivers/gpu/drm/nouveau/nvkm/subdev/clk/base.c +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/clk/base.c @@ -134,7 +134,7 @@ nvkm_cstate_find_best(struct nvkm_clk *clk, struct nvkm_pstate *pstate, nvkm_volt_map(volt, volt->max2_id, clk->temp)); for (cstate = start; &cstate->head != &pstate->list; - cstate = list_entry(cstate->head.prev, typeof(*cstate), head)) { + cstate = list_prev_entry(cstate, head)) { if (nvkm_cstate_valid(clk, cstate, max_volt, clk->temp))...
2016 Sep 16
1
[PATCH] volt: use kernel's 64-bit signed division function
...| 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/drm/nouveau/nvkm/subdev/volt/base.c b/drm/nouveau/nvkm/subdev/volt/base.c index 90d234231eed..e8569b04b55d 100644 --- a/drm/nouveau/nvkm/subdev/volt/base.c +++ b/drm/nouveau/nvkm/subdev/volt/base.c @@ -116,9 +116,9 @@ nvkm_volt_map(struct nvkm_volt *volt, u8 id, u8 temp) return volt->speedo; if (ver == 0x10 || (ver == 0x20 && info.mode == 0)) { - result = (s64)info.arg[0] / 10; - result += ((s64)info.arg[1] * volt->speedo) / 10; - result += ((s64)info.arg[2] * volt->speedo * volt->speedo)...
2016 Apr 18
0
[PATCH v4 10/37] add daemon to compare nouveau with blob voltage
...ate = pstate; + mem_err = abs(cstate->domain[nv_clk_src_mem] - mem_clock); + } + } + + if (!best_cstate) + best_cstate = &best_pstate->base; + + new_voltage = nvkm_volt_get(volt); + new_temp = nvkm_rd32(device, 0x20400);//nvkm_therm_temp_get(therm); + new_nouveau_voltage = max(nvkm_volt_map(volt, best_cstate->voltage), nvkm_volt_map(volt, best_pstate->base.voltage)); + new_pstate = best_pstate->pstate; + new_cstate = best_cstate->cstate; + + if (new_voltage != old_voltage || new_nouveau_voltage != old_nouveau_voltage || new_pstate != old_pstate || new_cstate != old_csta...
2018 Mar 25
4
[PATCH v2 0/2] drm: Replace list_entry
Replace list_entry with list_{next/prev}_entry. Arushi Singhal (2): gpu: drm/lease:: Use list_{next/prev}_entry instead of list_entry gpu: drm: nouveau: Use list_{next/prev}_entry instead of list_entry drivers/gpu/drm/drm_lease.c | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/clk/base.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) -- changes in v2 *All the