Commit Graph

2945 Commits

Author SHA1 Message Date
Emil Velikov
eadc69cc90 drm/nouveau: don't use the default pll limits in table v2.1 on nv50+ cards
This fixes issues bug 30370 and prevents another possible divide by zero on
the original nv50 cards, by returning -ENOENT

Signed-off-by: Emil Velikov <eeydev@nottingham.ac.uk>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2010-10-05 09:59:34 +10:00
Francisco Jerez
8af29ccd79 drm/nv50: Fix large 3D performance regression caused by the interchannel sync patches.
Reported-by: Christoph Bumiller <e0425955@student.tuwien.ac.at>
Signed-off-by: Francisco Jerez <currojerez@riseup.net>
Tested-by: Maarten Maathuis <madman2003@gmail.com>
Tested-by: Xavier Chantry <chantry.xavier@gmail.com>
Tested-by: Ben Skeggs <bskeggs@redhat.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2010-10-05 09:59:28 +10:00
Francisco Jerez
6479881752 drm/nouveau: Synchronize buffer object moves in hardware.
Signed-off-by: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2010-10-05 09:59:22 +10:00
Francisco Jerez
0c6c1c2fb8 drm/nouveau: Use semaphores to handle inter-channel sync in hardware.
Signed-off-by: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2010-10-05 09:59:16 +10:00
Francisco Jerez
8ac3891b48 drm/nouveau: Provide a means to have arbitrary work run on fence completion.
Signed-off-by: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2010-10-05 09:59:12 +10:00
Francisco Jerez
2730723bbc drm/nouveau: Minor refactoring/cleanup of the fence code.
Mainly to make room for inter-channel sync.

Signed-off-by: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2010-10-05 09:58:59 +10:00
Marcin Kościelnicki
0cba1b7644 drm/nouveau: Add a module option to force card POST.
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2010-10-05 09:58:52 +10:00
Ben Skeggs
62841ab726 drm/nv50: prevent (IB_PUT == IB_GET) for occurring unless idle
Should fix a DMA race condition I've never seen myself, but could be
the culprit in some random hangs that have been reported.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2010-10-05 09:58:47 +10:00
Francisco Jerez
cd2fb2e9e0 drm/nv0x-nv4x: Leave the 0x40 bit untouched when changing CRE_LCD.
It's an unrelated PLL filtering control bit, leave it alone when
changing the CRTC-encoder binding.

Signed-off-by: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2010-10-05 09:58:43 +10:00
Francisco Jerez
23357e4da0 drm/nv30-nv40: Fix postdivider mask when writing engine/memory PLLs.
Signed-off-by: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2010-10-05 09:58:33 +10:00
Francisco Jerez
2756a4f5df drm/nouveau: Fix perf table parsing on BMP v5.25.
Signed-off-by: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2010-10-05 09:58:29 +10:00
Ben Skeggs
62acdc71cf drm/nouveau: fix required mode bandwidth calculation for DP
This should fix eDP on certain laptops with 18-bit panels, we were rejecting
the panel's native mode due to thinking there was insufficient bandwidth
for it.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2010-10-05 09:58:03 +10:00
Ben Skeggs
85341f27b4 drm/nouveau: fix typo in c2aa91afea5f7e7ae4530fabd37414a79c03328c
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2010-10-05 09:57:58 +10:00
Ben Skeggs
fade7ad56d drm/nva3: split pm backend out from nv50
This will end up quite different, it makes sense for it to be completely
separate.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2010-10-05 09:57:54 +10:00
Ben Skeggs
aee582de80 drm/nouveau: run perflvl and M table scripts on mem clock change
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2010-10-05 09:57:49 +10:00
Ben Skeggs
5c6dc65754 drm/nouveau: pass perflvl struct to clock_pre()
On certain boards, there's BIOS scripts and memory timings that need to
be modified with the memclk.  Just pass in the entire perflvl struct and
let the chipset-specific code decide what to do.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2010-10-05 09:57:41 +10:00
Ben Skeggs
fe224bb7e1 drm/nouveau: enable enhanced framing only if DP display supports it
Reported-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2010-10-05 09:57:35 +10:00
Roy Spliet
7760fcb020 drm/nouveau: Import initial memory timing work
This isn't correct everywhere yet, but since we don't use the data yet
it's perfectly safe to push in, and the information we gain from logs
will help to fix the remaining issues.

v2 (Ben Skeggs <bskeggs@redhat.com>):
- fixed up formatting
- free parsed timing info on takedown
- switched timing table printout to debug loglevel

Signed-off-by: Roy Spliet <r.spliet@student.tudelft.nl>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2010-10-05 09:57:32 +10:00
Ben Skeggs
5b32165b04 drm/nv50: use pll type rather than register for CRTC PLL
Just in case someone, somewhere, does something difficult.  This also
removes one path that was different between fermi and non-fermi.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2010-09-24 16:29:55 +10:00
Ben Skeggs
56edd964e8 drm/nouveau: v3.0 pll limits tables have type<->register mapping too
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2010-09-24 16:29:48 +10:00
Francisco Jerez
5c4abd09bd drm/nouveau: Misc cleanup of the PM code.
Signed-off-by: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2010-09-24 16:29:41 +10:00
Francisco Jerez
66146da066 drm/nouveau: Add support for I2C hardware monitoring devices.
Signed-off-by: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2010-09-24 16:29:36 +10:00
Francisco Jerez
8155cac489 drm/nouveau: Refactor nouveau_temp_get() into engine pointers.
Signed-off-by: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2010-09-24 16:29:29 +10:00
Francisco Jerez
e829d804d7 drm/nouveau: Double the perf table memory clocks on pre-G71 cards.
Signed-off-by: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2010-09-24 16:29:25 +10:00
Francisco Jerez
67e1d4fbae drm/nouveau: Fix parsing of the temperature constant correction.
Signed-off-by: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2010-09-24 16:29:19 +10:00
Francisco Jerez
d34ec507d4 drm/nouveau: Add sane sensor correction defaults for nv4a.
Signed-off-by: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2010-09-24 16:29:14 +10:00
Francesco Marella
4164743c82 drm/nv40: fix reading temp value
Signed-off-by: Francesco Marella <fmarl@paranoici.org>
Signed-off-by: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2010-09-24 16:29:06 +10:00
Francisco Jerez
5e6a74436e drm/nouveau: Don't try to parse a GPIO table on early DCBv2.2 BIOSes.
Signed-off-by: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2010-09-24 16:29:02 +10:00
Francisco Jerez
bb338bb6f2 drm/nv10: Don't oops if the card wants to switch to a channel with no grctx.
Signed-off-by: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2010-09-24 16:28:56 +10:00
Ben Skeggs
80dad869a3 drm/nouveau: fix panels using straps-based mode detection
nouveau_bios_fp_mode() zeroes the mode struct before filling in relevant
entries.  This nukes the mode id initialised by drm_mode_create(), and
causes warnings from idr when we try to remove the mode.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2010-09-24 16:28:50 +10:00
Ben Skeggs
9bb5863ab4 drm/nouveau: fix chipset vs card_type thinko
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2010-09-24 16:28:43 +10:00
Ben Skeggs
5220b3c14b drm/nv50: assume smaller tiles for bo moves
Somehow fixes some corruption seen in KDE..

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2010-09-24 16:28:39 +10:00
Ben Skeggs
5f7d42ece3 drm/nouveau: add debugfs file to forcibly evict everything from vram
Very useful for debugging buffer migration issues.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2010-09-24 16:28:33 +10:00
Martin Peres
34e9d85a1a drm/nouveau: Add temperature support (vbios parsing, readings, hwmon)
Signed-off-by: Martin Peres <martin.peres@ensi-bourges.fr>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2010-09-24 16:28:28 +10:00
Ben Skeggs
64d202b4d7 drm/nouveau: correct INIT_DP_CONDITION subcondition 5
Fixes DP output on a GTX 465 board I have.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2010-09-24 16:28:16 +10:00
Francisco Jerez
0fbb114af7 drm/nouveau: Parse old style perf tables.
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>
2010-09-24 16:28:12 +10:00
Ben Skeggs
038b8b2a0d drm/nv50: flush bar1 vm / dma object setup before poking 0x1708
Should fix issues noticed on NVAC (MacBook Pro / ION) since gpuobj
rework.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2010-09-24 16:28:06 +10:00
Ben Skeggs
dc7339df11 drm/nouveau: fix thinko in volt 0x1x parsing
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2010-09-24 16:27:58 +10:00
Ben Skeggs
e49f70f775 drm/nouveau: implement parsing of DCB 2.2 GPIO table
Found on NV3x boards, this should allow voltage modifications to work
on these chipsets.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2010-09-24 16:27:54 +10:00
Ben Skeggs
07b1266962 drm/nouveau: fix potential accuracy loss when parsing perf 0x1c tables
Reported-by: Roy Spliet <r.spliet@student.tudelft.nl>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2010-09-24 16:27:48 +10:00
Phil Turmel
e022878571 drm/nouveau: Fix build regression, undefined reference to `acpi_video_get_edid'
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:

a6ed76d7ff is the first bad commit
commit a6ed76d7ff
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>
2010-09-24 16:27:40 +10:00
Ben Skeggs
64f1c11a47 drm/nouveau: restore perflvl on resume, and restore boot perflvl on unload
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2010-09-24 16:27:35 +10:00
Ben Skeggs
6f876986be drm/nouveau: allow static performance level setting
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>
2010-09-24 16:27:20 +10:00
Ben Skeggs
442b626ece drm/nv04-nv40: import initial pm backend
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>
2010-09-24 16:27:13 +10:00
Ben Skeggs
02c30ca0a1 drm/nv50: import initial clock get/set routines + hook up pm engine
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>
2010-09-24 16:27:06 +10:00
Ben Skeggs
330c5988ee drm/nouveau: import initial work on vbios performance table parsing
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2010-09-24 16:27:00 +10:00
Ben Skeggs
4709bff02a drm/nouveau: make bios code easier to use externally
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2010-09-24 16:26:56 +10:00
Ben Skeggs
855a95e4fc drm/nouveau: make the behaviour of get_pll_limits() consistent
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>
2010-09-24 16:26:49 +10:00
Ben Skeggs
f9aafdd30e drm/nv50: fix 100c90 write on nva3
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2010-09-24 16:26:41 +10:00
Ben Skeggs
b6fd780791 drm/nouveau: zero dummy page
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2010-09-24 16:26:35 +10:00