aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/nouveau/nouveau_bios.c
Commit message (Collapse)AuthorAge
* drm/nouveau: port remainder of drm code, and rip out compat layerBen Skeggs2012-10-02
| | | | | | | | v2: Ben Skeggs <bskeggs@redhat.com> - fill in nouveau_pm.dev to prevent oops - fix ppc issues (build + OF shadow) Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: flatten nv{Read,Write}{MC,VIDEO,FB,EXTDEV}Ben Skeggs2012-10-02
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/mxm: split up into bios code and a subdev moduleBen Skeggs2012-10-02
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: implement devinit subdev, and new init table parserBen Skeggs2012-10-02
| | | | | | | v2: - make sure not to execute display scripts unless resuming Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/clock: pull in the implementation from all over the placeBen Skeggs2012-10-02
| | | | | | | Still missing the main bits we use to change performance levels, I'll get to it after all the hard yakka has been finished. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/i2c: port to subdev interfacesBen Skeggs2012-10-02
| | | | | | | | | | | v2/v3: Ben Skeggs <bskeggs@redhat.com> - fix typo in default bus selection - fix accidental loss of destructor v4: Dmitry Eremin-Solenikov <dmitry_eremin@mentor.com> - fix typo causing incorrect default i2c port settings when no BMP data Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/gpio: port gpio to subdev interfacesBen Skeggs2012-10-02
| | | | | | | v2: Ben Skeggs <bskeggs@redhat.com> - rebase on top of v3.6-rc6 with gpio reset patch integrated already Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/oldbios: remove shadowing support, use bios subdev's imageBen Skeggs2012-10-02
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: restructure source tree, split core from drm implementationBen Skeggs2012-10-02
| | | | | | | | | | | | | | Future work will be headed in the way of separating the policy supplied by the nouveau drm module from the mechanisms provided by the driver core. There will be a couple of major classes (subdev, engine) of driver modules that have clearly defined tasks, and the further directory structure change is to reflect this. No code changes here whatsoever, aside from fixing up a couple of include file pathnames. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: dcb table quirk for fdo#50830Ben Skeggs2012-07-25
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/bios: fix some shadowing issues, particularly acpiBen Skeggs2012-05-24
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/bios: allow loading alternate vbios image as firmwareBen Skeggs2012-05-24
| | | | | | Useful for debugging different VBIOS versions. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/bios: fix regression on some nv4x boardBen Skeggs2012-04-30
| | | | | | | | | | We started using the connector table on nv4x a while back, and this VBIOS has bad connector indices which causes the wrong encoders to get paired with connectors. Add a quirk to fix this... Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* Revert "nouveau/bios: Fix tracking of BIOS image data"Linus Torvalds2012-04-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit d06221c0617ab6d0bc41c4980cefdd9c8cc9a1c1. It turns out to trigger the "BUG_ON(!PageCompound(page))" in kfree(), apparently because the code ends up trying to free somethng that was never kmalloced in the first place. BenH points out that the patch was untested and wasn't meant to go into the upstream kernel that quickly in the first place. Backtrace: bios_shadow bios_shadow_prom nv_mask init_io bios_shadow nouveau_bios_init NVReadVgaCrtc NVSetOwner nouveau_card_init nouveau_load Reported-by: Meelis Roos <mroos@linux.ee> Requested-by: Dave Airlie <airlied@gmail.com> Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Ben Skeggs <bskeggs@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* nouveau/bios: Fix tracking of BIOS image dataBenjamin Herrenschmidt2012-04-02
| | | | | | | | | | | | | | | | | | The code tries various methods for retreiving the BIOS data. However it doesn't clear the bios->data pointer between the iterations. In some cases, the shadow() method will fail and not update bios->data at all, which will cause us to "score" the old data and incorrectly attribute that score to the new method. This can cause double frees later when disposing of the unused data. Additionally, we were not freeing the data for methods that fail the score test (we only freed when a "best" is superseeded, not when the new method has a lower score than the exising "best"). Fix that as well. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Acked-by: Ben Skeggs <bskeggs@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* nouveau: Fix crash when pci_ram_rom() returns a size of 0Benjamin Herrenschmidt2012-04-02
| | | | | | | | | | | | | | | | | From b15b244d6e6e20964bd4b85306722cb60c3c0809 Mon Sep 17 00:00:00 2001 From: Benjamin Herrenschmidt <benh@kernel.crashing.org> Date: Mon, 2 Apr 2012 13:28:18 +1000 Subject: Under some circumstances, pci_map_rom() can return a valid mapping but a size of 0 (if it cannot find an image in the header). This causes nouveau to try to kmalloc() a 0 sized pointer and dereference it, which crashes. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Acked-by: Ben Skeggs <bskeggs@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/nouveau/dp: support version 4.0 of DP tableBen Skeggs2012-03-22
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/bios: rework vbios shadowingBen Skeggs2012-03-13
| | | | | | | | | Refactored to allow shadowing of VBIOS images longer than 64KiB, which allows us to pass the VBIOS checksum test on certain boards. There's also a workaround for reading the PROM VBIOS on some chipsets. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/bios: attempt acpi rom fetch before pciromBen Skeggs2012-03-13
| | | | | | | There's cards out there with completely messed up PCIROM images that have a perfectly valid signature.. Sigh! Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/gpio: reimplement as nouveau_gpio.c, fixing a number of issuesBen Skeggs2011-12-21
| | | | | | | | | | | | | | - moves out of nouveau_bios.c and demagics the logical state definitions - simplifies chipset-specific driver interface - makes most of gpio irq handling common, will use for nv4x hpd later - api extended to allow both direct gpio access, and access using the logical function states - api extended to allow for future use of gpio extender chips - pre-nv50 was handled very badly, the main issue being that all GPIOs were being treated as output-only. - fixes nvd0 so gpio changes actually stick, magic reg needs bashing Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nv04/disp: handle dual-link spwg panels without needing quirksBen Skeggs2011-12-21
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/mxm: initial implementation of dcb sanitisationBen Skeggs2011-12-21
| | | | | | | | | | | | | | | | The DCB table provided by the VBIOS on most MXM chips has a number of entries which either need to be disabled, or modified according to the MXM-SIS Output Device Descriptors. The x86 vbios code usually takes care of this for us, however, with the large number of laptops now with switchable graphics or optimus, a lot of the time nouveau is responsible for POSTing the card instead - leaving some fun situations like, plugging in a monitor and having nouveau decide 3 connectors actually just got plugged in.. No MXM-SIS fetching methods implemented yet. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/disp: parse connector info directly in nouveau_connector.cBen Skeggs2011-12-21
| | | | | | | | | | | | Another case where we parsed vbios data to some structs, then again use that info once to construct another set of data. Skip the intermediate step. This is also slightly improved in that we can now use DCB 3.x connector table info, which will allow NV4x to gain hotplug support, and to make quirks for SPWG LVDS panels unnecessary. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/i2c: do parsing of i2c-related vbios info in nouveau_i2c.cBen Skeggs2011-12-21
| | | | | | | | Not much point parsing the vbios data into a struct which is only used once to parse the data into another struct, go directly from vbios to nouveau_i2c_chan. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/bios: start refactoring dcb routinesBen Skeggs2011-12-21
| | | | | | | | This primary reason for this was mostly to avoid duplication of some of this stuff by the MXM-SIS parser. However, some other cleanups will also follow this as a result. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/bios: fold fixup_legacy_i2cBen Skeggs2011-12-21
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/bios: pass drm_device to ROMPTR, rather than nvbiosBen Skeggs2011-12-21
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nv50/pm: s/PLL_UNK05/PLL_VDEC/Martin Peres2011-12-21
| | | | | | | | | | Following to "drm/nv50/pm: s/unk05/vdec/", let's rename the PLL to PLL_VDEC PLL names are purely indicative and are based on the most important engine it clocks. Signed-off-by: Martin Peres <martin.peres@labri.fr> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/gpio: remove invert flag, use state[] everywhereBen Skeggs2011-12-21
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nv50/bios: fixup mpll programming from the init table parserBen Skeggs2011-11-09
| | | | | | | Reportedly this has been causing stability and corruption issues after resuming from suspend for a few people. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nv40/pm: execute memory reset script from vbiosBen Skeggs2011-09-20
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/dp: return master dp table pointer too when looking up encoderBen Skeggs2011-09-20
| | | | | | | Will need to be able to distinguish 2.0/2.1 from 3.0 soon. Also, move the vbios parsing to nouveau_dp where it belongs. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/bios: simplify U/d table hash matching func to just matchBen Skeggs2011-09-20
| | | | | | | The caller is now responsible for parsing its own lists (or whatever) of possible encoders. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/dp: store unencoded link_bw everywhereBen Skeggs2011-09-20
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/dp: restructure link training codeBen Skeggs2011-09-20
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/bios: check for null script pointers in parserBen Skeggs2011-09-20
| | | | | | Allows us to be lazy elsewhere... Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/bios: allow passing in crtc to the init table parserBen Skeggs2011-09-20
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/bios: fix INIT_GPIO for new chipsetsBen Skeggs2011-09-20
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nvd0/gpio: initial implementationBen Skeggs2011-09-20
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: Add a quirk for Gigabyte NX86TEmil Velikov2011-07-24
| | | | | | | | | The connector table lies, the card has DVI-I not HDMI Fixes bug https://bugs.freedesktop.org/show_bug.cgi?id=35675 v2: Mention the bugreport Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: fix fetching vbios from above 4GiB vram addressesBen Skeggs2011-06-26
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: silence error for missing dac loadval tableBen Skeggs2011-06-23
| | | | | | | There's lots of boards (all recent ones) that don't have this anymore, so punt the message to debug loglevel. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nv50: DCB table quirks for another busted XFX boardBen Skeggs2011-06-23
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: recognise DCB connector type 0x41 as LVDSBen Skeggs2011-05-15
| | | | | | | | After looking at a number of different logs, it appears 0x41 likely indicates the presense of an LVDS panel following the SPWG spec (http://www.spwg.org/) Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: pull refclk from vbios on limits 0x40 boardsBen Skeggs2011-05-15
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: quirk for XFX GT-240X-YABen Skeggs2011-04-04
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: implement init table opcode 0x5cBen Skeggs2011-04-04
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/vbios: parse more gpio tag bits from connector tableBen Skeggs2011-02-24
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: make vbios parser runnable from an atomic contextBen Skeggs2011-02-24
| | | | | | | | | The nv50 display isr bh needs to be converted to a tasklet, which means we can't sleep anymore. The places we execute vbios init tables are rare, and not in any way performance critical, so this isn't a huge problem. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* Merge remote-tracking branch 'airlied/drm-core-next' into drm-nouveau-nextBen Skeggs2011-02-24
|\