Commit graph

2239 commits

Author SHA1 Message Date
Dave Airlie ef64cf9d06 Merge branch 'drm-nouveau-next' of git://anongit.freedesktop.org/git/nouveau/linux-2.6 into drm-next
more fixes for nouveau.

* 'drm-nouveau-next' of git://anongit.freedesktop.org/git/nouveau/linux-2.6:
  drm/nouveau: resume display if any later suspend bits fail
  drm/nouveau: fix lock unbalance in nouveau_crtc_page_flip
  drm/nouveau: implement hooks for needed for drm vblank timestamping support
  drm/nouveau/disp: add a method to fetch info needed by drm vblank timestamping
  drm/nv50: fill in crtc mode struct members from crtc_mode_fixup
2014-01-30 10:46:06 +10:00
Ilia Mirkin f3980dc50c drm/nouveau: resume display if any later suspend bits fail
If either idling channels or suspending the fence were to fail, the
display would never be resumed. Also if a client fails, resume the fence
(not functionally important, but it would potentially leak memory).

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

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-01-30 09:20:28 +10:00
Maarten Lankhorst 09c3de1350 drm/nouveau: fix lock unbalance in nouveau_crtc_page_flip
Fixes a regression introduced by d5c1e84b3a
"drm/nouveau: hold mutex while syncing to kernel channel".

Cc: stable@vger.kernel.org #3.13
Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-01-30 09:20:28 +10:00
Ben Skeggs d83ef85395 drm/nouveau: implement hooks for needed for drm vblank timestamping support
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-01-30 09:20:27 +10:00
Ben Skeggs d2fa7d32ea drm/nouveau/disp: add a method to fetch info needed by drm vblank timestamping
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-01-30 08:18:36 +10:00
Ben Skeggs eb2e9686d6 drm/nv50: fill in crtc mode struct members from crtc_mode_fixup
The DRM uses the adjusted mode to calculate constants for vblank
timestamping.  Our encoder mode_fixup (usually) replaces this data
with our backend mode information, which doesn't have the needed
data filled in already.

Reported-by: Mario Kleiner mario.kleiner.de@gmail.com
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-01-30 08:18:26 +10:00
Dave Airlie a5bd4f8ab0 Merge branch 'drm-armada-fixes' of git://ftp.arm.linux.org.uk/~rmk/linux-cubox into drm-next
Just one-liner which corrects a select statement for DRM_KMS_FB_HELPER
which looks like it was missed in the initial merge.  Based on 3.13.

* 'drm-armada-fixes' of git://ftp.arm.linux.org.uk/~rmk/linux-cubox: (55 commits)
  DRM: armada: fix missing DRM_KMS_FB_HELPER select
2014-01-29 09:38:32 +10:00
Ben Skeggs 1139ffb96b drm/nouveau: call drm_vblank_cleanup() earlier
Fixes a NULL-ptr deref seen on module unload sometimes.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-01-23 13:39:19 +10:00
Ben Skeggs 2332b31116 drm/nouveau: create base display from common code
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-01-23 13:39:18 +10:00
Ilia Mirkin ea7dce9010 drm/nv50/gr: print mpc trap name when it's not an mp trap
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
2014-01-23 13:39:17 +10:00
Ilia Mirkin f750ecc950 drm/nv50/gr: update list of mp errors, make it a bitfield
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
2014-01-23 13:39:17 +10:00
Ilia Mirkin e2dd003dfa drm/nv50/gr: add more trap names to print on error
Also avoids printing the errors bitfield if that information has already
been shown.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
2014-01-23 13:39:16 +10:00
Ilia Mirkin f87cd8b695 drm/nouveau/devinit: lock/unlock crtc regs for all devices, not just pre-nv50
Also make nv_lockvgac work for nv50+ devices. This should fix
IO_CONDITION and related VBIOS opcodes that read/write the crtc regs.

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

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-01-23 13:39:15 +10:00
Maarten Lankhorst d5c1e84b3a drm/nouveau: hold mutex while syncing to kernel channel
Not holding the mutex potentially causes corruption of the kernel
channel when page flipping.

Cc: stable@vger.kernel.org #3.13
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-01-23 13:39:14 +10:00
Ilia Mirkin 4019aaa2b3 drm/nv50-/devinit: prevent use of engines marked as disabled by hw/vbios
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-01-23 13:39:13 +10:00
Ilia Mirkin f0d13e3a85 drm/nouveau/device: provide a way for devinit to mark engines as disabled
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-01-23 13:39:13 +10:00
Ben Skeggs cf336014c6 drm/nouveau/devinit: tidy up the subdev class definition
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-01-23 13:39:12 +10:00
Ben Skeggs 52225551dd drm/nouveau/bar: tidy up the subdev and object class definitions
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-01-23 13:39:11 +10:00
Ben Skeggs ab606194d1 drm/nouveau/instmem: tidy up the object class definition
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-01-23 13:39:10 +10:00
Ben Skeggs 24a4ae86de drm/nouveau/instmem: tidy up the subdev class definition
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-01-23 13:39:09 +10:00
Ben Skeggs 64c672ae1d drm/nouveau/pwr: implement a simple i2c stack
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-01-23 13:39:09 +10:00
Ben Skeggs 2e9dfe234a drm/nouveau/pwr: have rd/wr32 routines clobber data instead of addr
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-01-23 13:39:08 +10:00
Ben Skeggs 73216231ca drm/nve0/fb: turn off some bits in 10f584 at init
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-01-23 13:39:07 +10:00
Ben Skeggs cb54dd2f8e drm/nve0/fb/gddr5: merge a fix from ddr3 for one of the timing settings
Titan.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-01-23 13:39:06 +10:00
Ben Skeggs b13d0e4a93 drm/nve0/fb/gddr5: yet another random 10f200 bit
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-01-23 13:39:05 +10:00
Ben Skeggs c814a60dbe drm/nvc0-/fb: hook up skeleton interrupt handler
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-01-23 13:39:04 +10:00
Ben Skeggs 7f39e59772 drm/nve0/fb/gddr5: more 10f200 stuff
Seen on Titan.  NFI what the condition to switch this on is yet, and,
hardcoding it to on currently causes master to report unknown intr
with a mask of 0x08002000.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-01-23 13:39:04 +10:00
Ben Skeggs 12642e36e0 drm/nve0/clk: report ddr memory frequency
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-01-23 13:39:03 +10:00
Ben Skeggs 1a894c069d drm/nouveau/fb/gddr5: make sure we update mr7 when we're supposed to
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-01-23 13:39:02 +10:00
Ben Skeggs a8ccbb7701 drm/nve0/fb/gddr5: 10f698/69c
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-01-23 13:39:01 +10:00
Ben Skeggs cfe1760838 drm/nve0/fb: it's now safe to obey the memory voltage setting properly
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-01-23 13:39:00 +10:00
Ben Skeggs 46bf1c389f drm/nve0/fb: multi-stage reclock is required for certain transitions
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-01-23 13:39:00 +10:00
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