search for: nvkm_clk_cstate_highest

Displaying 18 results from an estimated 18 matches for "nvkm_clk_cstate_highest".

2017 Sep 15
0
[RFC PATCH 07/29] clk: Hold information about the current cstate status
...base.c index 0d4d9fdf..d37c13b7 100644 --- a/drm/nouveau/nvkm/subdev/clk/base.c +++ b/drm/nouveau/nvkm/subdev/clk/base.c @@ -146,9 +146,14 @@ static struct nvkm_cstate * nvkm_cstate_get(struct nvkm_clk *clk, struct nvkm_pstate *pstate, int cstatei) { struct nvkm_cstate *cstate; - if (cstatei == NVKM_CLK_CSTATE_HIGHEST) + switch (cstatei) { + case NVKM_CLK_CSTATE_HIGHEST: return list_last_entry(&pstate->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-&...
2016 Apr 18
0
[PATCH v4 28/37] clk: hold information about the current cstate status
...nvkm_clk { int ustate_ac; /* user-requested (-1 disabled, -2 perfmon) */ int ustate_dc; /* user-requested (-1 disabled, -2 perfmon) */ int astate; /* perfmon adjustment (base) */ + struct nvkm_cstate *set_cstate; +#define NVKM_CLK_CSTATE_DEFAULT -1 +#define NVKM_CLK_CSTATE_BASE -2 +#define NVKM_CLK_CSTATE_HIGHEST -3 + int exp_cstate; bool allow_reclock; #define NVKM_CLK_BOOST_NONE 0x0 diff --git a/drm/nouveau/nvkm/subdev/clk/base.c b/drm/nouveau/nvkm/subdev/clk/base.c index 762dfe2..23f4cfe 100644 --- a/drm/nouveau/nvkm/subdev/clk/base.c +++ b/drm/nouveau/nvkm/subdev/clk/base.c @@ -152,9 +152,14 @@ sta...
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
2017 Oct 08
1
[RFC PATCH 08/29] clk: We should pass the pstate id around not the index in the list
...L; > } > > int > nvkm_clk_ustate(struct nvkm_clk *clk, int req, int pwr) > { > - int ret = nvkm_clk_ustate_update(clk, req); > - if (ret >= 0) { > - if (ret -= 2, pwr) clk->ustate_ac = ret; > - else clk->ustate_dc = ret; > - clk->exp_cstateid = NVKM_CLK_CSTATE_HIGHEST; > - return nvkm_clk_update(clk, true); > + struct nvkm_pstate *pstate; > + bool valid = false; Same here, don’t you need to check for `clk->allow_reclock`, as it was done in `nvkm_clk_ustate_update()`? > + > + list_for_each_entry(pstate, &clk->states, head) { > + if...
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
2017 Mar 05
0
[PATCH 5/9] clk: We should pass the pstate id around not the index in the list
...pstate == ret) + return ret; + } + return -EINVAL; } int nvkm_clk_ustate(struct nvkm_clk *clk, int req, int pwr) { - int ret = nvkm_clk_ustate_update(clk, req); - if (ret >= 0) { - if (ret -= 2, pwr) clk->ustate_ac = ret; - else clk->ustate_dc = ret; - clk->exp_cstateid = NVKM_CLK_CSTATE_HIGHEST; - return nvkm_clk_update(clk, true); + struct nvkm_pstate *pstate; + bool valid = false; + + list_for_each_entry(pstate, &clk->states, head) { + if (pstate->pstate == req) { + valid = true; + break; + } } - return ret; + + if (!valid) + return -EINVAL; + + if (pwr) + clk->u...
2017 Sep 15
0
[RFC PATCH 08/29] clk: We should pass the pstate id around not the index in the list
...pstate == ret) + return ret; + } + return -EINVAL; } int nvkm_clk_ustate(struct nvkm_clk *clk, int req, int pwr) { - int ret = nvkm_clk_ustate_update(clk, req); - if (ret >= 0) { - if (ret -= 2, pwr) clk->ustate_ac = ret; - else clk->ustate_dc = ret; - clk->exp_cstateid = NVKM_CLK_CSTATE_HIGHEST; - return nvkm_clk_update(clk, true); + struct nvkm_pstate *pstate; + bool valid = false; + + list_for_each_entry(pstate, &clk->states, head) { + if (pstate->pstate == req) { + valid = true; + break; + } } - return ret; + + if (!valid) + return -EINVAL; + + if (pwr) + clk->u...
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
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
2017 Oct 08
1
[RFC PATCH 06/29] clk: Make pstate a pointer to nvkm_pstate
.../clk.h b/drm/nouveau/include/nvkm/subdev/clk.h > index 1340f5b8..ec537e08 100644 > --- a/drm/nouveau/include/nvkm/subdev/clk.h > +++ b/drm/nouveau/include/nvkm/subdev/clk.h > @@ -10,6 +10,8 @@ struct nvkm_pll_vals; > #define NVKM_CLK_CSTATE_BASE -2 /* pstate base */ > #define NVKM_CLK_CSTATE_HIGHEST -3 /* highest possible */ > > +#define NVKM_CLK_PSTATE_DEFAULT -1 > + > enum nv_clk_src { > nv_clk_src_crystal, > nv_clk_src_href, > @@ -95,7 +97,7 @@ struct nvkm_clk { > > struct nvkm_notify pwrsrc_ntfy; > int pwrsrc; > - int pstate; /* current */ >...
2016 Apr 18
0
[PATCH v4 29/37] clk: we should pass the pstate id around not the index in the list
...nvkm_clk *clk, int req, int pwr) { - int ret = nvkm_clk_ustate_update(clk, req); + int ret = req; if (ret >= 0) { - if (ret -= 2, pwr) clk->ustate_ac = ret; - else clk->ustate_dc = ret; + if (pwr) clk->ustate_ac = ret; + else clk->ustate_dc = ret; clk->exp_cstate = NVKM_CLK_CSTATE_HIGHEST; return nvkm_clk_update(clk, true); } @@ -623,7 +602,7 @@ nvkm_clk_init(struct nvkm_subdev *subdev) if (clk->func->init) return clk->func->init(clk); - clk->astate = clk->state_nr - 1; + clk->astate = -1; clk->pstate = NULL; clk->exp_cstate = NVKM_CLK_CSTA...
2017 Mar 05
0
[PATCH 3/9] clk: Make pstate a pointer to nvkm_pstate
...rm/nouveau/include/nvkm/subdev/clk.h b/drm/nouveau/include/nvkm/subdev/clk.h index 69942b14..37263b7f 100644 --- a/drm/nouveau/include/nvkm/subdev/clk.h +++ b/drm/nouveau/include/nvkm/subdev/clk.h @@ -10,6 +10,8 @@ struct nvkm_pll_vals; #define NVKM_CLK_CSTATE_BASE -2 /* pstate base */ #define NVKM_CLK_CSTATE_HIGHEST -3 /* highest possible */ +#define NVKM_CLK_PSTATE_DEFAULT -1 + enum nv_clk_src { nv_clk_src_crystal, nv_clk_src_href, @@ -95,7 +97,7 @@ struct nvkm_clk { struct nvkm_notify pwrsrc_ntfy; int pwrsrc; - int pstate; /* current */ + struct nvkm_pstate *pstate; /* current */ int ustate_ac...
2017 Sep 15
0
[RFC PATCH 06/29] clk: Make pstate a pointer to nvkm_pstate
...rm/nouveau/include/nvkm/subdev/clk.h b/drm/nouveau/include/nvkm/subdev/clk.h index 1340f5b8..ec537e08 100644 --- a/drm/nouveau/include/nvkm/subdev/clk.h +++ b/drm/nouveau/include/nvkm/subdev/clk.h @@ -10,6 +10,8 @@ struct nvkm_pll_vals; #define NVKM_CLK_CSTATE_BASE -2 /* pstate base */ #define NVKM_CLK_CSTATE_HIGHEST -3 /* highest possible */ +#define NVKM_CLK_PSTATE_DEFAULT -1 + enum nv_clk_src { nv_clk_src_crystal, nv_clk_src_href, @@ -95,7 +97,7 @@ struct nvkm_clk { struct nvkm_notify pwrsrc_ntfy; int pwrsrc; - int pstate; /* current */ + struct nvkm_pstate *pstate; /* current */ int ustate_ac...
2016 Apr 07
29
[PATCH v3 00/29] Volting/Clocking improvements for Fermi and newer
This is an updated series for the old clocking improvement one. I think I got everything needed in place and also a simple update mechanism for updating the cstates/voltage on temperature changes. If anything is unclear how I REed or got the information, please leave a note so that I can provide additional information in the commits. Besides that I think we are pretty close now and only some
2016 Apr 18
63
[PATCH v4 00/37] Volting/Clocking improvements for Fermi and newer
We are slowly getting there! v4 of the series with some realy good improvements, so I am sure this is like 95% done and only needs some proper polishing and proper Reviews! I also added the NvVoltOffsetmV module parameter, so that a user is able to over and !under!-volt the GPU. Overvolting makes sense, when there are still some reclocking issues left, which might be solved by a higher voltage.
2017 Nov 17
35
[PATCH 00/32] Updated State of my clk patches
...re some fermi vbios with no boost or tdp entry debugfs: Wake up GPU before doing any reclocking therm: Split return code and value in nvkm_get_temp hwmon: Properly check for errors clk: Improve names of pstate/cstate related variables and fields clk: Add NVKM_CLK_PSTATE_BOOT clk: Rename NVKM_CLK_CSTATE_HIGHEST to NVKM_CLK_CSTATE_AUTO clk: Rename nvkm_clk.states to pstates clk: Rename nvkm_pstate.list to cstates clk: Remove dstate clk: Rename nvkm_pstate_calc to nvkm_clk_update and export it clk: Use list_for_each_entry_from_reverse in nvkm_cstate_find_best clk: We should pass the pstate id ar...
2016 Aug 16
21
[PATCH v5 00/20] Engine Reclocking Fixes for Fermi-Maxwell2
I've splitted my big series between the part which actually fixes the engine reclocking bits and the part handling voltage/clock updates on temperature change, so that the more reviewed parts can be merged in faster. This series fixes a lot of Engine reclocking issues found on Fermi, Kepler and all Maxwell generation GPUs. It does _not_ fix memory reclocking on Fermi. It mostly contains of