summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/nouveau/nouveau_bios.c
Commit message (Collapse)AuthorAgeFilesLines
...
| * drm/nouveau: allow static performance level settingBen Skeggs2010-09-241-1/+4
| | | | | | | | | | | | | | Guarded by a module parameter for the moment, read the code for the magic value which enables it. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| * drm/nouveau: make bios code easier to use externallyBen Skeggs2010-09-241-23/+31
| | | | | | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| * drm/nouveau: make the behaviour of get_pll_limits() consistentBen Skeggs2010-09-241-32/+104
| | | | | | | | | | | | | | | | | | | | | | This replaces all the pll_types definitions for ones that match the types used in the tables in recent VBIOS versions. get_pll_limits() will now accept either type or register value as input across all limits table versions, and will store the actual register ID that a PLL type refers to in the returned structure. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* | mm: stack based kmap_atomic()Peter Zijlstra2010-10-261-4/+4
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Keep the current interface but ignore the KM_type and use a stack based approach. The advantage is that we get rid of crappy code like: #define __KM_PTE \ (in_nmi() ? KM_NMI_PTE : \ in_irq() ? KM_IRQ_PTE : \ KM_PTE0) and in general can stop worrying about what context we're in and what kmap slots might be appropriate for that. The downside is that FRV kmap_atomic() gets more expensive. For now we use a CPP trick suggested by Andrew: #define kmap_atomic(page, args...) __kmap_atomic(page) to avoid having to touch all kmap_atomic() users in a single patch. [ not compiled on: - mn10300: the arch doesn't actually build with highmem to begin with ] [akpm@linux-foundation.org: coding-style fixes] [akpm@linux-foundation.org: fix up drivers/gpu/drm/i915/intel_overlay.c] Acked-by: Rik van Riel <riel@redhat.com> Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Acked-by: Chris Metcalf <cmetcalf@tilera.com> Cc: David Howells <dhowells@redhat.com> Cc: Hugh Dickins <hughd@google.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: "H. Peter Anvin" <hpa@zytor.com> Cc: Steven Rostedt <rostedt@goodmis.org> Cc: Russell King <rmk@arm.linux.org.uk> Cc: Ralf Baechle <ralf@linux-mips.org> Cc: David Miller <davem@davemloft.net> Cc: Paul Mackerras <paulus@samba.org> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Dave Airlie <airlied@linux.ie> Cc: Li Zefan <lizf@cn.fujitsu.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* drm/nouveau: Fix TMDS on some DCB1.5 boards.Francisco Jerez2010-08-261-14/+6
| | | | | | | | | The TMDS output of an nv11 was being detected as LVDS, because it uses DCB type 2 for TMDS instead of type 4. Reported-by: Bertrand VIEILLE <Vieille.Bertrand@free.fr> Signed-off-by: Francisco Jerez <currojerez@riseup.net> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: Fix backlight control on PPC machines with an internal TMDS panel.Francisco Jerez2010-08-261-21/+4
| | | | | | | | This commit fixes fdo bug 29685. Reported-by: Vlado Plaga <rechner@vlado-do.de> Signed-off-by: Francisco Jerez <currojerez@riseup.net> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: Use a helper function to match PCI device/subsystem IDs.Francisco Jerez2010-08-261-13/+4
| | | | | Signed-off-by: Francisco Jerez <currojerez@riseup.net> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nv50: add dcb type 14 to enum to prevent compiler complaintBen Skeggs2010-08-261-1/+1
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: fix earlier mistake when fixing merge conflictBen Skeggs2010-08-171-2/+2
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: Workaround missing GPIO tables on an Apple iMac G4 NV18.Francisco Jerez2010-08-171-0/+16
| | | | | | | | | This should fix the reported TV-out load detection false positives (fdo bug 29455). Reported-by: Vlado Plaga <rechner@vlado-do.de> Signed-off-by: Francisco Jerez <currojerez@riseup.net> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: punt some more log messages to debug levelBen Skeggs2010-08-171-5/+5
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: remove warning about unknown tmds table revisionsBen Skeggs2010-08-171-7/+5
| | | | | | | | This message is apparently confusing people, and is being blamed for some modesetting issues. Lets remove the message, and instead replace it with an unconditional printout of the table revision. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: Fix DCB TMDS config parsing.Francisco Jerez2010-08-091-4/+4
| | | | | | Thinko caused by 43bda05428a3d2021f3c12220073e0251c65df8b. Signed-off-by: Francisco Jerez <currojerez@riseup.net>
* drm/nv04: Fix up SGRAM density detection.Francisco Jerez2010-08-091-1/+1
| | | | | Signed-off-by: Francisco Jerez <currojerez@riseup.net> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: Init dcb->or on cards that have no usable DCB table.Francisco Jerez2010-08-091-1/+1
| | | | | | | We need a valid OR value because there're a few nv17 cards with DCB v1.4. Signed-off-by: Francisco Jerez <currojerez@riseup.net> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: reduce severity of some "error" messagesBen Skeggs2010-08-061-2/+2
| | | | | | | There's some known configurations where the lack of these tables/scripts is perfectly normal, reduce visibilty of complaint messages to debug. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: implement init table opcodex 0x5e and 0x9aMarcin Kościelnicki2010-08-061-0/+123
| | | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Signed-off-by: Marcin Kościelnicki <koriakin@0x04.net>
* drm/nouveau: implement init table op 0x57, INIT_LTIMEMarcin Kościelnicki2010-08-061-0/+26
| | | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Signed-off-by: Marcin Kościelnicki <koriakin@0x04.net>
* drm/nvc0: implement crtc pll settingBen Skeggs2010-08-061-1/+1
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nvc0: allow INIT_GPIOBen Skeggs2010-08-061-1/+1
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nv17-nv4x: Attempt to init some external TMDS transmitters.Francisco Jerez2010-08-061-1/+20
| | | | | | | | | | | sil164 and friends are the most common, usually they just need to be poked once because a fixed configuration is enough for any modes and clocks, so they worked without this patch if the BIOS had done a good job on POST. Display couldn't survive a suspend/resume cycle though. Unfortunately, BIOS scripts are useless here. Signed-off-by: Francisco Jerez <currojerez@riseup.net> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: Fix the INIT_CONFIGURE_PREINIT BIOS opcode.Francisco Jerez2010-08-061-1/+1
| | | | | Signed-off-by: Francisco Jerez <currojerez@riseup.net> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: Don't pass misaligned offsets to io_mapping_map_atomic_wc().Francisco Jerez2010-08-061-4/+6
| | | | | Signed-off-by: Francisco Jerez <currojerez@riseup.net> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm,io-mapping: Specify slot to use for atomic mappingsChris Wilson2010-08-051-4/+4
| | | | | | | | | This is required should we ever attempt to use an io-mapping where KM_USER0 is verboten, such as inside an IRQ context. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Eric Anholt <eric@anholt.net> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/nouveau: introduce gpio engineBen Skeggs2010-07-261-1/+2
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: Get rid of the remaining VGA CRTC locking.Francisco Jerez2010-07-261-11/+2
| | | | | Signed-off-by: Francisco Jerez <currojerez@riseup.net> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: Reset CRTC owner to 0 before BIOS init.Francisco Jerez2010-07-261-2/+4
| | | | | | | | Fixes suspend+multihead on some boards that also use BIOS scripts for modesetting. Signed-off-by: Francisco Jerez <currojerez@riseup.net> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: No need to lock/unlock the VGA CRTC regs all the time.Francisco Jerez2010-07-261-6/+5
| | | | | | | | Locking only makes sense in the VBIOS parsing code as it's executed before CRTC init. Signed-off-by: Francisco Jerez <currojerez@riseup.net> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nv04-nv3x: Implement init-compute-mem.Francisco Jerez2010-07-261-59/+359
| | | | | | | | | | | | | | Init-compute-mem was the last piece missing for nv0x-nv3x card cold-booting. This implementation is somewhat lacking but it's been reported to work on most chipsets it was tested in. Let me know if it breaks suspend to RAM for you. Signed-off-by: Francisco Jerez <currojerez@riseup.net> Tested-by: Patrice Mandin <patmandin@gmail.com> Tested-by: Ben Skeggs <bskeggs@redhat.com> Tested-by: Xavier Chantry <chantry.xavier@gmail.com> Tested-by: Marcin Kościelnicki <koriakin@0x04.net> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: Add some PFB register defines.Francisco Jerez2010-07-261-11/+11
| | | | | | | | Also collect all the PFB registers in a single place and remove some duplicated definitions. Signed-off-by: Francisco Jerez <currojerez@riseup.net> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: Fix a sparse warning.Francisco Jerez2010-07-261-6/+6
| | | | | | | It doesn't like variable length arrays. Signed-off-by: Francisco Jerez <currojerez@riseup.net> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nv50: fix regression that break LVDS in some placesBen Skeggs2010-07-261-0/+1
| | | | | | | | A previous commit started additionally using the SOR link when trying to match the correct output script. However, we never fill in this field for LVDS so we can never match a script at all. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: support fetching LVDS EDID from ACPIBen Skeggs2010-07-261-1/+3
| | | | | | | Based on a patch from Matthew Garrett. Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Acked-by: Matthew Garrett <mjg@redhat.com>
* drm/nouveau: remove quirk to fabricate DVI-A output on DCB 1.5 boardsBen Skeggs2010-07-261-7/+0
| | | | | | | | | | | | | | There's a report of this quirk breaking modesetting on at least one board. After discussion with Francisco Jerez, we've decided to remove it: <darktama> it's not worth limiting the quirk to just where we know it can work? i'm happy either way really :) <curro> hmm, don't think so, most if not all DCB15 cards have just one DAC <curro> and with that quirk there's no way to tell if the load comes from the VGA or DVI port Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Acked-by: Francisco Jerez <currojerez@riseup.net>
* drm/nouveau: fix pcirom vbios shadow breakage from acpi rom patchBen Skeggs2010-07-131-24/+9
| | | | | | | | | | | On nv50 it became impossible to attempt a PCI ROM shadow of the VBIOS, which will break some setups. This patch also removes the different ordering of shadow methods for pre-nv50 chipsets. The reason for the different ordering was paranoia, but it should hopefully be OK to try shadowing PRAMIN first. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: INIT_CONFIGURE_PREINIT/CLK/MEM on newer BIOSes is not an error.Francisco Jerez2010-07-131-3/+3
| | | | | | | | No need to spam the logs when they're found, they're equivalent to INIT_DONE. Signed-off-by: Francisco Jerez <currojerez@riseup.net> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nv50: DCB quirk for Dell M6300Ben Skeggs2010-07-131-0/+28
| | | | | | | | Uncertain if this is a weirdo configuration, or a BIOS bug. If it's not a BIOS bug, we still don't know how to make it work anyway so ignore a "conflicting" DCB entry to prevent a display hang. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: downgrade severity of most init table parser errorsBen Skeggs2010-07-131-42/+70
| | | | | | | | As long as we know the length of the opcode, we're probably better off trying to parse the remainder of an init table rather than aborting in the middle of it. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: Ignore broken legacy I2C entries.Francisco Jerez2010-07-131-4/+8
| | | | | | | | | | | The nv05 card in the bug report [1] doesn't have usable I2C port register offsets (they're all filled with zeros). Ignore them and use the defaults. [1] http://bugs.launchpad.net/bugs/569505 Signed-off-by: Francisco Jerez <currojerez@riseup.net> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: Don't clear AGPCMD completely on INIT_RESET.Francisco Jerez2010-07-131-1/+2
| | | | | | | | | | | | | We just need to clear the SBA and ENABLE bits to reset the AGP controller: If the AGP bridge was configured to use "fast writes", clearing the FW bit would break the subsequent MMIO writes and eventually end with a lockup. Note that all the BIOSes I've seen do the same as we did (it works for them because they don't use MMIO), OTOH the blob leaves FW untouched. Signed-off-by: Francisco Jerez <currojerez@riseup.net> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: off by one in init_i2c_device_find()Dan Carpenter2010-06-081-1/+1
| | | | | | | | dcb->i2c[] has DCB_MAX_NUM_I2C_ENTRIES entries. Signed-off-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/nouveau: match U/DP script against SOR linkBen Skeggs2010-06-081-3/+20
| | | | | | | | It appears version 0x21 'U' and 'd' tables require us to take the SOR link into account when selecting the appropriate table for a particular output. Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* Merge remote branch 'nouveau/for-airlied' of ../drm-nouveau-next into ↵Dave Airlie2010-06-011-11/+40
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | drm-testing * 'nouveau/for-airlied' of ../drm-nouveau-next: drm/nv50: cast IGP memory location to u64 before shifting drm/nv50: use alternate source of SOR_MODE_CTRL for DP hack drm/nouveau: fix dual-link displays when plugged into single-link outputs drm/nv50: obey dcb->duallink_possible drm/nv50: fix duallink_possible calculation for DCB 4.0 cards drm/nouveau: don't execute INIT_GPIO unless we're really running the table drm/nv40: allow cold-booting of nv4x chipsets drm/nouveau: fix POST detection for certain chipsets drm/nouveau: Add getparam for current PTIMER time. drm/nouveau: allow cursor image and position to survive suspend
| * drm/nv50: fix duallink_possible calculation for DCB 4.0 cardsBen Skeggs2010-05-281-6/+10
| | | | | | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| * drm/nouveau: don't execute INIT_GPIO unless we're really running the tableBen Skeggs2010-05-281-1/+4
| | | | | | | | | | | | | | | | | | This resulted in accidently switching off the eDP panel on certain laptops since the default state in the GPIO table was off. Fixes rh#582621 Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| * drm/nv40: allow cold-booting of nv4x chipsetsBen Skeggs2010-05-281-1/+1
| | | | | | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| * drm/nouveau: fix POST detection for certain chipsetsBen Skeggs2010-05-281-3/+25
| | | | | | | | | | | | | | | | | | | | | | | | We totally fail at detecting un-POSTed chipsets prior to G80. This commit changes the pre-G80 POST detection to read the programmed horizontal total from CRTC 0, and assume the card isn't POSTed if it's 0. NVIDIA use some other heuristics more similar to what we do on G80, but I wasted quite a long time trying to figure out the exact specifics of what they do so we can try this for a bit instead. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* | drm/nouveau: attempt to get bios from ACPI v3Dave Airlie2010-06-011-0/+20
|/ | | | | | | | Some of the laptops with the switchable graphics, seem to not post the secondary GPU at all, and we can't find a copy of the BIOS anywhere except in the ACPI rom retrieval. This adds support for ACPI ROM retrieval to nouveau. Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/nouveau: fix i2c-related init table handlersBen Skeggs2010-05-191-39/+38
| | | | | | | | Mutliple issues. INIT_ZM_I2C_BYTE/INIT_I2C_BYTE didn't even try and use the register value, and all the handlers were using the wrong slave address. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: support init table i2c device identifier 0x81Ben Skeggs2010-05-191-0/+3
| | | | | | It appears to be meant to reference the second "default index". Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
OpenPOWER on IntegriCloud