search for: pstatei

Displaying 20 results from an estimated 53 matches for "pstatei".

Did you mean: pstate
2017 Oct 08
1
[RFC PATCH 06/29] clk: Make pstate a pointer to nvkm_pstate
...E_DISABLE; > diff --git a/drm/nouveau/nvkm/subdev/clk/base.c b/drm/nouveau/nvkm/subdev/clk/base.c > index 07d530ed..0d4d9fdf 100644 > --- a/drm/nouveau/nvkm/subdev/clk/base.c > +++ b/drm/nouveau/nvkm/subdev/clk/base.c > @@ -271,13 +271,16 @@ nvkm_pstate_prog(struct nvkm_clk *clk, int pstatei) > struct nvkm_pstate *pstate; > int ret, idx = 0; > > + if (pstatei == NVKM_CLK_PSTATE_DEFAULT) > + return 0; > + > list_for_each_entry(pstate, &clk->states, head) { > if (idx++ == pstatei) > break; > } > > nvkm_debug(subdev, "s...
2023 Mar 01
5
[PATCH 0/2] drm/nouveau: avoid usage of list iterator after loop
This patch set includes two instances where the list iterator variable 'pstate' is implicitly assumed to be valid after the iterator loop. While in pratice that is most likely the case (if 'pstatei'/'args->v0.state' is <= the elements in clk->states), we should explicitly only allow 'pstate' to always point to correct 'nvkm_pstate' structs. That allows catching potential bugs with BUG_ON(!pstate) that otherwise would be completely undetectable. It also h...
2017 Oct 08
1
[RFC PATCH 08/29] clk: We should pass the pstate id around not the index in the list
...veau/nvkm/subdev/clk/base.c > @@ -272,23 +272,26 @@ nvkm_cstate_new(struct nvkm_clk *clk, int idx, struct nvkm_pstate *pstate) > * P-States > *****************************************************************************/ > static int > -nvkm_pstate_prog(struct nvkm_clk *clk, int pstatei) > +nvkm_pstate_prog(struct nvkm_clk *clk, int pstateid) > { > struct nvkm_subdev *subdev = &clk->subdev; > struct nvkm_fb *fb = subdev->device->fb; > struct nvkm_pci *pci = subdev->device->pci; > struct nvkm_pstate *pstate; > - int ret, idx = 0; &gt...
2016 Apr 18
0
[PATCH v4 22/37] clk: rename nvkm_pstate_calc to nvkm_clk_update
...int, struct nvkm_clk **); diff --git a/drm/nouveau/nvkm/subdev/clk/base.c b/drm/nouveau/nvkm/subdev/clk/base.c index 1ca25dd..bfc6a49 100644 --- a/drm/nouveau/nvkm/subdev/clk/base.c +++ b/drm/nouveau/nvkm/subdev/clk/base.c @@ -274,11 +274,14 @@ static int nvkm_pstate_prog(struct nvkm_clk *clk, int pstatei) { struct nvkm_subdev *subdev = &clk->subdev; - struct nvkm_ram *ram = subdev->device->fb->ram; + struct nvkm_fb *fb = subdev->device->fb; struct nvkm_pci *pci = subdev->device->pci; struct nvkm_pstate *pstate; int ret, idx = 0; + if (pstatei == -1) + return...
2017 Mar 05
0
[PATCH 3/9] clk: Make pstate a pointer to nvkm_pstate
...TROL_PSTATE_INFO_V0_USTATE_DISABLE; diff --git a/drm/nouveau/nvkm/subdev/clk/base.c b/drm/nouveau/nvkm/subdev/clk/base.c index 07d530ed..0d4d9fdf 100644 --- a/drm/nouveau/nvkm/subdev/clk/base.c +++ b/drm/nouveau/nvkm/subdev/clk/base.c @@ -271,13 +271,16 @@ nvkm_pstate_prog(struct nvkm_clk *clk, int pstatei) struct nvkm_pstate *pstate; int ret, idx = 0; + if (pstatei == NVKM_CLK_PSTATE_DEFAULT) + return 0; + list_for_each_entry(pstate, &clk->states, head) { if (idx++ == pstatei) break; } nvkm_debug(subdev, "setting performance state %d\n", pstatei); - clk->pst...
2017 Sep 15
0
[RFC PATCH 06/29] clk: Make pstate a pointer to nvkm_pstate
...TROL_PSTATE_INFO_V0_USTATE_DISABLE; diff --git a/drm/nouveau/nvkm/subdev/clk/base.c b/drm/nouveau/nvkm/subdev/clk/base.c index 07d530ed..0d4d9fdf 100644 --- a/drm/nouveau/nvkm/subdev/clk/base.c +++ b/drm/nouveau/nvkm/subdev/clk/base.c @@ -271,13 +271,16 @@ nvkm_pstate_prog(struct nvkm_clk *clk, int pstatei) struct nvkm_pstate *pstate; int ret, idx = 0; + if (pstatei == NVKM_CLK_PSTATE_DEFAULT) + return 0; + list_for_each_entry(pstate, &clk->states, head) { if (idx++ == pstatei) break; } nvkm_debug(subdev, "setting performance state %d\n", pstatei); - clk->pst...
2016 Apr 20
2
[PATCH v4 27/37] clk: make pstate a pointer to nvkm_pstate
...STATE_DISABLE; > diff --git a/drm/nouveau/nvkm/subdev/clk/base.c b/drm/nouveau/nvkm/subdev/clk/base.c > index 3867ab7..762dfe2 100644 > --- a/drm/nouveau/nvkm/subdev/clk/base.c > +++ b/drm/nouveau/nvkm/subdev/clk/base.c > @@ -288,7 +288,7 @@ nvkm_pstate_prog(struct nvkm_clk *clk, 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_upd...
2016 Apr 18
0
[PATCH v4 29/37] clk: we should pass the pstate id around not the index in the list
.../clk/base.c +++ b/drm/nouveau/nvkm/subdev/clk/base.c @@ -280,23 +280,26 @@ nvkm_cstate_new(struct nvkm_clk *clk, int idx, struct nvkm_pstate *pstate) * P-States *****************************************************************************/ static int -nvkm_pstate_prog(struct nvkm_clk *clk, int pstatei) +nvkm_pstate_prog(struct nvkm_clk *clk, int pstateid) { struct nvkm_subdev *subdev = &clk->subdev; struct nvkm_fb *fb = subdev->device->fb; struct nvkm_pci *pci = subdev->device->pci; struct nvkm_pstate *pstate; - int ret, idx = 0; + int ret; - if (pstatei == -1) + if...
2017 Mar 05
0
[PATCH 5/9] clk: We should pass the pstate id around not the index in the list
.../clk/base.c +++ b/drm/nouveau/nvkm/subdev/clk/base.c @@ -272,23 +272,26 @@ nvkm_cstate_new(struct nvkm_clk *clk, int idx, struct nvkm_pstate *pstate) * P-States *****************************************************************************/ static int -nvkm_pstate_prog(struct nvkm_clk *clk, int pstatei) +nvkm_pstate_prog(struct nvkm_clk *clk, int pstateid) { struct nvkm_subdev *subdev = &clk->subdev; struct nvkm_fb *fb = subdev->device->fb; struct nvkm_pci *pci = subdev->device->pci; struct nvkm_pstate *pstate; - int ret, idx = 0; + int ret; - if (pstatei == NVKM_CLK...
2017 Sep 15
0
[RFC PATCH 08/29] clk: We should pass the pstate id around not the index in the list
.../clk/base.c +++ b/drm/nouveau/nvkm/subdev/clk/base.c @@ -272,23 +272,26 @@ nvkm_cstate_new(struct nvkm_clk *clk, int idx, struct nvkm_pstate *pstate) * P-States *****************************************************************************/ static int -nvkm_pstate_prog(struct nvkm_clk *clk, int pstatei) +nvkm_pstate_prog(struct nvkm_clk *clk, int pstateid) { struct nvkm_subdev *subdev = &clk->subdev; struct nvkm_fb *fb = subdev->device->fb; struct nvkm_pci *pci = subdev->device->pci; struct nvkm_pstate *pstate; - int ret, idx = 0; + int ret; - if (pstatei == NVKM_CLK...
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
2019 Sep 17
2
[PATCH v4 3/4] pci: set the pcie link speed to 8.0 when suspending
...rm_dev)) { > diff --git a/drm/nouveau/nvkm/subdev/clk/base.c b/drm/nouveau/nvkm/subdev/clk/base.c > index ba6a868d4..e30e77453 100644 > --- a/drm/nouveau/nvkm/subdev/clk/base.c > +++ b/drm/nouveau/nvkm/subdev/clk/base.c > @@ -277,7 +277,7 @@ nvkm_pstate_prog(struct nvkm_clk *clk, int pstatei) > nvkm_debug(subdev, "setting performance state %d\n", pstatei); > clk->pstate = pstatei; > > - nvkm_pcie_set_link(pci, pstate->pcie_speed, pstate->pcie_width); > + nvkm_pcie_set_link(pci, pstate->pcie_speed, pstate->pcie_width, t...
2016 Mar 21
0
[PATCH v2 20/22] clk: add nvkm_clk_reclock function
...vkm_device *, int, struct nvkm_clk **); diff --git a/drm/nouveau/nvkm/subdev/clk/base.c b/drm/nouveau/nvkm/subdev/clk/base.c index 2d16e9c..7a8451e 100644 --- a/drm/nouveau/nvkm/subdev/clk/base.c +++ b/drm/nouveau/nvkm/subdev/clk/base.c @@ -264,6 +264,9 @@ nvkm_pstate_prog(struct nvkm_clk *clk, int pstatei) struct nvkm_pstate *pstate; int ret, idx = 0; + if (pstatei == -1) + return 0; + list_for_each_entry(pstate, &clk->states, head) { if (idx++ == pstatei) break; @@ -292,7 +295,7 @@ nvkm_pstate_work(struct work_struct *work) { struct nvkm_clk *clk = container_of(work, typeo...
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
2019 Sep 17
2
[PATCH v4 3/4] pci: set the pcie link speed to 8.0 when suspending
.../nvkm/subdev/clk/base.c b/drm/nouveau/nvkm/subdev/clk/base.c > > > index ba6a868d4..e30e77453 100644 > > > --- a/drm/nouveau/nvkm/subdev/clk/base.c > > > +++ b/drm/nouveau/nvkm/subdev/clk/base.c > > > @@ -277,7 +277,7 @@ nvkm_pstate_prog(struct nvkm_clk *clk, int pstatei) > > > nvkm_debug(subdev, "setting performance state %d\n", pstatei); > > > clk->pstate = pstatei; > > > > > > - nvkm_pcie_set_link(pci, pstate->pcie_speed, pstate->pcie_width); > > > + nvkm_pcie_set_link(pc...
2016 Apr 18
0
[PATCH v4 27/37] clk: make pstate a pointer to nvkm_pstate
..._CONTROL_PSTATE_INFO_V0_USTATE_DISABLE; diff --git a/drm/nouveau/nvkm/subdev/clk/base.c b/drm/nouveau/nvkm/subdev/clk/base.c index 3867ab7..762dfe2 100644 --- a/drm/nouveau/nvkm/subdev/clk/base.c +++ b/drm/nouveau/nvkm/subdev/clk/base.c @@ -288,7 +288,7 @@ nvkm_pstate_prog(struct nvkm_clk *clk, 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...
2016 Apr 20
0
[PATCH v4 27/37] clk: make pstate a pointer to nvkm_pstate
...--git a/drm/nouveau/nvkm/subdev/clk/base.c >> b/drm/nouveau/nvkm/subdev/clk/base.c >> index 3867ab7..762dfe2 100644 >> --- a/drm/nouveau/nvkm/subdev/clk/base.c >> +++ b/drm/nouveau/nvkm/subdev/clk/base.c >> @@ -288,7 +288,7 @@ nvkm_pstate_prog(struct nvkm_clk *clk, 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); >> @@ -3...
2019 Sep 13
8
[PATCH v4 0/4] add PCIe workaround to fix runpm on laptops
not much changed since the last time I sent those patches out, but there are a couple of annoying bug fixes, which users would probably never hit unless they do rmmod/modprobe nouveau cycles. Biggest change is that I force the link to a 8.0 speed rather than the speed the GPU came up with. Also this series depends on the PCIe improvement patches I sent out recently. Karol Herbst (4): pci:
2019 Sep 13
0
[PATCH v4 3/4] pci: set the pcie link speed to 8.0 when suspending
...->dev); if (IS_ERR(drm_dev)) { diff --git a/drm/nouveau/nvkm/subdev/clk/base.c b/drm/nouveau/nvkm/subdev/clk/base.c index ba6a868d4..e30e77453 100644 --- a/drm/nouveau/nvkm/subdev/clk/base.c +++ b/drm/nouveau/nvkm/subdev/clk/base.c @@ -277,7 +277,7 @@ nvkm_pstate_prog(struct nvkm_clk *clk, int pstatei) nvkm_debug(subdev, "setting performance state %d\n", pstatei); clk->pstate = pstatei; - nvkm_pcie_set_link(pci, pstate->pcie_speed, pstate->pcie_width); + nvkm_pcie_set_link(pci, pstate->pcie_speed, pstate->pcie_width, true); if (fb && fb->ram &&am...