Commit graph

2206 commits

Author SHA1 Message Date
Ben Skeggs 1789cab4ef drm/nouveau/clk: allow fb to signal it needs to do a multi-stage reclock
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-01-23 13:38:59 +10:00
Ben Skeggs b655f2bb77 drm/nve0/fb/gddr5: parse bios data into struct rather than using directly
Still essentially a struct of magic values with magic names and unknown
purposes.  But, we will shortly need to be able to mix and match bits of
the previous and next configurations to do a transition reclock, as such,
we can no longer directly use the vbios data with any ease.

This is probably nicer anyway in the long run, for a few reasons.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-01-23 13:38:58 +10:00
Ben Skeggs ea8b4a380d drm/nve0/fb/gddr5: found LP3 setting
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-01-23 13:38:57 +10:00
Ben Skeggs 971372eac1 drm/nve0/fb: note the memory voltage toggle, not using it yet
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-01-23 13:38:56 +10:00
Ben Skeggs db6735cab2 drm/nve0/fb/gddr5: somewhat better attempt at 100770/10f604/610/614
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>

fb/gddr5/nve0: 100770 is like 10f604

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-01-23 13:38:56 +10:00
Ben Skeggs f4aa2c6677 drm/nve0/fb/gddr5: fixup delays a bit
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-01-23 13:38:55 +10:00
Ben Skeggs 1522ecae65 drm/nouveau/bios: timing 2.0 entries can have subentries
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-01-23 13:38:54 +10:00
Ben Skeggs 09692e5b4e drm/nve0/fb/gddr5: note another semi-unknown
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-01-23 13:38:53 +10:00
Ben Skeggs 1e1d6b4c53 drm/nouveau/fb/gddr5: modify mr8 with high bits of CL/WR
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-01-23 13:38:52 +10:00
Ben Skeggs e7084c669b drm/nve0/fb/gddr5: fix calculation of RDQS setting
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-01-23 13:38:52 +10:00
Ben Skeggs 334565abfe drm/nve0/fb/gddr5: switch off some other random bit at some point
As seen when comparing us vs nv on my GTX660

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-01-23 13:38:51 +10:00
Ben Skeggs 01891690e8 drm/nve0/fb/gddr5: punt all 10f910/914 accesses through ram_train
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-01-23 13:38:50 +10:00
Ben Skeggs d394fb12ec drm/nve0/fb/gddr5: not all memory partitions are created equal
As seen when comparing us vs nv on my GTX660.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-01-23 13:38:49 +10:00
Ben Skeggs dd95c8f782 drm/nve0/fb: typo in register name
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-01-23 13:38:48 +10:00
Ben Skeggs 0a0dc8f564 drm/nouveau/bios: make common code to handle ramcfg strap etc
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-01-23 13:38:48 +10:00
Ben Skeggs 5905439224 drm/nve0/fb/gddr5: fix an assumption of sane memory controller layout
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-01-23 13:38:47 +10:00
Ben Skeggs 2daaf5b0e4 drm/nve0/fb/gddr5: fix behaviour of lp3 setting
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-01-23 13:38:46 +10:00
Ben Skeggs cb1567c286 drm/nve0/fifo: recover from mmu faults on bar1/bar3
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-01-23 13:38:45 +10:00
Ben Skeggs 649ec925ae drm/nve0/fifo: keep mmu fault interrupts enabled at all times
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-01-23 13:38:44 +10:00
Ben Skeggs e1b6b14ad5 drm/nve0/fifo: update human-readable mmu fault descriptions
Ordering from Android GK20A driver, names from binary driver strings.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-01-23 13:38:44 +10:00
Ben Skeggs e9fb9805ad drm/nve0/fifo: document more intr status bits
As per Android GK20A driver.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-01-23 13:38:43 +10:00
Ben Skeggs 9f8459cf06 drm/nve0/fifo: populate PBDMA status bitfield with more definitions
As per Android GK20A driver.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-01-23 13:38:42 +10:00
Ben Skeggs 39b055427e drm/nve0/fifo: s/subfifo/PBDMA/
As per Android GK20A driver.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-01-23 13:38:41 +10:00
Ben Skeggs f82c44a78f drm/nve0/fifo: s/playlist/runlist/
As per Android GK20A driver.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-01-23 13:38:40 +10:00
Ben Skeggs f76dd80f76 drm/nvf0/gr: enable acceleration with our chsw ucode
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-01-23 13:38:40 +10:00
Ben Skeggs aa97cd31b6 drm/nv108/gr: enable acceleration with our chsw ucode
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-01-23 13:38:39 +10:00
Ben Skeggs 5d91e1916d drm/nvc0-/gr: handle fwmthd interrupts in ucode
Compute code in mesa triggers one of these, hanging the engine.  Let's
at least ack the request for now to avoid the hang.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-01-23 13:38:38 +10:00
Ben Skeggs e1b22bc148 drm/nvc0-/gr: fiddle some magic around strand init
Fixes HUB_INIT timeout on GK110/GK208 when not using NVIDIA's ucode.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-01-23 13:38:37 +10:00
Ben Skeggs 96616b4caf drm/nv108/gr: initial support (need external fuc)
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-01-23 13:38:36 +10:00
Ben Skeggs daa9ab5821 drm/nv108/ce: enable copy engines
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-01-23 13:38:35 +10:00
Ben Skeggs a763951a86 drm/nv108/fifo: initial support
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-01-23 13:38:35 +10:00
Ben Skeggs a0f95f11a3 drm/nvf0/gr: remove a copy+pasto in ctx reglist
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-01-23 13:38:34 +10:00
Ben Skeggs 67af60f0aa drm/nvc0-/gr: bring in some macros to abstract falcon isa differences
Need. A. Compiler...

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-01-23 13:38:33 +10:00
Ilia Mirkin 90d6db1635 drm/nouveau/falcon: use vmalloc to create firwmare copies
Some firmware images may be large (64K), so using kmalloc memory is
inappropriate for them. Use vmalloc instead, to avoid high-order
allocation failures.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Cc: stable@vger.kernel.org
2014-01-23 13:38:32 +10:00
Ben Skeggs d96bf437b6 drm/nouveau/gem: remove (now) unneeded pre-validate fence sync
Now that nouveau_bo.c can handle sync when it actually needs to, we can
remove this and avoid a double semaphore acquire when syncing in the
command submission path.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-01-23 13:38:31 +10:00
Ben Skeggs cef9e99e1e drm/nouveau/ttm: explicitly wait for bo idle before memcpy buffer move
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-01-23 13:38:30 +10:00
Ben Skeggs 35b8141b82 drm/nouveau/ttm: explicity sync with kernel channel before moving buffer
The GEM code handles this currently, but that'll be removed.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-01-23 13:38:30 +10:00
Ben Skeggs 3c57d85d7d drm/nouveau/ttm: tidy up creation of temporary buffer move vmas
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-01-23 13:38:29 +10:00
Ilia Mirkin ab9b18a6a1 drm/nv04/plane: add support for nv04/nv05 video overlay
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-01-23 13:38:28 +10:00
Ilia Mirkin 7ffb078172 drm/nv10/plane: add YUYV support
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-01-23 13:38:27 +10:00
Maarten Lankhorst a554090664 drm/nv50-: map TTM_PL_SYSTEM through a BAR for CPU access
Moves bo's to TTM_PL_TT for BAR mapping, to hide tiling from user.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-01-23 13:38:26 +10:00
Maarten Lankhorst ce8f7699f2 drm/nouveau: fix m2mf copy to tiled gart
Commit de7b7d59d5 introduced tiled GART, but a linear copy is
still performed. This may result in errors on eviction, fix it by
checking tiling from memtype.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Cc: stable@vger.kernel.org #3.10+
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-01-23 13:38:25 +10:00
Ben Skeggs 2e2cfbe61b drm/nouveau/vm: reduce number of entry-points to vm_map()
Pretty much everywhere had to make the decision which to use, so it
makes a lot more sense to just have one entrypoint decide the path
to take instead.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-01-23 13:38:25 +10:00
Jeff Mahoney d0ce7b8567 drm/nouveau: make vga_switcheroo code depend on VGA_SWITCHEROO
Commit 8116188fde ("nouveau/acpi: hook up to the MXM method for mux
switching.") broke the build on non-x86 architectures due to the new
dependency on MXM and MXM being an x86 platform driver.

It built previously since the vga switcheroo registration routines were
zereod out on !X86.  The code was built in but unused.

This patch makes all of the DSM code depend on CONFIG_VGA_SWITCHEROO,
allowing it to build on non-x86 and shrinking the module size as well.

[rdunlap@infradead.org: fix build eror when VGA_SWITCHEROO is not enabled]
Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: David Airlie <airlied@linux.ie>
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2014-01-23 11:01:40 +10:00
Dave Airlie cfd72a4c20 Merge branch 'drm-intel-next' of git://people.freedesktop.org/~danvet/drm-intel into drm-next
drm-intel-next-2014-01-10:
- final bits for runtime D3 on Haswell from Paul (now enabled fully)
- parse the backlight modulation freq information in the VBT from Jani
  (but not yet used)
- more watermark improvements from Ville for ilk-ivb and bdw
- bugfixes for fastboot from Jesse
- watermark fix for i830M (but not yet everything)
- vlv vga hotplug w/a (Imre)
- piles of other small improvements, cleanups and fixes all over

Note that the pull request includes a backmerge of the last drm-fixes
pulled into Linus' tree - things where getting a bit too messy. So the
shortlog also contains a bunch of patches from Linus tree. Please yell if
you want me to frob it for you a bit.

* 'drm-intel-next' of git://people.freedesktop.org/~danvet/drm-intel: (609 commits)
  drm/i915/bdw: make sure south port interrupts are enabled properly v2
  drm/i915: Include more information in disabled hotplug interrupt warning
  drm/i915: Only complain about a rogue hotplug IRQ after disabling
  drm/i915: Only WARN about a stuck hotplug irq ONCE
  drm/i915: s/hotplugt_status_gen4/hotplug_status_g4x/
2014-01-20 10:21:54 +10:00
Dave Airlie 703a8c2dfa Merge branch 'drm-nouveau-next' of git://git.freedesktop.org/git/nouveau/linux-2.6 into drm-fixes
Single regression fix for nouveau

* 'drm-nouveau-next' of git://git.freedesktop.org/git/nouveau/linux-2.6:
  drm/nouveau: fix null ptr dereferences on some boards
2014-01-15 15:01:11 +10:00
Ben Skeggs fdd239ac99 drm/nouveau: fix null ptr dereferences on some boards
Regression from "device: populate master subdev pointer only when fully
constructed"

Reported-by: Bob Gleitsmann <rjgleits@bellsouth.net>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-01-15 14:24:05 +10:00
Dave Airlie ceb3b0212d Merge branch 'drm-nouveau-next' of git://anongit.freedesktop.org/nouveau/linux-2.6 into drm-fixes
misc fixes for nouveau, one more msi rearm, regression fix for old bioses
crash and leak fixes.

* 'drm-nouveau-next' of git://anongit.freedesktop.org/nouveau/linux-2.6:
  drm/nouveau/nouveau: fix memory leak in nouveau_crtc_page_flip()
  drm/nouveau/bios: fix offset calculation for BMPv1 bioses
  drm/nouveau: return offset of allocated notifier
  drm/nouveau/bios: make jump conditional
  drm/nvce/mc: fix msi rearm on GF114
  drm/nvc0/gr: fix mthd data submission
  drm/nouveau: populate master subdev pointer only when fully constructed
2014-01-08 17:57:45 +10:00
Christian Engelmayer bbc6319676 drm/nouveau/nouveau: fix memory leak in nouveau_crtc_page_flip()
Fix a memory leak in the nouveau_crtc_page_flip() error handling path.

Signed-off-by: Christian Engelmayer <cengelma@gmx.at>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-01-08 16:17:48 +10:00
Ilia Mirkin 5d2f4767c4 drm/nouveau/bios: fix offset calculation for BMPv1 bioses
The only BIOS on record that needs the 14 offset has a bios major
version 2 but BMP version 1.01. Another bunch of BIOSes that need the 18
offset have BMP version 2.01 or 5.01 or higher. So instead of looking at the
bios major version, look at the BMP version. BIOSes with BMP version 0
do not contain a detectable script, so always return 0 for them.

See https://bugs.freedesktop.org/show_bug.cgi?id=68835

Reported-by: Mauro Molinari <mauromol@tiscali.it>
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-01-08 15:56:10 +10:00