Displaying 12 results from an estimated 12 matches for "entry_offset".
2016 Nov 30
3
[PATCH v3 1/3] nvbios/power_budget: Add basic power budget parsing
...budget->cap_entry = cap_entry;
> + return 0;
> +}
> +
> +int
> +nvbios_power_budget_entry(struct nvkm_bios *bios,
> + struct nvbios_power_budget *budget,
> + u8 idx, struct nvbios_power_budget_entry *entry)
> +{
> + u32 entry_offset;
> +
> + if (!bios || !budget || !budget->offset || idx >= budget->ecount
> + || !entry)
> + return -EINVAL;
> +
> + entry_offset = budget->offset + budget->hlen + idx * budget->elen;
> +
> + if (budget->elen >= 0xe) {
I question this check. Genera...
2016 Nov 12
1
[PATCH 1/3] nvbios/power_budget: Add basic power budget parsing
...et->cap_entry = 0xff;
> + }
> + return 0;
> +}
> +
> +int
> +nvbios_power_budget_entry(struct nvkm_bios *bios,
> + struct nvbios_power_budget *budget,
> + u8 idx, struct nvbios_power_budget_entry *entry)
> +{
> + u32 entry_offset;
> +
> + if (!budget || !budget->offset || idx >= budget->entry_count || !entry)
> + return -EINVAL;
> +
> + entry_offset = budget->offset + budget->header_len + idx * budget->entry_len;
> +
> + if (budget->entry_len >= 0xe) {
> + entry->min_w =...
2016 Nov 30
1
[PATCH v3 1/3] nvbios/power_budget: Add basic power budget parsing
...gt;>> +
>>> +int
>>> +nvbios_power_budget_entry(struct nvkm_bios *bios,
>>> + struct nvbios_power_budget *budget,
>>> + u8 idx, struct nvbios_power_budget_entry *entry)
>>> +{
>>> + u32 entry_offset;
>>> +
>>> + if (!bios || !budget || !budget->offset || idx >= budget->ecount
>>> + || !entry)
>>> + return -EINVAL;
>>> +
>>> + entry_offset = budget->offset + budget->hlen + idx * budget->elen;...
2016 Oct 25
1
[PATCH 1/3] nvbios/power_budget: Add basic power budget parsing
...lt; cnt)
> + budget->cap_entry = cap_entry;
> + else {
> + if (cap_entry != 0xff)
> + nvkm_warn(subdev,
> + "invalid cap_entry in power budget table found\n");
> + budget->cap_entry = 0xff;
> + }
> +
> + for (i = 0; i < cnt; ++i) {
> + u32 entry_offset = header + hdr + i * len;
> + struct nvbios_power_budget_entry *entry = &budget->entries[i];
> +
> + if (len >= 0xe) {
> + entry->min_w = nvbios_rd32(bios, entry_offset + 0x2);
> + entry->avg_w = nvbios_rd32(bios, entry_offset + 0x6);
> + entry->max_w =...
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 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 12
0
[PATCH 1/3] nvbios/power_budget: Add basic power budget parsing
..."
+ "found\n");
+ budget->cap_entry = 0xff;
+ }
+ return 0;
+}
+
+int
+nvbios_power_budget_entry(struct nvkm_bios *bios,
+ struct nvbios_power_budget *budget,
+ u8 idx, struct nvbios_power_budget_entry *entry)
+{
+ u32 entry_offset;
+
+ if (!budget || !budget->offset || idx >= budget->entry_count || !entry)
+ return -EINVAL;
+
+ entry_offset = budget->offset + budget->header_len + idx * budget->entry_len;
+
+ if (budget->entry_len >= 0xe) {
+ entry->min_w = nvbios_rd32(bios, entry_offset + 0x2);
+...
2016 Nov 30
0
[PATCH v3 1/3] nvbios/power_budget: Add basic power budget parsing
...cap_entry = 0xff;
+ return -EINVAL;
+ }
+
+ budget->cap_entry = cap_entry;
+ return 0;
+}
+
+int
+nvbios_power_budget_entry(struct nvkm_bios *bios,
+ struct nvbios_power_budget *budget,
+ u8 idx, struct nvbios_power_budget_entry *entry)
+{
+ u32 entry_offset;
+
+ if (!bios || !budget || !budget->offset || idx >= budget->ecount
+ || !entry)
+ return -EINVAL;
+
+ entry_offset = budget->offset + budget->hlen + idx * budget->elen;
+
+ if (budget->elen >= 0xe) {
+ entry->min_w = nvbios_rd32(bios, entry_offset + 0x2);
+ entry-&...
2016 Nov 30
0
[PATCH v3 1/3] nvbios/power_budget: Add basic power budget parsing
...return 0;
>> +}
>> +
>> +int
>> +nvbios_power_budget_entry(struct nvkm_bios *bios,
>> + struct nvbios_power_budget *budget,
>> + u8 idx, struct nvbios_power_budget_entry *entry)
>> +{
>> + u32 entry_offset;
>> +
>> + if (!bios || !budget || !budget->offset || idx >= budget->ecount
>> + || !entry)
>> + return -EINVAL;
>> +
>> + entry_offset = budget->offset + budget->hlen + idx * budget->elen;
>> +
>> +...
2016 Oct 24
0
[PATCH 1/3] nvbios/power_budget: Add basic power budget parsing
...default:
+ cap_entry = 0;
+ }
+
+ if (cap_entry < cnt)
+ budget->cap_entry = cap_entry;
+ else {
+ if (cap_entry != 0xff)
+ nvkm_warn(subdev,
+ "invalid cap_entry in power budget table found\n");
+ budget->cap_entry = 0xff;
+ }
+
+ for (i = 0; i < cnt; ++i) {
+ u32 entry_offset = header + hdr + i * len;
+ struct nvbios_power_budget_entry *entry = &budget->entries[i];
+
+ if (len >= 0xe) {
+ entry->min_w = nvbios_rd32(bios, entry_offset + 0x2);
+ entry->avg_w = nvbios_rd32(bios, entry_offset + 0x6);
+ entry->max_w = nvbios_rd32(bios, entry_offset...
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
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.