summaryrefslogtreecommitdiff
path: root/drivers
Commit message (Collapse)AuthorAgeFilesLines
* drm/nouveau: Add temperature support (vbios parsing, readings, hwmon)Martin Peres2010-09-245-39/+518
| | | | | Signed-off-by: Martin Peres <martin.peres@ensi-bourges.fr> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: correct INIT_DP_CONDITION subcondition 5Ben Skeggs2010-09-241-1/+1
| | | | | | Fixes DP output on a GTX 465 board I have. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: Parse old style perf tables.Francisco Jerez2010-09-242-4/+53
| | | | | | | | | | | | | Used on nv17-nv28, they contain memory clocks and timings, only one of the table entries can actually be used, depending on the RAMCFG straps, and it's usually higher than the frequency programmed on boot by the BIOS. The memory timings listed in table version 0x1x are used to init the 0x12xx range but they aren't required for reclocking to work. Signed-off-by: Francisco Jerez <currojerez@riseup.net> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nv50: flush bar1 vm / dma object setup before poking 0x1708Ben Skeggs2010-09-241-0/+2
| | | | | | | Should fix issues noticed on NVAC (MacBook Pro / ION) since gpuobj rework. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: fix thinko in volt 0x1x parsingBen Skeggs2010-09-241-3/+6
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: implement parsing of DCB 2.2 GPIO tableBen Skeggs2010-09-241-93/+63
| | | | | | | Found on NV3x boards, this should allow voltage modifications to work on these chipsets. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: fix potential accuracy loss when parsing perf 0x1c tablesBen Skeggs2010-09-241-20/+14
| | | | | Reported-by: Roy Spliet <r.spliet@student.tudelft.nl> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: Fix build regression, undefined reference to `acpi_video_get_edid'Phil Turmel2010-09-241-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Build breakage: drivers/built-in.o: In function `nouveau_acpi_edid': (.text+0x13404e): undefined reference to `acpi_video_get_edid' make: *** [.tmp_vmlinux1] Error 1 Introduced by: a6ed76d7ffc62ffa474b41d31b011b6853c5de32 is the first bad commit commit a6ed76d7ffc62ffa474b41d31b011b6853c5de32 Author: Ben Skeggs <bskeggs@redhat.com> Date: Mon Jul 12 15:33:07 2010 +1000 drm/nouveau: support fetching LVDS EDID from ACPI Based on a patch from Matthew Garrett. Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Acked-by: Matthew Garrett <mjg@redhat.com> It doesn't seem to revert cleanly, but the problem lies in these two config entries: CONFIG_ACPI=y CONFIG_ACPI_VIDEO=m Adding a select for ACPI_VIDEO appears to be the best solution, and is comparable to what is done in DRM_I915. Builds, boots, and appears to work correctly. Signed-off-by: Philip J. Turmel <philip@turmel.org> Signed-off-by: Francisco Jerez <currojerez@riseup.net> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: restore perflvl on resume, and restore boot perflvl on unloadBen Skeggs2010-09-243-19/+49
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: allow static performance level settingBen Skeggs2010-09-246-4/+104
| | | | | | | 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/nv04-nv40: import initial pm backendBen Skeggs2010-09-245-3/+110
| | | | | | | | | | Currently just hooked up to the already-existing nouveau_hw, which should handle all relevant chipsets as well as we currently can. This will likely be eventually split out and improved into chipset specific code at a later point. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nv50: import initial clock get/set routines + hook up pm engineBen Skeggs2010-09-244-1/+138
| | | | | | | | | This will make nouveau_pm attempt to report the card's current performance level both during bootup, and through sysfs. This is a very initial implementation, and can be improved a *lot* Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: import initial work on vbios performance table parsingBen Skeggs2010-09-247-0/+678
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: make bios code easier to use externallyBen Skeggs2010-09-242-23/+50
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: make the behaviour of get_pll_limits() consistentBen Skeggs2010-09-246-59/+135
| | | | | | | | | | | 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>
* drm/nv50: fix 100c90 write on nva3Ben Skeggs2010-09-241-0/+1
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: zero dummy pageBen Skeggs2010-09-241-1/+1
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nv50: mark PCIEGART pages non-present rather than using dummy pageBen Skeggs2010-09-241-4/+3
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: we can't free ACPI EDID, so make a copy that we canBen Skeggs2010-09-241-1/+1
| | | | | | | | The rest of the connector code assumes we can kfree() the EDID pointer. This causes things to blow up with the ACPI EDID pointer we get passed. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: handle fifo pusher errors betterBen Skeggs2010-09-241-8/+37
| | | | | | | | | | | | The most important part of this change is that we now instruct PFIFO to drop all pending fetches, rather than attempting to skip a single dword and hope that things would magically sort themselves out - they usually don't, and we end up with PFIFO being completely hung. This commit also adds somewhat more useful logging when these exceptions occur. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: better handling of unmappable vramBen Skeggs2010-09-241-3/+20
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: Try to fetch an EDID from OF if DDC fails.Francisco Jerez2010-09-241-0/+36
| | | | | | | | | More Apple brain damage, it fixes the modesetting failure on an eMac G4 (fdo bug 29810). Reported-by: Zoltan Varnagy <doi@freemail.hu> Signed-off-by: Francisco Jerez <currojerez@riseup.net> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: Simplify tile region handling.Francisco Jerez2010-09-246-60/+36
| | | | | | | | | Instead of emptying the caches to avoid a race with the PFIFO puller, go straight ahead and try to recover from it when it happens. Also, kill pfifo->cache_flush and tile->lock, we don't need them anymore. Signed-off-by: Francisco Jerez <currojerez@riseup.net> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: Remove implicit argument from nv_wait().Francisco Jerez2010-09-2410-22/+24
| | | | | Signed-off-by: Francisco Jerez <currojerez@riseup.net> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: PRAMIN is available from the start on pre-nv50.Francisco Jerez2010-09-241-1/+3
| | | | | | | This makes sure that RAMHT is cleared correctly on start up. Signed-off-by: Francisco Jerez <currojerez@riseup.net> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: Add module parameter to override the default AGP rate.Francisco Jerez2010-09-243-5/+15
| | | | | Signed-off-by: Francisco Jerez <currojerez@riseup.net> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: Don't enable AGP FW on nv18.Francisco Jerez2010-09-241-2/+19
| | | | | | | | FW seems to be broken on nv18, it causes random lockups and breaks suspend/resume even with the blob. Signed-off-by: Francisco Jerez <currojerez@riseup.net> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: Don't remove ramht entries from the neighboring channels.Francisco Jerez2010-09-241-0/+18
| | | | | Signed-off-by: Francisco Jerez <currojerez@riseup.net> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: Break some long lines in the TV-out code.Francisco Jerez2010-09-243-66/+96
| | | | | Signed-off-by: Francisco Jerez <currojerez@riseup.net> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nv50: fix SOR count for early chipsetsBen Skeggs2010-09-242-9/+19
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nv50: report BAR access faultsBen Skeggs2010-09-241-0/+8
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nv50: move vm trap to nv50_fb.cBen Skeggs2010-09-243-46/+51
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nv50: demagic grctx, and add NVAF supportMarcin Kościelnicki2010-09-241-1182/+2123
| | | | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Signed-off-by: Marcin Kościelnicki <koriakin@0x04.net> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: protect ramht_find() from oopsing if on channel without ramhtBen Skeggs2010-09-241-0/+3
| | | | | | | | | | | This doesn't actually happen now, but there's a test case for an earlier kernel where a GPU error is signalled on one of nv50's fake channels, and the ramht lookup by the IRQ handler triggered an oops. This adds a check for RAMHT's existance on a channel before looking up an object handle. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: remove nouveau_gpuobj_late_takedownBen Skeggs2010-09-242-7/+1
| | | | | Reviewed-by: Francisco Jerez <currojerez@riseup.net> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: protect gpuobj list + global instmem heap with spinlockBen Skeggs2010-09-242-9/+27
| | | | | Reviewed-by: Francisco Jerez <currojerez@riseup.net> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: fix gpuobj refcount to use atomicsBen Skeggs2010-09-242-23/+12
| | | | | Reviewed-by: Francisco Jerez <currojerez@riseup.net> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: add spinlock around ramht modificationsBen Skeggs2010-09-242-21/+58
| | | | | Reviewed-by: Francisco Jerez <currojerez@riseup.net> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: tidy ram{ht,fc,ro} a bitBen Skeggs2010-09-2411-101/+69
| | | | | Reviewed-by: Francisco Jerez <currojerez@riseup.net> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: rework init ordering so nv50_instmem.c can be less badBen Skeggs2010-09-247-303/+243
| | | | | Reviewed-by: Francisco Jerez <currojerez@riseup.net> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nv50: calculate vram reordering block sizeBen Skeggs2010-09-242-2/+66
| | | | | | | | | | | Will be used at a later point when we plug in an alternative VRAM memory manager for GeForce 8+ boards. Based on pscnv code to do the same. Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Signed-off-by: Marcin Kościelnicki <koriakin@0x04.net> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nv50: allow gpuobjs that aren't mapped into apertureBen Skeggs2010-09-245-27/+86
| | | | | Reviewed-by: Francisco Jerez <currojerez@riseup.net> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: simplify fake gpu objectsBen Skeggs2010-09-245-86/+39
| | | | | Reviewed-by: Francisco Jerez <currojerez@riseup.net> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: remove nouveau_gpuobj_ref completely, replace with sanityBen Skeggs2010-09-2421-583/+459
| | | | | Reviewed-by: Francisco Jerez <currojerez@riseup.net> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: rebase per-channel pramin heap offsets to 0Ben Skeggs2010-09-244-25/+43
| | | | | Reviewed-by: Francisco Jerez <currojerez@riseup.net> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: modify object accessors, offset in bytes rather than dwordsBen Skeggs2010-09-2415-458/+474
| | | | | Reviewed-by: Francisco Jerez <currojerez@riseup.net> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: move ramht code out of nouveau_object.c, nothing to see hereBen Skeggs2010-09-244-132/+193
| | | | | Reviewed-by: Francisco Jerez <currojerez@riseup.net> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: have nv_mask return original register valueBen Skeggs2010-09-241-4/+3
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nv40: Try to set up CRE_LCD even if it has unknown bits set.Francisco Jerez2010-09-243-36/+20
| | | | | | | | | They don't seem to do anything useful, and we really want to program CRE_LCD if we aren't lucky enough to find the right CRTC binding already set. Signed-off-by: Francisco Jerez <currojerez@riseup.net> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nv17-nv4x: Fix analog load detection false positive on rare occasions.Francisco Jerez2010-09-241-0/+2
| | | | | | | | | | | On some boards the residual current DAC outputs can draw when they're disconnected can be high enough to give a false load detection positive (I've only seen it in the S-video luma output of some cards, but just to be sure). The output line capacitance is limited and sampling twice should fix it reliably. Signed-off-by: Francisco Jerez <currojerez@riseup.net> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>