Displaying 20 results from an estimated 32 matches for "nvkm_clk_init".
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 Mar 05
0
[PATCH 8/9] clk: Set clocks to pre suspend state after suspend
The idea is to clear out the saved state, because after a resume we can't
know what the GPU is clocked to. The reclock is triggered by the call to
nvkm_clk_update later in nvkm_clk_init.
Signed-off-by: Karol Herbst <karolherbst at gmail.com>
Reviewed-by: Martin Peres <martin.peres at free.fr>
---
drm/nouveau/nvkm/subdev/clk/base.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/drm/nouveau/nvkm/subdev/clk/base.c b/drm/nouveau/nvkm/subdev/...
2017 Sep 15
0
[RFC PATCH 09/29] clk: Set clocks to pre suspend state after suspend
The idea is to clear out the saved state, because after a resume we can't
know what the GPU is clocked to. The reclock is triggered by the call to
nvkm_clk_update later in nvkm_clk_init.
v2: convert to C style comments
Signed-off-by: Karol Herbst <karolherbst at gmail.com>
Reviewed-by: Martin Peres <martin.peres at free.fr>
---
drm/nouveau/nvkm/subdev/clk/base.c | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/drm/nouveau/nvkm/subdev/cl...
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 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 Oct 08
1
[RFC PATCH 04/29] clk: Rename nvkm_pstate_calc to nvkm_clk_update and export it
..._of(notify, typeof(*clk), pwrsrc_ntfy);
> - nvkm_pstate_calc(clk, false);
> + nvkm_clk_update(clk, false);
> return NVKM_NOTIFY_DROP;
Same here as below, shouldn’t there be some error checking on what
`nvkm_clk_update()` returned, as it can fail?
> }
>
> @@ -618,7 +624,7 @@ nvkm_clk_init(struct nvkm_subdev *subdev)
> clk->dstate = 0;
> clk->pstate = -1;
> clk->temp = 90; /* reasonable default value */
> - nvkm_pstate_calc(clk, true);
> + nvkm_clk_update(clk, true);
> return 0;
`nvkm_pstate_calc()` did not return any error code, but `nvkm_clk_upda...
2016 Apr 20
2
[PATCH v4 27/37] clk: make pstate a pointer to nvkm_pstate
...gt;astate : pstate;
> } else {
> - pstate = clk->pstate = -1;
> + pstate = -1;
Isn't "clk->pstate = NULL;" missing here? Why did you change this code otherwise?
> }
>
> nvkm_trace(subdev, "-> %d\n", pstate);
> @@ -609,7 +613,7 @@ nvkm_clk_init(struct nvkm_subdev *subdev)
> return clk->func->init(clk);
>
> clk->astate = clk->state_nr - 1;
> - clk->pstate = -1;
> + clk->pstate = NULL;
> nvkm_clk_update(clk, true);
> return 0;
> }
> diff --git a/drm/nouveau/nvkm/subdev/pmu/gk20a...
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 Oct 08
1
[RFC PATCH 08/29] clk: We should pass the pstate id around not the index in the list
...+
> + if (!valid)
> + return -EINVAL;
> +
> + if (pwr)
> + clk->ustate_ac = req;
> + else
> + clk->ustate_dc = req;
> +
> + clk->exp_cstateid = NVKM_CLK_CSTATE_HIGHEST;
> + return nvkm_clk_update(clk, true);
> }
>
> int
> @@ -627,7 +625,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 = NVKM_CLK_PSTATE_DEFAULT;
> clk->pstate = NULL;
> clk->exp_cstateid = NVKM_CLK_CSTATE_DEFAULT;
>...
2017 Mar 05
0
[PATCH 2/9] clk: Remove dstate
...-{
- if (!rel) clk->dstate = req;
- if ( rel) clk->dstate += rel;
- clk->dstate = min(clk->dstate, clk->state_nr - 1);
- clk->dstate = max(clk->dstate, 0);
- return nvkm_clk_update(clk, true);
-}
-
static int
nvkm_clk_pwrsrc(struct nvkm_notify *notify)
{
@@ -621,7 +610,6 @@ nvkm_clk_init(struct nvkm_subdev *subdev)
return clk->func->init(clk);
clk->astate = clk->state_nr - 1;
- clk->dstate = 0;
clk->pstate = -1;
clk->temp = 90; /* reasonable default value */
nvkm_clk_update(clk, true);
--
2.12.0
2017 Sep 15
0
[RFC PATCH 05/29] clk: Remove dstate
...-{
- if (!rel) clk->dstate = req;
- if ( rel) clk->dstate += rel;
- clk->dstate = min(clk->dstate, clk->state_nr - 1);
- clk->dstate = max(clk->dstate, 0);
- return nvkm_clk_update(clk, true);
-}
-
static int
nvkm_clk_pwrsrc(struct nvkm_notify *notify)
{
@@ -621,7 +610,6 @@ nvkm_clk_init(struct nvkm_subdev *subdev)
return clk->func->init(clk);
clk->astate = clk->state_nr - 1;
- clk->dstate = 0;
clk->pstate = -1;
clk->temp = 90; /* reasonable default value */
nvkm_clk_update(clk, true);
--
2.14.1
2017 Oct 08
1
[RFC PATCH 06/29] clk: Make pstate a pointer to nvkm_pstate
...;-> %d\n", pstate);
> - if (pstate != clk->pstate) {
> + if (!clk->pstate || pstate != clk->pstate->pstate) {
> int ret = nvkm_pstate_prog(clk, pstate);
> if (ret) {
> nvkm_error(subdev, "error setting pstate %d: %d\n",
> @@ -610,7 +617,7 @@ nvkm_clk_init(struct nvkm_subdev *subdev)
> return clk->func->init(clk);
>
> clk->astate = clk->state_nr - 1;
> - clk->pstate = -1;
> + clk->pstate = NULL;
> clk->temp = 90; /* reasonable default value */
> nvkm_clk_update(clk, true);
> return 0;
> dif...
2016 Apr 18
0
[PATCH v4 25/37] clk: remove dstate and tstate
...-{
- if (!rel) clk->dstate = req;
- if ( rel) clk->dstate += rel;
- clk->dstate = min(clk->dstate, clk->state_nr - 1);
- clk->dstate = max(clk->dstate, 0);
- return nvkm_clk_update(clk, true);
-}
-
static int
nvkm_clk_pwrsrc(struct nvkm_notify *notify)
{
@@ -631,8 +609,6 @@ nvkm_clk_init(struct nvkm_subdev *subdev)
return clk->func->init(clk);
clk->astate = clk->state_nr - 1;
- clk->tstate = 0;
- clk->dstate = 0;
clk->pstate = -1;
nvkm_clk_update(clk, true);
return 0;
--
2.8.1
2016 Apr 18
0
[PATCH v4 29/37] clk: we should pass the pstate id around not the index in the list
...t 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_CSTATE_DEFAULT;
clk->set_cstate = NULL;
--
2.8.1
2017 Mar 05
0
[PATCH 1/9] clk: Rename nvkm_pstate_calc to nvkm_clk_update and export it
..._clk_update(clk, true);
}
static int
@@ -563,7 +569,7 @@ nvkm_clk_pwrsrc(struct nvkm_notify *notify)
{
struct nvkm_clk *clk =
container_of(notify, typeof(*clk), pwrsrc_ntfy);
- nvkm_pstate_calc(clk, false);
+ nvkm_clk_update(clk, false);
return NVKM_NOTIFY_DROP;
}
@@ -618,7 +624,7 @@ nvkm_clk_init(struct nvkm_subdev *subdev)
clk->dstate = 0;
clk->pstate = -1;
clk->temp = 90; /* reasonable default value */
- nvkm_pstate_calc(clk, true);
+ nvkm_clk_update(clk, true);
return 0;
}
@@ -675,7 +681,7 @@ nvkm_clk_ctor(const struct nvkm_clk_func *func, struct nvkm_device *device,...
2017 Sep 15
0
[RFC PATCH 04/29] clk: Rename nvkm_pstate_calc to nvkm_clk_update and export it
..._clk_update(clk, true);
}
static int
@@ -563,7 +569,7 @@ nvkm_clk_pwrsrc(struct nvkm_notify *notify)
{
struct nvkm_clk *clk =
container_of(notify, typeof(*clk), pwrsrc_ntfy);
- nvkm_pstate_calc(clk, false);
+ nvkm_clk_update(clk, false);
return NVKM_NOTIFY_DROP;
}
@@ -618,7 +624,7 @@ nvkm_clk_init(struct nvkm_subdev *subdev)
clk->dstate = 0;
clk->pstate = -1;
clk->temp = 90; /* reasonable default value */
- nvkm_pstate_calc(clk, true);
+ nvkm_clk_update(clk, true);
return 0;
}
@@ -675,7 +681,7 @@ nvkm_clk_ctor(const struct nvkm_clk_func *func, struct nvkm_device *device,...
2016 Apr 20
1
[PATCH v4 25/37] clk: remove dstate and tstate
...) clk->dstate += rel;
> - clk->dstate = min(clk->dstate, clk->state_nr - 1);
> - clk->dstate = max(clk->dstate, 0);
> - return nvkm_clk_update(clk, true);
> -}
> -
> static int
> nvkm_clk_pwrsrc(struct nvkm_notify *notify)
> {
> @@ -631,8 +609,6 @@ nvkm_clk_init(struct nvkm_subdev *subdev)
> return clk->func->init(clk);
>
> clk->astate = clk->state_nr - 1;
> - clk->tstate = 0;
> - clk->dstate = 0;
> clk->pstate = -1;
> nvkm_clk_update(clk, true);
> return 0;
2016 Apr 18
0
[PATCH v4 28/37] clk: hold information about the current cstate status
...e(struct nvkm_clk *clk, int req, int rel, bool wait)
if ( rel) clk->astate += rel;
clk->astate = min(clk->astate, clk->state_nr - 1);
clk->astate = max(clk->astate, 0);
+ clk->exp_cstate = NVKM_CLK_CSTATE_BASE;
return nvkm_clk_update(clk, wait);
}
@@ -614,6 +625,8 @@ nvkm_clk_init(struct nvkm_subdev *subdev)
clk->astate = clk->state_nr - 1;
clk->pstate = NULL;
+ clk->exp_cstate = NVKM_CLK_CSTATE_DEFAULT;
+ clk->set_cstate = NULL;
nvkm_clk_update(clk, true);
return 0;
}
@@ -698,15 +711,20 @@ nvkm_clk_ctor(const struct nvkm_clk_func *func, struct nvkm...
2016 Apr 18
0
[PATCH v4 35/37] clk: set clocks to pre suspend state after suspend
...ic void
@@ -360,7 +360,7 @@ nvkm_clk_update_work(struct work_struct *work)
if (!atomic_xchg(&clk->waiting, 0))
return;
- nvkm_clk_update_impl(clk);
+ nvkm_clk_update_impl(clk, false);
wake_up_all(&clk->wait);
nvkm_notify_get(&clk->pwrsrc_ntfy);
@@ -613,11 +613,7 @@ nvkm_clk_init(struct nvkm_subdev *subdev)
if (clk->func->init)
return clk->func->init(clk);
- clk->astate = -1;
- clk->pstate = NULL;
- clk->exp_cstate = NVKM_CLK_CSTATE_DEFAULT;
- clk->set_cstate = NULL;
- nvkm_clk_update(clk, true);
+ nvkm_clk_update_impl(clk, true);
return 0;...
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