search for: bit_p

Displaying 20 results from an estimated 43 matches for "bit_p".

2016 Nov 30
3
[PATCH v3 1/3] nvbios/power_budget: Add basic power budget parsing
...st > + */ > +#include <subdev/bios.h> > +#include <subdev/bios/bit.h> > +#include <subdev/bios/power_budget.h> > + > +static u32 > +nvbios_power_budget_table(struct nvkm_bios *bios, u8 *ver, u8 *hdr, u8 *cnt, > + u8 *len) > +{ > + struct bit_entry bit_P; > + u32 power_budget; > + > + if (bit_entry(bios, 'P', &bit_P) || bit_P.version != 2 || > + bit_P.length < 0x2c) > + return 0; > + > + power_budget = nvbios_rd32(bios, bit_P.offset + 0x2c); > + if (!power_budget) > + return 0; > + > + *ver = nv...
2016 Oct 25
1
[PATCH 1/3] nvbios/power_budget: Add basic power budget parsing
...st > + */ > +#include <subdev/bios.h> > +#include <subdev/bios/bit.h> > +#include <subdev/bios/power_budget.h> > + > +static u32 > +nvbios_power_budget_table(struct nvkm_bios *bios, u8 *ver, u8 *hdr, u8 *cnt, > + u8 *len) > +{ > + struct bit_entry bit_P; > + u32 power_budget; > + > + if (bit_entry(bios, 'P', &bit_P) || bit_P.version != 2 || > + bit_P.length < 0x2c) > + return 0; > + > + power_budget = nvbios_rd32(bios, bit_P.offset + 0x2c); > + if (!power_budget) > + return 0; > + > + *ver = nv...
2017 Oct 08
1
[RFC PATCH 15/29] bios: add thermal policies table
...RE. > + * > + * Authors: Karol Herbst > + */ > +#include <subdev/bios.h> > +#include <subdev/bios/bit.h> > +#include <subdev/bios/thermal_policies.h> > + > +static u32 > +nvbios_thermal_policies_offset(struct nvkm_bios *b) > +{ > + struct bit_entry bit_P; > + > + if (!bit_entry(b, 'P', &bit_P)) { > + if (bit_P.version == 2 && bit_P.length >= 0x50) > + return nvbios_rd32(b, bit_P.offset + 0x50); > + } > + > + return 0; > +} > + > +int > +nvbios_thermal_policies_parse(struct nvkm_bios *b, str...
2016 Nov 12
1
[PATCH 1/3] nvbios/power_budget: Add basic power budget parsing
...st > + */ > +#include <subdev/bios.h> > +#include <subdev/bios/bit.h> > +#include <subdev/bios/power_budget.h> > + > +static u32 > +nvbios_power_budget_table(struct nvkm_bios *bios, u8 *ver, u8 *hdr, u8 *cnt, > + u8 *len) > +{ > + struct bit_entry bit_P; > + u32 power_budget; > + > + if (bit_entry(bios, 'P', &bit_P) || bit_P.version != 2 || > + bit_P.length < 0x2c) > + return 0; > + > + power_budget = nvbios_rd32(bios, bit_P.offset + 0x2c); > + if (!power_budget) > + return 0; > + > + *ver = nv...
2016 Nov 30
1
[PATCH v3 1/3] nvbios/power_budget: Add basic power budget parsing
...os/bit.h> >>> +#include <subdev/bios/power_budget.h> >>> + >>> +static u32 >>> +nvbios_power_budget_table(struct nvkm_bios *bios, u8 *ver, u8 *hdr, u8 *cnt, >>> + u8 *len) >>> +{ >>> + struct bit_entry bit_P; >>> + u32 power_budget; >>> + >>> + if (bit_entry(bios, 'P', &bit_P) || bit_P.version != 2 || >>> + bit_P.length < 0x2c) >>> + return 0; >>> + >>> + power_budget = nvbios_rd32(bios, bit_P....
2017 Sep 15
0
[RFC PATCH 15/29] bios: add thermal policies table
...SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + * + * Authors: Karol Herbst + */ +#include <subdev/bios.h> +#include <subdev/bios/bit.h> +#include <subdev/bios/thermal_policies.h> + +static u32 +nvbios_thermal_policies_offset(struct nvkm_bios *b) +{ + struct bit_entry bit_P; + + if (!bit_entry(b, 'P', &bit_P)) { + if (bit_P.version == 2 && bit_P.length >= 0x50) + return nvbios_rd32(b, bit_P.offset + 0x50); + } + + return 0; +} + +int +nvbios_thermal_policies_parse(struct nvkm_bios *b, struct nvbios_thermal_policies_header *h) +{ + if (!h) +...
2016 Feb 20
0
[PATCH v4 2/6] nvbios/iccsense: add parsing of the SENSE table
...R DEALINGS IN THE SOFTWARE. + * + * Authors: Martin Peres + */ +#include <subdev/bios.h> +#include <subdev/bios/bit.h> +#include <subdev/bios/iccsense.h> + +static u16 +nvbios_iccsense_table(struct nvkm_bios *bios, u8 *ver, u8 *hdr, u8 *cnt, + u8 *len) +{ + struct bit_entry bit_P; + u16 iccsense; + + if (bit_entry(bios, 'P', &bit_P) || bit_P.version != 2 || + bit_P.length < 0x2c) + return 0; + + iccsense = nvbios_rd16(bios, bit_P.offset + 0x28); + if (!iccsense) + return 0; + + *ver = nvbios_rd08(bios, iccsense + 0); + switch (*ver) { + case 0x10: + cas...
2016 Oct 24
0
[PATCH 1/3] nvbios/power_budget: Add basic power budget parsing
...LINGS IN THE SOFTWARE. + * + * Authors: Karol Herbst + */ +#include <subdev/bios.h> +#include <subdev/bios/bit.h> +#include <subdev/bios/power_budget.h> + +static u32 +nvbios_power_budget_table(struct nvkm_bios *bios, u8 *ver, u8 *hdr, u8 *cnt, + u8 *len) +{ + struct bit_entry bit_P; + u32 power_budget; + + if (bit_entry(bios, 'P', &bit_P) || bit_P.version != 2 || + bit_P.length < 0x2c) + return 0; + + power_budget = nvbios_rd32(bios, bit_P.offset + 0x2c); + if (!power_budget) + return 0; + + *ver = nvbios_rd08(bios, power_budget); + switch (*ver) { + case...
2017 Apr 10
0
[PATCH 11/11] nvkm/bios/perf: Retreive pointer to unk1c script
...ndex c306835..55c1f36 100644 --- a/drivers/gpu/drm/nouveau/nvkm/subdev/bios/perf.c +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/bios/perf.c @@ -213,3 +213,17 @@ nvbios_perf_fan_parse(struct nvkm_bios *bios, return 0; } + +u16 +nvbios_perf_script_unk1c(struct nvkm_bios *bios) +{ + struct bit_entry bit_P; + + if (!bit_entry(bios, 'P', &bit_P)) { + if (bit_P.version == 2) { + return nvbios_rd16(bios, bit_P.offset + 0x1c); + } + } + + return 0x0000; +} diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramgf100.c b/drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramgf100.c index eebd20b..def1...
2017 Apr 10
0
[PATCH 13/13] nvkm/bios/perf: Retreive pointer to unk1c script
...ndex c306835..55c1f36 100644 --- a/drivers/gpu/drm/nouveau/nvkm/subdev/bios/perf.c +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/bios/perf.c @@ -213,3 +213,17 @@ nvbios_perf_fan_parse(struct nvkm_bios *bios, return 0; } + +u16 +nvbios_perf_script_unk1c(struct nvkm_bios *bios) +{ + struct bit_entry bit_P; + + if (!bit_entry(bios, 'P', &bit_P)) { + if (bit_P.version == 2) { + return nvbios_rd16(bios, bit_P.offset + 0x1c); + } + } + + return 0x0000; +} diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramgf100.c b/drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramgf100.c index eebd20b..def1...
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
...LINGS IN THE SOFTWARE. + * + * Authors: Karol Herbst + */ +#include <subdev/bios.h> +#include <subdev/bios/bit.h> +#include <subdev/bios/power_budget.h> + +static u32 +nvbios_power_budget_table(struct nvkm_bios *bios, u8 *ver, u8 *hdr, u8 *cnt, + u8 *len) +{ + struct bit_entry bit_P; + u32 power_budget; + + if (bit_entry(bios, 'P', &bit_P) || bit_P.version != 2 || + bit_P.length < 0x2c) + return 0; + + power_budget = nvbios_rd32(bios, bit_P.offset + 0x2c); + if (!power_budget) + return 0; + + *ver = nvbios_rd08(bios, power_budget); + switch (*ver) { + case...
2016 Nov 30
0
[PATCH v3 1/3] nvbios/power_budget: Add basic power budget parsing
...LINGS IN THE SOFTWARE. + * + * Authors: Karol Herbst + */ +#include <subdev/bios.h> +#include <subdev/bios/bit.h> +#include <subdev/bios/power_budget.h> + +static u32 +nvbios_power_budget_table(struct nvkm_bios *bios, u8 *ver, u8 *hdr, u8 *cnt, + u8 *len) +{ + struct bit_entry bit_P; + u32 power_budget; + + if (bit_entry(bios, 'P', &bit_P) || bit_P.version != 2 || + bit_P.length < 0x2c) + return 0; + + power_budget = nvbios_rd32(bios, bit_P.offset + 0x2c); + if (!power_budget) + return 0; + + *ver = nvbios_rd08(bios, power_budget); + switch (*ver) { + case...
2016 Nov 30
0
[PATCH v3 1/3] nvbios/power_budget: Add basic power budget parsing
...> +#include <subdev/bios/bit.h> >> +#include <subdev/bios/power_budget.h> >> + >> +static u32 >> +nvbios_power_budget_table(struct nvkm_bios *bios, u8 *ver, u8 *hdr, u8 *cnt, >> + u8 *len) >> +{ >> + struct bit_entry bit_P; >> + u32 power_budget; >> + >> + if (bit_entry(bios, 'P', &bit_P) || bit_P.version != 2 || >> + bit_P.length < 0x2c) >> + return 0; >> + >> + power_budget = nvbios_rd32(bios, bit_P.offset + 0x2c); >> +...
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 Mar 17
0
[PATCH 03/19] bios: add parsing of BASE CLOCK table
...TION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + * + * Authors: Karol Herbst + */ +#include <subdev/bios.h> +#include <subdev/bios/bit.h> +#include <subdev/bios/baseclock.h> + +static u16 +nvbios_baseclock_offset(struct nvkm_bios *b) +{ + struct bit_entry bit_P; + + if (!bit_entry(b, 'P', &bit_P)) { + if (bit_P.version == 2) + return nvbios_rd16(b, bit_P.offset + 0x38); + } + + return 0x0000; +} + +int +nvbios_baseclock_parse(struct nvkm_bios *b, struct nvbios_baseclk_header *h) +{ + if (!h) + return -EINVAL; + + h->offset = nvbios_base...
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.
2014 Aug 16
3
[PATCH 1/3] bios/fan: add support for maxwell's fan management table
...R THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + * + * Authors: Martin Peres + */ + +#include <subdev/bios.h> +#include <subdev/bios/bit.h> +#include <subdev/bios/fan.h> + +u16 +nvbios_fan_table(struct nouveau_bios *bios, u8 *ver, u8 *hdr, u8 *cnt, u8 *len) +{ + struct bit_entry bit_P; + u16 fan = 0x0000; + + if (!bit_entry(bios, 'P', &bit_P)) { + if (bit_P.version == 2 && bit_P.length >= 0x5a) + fan = nv_ro16(bios, bit_P.offset + 0x58); + + if (fan) { + *ver = nv_ro08(bios, fan + 0); + switch (*ver) { + case 0x10: + *hdr = nv_ro08(bios, fan +...
2016 Feb 29
9
[PATCH 0/9] Groundwork for clocking fixes
This series contains a lot of groundwork to finally fix reclocking issues on Kepler+ gpus. There shouldn't be any functional changes with the first patch being the only exception (fixes some voltage table parsing issues with of few kepler gpus) The most interessting thing is the tool in the last patch, which can be ran alongside the nvidia driver to test nouveaus volting code and print the