summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/nouveau/nvkm/subdev/bios
Commit message (Collapse)AuthorAgeFilesLines
...
* drm/nouveau/volt: Parse the max voltage map entriesKarol Herbst2016-10-121-0/+10
| | | | | | | | | | | | | | | | | | | There are at least three "max" entries, which specify the max voltage. Because they are actually normal voltage map entries, they can also be affected by the temperature. Nvidia respects those entries and if they get changed, nvidia uses the lower voltage from all three. We shouldn't exceed those voltages at any given time. v2: State what those entries do in the source. v3: Add the third max entry. v5: Better describe the entries. Signed-off-by: Karol Herbst <karolherbst@gmail.com> Reviewed-by: Martin Peres <martin.peres@free.fr> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/volt: Properly detect entry based voltage tablesKarol Herbst2016-10-121-3/+9
| | | | | | | | | | | | | There is a field in the voltage table which tells us if the VIDs are taken from the entries or calculated through the header. v2: Don't break older versions. v5: Reverse flag name. Signed-off-by: Karol Herbst <karolherbst@gmail.com> Reviewed-by: Martin Peres <martin.peres@free.fr> Tested-by: Pierre Moreau <pierre.morrow@free.fr> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/bios/volt: Handle voltage table version 0x50 with zeroed headerKarol Herbst2016-10-121-0/+3
| | | | | | | | | | | | | | | | | | Some Fermi+ GPUs specify VID information via voltage table entries, rather than describing them as a range in the header. The mask may be bigger than 0x1fffff, but this value is already >2V, so it will be fine for now. This patch fixes volting issues on those cards enabling them to switch cstates. v6: rework message Signed-off-by: Karol Herbst <karolherbst@gmail.com> Reviewed-by: Martin Peres <martin.peres@free.fr> Tested-by: Pierre Moreau <pierre.morrow@free.fr> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/iccsense: Parse the resistors and config the right wayKarol Herbst2016-10-121-4/+29
| | | | | | | | | | | | | | Previously we parsed that table a bit wrong: 1. The entry layout depends on the sensor type used. 2. We have all resitors in one entry for the INA3221. 3. The config is already included in the vbios. This commit addresses that issue and with that we should be able to read out the right power consumption for every GPU with a INA209, INA219 and INA3221. Signed-off-by: Karol Herbst <karolherbst@gmail.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/bios/rammap: 32-bit bios pointersBen Skeggs2016-07-141-3/+3
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/bios/pll: initial support for BIT 'C' version 2Ben Skeggs2016-07-141-9/+11
| | | | | | Just enough to get at the PLL table. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/bios/dp: initial support for 4.2Ben Skeggs2016-07-141-0/+8
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/bios: pointers beyond end of first image need special handlingBen Skeggs2016-07-143-21/+33
| | | | | | | | | Makes common the code that was previously used by the PMU table parsing, as it appears other tables need this too. Not much of an idea what this is all about... Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/bios: guard against out-of-bounds accesses to imageBen Skeggs2016-07-141-0/+34
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/bios/disp: fix handling of "match any protocol" entriesBen Skeggs2016-06-021-3/+5
| | | | | | | As it turns out, a value of 0xff means "any protocol" and not "VGA". Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Cc: stable@vger.kernel.org
* drm/nouveau/bios/pll: check BIT table version before trying to parse itBen Skeggs2016-05-201-4/+6
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/bios/pll: prevent oops when limits table can't be parsedBen Skeggs2016-05-201-2/+2
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/core: remove pmc_enable argument from subdev ctorBen Skeggs2016-05-201-1/+1
| | | | | | These are now specified directly in the MC subdev. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/bios/extdev: also parse v4.1 tableKarol Herbst2016-03-141-1/+1
| | | | | Signed-off-by: Karol Herbst <nouveau@karolherbst.de> Reviewed-by: Martin Peres <martin.peres@free.fr>
* drm/nouveau/nvbios/iccsense: add parsing of the SENSE tableMartin Peres2016-03-142-0/+101
| | | | | | | | | Karol Herbst: v4: don't kmalloc(0) v5: stricter validation Signed-off-by: Karol Herbst <nouveau@karolherbst.de> Reviewed-by: Martin Peres <martin.peres@free.fr>
* drm/nouveau/bios/devinit: properly handle unknown generic conditionsBen Skeggs2016-03-141-2/+3
| | | | | | | | Upon encountering an unknown condition code, the script interpreter is supposed to skip 'size' bytes and continue at the next devinit token. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/bios/devinit: rename INIT_DP_CONDITION to INIT_GENERIC_CONDITIONBen Skeggs2016-03-141-5/+5
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/bios/perf: parse the pci speed from the bios for tesla and newer ↵Karol Herbst2016-01-111-0/+16
| | | | | | cards Signed-off-by: Karol Herbst <nouveau@karolherbst.de>
* drm/nouveau/bios: parse 8.1 Gbps DP link rateBen Skeggs2016-01-111-4/+7
| | | | | | From DCB 4.1 spec. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/bios/fan: hardcode the fan mode to linearMartin Peres2015-12-181-0/+1
| | | | | | | | | | | | | | | | This is an oversight that made use of the trip-point-based fan managenent on cards that never expose those. This led the fan to stay at fan_min. Fortunately, the emergency code would kick when the temperature would reach 90°C. Reported-by: Tom Englund <tomenglund26@gmail.com> Tested-by: Tom Englund <tomenglund26@gmail.com> Signed-off-by: Martin Peres <martin.peres@free.fr> Tested-by: Daemon32 <lnf.purple@gmail.com> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=92126 Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Cc: stable@vger.kernel.org
* drm/nouveau/fb/ramnv50: Voltage GPIOsRoy Spliet2015-11-031-0/+1
| | | | | | | | Does not seem to be necessary for NVA0, hence untested by me. Signed-off-by: Roy Spliet <rspliet@eclipso.eu> Tested-by: Pierre Moreau <pierre.morrow@free.fr> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/fb/ramgt215: Change FBVDD/Q when BIOS asks for itRoy Spliet2015-11-031-0/+1
| | | | | Signed-off-by: Roy Spliet <rspliet@eclipso.eu> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/bios/rammap: Identify DLLoff for >= GF100Roy Spliet2015-11-031-1/+1
| | | | | Signed-off-by: Roy Spliet <rspliet@eclipso.eu> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: remove unused functionSudip Mukherjee2015-11-031-13/+0
| | | | | | | | | | coverity.com reported that memset was using a buffer of size 0, on checking the code it turned out that the function was not being used. So remove it. Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/bios/volt: add support for pwm-based volt managementMartin Peres2015-11-031-2/+15
| | | | | Signed-off-by: Martin Peres <martin.peres@free.fr> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/bios: fix OF loadingIlia Mirkin2015-10-123-11/+36
| | | | | | | | | | | | | | | Currently OF bios load fails for a few reasons: - checksum failure - bios size too small - no PCIR header - bios length not a multiple of 4 In this change, we resolve all of the above by ignoring any checksum failures (since OF VBIOS tends not to have a checksum), and faking the PCIR data when loading from OF. Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/bios: translate devinit pri/sec i2c bus to internal identifiersBen Skeggs2015-10-121-0/+6
| | | | | | | | fdo#92013. Regression from "i2c: transition pad/ports away from being based on nvkm_object" Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* nouveau: fix powerpc buildDave Airlie2015-08-281-2/+2
| | | | | Reported-by: Ilia Mirkin on irc. Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/nouveau/device: remove pci/platform_device from common structBen Skeggs2015-08-283-6/+20
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/pci: new subdevBen Skeggs2015-08-281-11/+6
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/gpio: convert to new-style nvkm_subdevBen Skeggs2015-08-281-4/+4
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/devinit: convert to new-style nvkm_subdevBen Skeggs2015-08-281-7/+5
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/bios: convert to new-style nvkm_subdevBen Skeggs2015-08-2811-63/+41
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/subdev: rename some functions to avoid upcoming conflictsBen Skeggs2015-08-281-2/+2
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/i2c: transition pad/ports away from being based on nvkm_objectBen Skeggs2015-08-282-41/+39
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/vga: require nvkm_device pointer in accessor functionsBen Skeggs2015-08-282-7/+9
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/bios: remove object accessor functionsBen Skeggs2015-08-2832-929/+849
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/bios: switch to subdev printk macrosBen Skeggs2015-08-2813-54/+70
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/bios: switch to device pri macrosBen Skeggs2015-08-285-30/+38
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/bios: cosmetic changesBen Skeggs2015-08-282-4/+4
| | | | | | | This is purely preparation for upcoming commits, there should be no code changes here. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/device: include core/device.h automatically for subdevs/enginesBen Skeggs2015-08-2811-18/+0
| | | | | | | | | | Pretty much every subdev/engine is going to need access to nvkm_device shortly to touch registers and/or output messages. The odd placement of the includes is necessary to work around some inter-dependencies that currently exist. This will be fixed later. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/disp/dp: fix some tx_pu mishandlingBen Skeggs2015-08-281-1/+1
| | | | | | | We only need to mask 0x0f on GM2xx, and want to keep the higher bits on earlier cards. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/bios/dp: use alternate set of drvctl values where necessaryBen Skeggs2015-08-281-5/+4
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/bios/dcb: accept "maxwell" lane count values for dcb 4.0Ben Skeggs2015-08-281-14/+13
| | | | | | | | We previously assumed that the values "2" and "4" were new in DCB 4.1, however, there's at least one GM107 DCB 4.0 board (Quadro K620) that uses the newer values. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/bios: add opcodes 0x73 and 0x77Ilia Mirkin2015-08-281-0/+37
| | | | | | | | No known VBIOSes use these, but they are present in the actual VBIOS table parsing logic. No harm in adding these too. Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/bios/ramcfg: Separate out RON pull valueRoy Spliet2015-08-282-1/+4
| | | | | Signed-off-by: Roy Spliet <rspliet@eclipso.eu> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/bios/rammap: Parse perf mode as if it's a rammap entryRoy Spliet2015-08-281-0/+15
| | | | | | | Some of the bits in there are similar to the bits in the gt215 rammap. Signed-off-by: Roy Spliet <rspliet@eclipso.eu> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/fb/ramnv50: Ressurect timing code, use proper timing/rammap handlersRoy Spliet2015-08-281-0/+29
| | | | | | | Might need some generalisation to < GT200. For those: use at your own risk! Signed-off-by: Roy Spliet <rspliet@eclipso.eu> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/bios/rammap: Pull DLLoff bit out of version 0x10 structRoy Spliet2015-08-281-1/+1
| | | | | | | In preparation of NV50 reclocking, where there is no version Signed-off-by: Roy Spliet <rspliet@eclipso.eu> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/bios: add proper support for opcode 0x59Ilia Mirkin2015-07-271-4/+20
| | | | | | | | | More analysis shows that this is identical to 0x79 except that it loads the frequency indirectly from elsewhere in the VBIOS. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=91025 Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
OpenPOWER on IntegriCloud