Displaying 11 results from an estimated 11 matches for "nvbios_power_budget_header".
2023 Apr 16
0
[PATCH 5/9] drm/nouveau/bios/power_budget: Move an expression into a macro call parameter in nvbios_power_budget_header()
Date: Sat, 15 Apr 2023 22:30:30 +0200
The address of a data structure member was determined before
a corresponding null pointer check in the implementation of
the function ?nvbios_power_budget_header?.
Thus avoid the risk for undefined behaviour by moving the usage
of an expression into a parameter for a macro call in one if branch.
This issue was detected by using the Coccinelle software.
Fixes: e5f8eabc0077ea3f77b3362e28d3969ae62e70f0 ("drm/nouveau/bios/power_budget: Add basic power b...
2016 Nov 30
3
[PATCH v3 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 {
> + u32 offset;
> + u8 hlen;
> + u8 elen;
> + u8 ecount;
> + u8 cap_entry;
> +};
> +
> +int nvbios_power_budget_header(struct nvkm_bios *,
> + struct nvbios_power_budget *);
> +int nvbios_power_budget_entry(struct nvkm_bios *, struct nvbios_power_budget *,
> + u8 idx, struct nvbios_power_budget_entry *);
> +
> +#endif
> diff --git a/drm/no...
2023 Apr 16
10
[PATCH 0/9] GPU-DRM-nouveau: Adjustments for seven function implementations
...assignment behind a null pointer check
in nouveau_debugfs_pstate_get()
debugfs: Use seq_putc()
in nouveau_debugfs_pstate_get()
debugfs: Replace five seq_printf() calls by seq_puts()
in nouveau_debugfs_pstate_get()
power_budget: Move an expression into a macro call parameter
in nvbios_power_budget_header()
clk: Move a variable assignment behind a null pointer check
in nvkm_pstate_new()
pci: Move a variable assignment behind condition checks
in nvkm_pcie_set_link()
pci: Move an expression into a function call parameter
in nvkm_pcie_set_link()
therm: Move an assignment statement b...
2016 Nov 12
4
[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.
We should have this in the kernel before actually using it to catch errors
and see how reliable this is, but as it seems it works on all GPUs as
expected on Kepler und Maxwells with the power cap field set in the vbios.
This series keeps things really simple for now until we figure out
2016 Nov 12
1
[PATCH 1/3] nvbios/power_budget: Add basic power budget parsing
...bios.h>
> +
> +struct nvbios_power_budget_entry {
> + u32 min_w;
> + u32 avg_w;
> + u32 max_w;
> +};
> +
> +struct nvbios_power_budget {
> + u32 offset;
> + u8 header_len;
> + u8 entry_len;
> + u8 entry_count;
> + u8 cap_entry;
> +};
> +
> +int nvbios_power_budget_header(struct nvkm_bios *, struct nvbios_power_budget *);
> +int nvbios_power_budget_entry(struct nvkm_bios *, struct nvbios_power_budget *,
> + u8 idx, struct nvbios_power_budget_entry *);
> +
> +#endif
> diff --git a/drm/nouveau/nvkm/subdev/bios/Kbuild b/drm/n...
2016 Nov 30
4
[PATCH v3 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.
We should have this in the kernel before actually using it to catch errors
and see how reliable this is, but as it seems it works on all GPUs as
expected on Kepler und Maxwells with the power cap field set in the vbios.
This series keeps things really simple for now until we figure out
2016 Nov 30
1
[PATCH v3 1/3] nvbios/power_budget: Add basic power budget parsing
...gt; + u32 max_w;
>>> +};
>>> +
>>> +struct nvbios_power_budget {
>>> + u32 offset;
>>> + u8 hlen;
>>> + u8 elen;
>>> + u8 ecount;
>>> + u8 cap_entry;
>>> +};
>>> +
>>> +int nvbios_power_budget_header(struct nvkm_bios *,
>>> + struct nvbios_power_budget *);
>>> +int nvbios_power_budget_entry(struct nvkm_bios *, struct nvbios_power_budget *,
>>> + u8 idx, struct nvbios_power_budget_entry *);
>>> +
>&...
2016 Nov 12
0
[PATCH 1/3] nvbios/power_budget: Add basic power budget parsing
...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 {
+ u32 offset;
+ u8 header_len;
+ u8 entry_len;
+ u8 entry_count;
+ u8 cap_entry;
+};
+
+int nvbios_power_budget_header(struct nvkm_bios *, struct nvbios_power_budget *);
+int nvbios_power_budget_entry(struct nvkm_bios *, struct nvbios_power_budget *,
+ u8 idx, struct nvbios_power_budget_entry *);
+
+#endif
diff --git a/drm/nouveau/nvkm/subdev/bios/Kbuild b/drm/nouveau/nvkm/subdev/bios/K...
2017 Jan 23
3
[PATCH v4 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.
The meaning of this header field was confirmed with nvidia-smi -q:
The rows "Min Power Limit", "Power Limit" and "Max Power Limit" are set
to the "min", "avg" and "max" values from the referenced power budget
entry respectively.
2016 Nov 30
0
[PATCH v3 1/3] nvbios/power_budget: Add basic power budget parsing
...ifndef __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 {
+ u32 offset;
+ u8 hlen;
+ u8 elen;
+ u8 ecount;
+ u8 cap_entry;
+};
+
+int nvbios_power_budget_header(struct nvkm_bios *,
+ struct nvbios_power_budget *);
+int nvbios_power_budget_entry(struct nvkm_bios *, struct nvbios_power_budget *,
+ u8 idx, struct nvbios_power_budget_entry *);
+
+#endif
diff --git a/drm/nouveau/nvkm/subdev/bios/Kbuild...
2016 Nov 30
0
[PATCH v3 1/3] nvbios/power_budget: Add basic power budget parsing
...u32 min_w;
>> + u32 avg_w;
>> + u32 max_w;
>> +};
>> +
>> +struct nvbios_power_budget {
>> + u32 offset;
>> + u8 hlen;
>> + u8 elen;
>> + u8 ecount;
>> + u8 cap_entry;
>> +};
>> +
>> +int nvbios_power_budget_header(struct nvkm_bios *,
>> + struct nvbios_power_budget *);
>> +int nvbios_power_budget_entry(struct nvkm_bios *, struct nvbios_power_budget *,
>> + u8 idx, struct nvbios_power_budget_entry *);
>> +
>> +#endif
>...