search for: bit_entry

Displaying 20 results from an estimated 51 matches for "bit_entry".

Did you mean: alt_entry
2016 Nov 30
3
[PATCH v3 1/3] nvbios/power_budget: Add basic power budget parsing
...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; > + > + *ve...
2016 Oct 25
1
[PATCH 1/3] nvbios/power_budget: Add basic power budget parsing
...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; > + > + *ve...
2017 Oct 08
1
[RFC PATCH 15/29] bios: add thermal policies table
...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 *...
2017 Apr 10
0
[PATCH 11/11] nvkm/bios/perf: Retreive pointer to unk1c script
...s/perf.c index 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...
2017 Apr 10
0
[PATCH 13/13] nvkm/bios/perf: Retreive pointer to unk1c script
...s/perf.c index 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...
2016 Nov 12
1
[PATCH 1/3] nvbios/power_budget: Add basic power budget parsing
...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; > + > + *ve...
2016 Nov 30
1
[PATCH v3 1/3] nvbios/power_budget: Add basic power budget parsing
...;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,...
2017 Sep 15
0
[RFC PATCH 15/29] bios: add thermal policies table
...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/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 (!...
2016 Feb 20
0
[PATCH v4 2/6] nvbios/iccsense: add parsing of the SENSE table
...R + * OTHER 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:...
2016 Oct 24
0
[PATCH 1/3] nvbios/power_budget: Add basic power budget parsing
...OTHER DEALINGS 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) {...
2016 Mar 17
0
[PATCH 03/19] bios: add parsing of BASE CLOCK table
...IN CONNECTION 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 = nvbio...
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
...OTHER DEALINGS 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) {...
2016 Nov 30
0
[PATCH v3 1/3] nvbios/power_budget: Add basic power budget parsing
...OTHER DEALINGS 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) {...
2013 Jul 18
1
[PATCH 02/11] drm/nv50/pm: Fix last timing register in NVA3+, fix typo in NV50
..._mem.c index 4f6a572..35b5858 100644 --- a/drivers/gpu/drm/nouveau/nouveau_mem.c +++ b/drivers/gpu/drm/nouveau/nouveau_mem.c @@ -73,7 +73,8 @@ nv50_mem_timing_calc(struct drm_device *dev, u32 freq, struct nouveau_fb *pfb = nouveau_fb(device); struct nouveau_drm *drm = nouveau_drm(dev); struct bit_entry P; - uint8_t unk18 = 1, unk20 = 0, unk21 = 0, tmp7_3; + uint8_t unk18 = 1, unk20 = 0, unk21 = 0, tUnk_3_2; + int tUNK_base; if (bit_table(dev, 'P', &P)) return -EINVAL; @@ -91,6 +92,11 @@ nv50_mem_timing_calc(struct drm_device *dev, u32 freq, break; } + tUnk_3_2 = (boot-&g...
2016 Nov 30
0
[PATCH v3 1/3] nvbios/power_budget: Add basic power budget parsing
...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); >&g...
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
2009 Nov 19
2
[RFC] nouveau: Add basic i2c sensor chip support
...bios->sensor.diode_offset_div = val; + break; + case 0x12: + bios->sensor.slope_mult = val; + break; + case 0x13: + bios->sensor.slope_div = val; + break; + } + } + return 0; +} + +static int parse_bit_performance_tbl_entry(struct drm_device *dev, struct nvbios *bios, struct bit_entry *bitentry) +{ + uint16_t temp_tbl_ptr = ROM16(bios->data[bitentry->offset + 0xc]); + + parse_bit_temp_tbl_entry(dev, bios, temp_tbl_ptr); + + return 0; +} + static int parse_bit_tmds_tbl_entry(struct drm_device *dev, struct nvbios *bios, struct bit_entry *bitentry) { /* @@ -4675,6 +4724,7...
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.