Displaying 20 results from an estimated 64 matches for "nvkm_pstate".
2016 Apr 18
0
[PATCH v4 32/37] clk: only do partial reclocks as required
...lk/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_cstate_find_best(struct nvkm_clk *clk, struct nvkm_pstate *pstate,
return cstate;
}
-static struct nvkm_cstate *
+struct nvkm_cstate *
nvkm_cstate_get(struct nvkm_clk *clk, struct nvkm_pstate *pstate, int cstatei)
{
s...
2017 Mar 05
0
[PATCH 3/9] clk: Make pstate a pointer to nvkm_pstate
.../* 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; /* user-requested (-1 disabled, -2 perfmon) */
int ustate_dc; /* user-requested (-1 disabled, -2 perfmon) */
int astate; /* perfmon adjustment (base) */
diff --git a/drm/nouveau/nvkm/engine/device/ctrl.c b/drm/nouveau/nvkm/engine/device/ctrl.c
index b0ece...
2017 Sep 15
0
[RFC PATCH 06/29] clk: Make pstate a pointer to nvkm_pstate
.../* 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; /* user-requested (-1 disabled, -2 perfmon) */
int ustate_dc; /* user-requested (-1 disabled, -2 perfmon) */
int astate; /* perfmon adjustment (base) */
diff --git a/drm/nouveau/nvkm/engine/device/ctrl.c b/drm/nouveau/nvkm/engine/device/ctrl.c
index b0ece...
2016 Apr 18
0
[PATCH v4 27/37] clk: make pstate a pointer to nvkm_pstate
.../nvkm/subdev/clk.h b/drm/nouveau/include/nvkm/subdev/clk.h
index db52e65..4fb2c1b 100644
--- a/drm/nouveau/include/nvkm/subdev/clk.h
+++ b/drm/nouveau/include/nvkm/subdev/clk.h
@@ -91,7 +91,7 @@ struct nvkm_clk {
struct nvkm_notify pwrsrc_ntfy;
int pwrsrc;
- int pstate; /* current */
+ struct nvkm_pstate *pstate; /* current */
int ustate_ac; /* user-requested (-1 disabled, -2 perfmon) */
int ustate_dc; /* user-requested (-1 disabled, -2 perfmon) */
int astate; /* perfmon adjustment (base) */
diff --git a/drm/nouveau/nvkm/engine/device/ctrl.c b/drm/nouveau/nvkm/engine/device/ctrl.c
index 039e8...
2016 Apr 20
0
[PATCH v4 27/37] clk: make pstate a pointer to nvkm_pstate
...644
>> --- a/drm/nouveau/include/nvkm/subdev/clk.h
>> +++ b/drm/nouveau/include/nvkm/subdev/clk.h
>> @@ -91,7 +91,7 @@ struct nvkm_clk {
>> struct nvkm_notify pwrsrc_ntfy;
>> int pwrsrc;
>> - int pstate; /* current */
>> + struct nvkm_pstate *pstate; /* current */
>> int ustate_ac; /* user-requested (-1 disabled, -2 perfmon) */
>> int ustate_dc; /* user-requested (-1 disabled, -2 perfmon) */
>> int astate; /* perfmon adjustment (base) */
>> diff --git a/drm/nouveau/nvkm/engine/device/ctrl...
2017 Oct 08
1
[RFC PATCH 08/29] clk: We should pass the pstate id around not the index in the list
...> diff --git a/drm/nouveau/nvkm/subdev/clk/base.c b/drm/nouveau/nvkm/subdev/clk/base.c
> index d37c13b7..1d71bf09 100644
> --- a/drm/nouveau/nvkm/subdev/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...
2017 Oct 08
1
[RFC PATCH 06/29] clk: Make pstate a pointer to nvkm_pstate
...hest 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; /* user-requested (-1 disabled, -2 perfmon) */
> int ustate_dc; /* user-requested (-1 disabled, -2 perfmon) */
> int astate; /* perfmon adjustment (base) */
> diff --git a/drm/nouveau/nvkm/engine/device/ctrl.c b/drm/nouveau/nvkm/engine/devic...
2016 Apr 20
2
[PATCH v4 27/37] clk: make pstate a pointer to nvkm_pstate
...bdev/clk.h
> index db52e65..4fb2c1b 100644
> --- a/drm/nouveau/include/nvkm/subdev/clk.h
> +++ b/drm/nouveau/include/nvkm/subdev/clk.h
> @@ -91,7 +91,7 @@ struct nvkm_clk {
>
> struct nvkm_notify pwrsrc_ntfy;
> int pwrsrc;
> - int pstate; /* current */
> + struct nvkm_pstate *pstate; /* current */
> int ustate_ac; /* user-requested (-1 disabled, -2 perfmon) */
> int ustate_dc; /* user-requested (-1 disabled, -2 perfmon) */
> int astate; /* perfmon adjustment (base) */
> diff --git a/drm/nouveau/nvkm/engine/device/ctrl.c b/drm/nouveau/nvkm/engine/de...
2018 Mar 27
2
[PATCH] gpu: drm: nouveau: Use list_for_each_entry_from_reverse
...vers/gpu/drm/nouveau/nvkm/subdev/clk/base.c b/drivers/gpu/drm/nouveau/nvkm/subdev/clk/base.c
index 81c3567..5e56f74 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/clk/base.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/clk/base.c
@@ -113,7 +113,6 @@ nvkm_cstate_find_best(struct nvkm_clk *clk, struct nvkm_pstate *pstate,
{
struct nvkm_device *device = clk->subdev.device;
struct nvkm_volt *volt = device->volt;
- struct nvkm_cstate *cstate;
int max_volt;
if (!pstate || !start)
@@ -133,13 +132,12 @@ nvkm_cstate_find_best(struct nvkm_clk *clk, struct nvkm_pstate *pstate,
max_volt = min(max_...
2023 Mar 01
5
[PATCH 0/2] drm/nouveau: avoid usage of list iterator after loop
...able
'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 helps the greater mission to hopefully move the list iterator
variable into the iterating macro directly [1].
Link: https://lore.kernel.org/all/CAHk-=wgRr_D8CB-D9Kg-c=E...
2017 Mar 05
15
[PATCH 0/9] clk subdev updates
...ly 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 changing the clock state due to temperature
changes and dynamic reclocking.
Karol Herbst (9):
clk: Rename nvkm_pstate_calc to nvkm_clk_update and export it
clk: Remove dstate
clk: Make pstate a pointer to nvkm_pstate
clk: Hold information about the current cstate status
clk: We should pass the pstate id around not the index in the list
clk: Split out update code to nv40
clk: Only do partial reclocks as...
2017 Mar 05
0
[PATCH 5/9] clk: We should pass the pstate id around not the index in the list
...(info.ustate_ac < -1)
diff --git a/drm/nouveau/nvkm/subdev/clk/base.c b/drm/nouveau/nvkm/subdev/clk/base.c
index d37c13b7..1d71bf09 100644
--- a/drm/nouveau/nvkm/subdev/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 =...
2017 Sep 15
0
[RFC PATCH 08/29] clk: We should pass the pstate id around not the index in the list
...(info.ustate_ac < -1)
diff --git a/drm/nouveau/nvkm/subdev/clk/base.c b/drm/nouveau/nvkm/subdev/clk/base.c
index d37c13b7..1d71bf09 100644
--- a/drm/nouveau/nvkm/subdev/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 =...
2016 Apr 18
0
[PATCH v4 13/37] clk: respect voltage limits in nvkm_cstate_prog
...rn true;
+
+ voltage = nvkm_volt_map(volt, cstate->voltage, temp);
+ if (voltage < 0)
+ return false;
+ return voltage <= min(max_volt, volt->max_uv) &&
+ voltage >= volt->min_uv;
+}
+
+static struct nvkm_cstate *
+nvkm_cstate_find_best(struct nvkm_clk *clk, struct nvkm_pstate *pstate,
+ struct nvkm_cstate *start)
+{
+ struct nvkm_device *device = clk->subdev.device;
+ struct nvkm_therm *therm = device->therm;
+ struct nvkm_volt *volt = device->volt;
+ struct nvkm_cstate *cstate;
+ int max_volt, temp = 0;
+
+ if (!pstate || !start)
+ return NULL;
+
+ if...
2017 Jul 01
7
[PATCH v2 0/7] clk subdev updates
...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 to support partial reclocks
Karol Herbst (7):
clk: Rename nvkm_pstate_calc to nvkm_clk_update and export it
clk: Remove dstate
clk: Make pstate a pointer to nvkm_pstate
clk: Hold information about the current cstate status
clk: We should pass the pstate id around not the index in the list
clk: Set clocks to pre suspend state after suspend
clk: Check pm_ru...
2017 Sep 03
8
[PATCH 0/8] clk subdev updates
...his is also preparation work of changing the clock state due to temperature
changes, dynamic reclocking and thermal/policy throttling.
v2: remove commits to support partial reclocks
v3: don't temper with runpm in nvkm, but move it into sysfs and reorder subdevs
Karol Herbst (8):
clk: Rename nvkm_pstate_calc to nvkm_clk_update and export it
clk: Remove dstate
clk: Make pstate a pointer to nvkm_pstate
clk: Hold information about the current cstate status
clk: We should pass the pstate id around not the index in the list
clk: Set clocks to pre suspend state after suspend
core/device: Mov...
2015 Dec 02
2
[RFC PATCH 5/5] clk: allow boosting only when NvBoost is set
..., 27 insertions(+), 4 deletions(-)
>
> diff --git a/drm/nouveau/include/nvkm/subdev/clk.h b/drm/nouveau/include/nvkm/subdev/clk.h
> index 8708f0a..8085d81 100644
> --- a/drm/nouveau/include/nvkm/subdev/clk.h
> +++ b/drm/nouveau/include/nvkm/subdev/clk.h
> @@ -64,7 +64,8 @@ struct nvkm_pstate {
> struct nvkm_domain {
> enum nv_clk_src name;
> u8 bios; /* 0xff for none */
> -#define NVKM_CLK_DOM_FLAG_CORE 0x01
> +#define NVKM_CLK_DOM_FLAG_CORE 0x01
> +#define NVKM_CLK_DOM_FLAG_BASE_CLOCK_CORE 0x02
> u8 flags;
> const char *mname;
> int mdi...
2017 Nov 17
35
[PATCH 00/32] Updated State of my clk patches
...rm: 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 around not the index in the list
clk: Hold information about the current cstate status
cl...
2016 Apr 18
63
[PATCH v4 00/37] Volting/Clocking improvements for Fermi and newer
...e_prog
bios: add parsing of BASE CLOCK table
clk: allow boosting only when NvBoost is set
volt: don't require perfect fit
bios/vmap: unk0 field is the mode
volt: add speedo
volt: add gf100 subdev with speedo
volt: add coefficients
clk: save the max clock we can set
clk: rename nvkm_pstate_calc to nvkm_clk_update
nvif: add boost info and set operations
debugfs: add boost interface to change the boost_mode
clk: remove dstate and tstate
therm: don't cancel the timer
clk: make pstate a pointer to nvkm_pstate
clk: hold information about the current cstate status
clk: we...
2016 Apr 18
0
[PATCH v4 29/37] clk: we should pass the pstate id around not the index in the list
...f (info.ustate_ac < -1)
diff --git a/drm/nouveau/nvkm/subdev/clk/base.c b/drm/nouveau/nvkm/subdev/clk/base.c
index 23f4cfe..7f86e41 100644
--- a/drm/nouveau/nvkm/subdev/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 =...