search for: nvkm_cstate_prog

Displaying 19 results from an estimated 19 matches for "nvkm_cstate_prog".

2016 Apr 18
0
[PATCH v4 13/37] clk: respect voltage limits in nvkm_cstate_prog
...cstatei) +{ + struct nvkm_cstate *cstate; + if (cstatei == -1) + return list_entry(pstate->list.prev, typeof(*cstate), head); + else { + list_for_each_entry(cstate, &pstate->list, head) { + if (cstate->cstate == cstatei) + return cstate; + } + } + return NULL; +} + static int nvkm_cstate_prog(struct nvkm_clk *clk, struct nvkm_pstate *pstate, int cstatei) { @@ -85,15 +157,8 @@ nvkm_cstate_prog(struct nvkm_clk *clk, struct nvkm_pstate *pstate, int cstatei) int ret; if (!list_empty(&pstate->list)) { - if (cstatei == -1) - cstate = list_entry(pstate->list.prev, typeof(*c...
2016 Apr 18
0
[PATCH v4 28/37] clk: hold information about the current cstate status
...t.prev, typeof(*cstate), head); - else { + case NVKM_CLK_CSTATE_BASE: + return &pstate->base; + case NVKM_CLK_CSTATE_DEFAULT: + return NULL; + default: list_for_each_entry(cstate, &pstate->list, head) { if (cstate->cstate == cstatei) return cstate; @@ -173,6 +178,9 @@ nvkm_cstate_prog(struct nvkm_clk *clk, struct nvkm_pstate *pstate, int cstatei) struct nvkm_cstate *cstate; int ret; + if (cstatei == NVKM_CLK_CSTATE_DEFAULT) + return 0; + if (!list_empty(&pstate->list)) { cstate = nvkm_cstate_get(clk, pstate, cstatei); cstate = nvkm_cstate_find_best(clk, pst...
2017 Sep 15
0
[RFC PATCH 07/29] clk: Hold information about the current cstate status
...e->list, typeof(*cstate), head); - else { + case NVKM_CLK_CSTATE_BASE: + return &pstate->base; + case NVKM_CLK_CSTATE_DEFAULT: + return NULL; + default: list_for_each_entry(cstate, &pstate->list, head) { if (cstate->id == cstatei) return cstate; @@ -167,6 +172,9 @@ nvkm_cstate_prog(struct nvkm_clk *clk, struct nvkm_pstate *pstate, int cstatei) struct nvkm_cstate *cstate; int ret; + if (cstatei == NVKM_CLK_CSTATE_DEFAULT) + return 0; + if (!list_empty(&pstate->list)) { cstate = nvkm_cstate_get(clk, pstate, cstatei); cstate = nvkm_cstate_find_best(clk, pst...
2016 Apr 18
0
[PATCH v4 32/37] clk: only do partial reclocks as required
...static struct nvkm_cstate * +struct nvkm_cstate * nvkm_cstate_get(struct nvkm_clk *clk, struct nvkm_pstate *pstate, int cstatei) { struct nvkm_cstate *cstate; @@ -168,7 +168,7 @@ nvkm_cstate_get(struct nvkm_clk *clk, struct nvkm_pstate *pstate, int cstatei) return NULL; } -static int +int nvkm_cstate_prog(struct nvkm_clk *clk, struct nvkm_pstate *pstate, int cstatei) { struct nvkm_subdev *subdev = &clk->subdev; @@ -188,6 +188,11 @@ nvkm_cstate_prog(struct nvkm_clk *clk, struct nvkm_pstate *pstate, int cstatei) cstate = &pstate->base; } + if (!cstate) { + nvkm_error(subdev, &...
2016 Mar 21
0
[PATCH v2 07/22] volt: add min_id parameter to nvkm_volt_set_id
...nvkm_volt **); int gk104_volt_new(struct nvkm_device *, int, struct nvkm_volt **); diff --git a/drm/nouveau/nvkm/subdev/clk/base.c b/drm/nouveau/nvkm/subdev/clk/base.c index 75122a2..ee193cf 100644 --- a/drm/nouveau/nvkm/subdev/clk/base.c +++ b/drm/nouveau/nvkm/subdev/clk/base.c @@ -99,7 +99,8 @@ nvkm_cstate_prog(struct nvkm_clk *clk, struct nvkm_pstate *pstate, int cstatei) } if (volt) { - ret = nvkm_volt_set_id(volt, cstate->voltage, +1); + ret = nvkm_volt_set_id(volt, cstate->voltage, + pstate->base.voltage, +1); if (ret && ret != -ENODEV) { nvkm_error(subdev, &q...
2017 Jul 21
0
[RFC PATCH 13/13] clk: thermal throttling
...e->fb; struct nvkm_pci *pci = subdev->device->pci; struct nvkm_pstate *pstate; - int ret; + int ret, cstate; if (pstateid == NVKM_CLK_PSTATE_DEFAULT) return 0; @@ -308,7 +308,12 @@ nvkm_pstate_prog(struct nvkm_clk *clk, int pstateid) ram->func->tidy(ram); } - return nvkm_cstate_prog(clk, pstate, clk->exp_cstateid); + if (clk->throttled) + cstate = list_first_entry(&pstate->list, struct nvkm_cstate, head)->id; + else + cstate = clk->exp_cstateid; + + return nvkm_cstate_prog(clk, pstate, cstate); } static void @@ -333,12 +338,17 @@ nvkm_clk_update_work(s...
2017 Sep 15
0
[RFC PATCH 17/29] clk: thermal throttling
...e->fb; struct nvkm_pci *pci = subdev->device->pci; struct nvkm_pstate *pstate; - int ret; + int ret, cstate; if (pstateid == NVKM_CLK_PSTATE_DEFAULT) return 0; @@ -308,7 +308,12 @@ nvkm_pstate_prog(struct nvkm_clk *clk, int pstateid) ram->func->tidy(ram); } - return nvkm_cstate_prog(clk, pstate, clk->exp_cstateid); + if (clk->throttled) + cstate = list_first_entry(&pstate->list, struct nvkm_cstate, head)->id; + else + cstate = clk->exp_cstateid; + + return nvkm_cstate_prog(clk, pstate, cstate); } static void @@ -322,22 +327,20 @@ nvkm_clk_update_work(s...
2016 Apr 07
29
[PATCH v3 00/29] Volting/Clocking improvements for Fermi and newer
...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 voltage volt: add temperature parameter to nvkm_volt_map clk: fixup cstate selection clk: respect voltage limits in nvkm_cstate_prog bios: add parsing of BASE CLOCK table clk: allow boosting only when NvBoost is set volt: don't require perfect fit bios/vmap: unk0 field is the mode volt: add coefficients I found on my gpu clk: save the max clock we can set clk: rename nvkm_pstate_calc to nvkm_clk_update nvif:...
2016 Aug 16
21
[PATCH v5 00/20] Engine Reclocking Fixes for Fermi-Maxwell2
...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 speedo volt: Make use of cvb coefficients fb/ram: Use Kepler implementation on Ma...
2017 Jul 21
15
[RFC PATCH 00/13] Thermal throttling
Adds Nouveau controlled thermal throttling for Kepler+ GPUs. With this I feel safe enough to add support for Maxwell2 reclocking later on (still hidden behind a switch, but we can be fairly sure to not overheat hardware if a user isn't carefull enough) Contains all patches from my clk update series, but I thought it makes sense to include those in this series as well for completness. Please
2016 Mar 17
22
[PATCH 00/19] Volting/Clocking improvements for Fermi and newer
...tries 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 voltage volt: add temperature parameter to nvkm_volt_map nouveau/subdev/clk: fixup cstate selection clk: respect voltage limits in nvkm_cstate_prog with cstate = -1 volt: don't require perfect fit bios/vmap: unk0 field is the mode volt: add coefficients I found on my gpu bin/nv_cmp_volt.c | 130 +++++++++++++++++++++ drm/nouveau/include/nvkm/subdev/bios/baseclock.h | 24 ++++ drm/nouveau/include/nvkm...
2017 Jul 01
7
[PATCH v2 0/7] clk subdev updates
This series addresses various issues inside the reclocking code: 1. after resume the set clocks are reset 2. reclocking not possible while GPU is suspended Some of the patches were part of the bigger reclocking series I sent months ago, some things have changed though. This is also preparation work of changing the clock state due to temperature changes and dynamic reclocking. v2: remove commits
2017 Sep 03
8
[PATCH 0/8] clk subdev updates
This series addresses various issues inside the reclocking code: 1. after resume the set clocks are reset 2. reclocking not possible while GPU is suspended 3. racy reclocking while GPU is suspending and leading to hangs Some of the patches were part of the bigger reclocking series I sent months ago, some things have changed though. This is also preparation work of changing the clock state due to
2016 Apr 18
63
[PATCH v4 00/37] Volting/Clocking improvements for Fermi and newer
...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 voltage volt: add temperature parameter to nvkm_volt_map clk: fixup cstate selection clk: respect voltage limits in nvkm_cstate_prog bios: add parsing of BASE CLOCK table clk: allow boosting only when NvBoost is set volt: don't require perfect fit bios/vmap: unk0 field is the mode volt: add speedo volt: add gf100 subdev with speedo volt: add coefficients clk: save the max clock we can set clk: rename nvkm_p...
2017 Mar 05
15
[PATCH 0/9] clk subdev updates
This series addresses various issues inside the reclocking code: 1. after resume the set clocks are reset 2. reclocking not possible while GPU is suspended 3. nouveau always does full reclocks even if only a change of the voltage is required Some of the patches were part of the bigger reclocking series I sent months ago, some things have changed though. This is also preparation work of
2016 Mar 21
28
[PATCH v2 00/22] Volting/Clocking improvements for Fermi and newer
...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 voltage volt: add temperature parameter to nvkm_volt_map clk: fixup cstate selection clk: respect voltage limits in nvkm_cstate_prog with cstate = -1 bios: add parsing of BASE CLOCK table clk: allow boosting only when NvBoost is set volt: don't require perfect fit bios/vmap: unk0 field is the mode volt: add coefficients I found on my gpu clk: save the max clock we can set clk: add nvkm_clk_reclock function nv...
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,
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 Jan 13
5
[PATCH 0/2] allow partly reclocking on chipset
some chipset have working engine reclocking, but broken memory reclocking like Fermi. We should for now, add the functionality to allow partly reclocking for those. Allthough this doesn't give as much performance as one might wish, it is till noticeable and may improve performance enough to be noted. Karol Herbst (2): clk: seperate engine and memory reclock toggles clk: allow engine