dect
/
linux-2.6
Archived
13
0
Fork 0
Commit Graph

116 Commits

Author SHA1 Message Date
Aleksi Torhamo 43f789792e drm/nvc0/fb: fix crash when different mutex is used to protect same list
Fixes regression introduced in commit 861d2107
"drm/nouveau/fb: merge fb/vram and port to subdev interfaces"

nv50_fb_vram_{new,del} functions were changed to use
nouveau_subdev->mutex instead of the old nouveau_mm->mutex.
nvc0_fb_vram_new still uses the nouveau_mm->mutex, but nvc0 doesn't
have its own fb_vram_del function, using nv50_fb_vram_del instead.
Because of this, on nvc0 a different mutex ends up being used to protect
additions and deletions to the same list.

This patch is a -stable candidate for 3.7.

Signed-off-by: Aleksi Torhamo <aleksi@torhamo.net>
Reported-by: Roy Spliet <r.spliet@student.tudelft.nl>
Tested-by: Roy Spliet <r.spliet@student.tudelft.nl>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Cc: stable@vger.kernel.org
2013-01-13 18:07:46 +10:00
Aleksi Torhamo d19528a9e4 drm/nouveau/clock: fix support for more than 2 monitors on nve0
Fixes regression introduced in commit 70790f4f
"drm/nouveau/clock: pull in the implementation from all over the place"

When code was moved from nv50_crtc_set_clock to nvc0_clock_pll_set,
the PLLs it is used for got limited to only the first two VPLLs.

nv50_crtc_set_clock was only called to change VPLLs, so it didn't
limit what it was used for in any way. Since nvc0_clock_pll_set is
used for all PLLs, it has to specify which PLLs the code is used for,
and only listed the first two VPLLs.

Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=58735

This patch is a -stable candidate for 3.7.

Signed-off-by: Aleksi Torhamo <aleksi@torhamo.net>
Tested-by: Aleksi Torhamo <aleksi@torhamo.net>
Tested-by: Sean Santos <quantheory@gmail.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Cc: stable@vger.kernel.org
2013-01-13 18:07:46 +10:00
Marcin Slusarz cfd376b6bf drm/nouveau/vm: fix memory corruption when pgt allocation fails
If we return freed vm, nouveau_drm_open will happily call nouveau_cli_destroy,
which will try to free it again.

Reported-by: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-01-13 18:07:40 +10:00
Marcin Slusarz 4c4101d29f drm/nouveau: add locking around instobj list operations
Fixes memory corruptions, oopses, etc. when multiple gpuobjs are
simultaneously created or destroyed.

Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Cc: stable@vger.kernel.org
2013-01-13 18:07:40 +10:00
Ben Skeggs 4459146deb drm/nouveau/devinit: ensure legacy vga control is enabled during post
Fixes ACPI backlight control after suspend on some systems.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-01-13 17:59:29 +10:00
Ben Skeggs 5ddf4d4a54 drm/nouveau/bios: cache ramcfg strap on later chipsets
This fixes suspend/resume on at least Quadro 400.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-12-23 22:59:30 +10:00
Ben Skeggs 3d8ec27739 drm/nouveau/mxm: silence output if no bios data
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-12-23 22:59:29 +10:00
Ben Skeggs 0dd660d4ab drm/nouveau/bios: parse/display extra version component
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-12-23 22:59:28 +10:00
Ben Skeggs 1ed731668d drm/nouveau/bios: implement opcode 0xa9
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-12-23 22:59:28 +10:00
Ben Skeggs d2bcea686f drm/nouveau/bios: update gpio parsing apis to match current design
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-12-23 22:59:27 +10:00
Ben Skeggs caba557020 drm/nouveau: initial support for GK106
Modesetting seems to work alright, as does graphics (using binary driver
fuc from nve7...).

Lots to be done no doubt, but this'll get an image on the screen for
people.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-12-23 22:59:26 +10:00
Dave Airlie 1a1494def7 Merge branch 'drm-next-3.8' of git://people.freedesktop.org/~agd5f/linux into drm-next
Alex writes:
Pretty minor -next pull request.  We some additional new bits waiting
internally for release.  Hopefully Monday we can get at least some of
them out.  The others will probably take a few more weeks.

Highlights of the current request:
- ELD registers for passing audio information to the sound hardware
- Handle GPUVM page faults more gracefully
- Misc fixes

Merge radeon test
* 'drm-next-3.8' of git://people.freedesktop.org/~agd5f/linux: (483 commits)
  drm/radeon: bump driver version for new info ioctl requests
  drm/radeon: fix eDP clk and lane setup for scaled modes
  drm/radeon: add new INFO ioctl requests
  drm/radeon/dce32+: use fractional fb dividers for high clocks
  drm/radeon: use cached memory when evicting for vram on non agp
  drm/radeon: add a CS flag END_OF_FRAME
  drm/radeon: stop page faults from hanging the system (v2)
  drm/radeon/dce4/5: add registers for ELD handling
  drm/radeon/dce3.2: add registers for ELD handling
  radeon: fix pll/ctrc mapping on dce2 and dce3 hardware
  Linux 3.7-rc7
  powerpc/eeh: Do not invalidate PE properly
  Revert "drm/i915: enable rc6 on ilk again"
  ALSA: hda - Fix build without CONFIG_PM
  of/address: sparc: Declare of_iomap as an extern function for sparc again
  PM / QoS: fix wrong error-checking condition
  bnx2x: remove redundant warning log
  vxlan: fix command usage in its doc
  8139cp: revert "set ring address before enabling receiver"
  MPI: Fix compilation on MIPS with GCC 4.4 and newer
  ...

Conflicts:
	drivers/gpu/drm/exynos/exynos_drm_encoder.c
	drivers/gpu/drm/exynos/exynos_drm_fbdev.c
	drivers/gpu/drm/nouveau/core/engine/disp/nv50.c
2012-12-10 20:03:58 +10:00
Sachin Kamat a8f559efb2 drm/nouveau/device: Remove duplicate inclusion of core/device.h
core/device.h was included twice.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-11-29 09:58:13 +10:00
Daniel J Blueman c9aa763fe9 drm/nouveau: prevent log mangling
On 3.7-rc6, add missing newline to to prevent the following kernel log
line getting appended to the current one after switching the integrated
GPU and suspending the discrete GPU.

Signed-off-by: Daniel J Blueman <daniel@quora.org>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-11-29 09:58:12 +10:00
Ben Skeggs fb9bff26f1 nve0/ppp: enable support via nvc0's implementation
NVIDIA also appear to use the same class on Fermi/Kepler for PPP.

Will allow use of the engine if firmware (nvXX_fuc086) provided.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-11-29 09:58:08 +10:00
Maarten Lankhorst 4a7950140b nvc0/ppp: initial implementation of engine
Will allow use of the engine if firmware (nvXX_fuc086) provided.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-11-29 09:58:08 +10:00
Maarten Lankhorst 7d8bd91bf4 nvc0/vp: initial implementation of engine
Will allow use of the engine if firmware (nvXX_fuc085) provided.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-11-29 09:58:07 +10:00
Maarten Lankhorst 23c14ed2ec nvc0/bsp: initial implementation of engine
Will allow use of the engine if firmware (nvXX_fuc084) provided.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-11-29 09:58:07 +10:00
Ben Skeggs a7416d0d8a drm/nve0/vp: implement initial support for engine
Will allow use of the engine if firmware (nvXX_fuc085) provided.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-11-29 09:58:06 +10:00
Ben Skeggs b2f04fc6cb drm/nve0/bsp: implement initial support for engine
Will allow use of the engine if firmware (nvXX_fuc084) provided.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-11-29 09:58:05 +10:00
Ben Skeggs 874309a5b7 drm/nv50/fb: implement trap handler as subdev interrupt handler
nv50_fb_trap() will now be called automagically by the mc intr handler,
rather than each engine's handler having to check for traps manually.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-11-29 09:58:03 +10:00
Ben Skeggs e0cdd1e545 drm/nouveau/mc: allow calling of multiple handlers for a give intr bit
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-11-29 09:58:03 +10:00
Ben Skeggs b6e4ad200a drm/nouveau: remove (now obsolete) BIT U table parsing from DRM code
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-11-29 09:57:53 +10:00
Ben Skeggs 75f8693f30 drm/nouveau/bios: implement some dcb output entry parsing/matching functions
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-11-29 09:57:48 +10:00
Ben Skeggs 65c78660fb drm/nouveau/bios: implement "full" BIT 'd' table (and subtable) parsing in core
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-11-29 09:57:44 +10:00
Ben Skeggs 206c38a9f1 drm/nouveau/core: add some missing subdev/engine disable flags
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-11-29 09:57:43 +10:00
Ben Skeggs b6caea5058 drm/nouveau/bios: implement BIT 'U' table (and subtable) parsing in core
This will, in the near future, replace what's currently in the DRM
nouveau_bios.c code.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-11-29 09:57:43 +10:00
Ben Skeggs 46654061bb drm/nvd0-nve0/disp: initial implementation of evo channel classes
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-11-29 09:57:40 +10:00
Ben Skeggs 70cabe4a14 drm/nv50/disp: create skeleton display/channel object classes
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-11-29 09:56:40 +10:00
Ben Skeggs 344e107df7 drm/nvd0/dmaobj: duplicate fermi class, will diverge real soon now
The hardware dmaobj format completely changed in GF119, so these will
need a separate implementation.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-11-29 09:56:39 +10:00
Ben Skeggs 0a32241d8b drm/nouveau: pass address to object accessor functions as u64
Will be required by future work.  Make the API change now to catch any
(but hopefully none) unexpected fallout.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-11-29 09:56:37 +10:00
Ben Skeggs 66bb7e1d67 drm/nouveau/gpio: place upper limit on using old-school tvdac bios data
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-11-29 09:56:36 +10:00
Viktor Novotný 1f2285d462 drm/nouveau/clk: fix crystal frequency retrieval on nv25
Signed-off-by: Viktor Novotný <noviktor@seznam.cz>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-11-29 09:56:35 +10:00
Marcin Slusarz fced4b2211 drm/nouveau: remove unused variable from nouveau_bios_shadow_of
drivers/gpu/drm/nouveau/core/subdev/bios/base.c: warning: unused variable 'i'

Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-11-29 09:56:34 +10:00
Ben Skeggs 7ef19e454e drm/nv40/fb: use an actual compressed zeta format
SPLIT is apparently just that, and only splits Z and S components.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-11-29 09:56:34 +10:00
Ben Skeggs d7da62845b drm/nv30/fb: enable z compression
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-11-29 09:56:33 +10:00
Ben Skeggs 2f1cb96d65 drm/nv40/fb: enable z compression
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-11-29 09:56:33 +10:00
Ben Skeggs fd3a522586 drm/nv20/fb: fixup compression tag allocation size
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-11-29 09:56:32 +10:00
Ben Skeggs e1344412ae drm/nv30-nv40/fb: call zcomp setup hook from tiling setup
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-11-29 09:56:31 +10:00
Ben Skeggs dac1558d49 drm/nouveau/fb: create tag heap from common code for all relevant chipsets
A nv2x bug wrt hardcoded tag counts is now also fixed as a side-effect.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-11-29 09:56:31 +10:00
Ben Skeggs 268d5a3017 drm/nv30/fb: start bashing zcomp registers with 'disabled' (for now)
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-11-29 09:56:30 +10:00
Ben Skeggs 7e0f992b79 drm/nouveau: replace some open-coded mm_initialised checks
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-11-29 09:56:30 +10:00
Ben Skeggs 6d338081a6 drm/nouveau/fb: read TILE_BASE after writing it to avoid a hardware race
Apparently needed for turbocache nv4x chips at least, we'll just do it
everywhere...

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-11-29 09:56:29 +10:00
Ben Skeggs 5f8e256704 drm/nv40/fb: start bashing zcomp registers on relevant chipsets
Always bashing "disabled" for now, actual compressing coming up...

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-11-29 09:56:29 +10:00
Ben Skeggs 150ccf161f drm/nv30-nv40/fb: make use of bankoff for zeta buffers, where supported
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-11-29 09:56:28 +10:00
Ben Skeggs d33db63b37 drm/nv20/fb: fix zcomp register calculation on big-endian systems
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-11-29 09:56:28 +10:00
Ben Skeggs 4ae207453e drm/nv40/fb: split implementation into nv40/nv41/nv44/nv46/nv47/nv49/nv4e pieces
Wow, this is a nice complicated mess of build-your-own-mc blocks...

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-11-29 09:56:27 +10:00
Ben Skeggs 11bac40708 drm/nv30/fb: split implementation into nv34(nv10)/nv30/nv35 pieces
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-11-29 09:56:27 +10:00
Ben Skeggs a8749af1a0 drm/nv20/fb: split implementation into nv20/nv25 pieces
There's more stuff that can be shared in the constructor, will be merged
together again later.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-11-29 09:56:27 +10:00
Ben Skeggs 67e9e9f6ca drm/nouveau/fb: split tile and compression region handling
This is in preparation for extending the support to the remaining
chipsets, to allow for sharing more functions.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-11-29 09:56:26 +10:00