platform/adaptation/renesas_rcar/renesas_kernel.git
14 years agodrm/nouveau: don't use the default pll limits in table v2.1 on nv50+ cards
Emil Velikov [Sun, 26 Sep 2010 19:26:02 +0000 (20:26 +0100)]
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>
14 years agodrm/nv50: Fix large 3D performance regression caused by the interchannel sync patches.
Francisco Jerez [Sat, 2 Oct 2010 15:04:46 +0000 (17:04 +0200)]
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>
14 years agodrm/nouveau: Synchronize buffer object moves in hardware.
Francisco Jerez [Tue, 21 Sep 2010 17:02:01 +0000 (19:02 +0200)]
drm/nouveau: Synchronize buffer object moves in hardware.

Signed-off-by: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
14 years agodrm/nouveau: Use semaphores to handle inter-channel sync in hardware.
Francisco Jerez [Tue, 21 Sep 2010 22:58:54 +0000 (00:58 +0200)]
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>
14 years agodrm/nouveau: Provide a means to have arbitrary work run on fence completion.
Francisco Jerez [Tue, 21 Sep 2010 18:49:39 +0000 (20:49 +0200)]
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>
14 years agodrm/nouveau: Minor refactoring/cleanup of the fence code.
Francisco Jerez [Tue, 21 Sep 2010 16:57:11 +0000 (18:57 +0200)]
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>
14 years agodrm/nouveau: Add a module option to force card POST.
Marcin Kościelnicki [Wed, 29 Sep 2010 11:15:01 +0000 (11:15 +0000)]
drm/nouveau: Add a module option to force card POST.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
14 years agodrm/nv50: prevent (IB_PUT == IB_GET) for occurring unless idle
Ben Skeggs [Wed, 29 Sep 2010 23:09:42 +0000 (09:09 +1000)]
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>
14 years agodrm/nv0x-nv4x: Leave the 0x40 bit untouched when changing CRE_LCD.
Francisco Jerez [Tue, 28 Sep 2010 18:47:58 +0000 (20:47 +0200)]
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>
14 years agodrm/nv30-nv40: Fix postdivider mask when writing engine/memory PLLs.
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>
14 years agodrm/nouveau: Fix perf table parsing on BMP v5.25.
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>
14 years agodrm/nouveau: fix required mode bandwidth calculation for DP
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>
14 years agodrm/nouveau: fix typo in c2aa91afea5f7e7ae4530fabd37414a79c03328c
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>
14 years agodrm/nva3: split pm backend out from nv50
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>
14 years agodrm/nouveau: run perflvl and M table scripts on mem clock change
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>
14 years agodrm/nouveau: pass perflvl struct to clock_pre()
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>
14 years agodrm/nouveau: enable enhanced framing only if DP display supports it
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>
14 years agodrm/nouveau: Import initial memory timing work
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>
14 years agodrm/nv50: use pll type rather than register for CRTC PLL
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>
14 years agodrm/nouveau: v3.0 pll limits tables have type<->register mapping too
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>
14 years agodrm/nouveau: Misc cleanup of the PM code.
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>
14 years agodrm/nouveau: Add support for I2C hardware monitoring devices.
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>
14 years agodrm/nouveau: Refactor nouveau_temp_get() into engine pointers.
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>
14 years agodrm/nouveau: Double the perf table memory clocks on pre-G71 cards.
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>
14 years agodrm/nouveau: Fix parsing of the temperature constant correction.
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>
14 years agodrm/nouveau: Add sane sensor correction defaults for nv4a.
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>
14 years agodrm/nv40: fix reading temp value
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>
14 years agodrm/nouveau: Don't try to parse a GPIO table on early DCBv2.2 BIOSes.
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>
14 years agodrm/nv10: Don't oops if the card wants to switch to a channel with no grctx.
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>
14 years agodrm/nouveau: fix panels using straps-based mode detection
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>
14 years agodrm/nouveau: fix chipset vs card_type thinko
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>
14 years agodrm/nv50: assume smaller tiles for bo moves
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>
14 years agodrm/nouveau: add debugfs file to forcibly evict everything from vram
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>
14 years agodrm/nouveau: Add temperature support (vbios parsing, readings, hwmon)
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>
14 years agodrm/nouveau: correct INIT_DP_CONDITION subcondition 5
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>
14 years agodrm/nouveau: Parse old style perf tables.
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>
14 years agodrm/nv50: flush bar1 vm / dma object setup before poking 0x1708
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>
14 years agodrm/nouveau: fix thinko in volt 0x1x parsing
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>
14 years agodrm/nouveau: implement parsing of DCB 2.2 GPIO table
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>
14 years agodrm/nouveau: fix potential accuracy loss when parsing perf 0x1c tables
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>
14 years agodrm/nouveau: Fix build regression, undefined reference to `acpi_video_get_edid'
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>
14 years agodrm/nouveau: restore perflvl on resume, and restore boot perflvl on unload
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>
14 years agodrm/nouveau: allow static performance level setting
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>
14 years agodrm/nv04-nv40: import initial pm backend
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>
14 years agodrm/nv50: import initial clock get/set routines + hook up pm engine
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>
14 years agodrm/nouveau: import initial work on vbios performance table parsing
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>
14 years agodrm/nouveau: make bios code easier to use externally
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>
14 years agodrm/nouveau: make the behaviour of get_pll_limits() consistent
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>
14 years agodrm/nv50: fix 100c90 write on nva3
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>
14 years agodrm/nouveau: zero dummy page
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>
14 years agodrm/nv50: mark PCIEGART pages non-present rather than using dummy page
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>
14 years agodrm/nouveau: we can't free ACPI EDID, so make a copy that we can
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>
14 years agodrm/nouveau: handle fifo pusher errors better
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>
14 years agodrm/nouveau: better handling of unmappable vram
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>
14 years agodrm/nouveau: Try to fetch an EDID from OF if DDC fails.
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>
14 years agodrm/nouveau: Simplify tile region handling.
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>
14 years agodrm/nouveau: Remove implicit argument from nv_wait().
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>
14 years agodrm/nouveau: PRAMIN is available from the start on pre-nv50.
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>
14 years agodrm/nouveau: Add module parameter to override the default AGP rate.
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>
14 years agodrm/nouveau: Don't enable AGP FW on nv18.
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>
14 years agodrm/nouveau: Don't remove ramht entries from the neighboring channels.
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>
14 years agodrm/nouveau: Break some long lines in the TV-out code.
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>
14 years agodrm/nv50: fix SOR count for early chipsets
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>
14 years agodrm/nv50: report BAR access faults
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>
14 years agodrm/nv50: move vm trap to nv50_fb.c
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>
14 years agodrm/nv50: demagic grctx, and add NVAF support
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>
14 years agodrm/nouveau: protect ramht_find() from oopsing if on channel without ramht
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>
14 years agodrm/nouveau: remove nouveau_gpuobj_late_takedown
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>
14 years agodrm/nouveau: protect gpuobj list + global instmem heap with spinlock
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>
14 years agodrm/nouveau: fix gpuobj refcount to use atomics
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>
14 years agodrm/nouveau: add spinlock around ramht modifications
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>
14 years agodrm/nouveau: tidy ram{ht,fc,ro} a bit
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>
14 years agodrm/nouveau: rework init ordering so nv50_instmem.c can be less bad
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>
14 years agodrm/nv50: calculate vram reordering block size
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>
14 years agodrm/nv50: allow gpuobjs that aren't mapped into aperture
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>
14 years agodrm/nouveau: simplify fake gpu objects
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>
14 years agodrm/nouveau: remove nouveau_gpuobj_ref completely, replace with sanity
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>
14 years agodrm/nouveau: rebase per-channel pramin heap offsets to 0
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>
14 years agodrm/nouveau: modify object accessors, offset in bytes rather than dwords
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>
14 years agodrm/nouveau: move ramht code out of nouveau_object.c, nothing to see here
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>
14 years agodrm/nouveau: have nv_mask return original register value
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>
14 years agodrm/nv40: Try to set up CRE_LCD even if it has unknown bits set.
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>
14 years agodrm/nv17-nv4x: Fix analog load detection false positive on rare occasions.
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>
14 years agodrm/nouveau: require explicit unmap of kmapped bos
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>
14 years agodrm/nouveau: remove second map of notifier bo
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>
14 years agodrm/nouveau: move check for no-op bo move before memcpy fallback
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>
14 years agodrm/nv50: add new accelerated bo move funtion
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>
14 years agodrm/nv20: Use the nv30 CRTC bandwidth calculation code.
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>
14 years agodrm/nouveau: Fix suspend on some nv4x AGP cards.
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>
14 years agoMerge remote branch 'origin/master' of /home/airlied/kernel//linux-2.6 into drm-core...
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

14 years agohugetlb, rmap: add BUG_ON(!PageLocked) in hugetlb_add_anon_rmap()
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>
14 years agohugetlb, rmap: fix confusing page locking in hugetlb_cow()
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>
14 years agohugetlb, rmap: use hugepage_add_new_anon_rmap() in hugetlb_cow()
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>
14 years agohugetlb, rmap: always use anon_vma root pointer
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>
14 years agoMerge branch 'kvm-updates/2.6.36' of git://git.kernel.org/pub/scm/virt/kvm/kvm
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

14 years agoMerge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mjg59/platf...
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

14 years agothinkpad-acpi: avoid keymap pitfall
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>
14 years agoChange MSI LAPTOP driver maintainer to Lee, Chun-Yi
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>
14 years agoMN10300: Arch doesn't support HAVE_ARCH_TRACEHOOK
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>
14 years agoMN10300: Fix SIGRTMAX
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>