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

205 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 c684cef795 drm/nv50/disp: fix selection of bios script for analog outputs
Analog output number was overwritten by value from digital output path.
Fix it.

Fixes resume from s2ram: https://bugs.freedesktop.org/show_bug.cgi?id=58729
(as stumbled on by J Binder, Pontus Fuchs and me)
Fixes blank screen on module load (reported by Sune Mølgaard).

Fixes regression from commit 186ecad21c
("drm/nv50/disp: move remaining interrupt handling into core").

Reported-by: J Binder <wheel@herr-der-mails.de>
Reported-by: Pontus Fuchs <pontus.fuchs@gmail.com>
Reported-by: Sune Mølgaard <sune@molgaard.org>
Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Tested-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Tested-by: Sune Mølgaard <sune@molgaard.org>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-01-13 18:07:45 +10:00
Marcin Slusarz dd5700ea98 drm/nouveau: fix nouveau_client allocation failure path
Depending on the point of failure, freed object would be returned
or memory leak would happen.

Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-01-13 18:07:44 +10:00
Marcin Slusarz 82c805abb2 drm/nouveau: don't return freed object from nouveau_handle_create
Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2013-01-13 18:07:41 +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 eca15296a9 drm/nve0/graph: fix fuc, and enable acceleration on all known chipsets
Also adds GK106 to chipsets known by ucode.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-12-23 22:59:32 +10:00
Ben Skeggs 902530693e drm/nvc0/graph: fix fuc, and enable acceleration on GF119
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-12-23 22:59:31 +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
Ben Skeggs edc260d061 drm/nouveau/fifo: trigger engine context unload before zeroing context pointer
Fixes a PCE0 page fault noticed on NVD9 during module unload.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-11-29 09:58:12 +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
Marcin Slusarz ae4ba7371c drm/nouveau: raise reporting levels of some messages
Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-11-29 09:58:10 +10:00
Martin Peres 507ceb1518 drm/nouveau/core: fix the assumption that NVDEV_XXXX is always under 32
It fixes a bug that would have been introduced when adding more
sudevs/engines.

Signed-off-by: Martin Peres <martin.peres@labri.fr>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-11-29 09:58:09 +10:00
Ben Skeggs d1be7e9be1 drm/nouveau/ppp: remove nouveau_ppp base class
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-11-29 09:58:09 +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 66433c2af8 drm/nouveau/vdec: remove nouveau_{bsp,vp} base classes, use nouveau_engine directly
Later chipsets use falcon anyway, and I can't currently see a good need
for a shared base class.

PPP will get the same treatment once Maarten's patches are merged.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-11-29 09:58:07 +10:00
Ben Skeggs f3295b3c99 drm/nve0/fifo: allow for future binding of ppp contexts
No support for the class yet, but will be pulled in with Maarten's Fermi
vdec patches.  The Kepler PPP class is identical.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-11-29 09:58:06 +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 43598875b3 drm/nouveau/core: implement shortcut for simple engctx construction
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-11-29 09:58:04 +10:00
Ben Skeggs e5e454f918 drm/nvc0/copy: share interrupt handler with nva3
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-11-29 09:58:04 +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 3cb0ebddd0 drm/nouveau/copy: remove nouveau_copy base class
nva3/nvc0 are using falcon, nve0 is now using engine directly.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-11-29 09:58:02 +10:00
Ben Skeggs 586ae46d65 drm/nvc0/copy: use nouveau_falcon base class
Reviewed-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-11-29 09:58:02 +10:00
Ben Skeggs 8365f2fd5c drm/nva3/copy: use nouveau_falcon base class
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-11-29 09:58:01 +10:00
Ben Skeggs 27abc13e47 drm/nv98/crypt: use nouveau_falcon base class
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-11-29 09:58:01 +10:00
Ben Skeggs e3aaa946bd drm/nouveau: initial falcon (fuc) engine base class implementation
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-11-29 09:58:00 +10:00
Ben Skeggs bf2c886a85 drm/nouveau/disp: add support for 10bpc over DisplayPort
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-11-29 09:57:59 +10:00
Ben Skeggs 8f2abc2586 drm/nouveau/dp: remove last bits of VBIOS parsing from DRM code
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-11-29 09:57:54 +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 186ecad21c drm/nv50/disp: move remaining interrupt handling into core
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-11-29 09:57:52 +10:00
Ben Skeggs 4a230fa618 drm/nvd0/disp: calculate U script id in supervisor interrupt
This is like we do on nv50:nvd9 already.  There's been no problems seen
yet with using this *seemingly* scratch register to store the value, but
we won't be able to do this anymore once nv50's code is merged.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-11-29 09:57:52 +10:00
Ben Skeggs 8e9e3d2dea drm/nv84/disp: move hdmi control into core
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-11-29 09:57:51 +10:00
Ben Skeggs a4feaf4ea5 drm/nva3/disp: move hda codec handling to core
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-11-29 09:57:51 +10:00
Ben Skeggs f7960736d0 drm/nv50/disp: move dp link training helpers into core
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-11-29 09:57:50 +10:00
Ben Skeggs 7ebb38b556 drm/nv50/disp: call into core for dac load detection
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-11-29 09:57:50 +10:00
Ben Skeggs ef22c8bb7b drm/nv50/disp: call into core to handle dac/sor power state changes
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-11-29 09:57:49 +10:00