Francisco Jerez [Tue, 28 Sep 2010 01:22:15 +0000 (03:22 +0200)]
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>
Francisco Jerez [Sun, 26 Sep 2010 15:33:50 +0000 (17:33 +0200)]
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>
Ben Skeggs [Tue, 28 Sep 2010 00:23:20 +0000 (10:23 +1000)]
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>
Ben Skeggs [Tue, 28 Sep 2010 00:03:57 +0000 (10:03 +1000)]
drm/nouveau: fix typo in
c2aa91afea5f7e7ae4530fabd37414a79c03328c
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Ben Skeggs [Mon, 27 Sep 2010 01:18:14 +0000 (11:18 +1000)]
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>
Ben Skeggs [Mon, 27 Sep 2010 00:13:23 +0000 (10:13 +1000)]
drm/nouveau: run perflvl and M table scripts on mem clock change
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Ben Skeggs [Sun, 26 Sep 2010 23:47:56 +0000 (09:47 +1000)]
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>
Ben Skeggs [Sun, 26 Sep 2010 22:29:33 +0000 (08:29 +1000)]
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>
Roy Spliet [Fri, 17 Sep 2010 21:17:24 +0000 (23:17 +0200)]
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>
Ben Skeggs [Thu, 23 Sep 2010 23:17:02 +0000 (09:17 +1000)]
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>
Ben Skeggs [Thu, 23 Sep 2010 23:15:50 +0000 (09:15 +1000)]
drm/nouveau: v3.0 pll limits tables have type<->register mapping too
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Francisco Jerez [Thu, 23 Sep 2010 18:36:42 +0000 (20:36 +0200)]
drm/nouveau: Misc cleanup of the PM code.
Signed-off-by: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Francisco Jerez [Thu, 23 Sep 2010 19:00:40 +0000 (21:00 +0200)]
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>
Francisco Jerez [Thu, 23 Sep 2010 18:58:38 +0000 (20:58 +0200)]
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>
Francisco Jerez [Thu, 23 Sep 2010 13:34:09 +0000 (15:34 +0200)]
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>
Francisco Jerez [Thu, 23 Sep 2010 15:01:05 +0000 (17:01 +0200)]
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>
Francisco Jerez [Thu, 23 Sep 2010 14:27:14 +0000 (16:27 +0200)]
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>
Francesco Marella [Thu, 23 Sep 2010 07:14:22 +0000 (09:14 +0200)]
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>
Francisco Jerez [Wed, 22 Sep 2010 21:25:00 +0000 (23:25 +0200)]
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>
Francisco Jerez [Tue, 21 Sep 2010 17:03:19 +0000 (19:03 +0200)]
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>
Ben Skeggs [Thu, 23 Sep 2010 06:37:39 +0000 (16:37 +1000)]
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>
Ben Skeggs [Thu, 23 Sep 2010 05:23:16 +0000 (15:23 +1000)]
drm/nouveau: fix chipset vs card_type thinko
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Ben Skeggs [Thu, 23 Sep 2010 05:21:17 +0000 (15:21 +1000)]
drm/nv50: assume smaller tiles for bo moves
Somehow fixes some corruption seen in KDE..
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Ben Skeggs [Thu, 23 Sep 2010 04:45:52 +0000 (14:45 +1000)]
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>
Martin Peres [Wed, 22 Sep 2010 18:54:22 +0000 (20:54 +0200)]
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>
Ben Skeggs [Tue, 21 Sep 2010 02:10:51 +0000 (12:10 +1000)]
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>
Francisco Jerez [Mon, 20 Sep 2010 14:18:28 +0000 (16:18 +0200)]
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>
Ben Skeggs [Mon, 20 Sep 2010 08:27:39 +0000 (18:27 +1000)]
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>
Ben Skeggs [Mon, 20 Sep 2010 00:38:30 +0000 (10:38 +1000)]
drm/nouveau: fix thinko in volt 0x1x parsing
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Ben Skeggs [Mon, 20 Sep 2010 00:06:50 +0000 (10:06 +1000)]
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>
Ben Skeggs [Sat, 18 Sep 2010 12:13:04 +0000 (22:13 +1000)]
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>
Phil Turmel [Wed, 15 Sep 2010 00:14:11 +0000 (20:14 -0400)]
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:
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>
Ben Skeggs [Fri, 17 Sep 2010 03:35:25 +0000 (13:35 +1000)]
drm/nouveau: restore perflvl on resume, and restore boot perflvl on unload
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Ben Skeggs [Thu, 16 Sep 2010 06:47:14 +0000 (16:47 +1000)]
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>
Ben Skeggs [Thu, 16 Sep 2010 06:25:26 +0000 (16:25 +1000)]
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>
Ben Skeggs [Thu, 16 Sep 2010 06:17:35 +0000 (16:17 +1000)]
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>
Ben Skeggs [Thu, 16 Sep 2010 05:39:49 +0000 (15:39 +1000)]
drm/nouveau: import initial work on vbios performance table parsing
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Ben Skeggs [Mon, 13 Sep 2010 05:18:40 +0000 (15:18 +1000)]
drm/nouveau: make bios code easier to use externally
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Ben Skeggs [Thu, 16 Sep 2010 05:25:25 +0000 (15:25 +1000)]
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>
Ben Skeggs [Mon, 13 Sep 2010 01:12:50 +0000 (11:12 +1000)]
drm/nv50: fix 100c90 write on nva3
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Ben Skeggs [Sun, 12 Sep 2010 23:58:37 +0000 (09:58 +1000)]
drm/nouveau: zero dummy page
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Ben Skeggs [Sun, 12 Sep 2010 23:57:44 +0000 (09:57 +1000)]
drm/nv50: mark PCIEGART pages non-present rather than using dummy page
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Ben Skeggs [Fri, 10 Sep 2010 05:33:11 +0000 (15:33 +1000)]
drm/nouveau: we can't free ACPI EDID, so make a copy that we can
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>
Ben Skeggs [Wed, 8 Sep 2010 05:40:30 +0000 (15:40 +1000)]
drm/nouveau: handle fifo pusher errors better
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>
Ben Skeggs [Fri, 10 Sep 2010 01:12:25 +0000 (11:12 +1000)]
drm/nouveau: better handling of unmappable vram
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Francisco Jerez [Thu, 9 Sep 2010 12:33:17 +0000 (14:33 +0200)]
drm/nouveau: Try to fetch an EDID from OF if DDC fails.
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>
Francisco Jerez [Tue, 7 Sep 2010 16:24:52 +0000 (18:24 +0200)]
drm/nouveau: Simplify tile region handling.
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>
Francisco Jerez [Tue, 7 Sep 2010 15:34:44 +0000 (17:34 +0200)]
drm/nouveau: Remove implicit argument from nv_wait().
Signed-off-by: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Francisco Jerez [Mon, 6 Sep 2010 18:25:28 +0000 (20:25 +0200)]
drm/nouveau: PRAMIN is available from the start on pre-nv50.
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>
Francisco Jerez [Wed, 8 Sep 2010 00:28:23 +0000 (02:28 +0200)]
drm/nouveau: Add module parameter to override the default AGP rate.
Signed-off-by: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Francisco Jerez [Wed, 8 Sep 2010 00:23:20 +0000 (02:23 +0200)]
drm/nouveau: Don't enable AGP FW on nv18.
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>
Francisco Jerez [Sun, 5 Sep 2010 04:03:07 +0000 (06:03 +0200)]
drm/nouveau: Don't remove ramht entries from the neighboring channels.
Signed-off-by: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Francisco Jerez [Wed, 8 Sep 2010 00:21:09 +0000 (02:21 +0200)]
drm/nouveau: Break some long lines in the TV-out code.
Signed-off-by: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Ben Skeggs [Mon, 6 Sep 2010 01:39:25 +0000 (11:39 +1000)]
drm/nv50: fix SOR count for early chipsets
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Ben Skeggs [Fri, 3 Sep 2010 05:56:12 +0000 (15:56 +1000)]
drm/nv50: report BAR access faults
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Ben Skeggs [Fri, 3 Sep 2010 05:46:58 +0000 (15:46 +1000)]
drm/nv50: move vm trap to nv50_fb.c
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Marcin Kościelnicki [Wed, 1 Sep 2010 05:41:24 +0000 (15:41 +1000)]
drm/nv50: demagic grctx, and add NVAF support
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>
Ben Skeggs [Fri, 3 Sep 2010 00:25:02 +0000 (10:25 +1000)]
drm/nouveau: protect ramht_find() from oopsing if on channel without ramht
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>
Ben Skeggs [Wed, 1 Sep 2010 05:24:39 +0000 (15:24 +1000)]
drm/nouveau: remove nouveau_gpuobj_late_takedown
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Ben Skeggs [Wed, 1 Sep 2010 05:24:38 +0000 (15:24 +1000)]
drm/nouveau: protect gpuobj list + global instmem heap with spinlock
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Ben Skeggs [Wed, 1 Sep 2010 05:24:37 +0000 (15:24 +1000)]
drm/nouveau: fix gpuobj refcount to use atomics
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Ben Skeggs [Wed, 1 Sep 2010 05:24:36 +0000 (15:24 +1000)]
drm/nouveau: add spinlock around ramht modifications
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Ben Skeggs [Wed, 1 Sep 2010 05:24:35 +0000 (15:24 +1000)]
drm/nouveau: tidy ram{ht,fc,ro} a bit
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Ben Skeggs [Wed, 1 Sep 2010 05:24:34 +0000 (15:24 +1000)]
drm/nouveau: rework init ordering so nv50_instmem.c can be less bad
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Ben Skeggs [Thu, 12 Aug 2010 02:37:28 +0000 (12:37 +1000)]
drm/nv50: calculate vram reordering block size
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>
Ben Skeggs [Wed, 1 Sep 2010 05:24:33 +0000 (15:24 +1000)]
drm/nv50: allow gpuobjs that aren't mapped into aperture
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Ben Skeggs [Wed, 1 Sep 2010 05:24:32 +0000 (15:24 +1000)]
drm/nouveau: simplify fake gpu objects
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Ben Skeggs [Wed, 1 Sep 2010 05:24:31 +0000 (15:24 +1000)]
drm/nouveau: remove nouveau_gpuobj_ref completely, replace with sanity
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Ben Skeggs [Wed, 1 Sep 2010 05:24:30 +0000 (15:24 +1000)]
drm/nouveau: rebase per-channel pramin heap offsets to 0
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Ben Skeggs [Wed, 1 Sep 2010 05:24:29 +0000 (15:24 +1000)]
drm/nouveau: modify object accessors, offset in bytes rather than dwords
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Ben Skeggs [Wed, 1 Sep 2010 05:24:28 +0000 (15:24 +1000)]
drm/nouveau: move ramht code out of nouveau_object.c, nothing to see here
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Ben Skeggs [Mon, 30 Aug 2010 06:14:51 +0000 (16:14 +1000)]
drm/nouveau: have nv_mask return original register value
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Francisco Jerez [Mon, 30 Aug 2010 17:55:52 +0000 (19:55 +0200)]
drm/nv40: Try to set up CRE_LCD even if it has unknown bits set.
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>
Francisco Jerez [Mon, 30 Aug 2010 13:37:57 +0000 (15:37 +0200)]
drm/nv17-nv4x: Fix analog load detection false positive on rare occasions.
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>
Ben Skeggs [Fri, 27 Aug 2010 03:04:41 +0000 (13:04 +1000)]
drm/nouveau: require explicit unmap of kmapped bos
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Ben Skeggs [Fri, 27 Aug 2010 01:58:49 +0000 (11:58 +1000)]
drm/nouveau: remove second map of notifier bo
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Ben Skeggs [Fri, 27 Aug 2010 01:55:43 +0000 (11:55 +1000)]
drm/nouveau: move check for no-op bo move before memcpy fallback
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Ben Skeggs [Thu, 26 Aug 2010 01:32:01 +0000 (11:32 +1000)]
drm/nv50: add new accelerated bo move funtion
Hopefully this one will be better able to cope with moving tiled buffers
around without getting them all scrambled as a result.
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Francisco Jerez [Thu, 26 Aug 2010 21:07:02 +0000 (23:07 +0200)]
drm/nv20: Use the nv30 CRTC bandwidth calculation code.
nv2x CRTC FIFOs are as large as in nv3x (4kB it seems), and the FIFO
control registers have the same layout: we can make them share the
same implementation.
Previously we were using the nv1x code, but the calculated FIFO
watermarks are usually too low for nv2x and they cause horrible
scanout artifacts. They've gone unnoticed until now because we've been
leaving one of the bandwidth regs uninitialized (CRE 47, which
contains the most significant bits of FFLWM), so everything seemed to
work fine except in some cases after a cold boot, depending on the
memory bandwidth and pixel clocks used.
Signed-off-by: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Francisco Jerez [Thu, 26 Aug 2010 14:13:49 +0000 (16:13 +0200)]
drm/nouveau: Fix suspend on some nv4x AGP cards.
On some nv4x cards (specifically, the ones that use an internal
PCIE->AGP bridge) the AGP controller state isn't preserved after a
suspend/resume cycle, and the AGP control registers have moved from
0x18xx to 0x100xx, so the FW check in nouveau_mem_reset_agp() doesn't
quite work. Check "dev->agp->mode" instead.
Signed-off-by: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Dave Airlie [Fri, 24 Sep 2010 05:37:33 +0000 (15:37 +1000)]
Merge remote branch 'origin/master' of /home/airlied/kernel//linux-2.6 into drm-core-next
Naoya Horiguchi [Fri, 10 Sep 2010 04:23:06 +0000 (13:23 +0900)]
hugetlb, rmap: add BUG_ON(!PageLocked) in hugetlb_add_anon_rmap()
Confirming page lock is held in hugetlb_add_anon_rmap() may be useful
to detect possible future problems.
Signed-off-by: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
Acked-by: Rik van Riel <riel@redhat.com>
Acked-by: Andrea Arcangeli <aarcange@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Naoya Horiguchi [Fri, 10 Sep 2010 04:23:04 +0000 (13:23 +0900)]
hugetlb, rmap: fix confusing page locking in hugetlb_cow()
The "if (!trylock_page)" block in the avoidcopy path of hugetlb_cow()
looks confusing and is buggy. Originally this trylock_page() was
intended to make sure that old_page is locked even when old_page !=
pagecache_page, because then only pagecache_page is locked.
This patch fixes it by moving page locking into hugetlb_fault().
Signed-off-by: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
Acked-by: Rik van Riel <riel@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Naoya Horiguchi [Fri, 10 Sep 2010 04:23:04 +0000 (13:23 +0900)]
hugetlb, rmap: use hugepage_add_new_anon_rmap() in hugetlb_cow()
Obviously, setting anon_vma for COWed hugepage should be done
by hugepage_add_new_anon_rmap() to scan vmas faster.
This patch fixes it.
Signed-off-by: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
Acked-by: Andrea Arcangeli <aarcange@redhat.com>
Reviewed-by: Rik van Riel <riel@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Naoya Horiguchi [Fri, 10 Sep 2010 04:23:03 +0000 (13:23 +0900)]
hugetlb, rmap: always use anon_vma root pointer
This patch applies Andrea's fix given by the following patch into hugepage
rmapping code:
commit
288468c334e98aacbb7e2fb8bde6bc1adcd55e05
Author: Andrea Arcangeli <aarcange@redhat.com>
Date: Mon Aug 9 17:19:09 2010 -0700
This patch uses anon_vma->root and avoids unnecessary overwriting when
anon_vma is already set up.
Signed-off-by: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
Acked-by: Andrea Arcangeli <aarcange@redhat.com>
Reviewed-by: Rik van Riel <riel@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Linus Torvalds [Fri, 24 Sep 2010 00:13:17 +0000 (17:13 -0700)]
Merge branch 'kvm-updates/2.6.36' of git://git./virt/kvm/kvm
* 'kvm-updates/2.6.36' of git://git.kernel.org/pub/scm/virt/kvm/kvm:
KVM: Fix reboot on Intel hosts
KVM: fix irqfd assign/deassign race
Linus Torvalds [Thu, 23 Sep 2010 20:30:13 +0000 (13:30 -0700)]
Merge branch 'for_linus' of git://git./linux/kernel/git/mjg59/platform-drivers-x86
* 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mjg59/platform-drivers-x86:
thinkpad-acpi: avoid keymap pitfall
Change MSI LAPTOP driver maintainer to Lee, Chun-Yi
Henrique de Moraes Holschuh [Sat, 18 Sep 2010 00:53:41 +0000 (21:53 -0300)]
thinkpad-acpi: avoid keymap pitfall
Change the code so that it will use the correct size for keymap entries.
Do it in a way that makes it harder to screw it up in the future.
Reported-by: Jaime Velasco Juan <jsagarribay@gmail.com>
Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
Lee, Chun-Yi [Fri, 10 Sep 2010 08:04:19 +0000 (08:04 +0000)]
Change MSI LAPTOP driver maintainer to Lee, Chun-Yi
Change MSI LAPTOP driver maintainer from Lennart Poettering to Lee, Chun-Yi.
MSI is a Taiwan OEM company, Lee, Chun-Yi can more easy to contact with MSI
and maintain msi-laptop driver.
Thank's for Lennart Poettering's contribute, Lee, Chun-Yi will base on his
article to continue maintain the msi-laptop driver.
Signed-off-by: Lee, Chun-Yi <jlee@novell.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
Mark Salter [Thu, 23 Sep 2010 17:04:33 +0000 (18:04 +0100)]
MN10300: Arch doesn't support HAVE_ARCH_TRACEHOOK
Remove specification of HAVE_ARCH_TRACEHOOK for MN10300 as the arch does not
support it at this time.
Signed-off-by: Mark Salter <msalter@redhat.com>
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Mark Salter [Thu, 23 Sep 2010 17:04:28 +0000 (18:04 +0100)]
MN10300: Fix SIGRTMAX
SIGRTMAX should be _NSIG not _NSIG-1.
Signed-off-by: Mark Salter <msalter@redhat.com>
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Mark Salter [Thu, 23 Sep 2010 15:40:22 +0000 (16:40 +0100)]
MN10300: Fix endianess of ext2 bitops
The MN10300 arch ext2 bitops assume a big-endian kernel, but the MN10300
arch only runs in little-endian mode.
Reported-by: Akira Takeuchi <takeuchi.akr@jp.panasonic.com>
Signed-off-by: Mark Salter <msalter@redhat.com>
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Linus Torvalds [Thu, 23 Sep 2010 15:06:55 +0000 (08:06 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/tj/percpu
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu:
percpu: fix pcpu_last_unit_cpu
Avi Kivity [Tue, 21 Sep 2010 17:59:43 +0000 (19:59 +0200)]
KVM: Fix reboot on Intel hosts
When we reboot, we disable vmx extensions or otherwise INIT gets blocked.
If a task on another cpu hits a vmx instruction, it will fault if vmx is
disabled. We trap that to avoid a nasty oops and spin until the reboot
completes.
Problem is, we sleep with interrupts disabled. This blocks smp_send_stop()
from running, and the reboot process halts.
Fix by enabling interrupts before spinning.
KVM-Stable-Tag.
Signed-off-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Michael S. Tsirkin [Sun, 19 Sep 2010 17:02:31 +0000 (19:02 +0200)]
KVM: fix irqfd assign/deassign race
I think I see the following (theoretical) race:
During irqfd assign, we drop irqfds lock before we
schedule inject work. Therefore, deassign running
on another CPU could cause shutdown and flush to run
before inject, causing user after free in inject.
A simple fix it to schedule inject under the lock.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Gregory Haskins <ghaskins@novell.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Yinghai Lu [Wed, 22 Sep 2010 20:05:15 +0000 (13:05 -0700)]
ipmi: fix hardcoded ipmi device exit path warning
When modprobe.conf has
options ipmi_si type="kcs" ports=0xCA2 regspacings="4"
ipmi_si can be loaded properly, but when try to unload it get:
Sep 20 15:00:27 xx abrt: Kerneloops: Reported 1 kernel oopses to Abrt
Sep 20 15:00:27 xx abrtd: Directory 'kerneloops-
1285020027-1' creation detected
Sep 20 15:00:27 xx abrtd: New crash /var/spool/abrt/kerneloops-
1285020027-1, processing
Sep 20 15:01:09 xx kernel: ------------[ cut here ]------------
Sep 20 15:01:09 xx kernel: WARNING: at drivers/base/driver.c:262 driver_unregister+0x8a/0xa0()
Sep 20 15:01:09 xx kernel: Hardware name: Sun Fire x4800
Sep 20 15:01:09 xx kernel: Unexpected driver unregister!
Sep 20 15:01:09 xx kernel: Modules linked in: ipmi_si(-) ipmi_msghandler ip6table_filter ip6_tables ebtable_nat ebtables ipt_MASQUERADE iptable_nat nf_nat bridge stp llc autofs4 sunrpc cpufreq_ondemand acpi_cpufreq freq_table mperf xt_physdev be2iscsi iscsi_boot_sysfs bnx2i cnic uio cxgb3i iw_cxgb3 cxgb3 mdio ib_iser rdma_cm ib_cm iw_cm ib_sa ib_mad ib_core ib_addr ipv6 iscsi_tcp libiscsi_tcp libiscsi scsi_transport_iscsi dm_mirror dm_region_hash dm_log dm_mod vhost_net macvtap macvlan tun kvm_intel kvm uinput sg ses enclosure ahci libahci pcspkr i2c_i801 i2c_core iTCO_wdt iTCO_vendor_support igb dca i7core_edac edac_core ext3 jbd mbcache sd_mod crc_t10dif megaraid_sas [last unloaded: ipmi_devintf]
Sep 20 15:01:09 xx kernel: Pid: 10625, comm: modprobe Tainted: G W 2.6.36-rc5-tip+ #6
Sep 20 15:01:09 xx kernel: Call Trace:
Sep 20 15:01:09 xx kernel: [<
ffffffff810600df>] warn_slowpath_common+0x7f/0xc0
Sep 20 15:01:09 xx kernel: [<
ffffffff810601d6>] warn_slowpath_fmt+0x46/0x50
Sep 20 15:01:09 xx kernel: [<
ffffffff812ff60a>] driver_unregister+0x8a/0xa0
Sep 20 15:01:09 xx kernel: [<
ffffffff812ae112>] pnp_unregister_driver+0x12/0x20
Sep 20 15:01:09 xx kernel: [<
ffffffffa01d0327>] cleanup_ipmi_si+0x3c/0xa7 [ipmi_si]
Sep 20 15:01:09 xx kernel: [<
ffffffff81099a60>] sys_delete_module+0x1a0/0x270
Sep 20 15:01:09 xx kernel: [<
ffffffff814b7070>] ? do_page_fault+0x150/0x320
Sep 20 15:01:09 xx kernel: [<
ffffffff8100b072>] system_call_fastpath+0x16/0x1b
Sep 20 15:01:09 xx kernel: ---[ end trace
0d1967161adcee0d ]---
We need to check if ipmi_pnp_driver is loaded before we try to unload it.
Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Cc: Corey Minyard <minyard@acm.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Vladimir Zapolskiy [Wed, 22 Sep 2010 20:05:13 +0000 (13:05 -0700)]
rtc: s3c: balance state changes of wakeup flag
This change resolves a problem about unbalanced calls of
enable_irq_wakeup() and disable_irq_wakeup() for alarm interrupt.
Bug reproduction:
root@eb600:~# echo 0 > /sys/class/rtc/rtc0/wakealarm
WARNING: at kernel/irq/manage.c:361 set_irq_wake+0x7c/0xe4()
Unbalanced IRQ 46 wake disable
Modules linked in:
[<
c0025708>] (unwind_backtrace+0x0/0xd8) from [<
c003358c>] (warn_slowpath_common+0x44/0x5c)
[<
c003358c>] (warn_slowpath_common+0x44/0x5c) from [<
c00335dc>] (warn_slowpath_fmt+0x24/0x30)
[<
c00335dc>] (warn_slowpath_fmt+0x24/0x30) from [<
c0058c20>] (set_irq_wake+0x7c/0xe4)
[<
c0058c20>] (set_irq_wake+0x7c/0xe4) from [<
c01b5e80>] (s3c_rtc_setalarm+0xa8/0xb8)
[<
c01b5e80>] (s3c_rtc_setalarm+0xa8/0xb8) from [<
c01b47a0>] (rtc_set_alarm+0x60/0x74)
[<
c01b47a0>] (rtc_set_alarm+0x60/0x74) from [<
c01b5a98>] (rtc_sysfs_set_wakealarm+0xc8/0xd8)
[<
c01b5a98>] (rtc_sysfs_set_wakealarm+0xc8/0xd8) from [<
c01891ec>] (dev_attr_store+0x20/0x24)
[<
c01891ec>] (dev_attr_store+0x20/0x24) from [<
c00be934>] (sysfs_write_file+0x104/0x13c)
[<
c00be934>] (sysfs_write_file+0x104/0x13c) from [<
c0080e7c>] (vfs_write+0xb0/0x158)
[<
c0080e7c>] (vfs_write+0xb0/0x158) from [<
c0080fcc>] (sys_write+0x3c/0x68)
[<
c0080fcc>] (sys_write+0x3c/0x68) from [<
c0020ec0>] (ret_fast_syscall+0x0/0x28)
Signed-off-by: Vladimir Zapolskiy <vzapolskiy@gmail.com>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Cc: Ben Dooks <ben@fluff.org.uk>
Cc: Atul Dahiya <atul.dahiya@samsung.com>
Cc: Taekgyun Ko <taeggyun.ko@samsung.com>
Cc: Kukjin Kim <kgene.kim@samsung.com>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Andrea Arcangeli [Wed, 22 Sep 2010 20:05:12 +0000 (13:05 -0700)]
mmap: call unlink_anon_vmas() in __split_vma() in case of error
If __split_vma fails because of an out of memory condition the
anon_vma_chain isn't teardown and freed potentially leading to rmap walks
accessing freed vma information plus there's a memleak.
Signed-off-by: Andrea Arcangeli <aarcange@redhat.com>
Acked-by: Johannes Weiner <jweiner@redhat.com>
Acked-by: Rik van Riel <riel@redhat.com>
Acked-by: Hugh Dickins <hughd@google.com>
Cc: Marcelo Tosatti <mtosatti@redhat.com>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Andrea Arcangeli [Wed, 22 Sep 2010 20:05:12 +0000 (13:05 -0700)]
rmap: fix walk during fork
The below bug in fork led to the rmap walk finding the parent huge-pmd
twice instead of just once, because the anon_vma_chain objects of the
child vma still point to the vma->vm_mm of the parent.
The patch fixes it by making the rmap walk accurate during fork. It's not
a big deal normally but it worth being accurate considering the cost is
the same.
Signed-off-by: Andrea Arcangeli <aarcange@redhat.com>
Acked-by: Johannes Weiner <jweiner@redhat.com>
Acked-by: Rik van Riel <riel@redhat.com>
Acked-by: Hugh Dickins <hughd@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Andrew Morton [Wed, 22 Sep 2010 20:05:11 +0000 (13:05 -0700)]
drivers/pci/intel-iommu.c: fix build with older gcc's
drivers/pci/intel-iommu.c: In function `__iommu_calculate_agaw':
drivers/pci/intel-iommu.c:437: sorry, unimplemented: inlining failed in call to 'width_to_agaw': function body not available
drivers/pci/intel-iommu.c:445: sorry, unimplemented: called from here
Move the offending function (and its siblings) to top-of-file, remove the
forward declaration.
Addresses https://bugzilla.kernel.org/show_bug.cgi?id=17441
Reported-by: Martin Mokrejs <mmokrejs@ribosome.natur.cuni.cz>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>