Displaying 4 results from an estimated 4 matches for "nvbios_power_budget_parse".
2016 Oct 25
1
[PATCH 1/3] nvbios/power_budget: Add basic power budget parsing
...<nvkm/subdev/bios.h>
> +
> +struct nvbios_power_budget_entry {
> + u32 min_w;
> + u32 avg_w;
> + u32 max_w;
> +};
> +
> +struct nvbios_power_budget {
> + u8 nr_entry;
> + u8 cap_entry;
> + struct nvbios_power_budget_entry *entries;
> +};
> +
> +int nvbios_power_budget_parse(struct nvkm_bios *, struct nvbios_power_budget *);
> +
> +#endif
> diff --git a/drm/nouveau/nvkm/subdev/bios/Kbuild b/drm/nouveau/nvkm/subdev/bios/Kbuild
> index be57220..6b4f1e0 100644
> --- a/drm/nouveau/nvkm/subdev/bios/Kbuild
> +++ b/drm/nouveau/nvkm/subdev/bios/Kbuild
> @@...
2016 Oct 24
7
RFC [PATCH 0/3] Expose power budget cap via hwmon
There is an optinal header field in the power budget table we can use to
read out the power cap of the GPU.
Sadly it is optional and if that field isn't sad, things beome
complicated.
Anyhow, this is good enough for most cards and we can use it later for
capping the power consumption of the GPUs, but first, just export those
values through hwmon.
First design, will change stuff, want
2016 Oct 24
0
[PATCH 1/3] nvbios/power_budget: Add basic power budget parsing
...NVBIOS_POWER_BUDGET_H__
+#define __NVBIOS_POWER_BUDGET_H__
+
+#include <nvkm/subdev/bios.h>
+
+struct nvbios_power_budget_entry {
+ u32 min_w;
+ u32 avg_w;
+ u32 max_w;
+};
+
+struct nvbios_power_budget {
+ u8 nr_entry;
+ u8 cap_entry;
+ struct nvbios_power_budget_entry *entries;
+};
+
+int nvbios_power_budget_parse(struct nvkm_bios *, struct nvbios_power_budget *);
+
+#endif
diff --git a/drm/nouveau/nvkm/subdev/bios/Kbuild b/drm/nouveau/nvkm/subdev/bios/Kbuild
index be57220..6b4f1e0 100644
--- a/drm/nouveau/nvkm/subdev/bios/Kbuild
+++ b/drm/nouveau/nvkm/subdev/bios/Kbuild
@@ -19,6 +19,7 @@ nvkm-y += nvkm/subd...
2016 Oct 24
0
[PATCH 2/3] subdev/iccsense: Parse max and crit power level
...struct nvkm_iccsense *iccsense = nvkm_iccsense(subdev);
struct nvkm_bios *bios = subdev->device->bios;
+ struct nvbios_power_budget budget;
struct nvbios_iccsense stbl;
int i;
- if (!bios || nvbios_iccsense_parse(bios, &stbl) || !stbl.nr_entry)
+ if (!bios)
+ return 0;
+
+ if (!nvbios_power_budget_parse(bios, &budget) && budget.nr_entry &&
+ budget.cap_entry != 0xff) {
+ iccsense->power_w_max = budget.entries[budget.cap_entry].avg_w;
+ iccsense->power_w_crit = budget.entries[budget.cap_entry].max_w;
+ }
+
+ if (nvbios_iccsense_parse(bios, &stbl) || !stbl.nr_ent...