Displaying 20 results from an estimated 34 matches for "nvkm_clk_update_work".
2016 Apr 18
0
[PATCH v4 30/37] clk: seperate the locking from the implementation in nvkm_clk_update
...ions(-)
diff --git a/drm/nouveau/nvkm/subdev/clk/base.c b/drm/nouveau/nvkm/subdev/clk/base.c
index 7f86e41..d6f239f 100644
--- a/drm/nouveau/nvkm/subdev/clk/base.c
+++ b/drm/nouveau/nvkm/subdev/clk/base.c
@@ -319,14 +319,11 @@ nvkm_pstate_prog(struct nvkm_clk *clk, int pstateid)
}
static void
-nvkm_clk_update_work(struct work_struct *work)
+nvkm_clk_update_impl(struct nvkm_clk *clk)
{
- struct nvkm_clk *clk = container_of(work, typeof(*clk), work);
struct nvkm_subdev *subdev = &clk->subdev;
int pstate, ret;
- if (!atomic_xchg(&clk->waiting, 0))
- return;
clk->pwrsrc = power_supply_...
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 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 Oct 08
1
[RFC PATCH 04/29] clk: Rename nvkm_pstate_calc to nvkm_clk_update and export it
...ase.c
> index e4c8d310..ecff3ff3 100644
> --- a/drm/nouveau/nvkm/subdev/clk/base.c
> +++ b/drm/nouveau/nvkm/subdev/clk/base.c
> @@ -296,7 +296,7 @@ nvkm_pstate_prog(struct nvkm_clk *clk, int pstatei)
> }
>
> static void
> -nvkm_pstate_work(struct work_struct *work)
> +nvkm_clk_update_work(struct work_struct *work)
> {
> struct nvkm_clk *clk = container_of(work, typeof(*clk), work);
> struct nvkm_subdev *subdev = &clk->subdev;
> @@ -332,9 +332,15 @@ nvkm_pstate_work(struct work_struct *work)
> nvkm_notify_get(&clk->pwrsrc_ntfy);
> }
>
>...
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
0
[PATCH 9/9] clk: Check pm_runtime status before reclocking
...bdev/clk/base.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/drm/nouveau/nvkm/subdev/clk/base.c b/drm/nouveau/nvkm/subdev/clk/base.c
index bc65906e..143ce0ea 100644
--- a/drm/nouveau/nvkm/subdev/clk/base.c
+++ b/drm/nouveau/nvkm/subdev/clk/base.c
@@ -320,6 +320,7 @@ nvkm_clk_update_work(struct work_struct *work)
{
struct nvkm_clk *clk = container_of(work, typeof(*clk), work);
struct nvkm_subdev *subdev = &clk->subdev;
+ struct device *dev = subdev->device->dev;
int pstate;
if (!atomic_xchg(&clk->waiting, 0))
@@ -345,7 +346,14 @@ nvkm_clk_update_work(...
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 06/29] clk: Make pstate a pointer to nvkm_pstate
...tei)
> break;
> }
>
> nvkm_debug(subdev, "setting performance state %d\n", pstatei);
> - clk->pstate = pstatei;
> + clk->pstate = pstate;
>
> nvkm_pcie_set_link(pci, pstate->pcie_speed, pstate->pcie_width);
>
> @@ -306,8 +309,12 @@ nvkm_clk_update_work(struct work_struct *work)
> return;
> clk->pwrsrc = power_supply_is_system_supplied();
>
> + if (clk->pstate)
> + pstate = clk->pstate->pstate;
> + else
> + pstate = NVKM_CLK_PSTATE_DEFAULT;
> nvkm_trace(subdev, "P %d PWR %d U(AC) %d U(DC) %d A %d...
2017 Mar 05
0
[PATCH 1/9] clk: Rename nvkm_pstate_calc to nvkm_clk_update and export it
...ev/clk/base.c b/drm/nouveau/nvkm/subdev/clk/base.c
index e4c8d310..ecff3ff3 100644
--- a/drm/nouveau/nvkm/subdev/clk/base.c
+++ b/drm/nouveau/nvkm/subdev/clk/base.c
@@ -296,7 +296,7 @@ nvkm_pstate_prog(struct nvkm_clk *clk, int pstatei)
}
static void
-nvkm_pstate_work(struct work_struct *work)
+nvkm_clk_update_work(struct work_struct *work)
{
struct nvkm_clk *clk = container_of(work, typeof(*clk), work);
struct nvkm_subdev *subdev = &clk->subdev;
@@ -332,9 +332,15 @@ nvkm_pstate_work(struct work_struct *work)
nvkm_notify_get(&clk->pwrsrc_ntfy);
}
-static int
-nvkm_pstate_calc(struct nv...
2017 Sep 15
0
[RFC PATCH 04/29] clk: Rename nvkm_pstate_calc to nvkm_clk_update and export it
...ev/clk/base.c b/drm/nouveau/nvkm/subdev/clk/base.c
index e4c8d310..ecff3ff3 100644
--- a/drm/nouveau/nvkm/subdev/clk/base.c
+++ b/drm/nouveau/nvkm/subdev/clk/base.c
@@ -296,7 +296,7 @@ nvkm_pstate_prog(struct nvkm_clk *clk, int pstatei)
}
static void
-nvkm_pstate_work(struct work_struct *work)
+nvkm_clk_update_work(struct work_struct *work)
{
struct nvkm_clk *clk = container_of(work, typeof(*clk), work);
struct nvkm_subdev *subdev = &clk->subdev;
@@ -332,9 +332,15 @@ nvkm_pstate_work(struct work_struct *work)
nvkm_notify_get(&clk->pwrsrc_ntfy);
}
-static int
-nvkm_pstate_calc(struct nv...
2016 Apr 18
0
[PATCH v4 35/37] clk: set clocks to pre suspend state after suspend
...lk *clk, bool force)
{
struct nvkm_subdev *subdev = &clk->subdev;
int pstate;
@@ -349,7 +349,7 @@ nvkm_clk_update_impl(struct nvkm_clk *clk)
pstate = -1;
}
- clk->func->update(clk, pstate);
+ clk->func->update(clk, pstate, force);
}
static 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 (...
2016 Apr 18
0
[PATCH v4 22/37] clk: rename nvkm_pstate_calc to nvkm_clk_update
...>func->calc) {
+ struct nvkm_ram *ram = fb->ram;
int khz = pstate->base.domain[nv_clk_src_mem];
do {
ret = ram->func->calc(ram, khz);
@@ -303,11 +307,11 @@ nvkm_pstate_prog(struct nvkm_clk *clk, int pstatei)
}
static void
-nvkm_pstate_work(struct work_struct *work)
+nvkm_clk_update_work(struct work_struct *work)
{
struct nvkm_clk *clk = container_of(work, typeof(*clk), work);
struct nvkm_subdev *subdev = &clk->subdev;
- int pstate;
+ int pstate, ret;
if (!atomic_xchg(&clk->waiting, 0))
return;
@@ -327,21 +331,25 @@ nvkm_pstate_work(struct work_struct *wor...
2017 Mar 05
0
[PATCH 3/9] clk: Make pstate a pointer to nvkm_pstate
...&clk->states, head) {
if (idx++ == pstatei)
break;
}
nvkm_debug(subdev, "setting performance state %d\n", pstatei);
- clk->pstate = pstatei;
+ clk->pstate = pstate;
nvkm_pcie_set_link(pci, pstate->pcie_speed, pstate->pcie_width);
@@ -306,8 +309,12 @@ nvkm_clk_update_work(struct work_struct *work)
return;
clk->pwrsrc = power_supply_is_system_supplied();
+ if (clk->pstate)
+ pstate = clk->pstate->pstate;
+ else
+ pstate = NVKM_CLK_PSTATE_DEFAULT;
nvkm_trace(subdev, "P %d PWR %d U(AC) %d U(DC) %d A %d T %d°C\n",
- clk->pstate, c...
2017 Sep 15
0
[RFC PATCH 06/29] clk: Make pstate a pointer to nvkm_pstate
...&clk->states, head) {
if (idx++ == pstatei)
break;
}
nvkm_debug(subdev, "setting performance state %d\n", pstatei);
- clk->pstate = pstatei;
+ clk->pstate = pstate;
nvkm_pcie_set_link(pci, pstate->pcie_speed, pstate->pcie_width);
@@ -306,8 +309,12 @@ nvkm_clk_update_work(struct work_struct *work)
return;
clk->pwrsrc = power_supply_is_system_supplied();
+ if (clk->pstate)
+ pstate = clk->pstate->pstate;
+ else
+ pstate = NVKM_CLK_PSTATE_DEFAULT;
nvkm_trace(subdev, "P %d PWR %d U(AC) %d U(DC) %d A %d T %d°C\n",
- clk->pstate, c...
2016 Apr 20
2
[PATCH v4 27/37] clk: make pstate a pointer to nvkm_pstate
...int pstatei)
> }
>
> nvkm_debug(subdev, "setting performance state %d\n", pstatei);
> - clk->pstate = pstatei;
> + clk->pstate = pstate;
>
> nvkm_pcie_set_link(pci, pstate->pcie_speed, pstate->pcie_width);
>
> @@ -317,15 +317,19 @@ nvkm_clk_update_work(struct work_struct *work)
> return;
> clk->pwrsrc = power_supply_is_system_supplied();
>
> + if (clk->pstate)
> + pstate = clk->pstate->pstate;
> + else
> + pstate = -1;
> nvkm_trace(subdev, "P %d PWR %d U(AC) %d U(DC) %d A %d\n",
> -...
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 08/29] clk: We should pass the pstate id around not the index in the list
...ate %d\n", pstatei);
> + if (!pstate)
> + return -EINVAL;
> +
> + nvkm_debug(subdev, "setting performance state %x\n", pstateid);
> clk->pstate = pstate;
>
> nvkm_pcie_set_link(pci, pstate->pcie_speed, pstate->pcie_width);
> @@ -329,7 +332,6 @@ nvkm_clk_update_work(struct work_struct *work)
> pstate = clk->pwrsrc ? clk->ustate_ac : clk->ustate_dc;
> if (clk->state_nr && pstate != -1) {
> pstate = (pstate < 0) ? clk->astate : pstate;
> - pstate = min(pstate, clk->state_nr - 1);
> } else {
> pstate = N...
2017 Mar 05
0
[PATCH 8/9] clk: Set clocks to pre suspend state after suspend
...ins = func->domains;
+
+ clk->astate = NVKM_CLK_PSTATE_DEFAULT;
clk->ustate_ac = -1;
clk->ustate_dc = -1;
+ clk->exp_cstateid = NVKM_CLK_CSTATE_DEFAULT;
+ clk->temp = 90; /* reasonable default value */
+
clk->allow_reclock = allow_reclock;
INIT_WORK(&clk->work, nvkm_clk_update_work);
--
2.12.0
2017 Sep 15
0
[RFC PATCH 09/29] clk: Set clocks to pre suspend state after suspend
...ins = func->domains;
+
+ clk->astate = NVKM_CLK_PSTATE_DEFAULT;
clk->ustate_ac = -1;
clk->ustate_dc = -1;
+ clk->exp_cstateid = NVKM_CLK_CSTATE_DEFAULT;
+ clk->temp = 90; /* reasonable default value */
+
clk->allow_reclock = allow_reclock;
INIT_WORK(&clk->work, nvkm_clk_update_work);
--
2.14.1
2017 Mar 05
0
[PATCH 2/9] clk: Remove dstate
...k *, u8 temperature);
int nvkm_clk_update(struct nvkm_clk *clk, bool wait);
diff --git a/drm/nouveau/nvkm/subdev/clk/base.c b/drm/nouveau/nvkm/subdev/clk/base.c
index ecff3ff3..07d530ed 100644
--- a/drm/nouveau/nvkm/subdev/clk/base.c
+++ b/drm/nouveau/nvkm/subdev/clk/base.c
@@ -306,15 +306,14 @@ nvkm_clk_update_work(struct work_struct *work)
return;
clk->pwrsrc = power_supply_is_system_supplied();
- nvkm_trace(subdev, "P %d PWR %d U(AC) %d U(DC) %d A %d T %d°C D %d\n",
+ nvkm_trace(subdev, "P %d PWR %d U(AC) %d U(DC) %d A %d T %d°C\n",
clk->pstate, clk->pwrsrc, clk->...