search for: nvkm_cstate_valid

Displaying 20 results from an estimated 28 matches for "nvkm_cstate_valid".

2018 Mar 27
2
[PATCH] gpu: drm: nouveau: Use list_for_each_entry_from_reverse
...2,12 @@ nvkm_cstate_find_best(struct nvkm_clk *clk, struct nvkm_pstate *pstate, max_volt = min(max_volt, nvkm_volt_map(volt, volt->max2_id, clk->temp)); - for (cstate = start; &cstate->head != &pstate->list; - cstate = list_prev_entry(cstate, head)) { - if (nvkm_cstate_valid(clk, cstate, max_volt, clk->temp)) + list_for_each_entry_from_reverse(start, &pstate->list, head) { + if (nvkm_cstate_valid(clk, start, max_volt, clk->temp)) break; } - return cstate; + return start; } static struct nvkm_cstate * -- 2.7.4
2018 Mar 26
2
[PATCH v2 2/2] gpu: drm: nouveau: Use list_{next/prev}_entry instead of list_entry
...map(volt, volt->max2_id, clk->temp)); > > for (cstate = start; &cstate->head != &pstate->list; > - cstate = list_entry(cstate->head.prev, typeof(*cstate), head)) { > + cstate = list_prev_entry(cstate, head)) { > if (nvkm_cstate_valid(clk, cstate, max_volt, clk->temp)) > break; > } > -- > 2.7.4 >
2018 Mar 27
0
[PATCH] gpu: drm: nouveau: Use list_for_each_entry_from_reverse
...max_volt = min(max_volt, > nvkm_volt_map(volt, volt->max2_id, clk->temp)); > > - for (cstate = start; &cstate->head != &pstate->list; > - cstate = list_prev_entry(cstate, head)) { > - if (nvkm_cstate_valid(clk, cstate, max_volt, clk->temp)) > + list_for_each_entry_from_reverse(start, &pstate->list, head) { > + if (nvkm_cstate_valid(clk, start, max_volt, clk->temp)) > break; > } > > - return cstate; > + r...
2018 Mar 27
0
[PATCH v2] gpu: drm: nouveau: Use list_for_each_entry_from_reverse
...4 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/clk/base.c b/drivers/gpu/drm/nouveau/nvkm/subdev/clk/base.c index 81c3567..ba6a868 100644 --- a/drivers/gpu/drm/nouveau/nvkm/subdev/clk/base.c +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/clk/base.c @@ -109,18 +109,17 @@ nvkm_cstate_valid(struct nvkm_clk *clk, struct nvkm_cstate *cstate, static struct nvkm_cstate * nvkm_cstate_find_best(struct nvkm_clk *clk, struct nvkm_pstate *pstate, - struct nvkm_cstate *start) + struct nvkm_cstate *cstate) { struct nvkm_device *device = clk->subdev.device; struct nvkm_v...
2018 Mar 19
4
[PATCH] gpu: drm: Use list_{next/prev}_entry instead of list_entry
...clk, struct nvkm_pstate *pstate, nvkm_volt_map(volt, volt->max2_id, clk->temp)); for (cstate = start; &cstate->head != &pstate->list; - cstate = list_entry(cstate->head.prev, typeof(*cstate), head)) { + cstate = list_prev_entry(cstate, head)) { if (nvkm_cstate_valid(clk, cstate, max_volt, clk->temp)) break; } -- 2.7.4
2016 Apr 18
0
[PATCH v4 13/37] clk: respect voltage limits in nvkm_cstate_prog
...+++ b/drm/nouveau/nvkm/subdev/clk/base.c @@ -74,6 +74,78 @@ nvkm_clk_adjust(struct nvkm_clk *clk, bool adjust, /****************************************************************************** * C-States *****************************************************************************/ +static bool +nvkm_cstate_valid(struct nvkm_clk *clk, struct nvkm_cstate *cstate, u32 max_volt, int temp) +{ + struct nvkm_volt *volt = clk->subdev.device->volt; + int voltage; + + if (!volt) + return true; + + voltage = nvkm_volt_map(volt, cstate->voltage, temp); + if (voltage < 0) + return false; + return voltage...
2016 Apr 18
0
[PATCH v4 15/37] clk: allow boosting only when NvBoost is set
0: base clock from the vbios is max clock 1: boost only to boost clock from the vbios (default) 2: boost to max clock available v2: moved into nvkm_cstate_valid v4: check the existence of the clocks before limiting Signed-off-by: Karol Herbst <nouveau at karolherbst.de> Reviewed-by: Martin Peres <martin.peres at free.fr> --- drm/nouveau/include/nvkm/subdev/clk.h | 9 ++++++++- drm/nouveau/nvkm/subdev/clk/base.c | 33 ++++++++++++++++++++++...
2018 Mar 25
4
[PATCH v2 0/2] drm: Replace list_entry
Replace list_entry with list_{next/prev}_entry. Arushi Singhal (2): gpu: drm/lease:: Use list_{next/prev}_entry instead of list_entry gpu: drm: nouveau: Use list_{next/prev}_entry instead of list_entry drivers/gpu/drm/drm_lease.c | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/clk/base.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) -- changes in v2 *All the
2018 Mar 25
2
[Outreachy kernel] [PATCH] gpu: drm: Use list_{next/prev}_entry instead of list_entry
...> clk->temp)); > > > > for (cstate = start; &cstate->head != &pstate->list; > > - cstate = list_entry(cstate->head.prev, typeof(*cstate), > head)) { > > + cstate = list_prev_entry(cstate, head)) { > > if (nvkm_cstate_valid(clk, cstate, max_volt, clk->temp)) > > break; > > } > > -- > > 2.7.4 > > > > -- > > You received this message because you are subscribed to the Google > Groups "outreachy-kernel" group. > > To unsubscribe fr...
2018 Mar 25
0
[PATCH v2 2/2] gpu: drm: nouveau: Use list_{next/prev}_entry instead of list_entry
...clk, struct nvkm_pstate *pstate, nvkm_volt_map(volt, volt->max2_id, clk->temp)); for (cstate = start; &cstate->head != &pstate->list; - cstate = list_entry(cstate->head.prev, typeof(*cstate), head)) { + cstate = list_prev_entry(cstate, head)) { if (nvkm_cstate_valid(clk, cstate, max_volt, clk->temp)) break; } -- 2.7.4
2018 Mar 26
0
[PATCH v2 2/2] gpu: drm: nouveau: Use list_{next/prev}_entry instead of list_entry
....prev, typeof(*cstate), head)) { > > + cstate = list_prev_entry(cstate, head)) { This loop could be written as: cstate = start; /* cstate looks redundant here, just use start? */ list_for_each_entry_from_reverse(cstate, &pstate->list, head) > > if (nvkm_cstate_valid(clk, cstate, max_volt, clk->temp)) > > break; > > } > > -- > > 2.7.4
2018 Mar 19
0
[Outreachy kernel] [PATCH] gpu: drm: Use list_{next/prev}_entry instead of list_entry
...e, > nvkm_volt_map(volt, volt->max2_id, clk->temp)); > > for (cstate = start; &cstate->head != &pstate->list; > - cstate = list_entry(cstate->head.prev, typeof(*cstate), head)) { > + cstate = list_prev_entry(cstate, head)) { > if (nvkm_cstate_valid(clk, cstate, max_volt, clk->temp)) > break; > } > -- > 2.7.4 > > -- > You received this message because you are subscribed to the Google Groups "outreachy-kernel" group. > To unsubscribe from this group and stop receiving emails from it, send an email t...
2018 Oct 17
2
[PATCH] drm/nouveau/nvkm: mark expected switch fall-throughs
...h */ default: return NULL; } diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/clk/base.c b/drivers/gpu/drm/nouveau/nvkm/subdev/clk/base.c index ba6a868d..40e5645 100644 --- a/drivers/gpu/drm/nouveau/nvkm/subdev/clk/base.c +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/clk/base.c @@ -90,6 +90,7 @@ nvkm_cstate_valid(struct nvkm_clk *clk, struct nvkm_cstate *cstate, case NVKM_CLK_BOOST_NONE: if (clk->base_khz && freq > clk->base_khz) return false; + /* fall through */ case NVKM_CLK_BOOST_BIOS: if (clk->boost_khz && freq > clk->boost_khz) return...
2018 Mar 19
0
[Outreachy kernel] [PATCH] gpu: drm: Use list_{next/prev}_entry instead of list_entry
...ate, > nvkm_volt_map(volt, volt->max2_id, clk->temp)); > > for (cstate = start; &cstate->head != &pstate->list; > - cstate = list_entry(cstate->head.prev, typeof(*cstate), head)) { > + cstate = list_prev_entry(cstate, head)) { > if (nvkm_cstate_valid(clk, cstate, max_volt, clk->temp)) > break; > } > -- > 2.7.4 > > -- > You received this message because you are subscribed to the Google Groups "outreachy-kernel" group. > To unsubscribe from this group and stop receiving emails from it, send an email to o...
2016 Apr 18
0
[PATCH v4 37/37] volt: add NvVoltOffsetmV option
...lt *); int nvkm_volt_set_id(struct nvkm_volt *, u8 id, u8 min_id, int condition); diff --git a/drm/nouveau/nvkm/subdev/clk/base.c b/drm/nouveau/nvkm/subdev/clk/base.c index d5440a9..7937155 100644 --- a/drm/nouveau/nvkm/subdev/clk/base.c +++ b/drm/nouveau/nvkm/subdev/clk/base.c @@ -100,7 +100,7 @@ nvkm_cstate_valid(struct nvkm_clk *clk, struct nvkm_cstate *cstate, u32 max_volt if (!volt) return true; - voltage = nvkm_volt_map(volt, cstate->voltage, temp); + voltage = nvkm_volt_map(volt, cstate->voltage, temp, true); if (voltage < 0) return false; return voltage <= min(max_volt, volt-...
2016 Apr 18
0
[PATCH v4 32/37] clk: only do partial reclocks as required
...km/subdev/clk/priv.h | 4 +++ 5 files changed, 77 insertions(+), 5 deletions(-) diff --git a/drm/nouveau/nvkm/subdev/clk/base.c b/drm/nouveau/nvkm/subdev/clk/base.c index 3c40f67..2776d79 100644 --- a/drm/nouveau/nvkm/subdev/clk/base.c +++ b/drm/nouveau/nvkm/subdev/clk/base.c @@ -107,7 +107,7 @@ nvkm_cstate_valid(struct nvkm_clk *clk, struct nvkm_cstate *cstate, u32 max_volt voltage >= volt->min_uv; } -static struct nvkm_cstate * +struct nvkm_cstate * nvkm_cstate_find_best(struct nvkm_clk *clk, struct nvkm_pstate *pstate, struct nvkm_cstate *start) { @@ -148,7 +148,7 @@ nvkm_cst...
2018 Jun 27
0
[PATCH] drm/nouveau/nvkm: mark expected switch fall-throughs
...gh */ default: return NULL; } diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/clk/base.c b/drivers/gpu/drm/nouveau/nvkm/subdev/clk/base.c index ba6a868..63ceab3 100644 --- a/drivers/gpu/drm/nouveau/nvkm/subdev/clk/base.c +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/clk/base.c @@ -90,6 +90,7 @@ nvkm_cstate_valid(struct nvkm_clk *clk, struct nvkm_cstate *cstate, case NVKM_CLK_BOOST_NONE: if (clk->base_khz && freq > clk->base_khz) return false; + /* else: fall through */ case NVKM_CLK_BOOST_BIOS: if (clk->boost_khz && freq > clk->boost_khz) r...
2019 Jan 10
0
[PATCH] drm/nouveau/nvkm: mark expected switch fall-throughs
...> } > diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/clk/base.c b/drivers/gpu/drm/nouveau/nvkm/subdev/clk/base.c > index ba6a868d..40e5645 100644 > --- a/drivers/gpu/drm/nouveau/nvkm/subdev/clk/base.c > +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/clk/base.c > @@ -90,6 +90,7 @@ nvkm_cstate_valid(struct nvkm_clk *clk, struct nvkm_cstate *cstate, > case NVKM_CLK_BOOST_NONE: > if (clk->base_khz && freq > clk->base_khz) > return false; > + /* fall through */ > case NVKM_CLK_BOOST_BIOS: > if (clk->boost_khz && freq &g...
2020 Jul 07
3
[PATCH][next] drm/nouveau: Use fallthrough pseudo-keyword
...s_rd08(bios, data + 0x10); diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/clk/base.c b/drivers/gpu/drm/nouveau/nvkm/subdev/clk/base.c index 40e564524b7a..dc184e857f85 100644 --- a/drivers/gpu/drm/nouveau/nvkm/subdev/clk/base.c +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/clk/base.c @@ -90,7 +90,7 @@ nvkm_cstate_valid(struct nvkm_clk *clk, struct nvkm_cstate *cstate, case NVKM_CLK_BOOST_NONE: if (clk->base_khz && freq > clk->base_khz) return false; - /* fall through */ + fallthrough; case NVKM_CLK_BOOST_BIOS: if (clk->boost_khz && freq > clk->boost_...
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.