]> git.karo-electronics.de Git - linux-beck.git/log
linux-beck.git
13 years agodrm/nouveau: replace nv04_graph_fifo_access() use with direct reg bashing
Ben Skeggs [Wed, 20 Jul 2011 01:04:46 +0000 (11:04 +1000)]
drm/nouveau: replace nv04_graph_fifo_access() use with direct reg bashing

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
13 years agodrm/nv40/gr: rewrite/split context takedown functions
Ben Skeggs [Sun, 17 Jul 2011 23:56:36 +0000 (09:56 +1000)]
drm/nv40/gr: rewrite/split context takedown functions

It's completely pointless to save the PGRAPH context when destroying a
channel, so don't bother.

This commit should also fix kernel.org bug 39422, where the DRM channel
state was incorrectly being saved because we left PGRAPH FIFO access
enabled while running the ctxprog.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
13 years agodrm/nouveau: detect disabled device in irq handler and return IRQ_NONE
Ben Skeggs [Tue, 12 Jul 2011 05:42:45 +0000 (15:42 +1000)]
drm/nouveau: detect disabled device in irq handler and return IRQ_NONE

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
13 years agodrm/nouveau: ignore connector type when deciding digital/analog on DVI-I
Ben Skeggs [Tue, 12 Jul 2011 03:32:07 +0000 (13:32 +1000)]
drm/nouveau: ignore connector type when deciding digital/analog on DVI-I

If the connector table is lying, which it often does on the boards of a
particular manufacturer, we may end up doing the wrong thing.  Listen
to the encoder table instead, it's more reliable.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
13 years agodrm/nouveau: Add a quirk for Gigabyte NX86T
Emil Velikov [Sun, 10 Jul 2011 09:59:29 +0000 (10:59 +0100)]
drm/nouveau: Add a quirk for Gigabyte NX86T

The connector table lies, the card has DVI-I not HDMI
Fixes bug https://bugs.freedesktop.org/show_bug.cgi?id=35675

v2: Mention the bugreport
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
13 years agodrm/nouveau: do not leak in nv20_graph_create
Jesper Juhl [Sun, 3 Jul 2011 23:46:53 +0000 (09:46 +1000)]
drm/nouveau: do not leak in nv20_graph_create

If we return due to an unknown chipset in
drivers/gpu/drm/nouveau/nv20_graph.c:nv20_graph_create() we'll leak the
memory allocated to 'pgraph'.

This patch should fix the leak.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Reviewed-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
13 years agodrm/nv50/dp: fix hack to work for macbooks booted via EFI
Ben Skeggs [Wed, 29 Jun 2011 23:03:36 +0000 (09:03 +1000)]
drm/nv50/dp: fix hack to work for macbooks booted via EFI

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
13 years agodrm/nouveau: error paths leak in nvc0_graph_construct_context()
Dan Carpenter [Sat, 25 Jun 2011 05:54:46 +0000 (08:54 +0300)]
drm/nouveau: error paths leak in nvc0_graph_construct_context()

Two of these error paths returned without freeing "ctx".

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
13 years agodrm/nouveau: Calculate reserved VRAM for PRAMIN value before use.
Younes Manton [Fri, 24 Jun 2011 05:15:58 +0000 (01:15 -0400)]
drm/nouveau: Calculate reserved VRAM for PRAMIN value before use.

'drm/nouveau: rework vram init/fini ordering a little' changed
the order of instmem.init() and nouveau_mem_vram_init() which
resulted in using ramin_rsvd_vram before it was calculated and
failing to init any accel on pre-NV50 cards.

Since it's only used on <NV50 just calculate it where it's needed
and leave it as default 0 for NV50.

Signed-off-by: Younes Manton <younes.m@gmail.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
13 years agodrm/nouveau: fix nouveau_vma object leak
Marcin Slusarz [Thu, 23 Jun 2011 14:34:30 +0000 (16:34 +0200)]
drm/nouveau: fix nouveau_vma object leak

Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
13 years agodrm/nouveau: fix nouveau_mem object leak
Marcin Slusarz [Thu, 23 Jun 2011 14:35:31 +0000 (16:35 +0200)]
drm/nouveau: fix nouveau_mem object leak

It's a regression from "drm/nouveau: create temp vmas for both src and
dst of bo moves".

Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
13 years agodrm/nouveau: fix fetching vbios from above 4GiB vram addresses
Ben Skeggs [Thu, 23 Jun 2011 22:18:23 +0000 (08:18 +1000)]
drm/nouveau: fix fetching vbios from above 4GiB vram addresses

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
13 years agodrm/nouveau: fix off-by-one
Ben Skeggs [Thu, 23 Jun 2011 05:47:32 +0000 (15:47 +1000)]
drm/nouveau: fix off-by-one

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
13 years agodrm/nouveau/temp: Add default calibration values for nv67
Emil Velikov [Wed, 22 Jun 2011 01:54:39 +0000 (02:54 +0100)]
drm/nouveau/temp: Add default calibration values for nv67

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
13 years agodrm/nouveau/temp: Fix signed/unsigned int logic
Emil Velikov [Wed, 22 Jun 2011 01:13:23 +0000 (02:13 +0100)]
drm/nouveau/temp: Fix signed/unsigned int logic

Many (all?) of the coefficients related to calculating the
correct temperature are signed integers

This patch correcly parses and stores those values
It also ensures that the default offset is 0 (previously 1)

Affected cards - the original nv50 and the nv40 family

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
13 years agodrm/nvc0: push prunk140 irq messages to debug loglevel
Ben Skeggs [Sun, 19 Jun 2011 10:50:59 +0000 (20:50 +1000)]
drm/nvc0: push prunk140 irq messages to debug loglevel

We know they happen, we don't know why.  They're annoying, so hide them
from users for the moment.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
13 years agodrm/nouveau: un-blacklist nvce accel
Ben Skeggs [Fri, 17 Jun 2011 09:49:31 +0000 (19:49 +1000)]
drm/nouveau: un-blacklist nvce accel

Reported working on IRC.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
13 years agodrm/nouveau: fix null pointer deref on pre-nv50 chipsets
Ben Skeggs [Mon, 13 Jun 2011 02:23:35 +0000 (12:23 +1000)]
drm/nouveau: fix null pointer deref on pre-nv50 chipsets

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
13 years agodrm/nouveau: rework vram init/fini ordering a little
Ben Skeggs [Fri, 10 Jun 2011 03:36:08 +0000 (13:36 +1000)]
drm/nouveau: rework vram init/fini ordering a little

Commit "drm/nouveau: add some debug output if nouveau_mm busy at destroy time"
revealed an issue where vram mm takedown would actually fail due to there
still being nodes present, causing nouveau to leak a small amount of memory
on module unload.

This splits TTM/nouveau_mm a bit more cleanly and ensures nouveau_mm fini
isn't done until all gpuobjs are also destroyed.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
13 years agodrm/nouveau: shut lockdep up if last vm ref needs to destroy pgd
Ben Skeggs [Wed, 8 Jun 2011 08:40:34 +0000 (18:40 +1000)]
drm/nouveau: shut lockdep up if last vm ref needs to destroy pgd

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
13 years agodrm/nouveau: fix display takedown order to match reverse init order
Ben Skeggs [Wed, 8 Jun 2011 08:29:12 +0000 (18:29 +1000)]
drm/nouveau: fix display takedown order to match reverse init order

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
13 years agodrm/nvc0: enable per-client address spaces
Ben Skeggs [Wed, 8 Jun 2011 08:17:41 +0000 (18:17 +1000)]
drm/nvc0: enable per-client address spaces

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
13 years agodrm/nouveau: add some debug output if nouveau_mm busy at destroy time
Ben Skeggs [Tue, 7 Jun 2011 06:18:19 +0000 (16:18 +1000)]
drm/nouveau: add some debug output if nouveau_mm busy at destroy time

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
13 years agodrm/nv50: enable use of per-client gpu address space
Ben Skeggs [Tue, 7 Jun 2011 05:35:37 +0000 (15:35 +1000)]
drm/nv50: enable use of per-client gpu address space

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
13 years agodrm/nouveau: remove implicit mapping of every bo into chan_vm
Ben Skeggs [Tue, 7 Jun 2011 05:25:12 +0000 (15:25 +1000)]
drm/nouveau: remove implicit mapping of every bo into chan_vm

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
13 years agodrm/nouveau: remove 'chan' argument from nouveau_bo_new
Ben Skeggs [Tue, 7 Jun 2011 04:21:29 +0000 (14:21 +1000)]
drm/nouveau: remove 'chan' argument from nouveau_bo_new

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
13 years agodrm/nouveau: fixup gem_info ioctl to return client-specific bo virtual
Ben Skeggs [Tue, 7 Jun 2011 03:28:11 +0000 (13:28 +1000)]
drm/nouveau: fixup gem_info ioctl to return client-specific bo virtual

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
13 years agodrm/nvc0: explicitly map PDISP semaphore buffer into each channel's vm
Ben Skeggs [Tue, 7 Jun 2011 05:43:31 +0000 (15:43 +1000)]
drm/nvc0: explicitly map PDISP semaphore buffer into each channel's vm

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
13 years agodrm/nv50-nvc0: lookup pushbuf virtual address on dma_push
Ben Skeggs [Tue, 7 Jun 2011 03:23:47 +0000 (13:23 +1000)]
drm/nv50-nvc0: lookup pushbuf virtual address on dma_push

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
13 years agodrm/nv84-nvc0: explicitly map semaphore buffer into channel vm
Ben Skeggs [Tue, 7 Jun 2011 05:21:23 +0000 (15:21 +1000)]
drm/nv84-nvc0: explicitly map semaphore buffer into channel vm

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
13 years agodrm/nv50-nvc0: explicitly map pushbuf bo into channel vm
Ben Skeggs [Tue, 7 Jun 2011 03:20:43 +0000 (13:20 +1000)]
drm/nv50-nvc0: explicitly map pushbuf bo into channel vm

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
13 years agodrm/nv50-nvc0: explicitly map notifier bo into channel vm
Ben Skeggs [Tue, 7 Jun 2011 03:17:45 +0000 (13:17 +1000)]
drm/nv50-nvc0: explicitly map notifier bo into channel vm

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
13 years agodrm/nv50-nvc0: explicitly map fbcon fb into channel vm
Ben Skeggs [Tue, 7 Jun 2011 03:12:44 +0000 (13:12 +1000)]
drm/nv50-nvc0: explicitly map fbcon fb into channel vm

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
13 years agodrm/nouveau: initial changes to support multiple VMAs per buffer object
Ben Skeggs [Mon, 6 Jun 2011 04:07:04 +0000 (14:07 +1000)]
drm/nouveau: initial changes to support multiple VMAs per buffer object

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
13 years agodrm/nv50-nvc0: completely disable relocs
Ben Skeggs [Tue, 7 Jun 2011 01:12:39 +0000 (11:12 +1000)]
drm/nv50-nvc0: completely disable relocs

GPU virtual addresses are constant now so this should never be getting hit
anyway and userspace shouldn't break from them being ignored.

This is being done in preference to teaching the code how to deal with BOs
that exist at different virtual addresses within separate VMs.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
13 years agodrm/nouveau: convert bo.mem.start usage to bo.offset
Ben Skeggs [Tue, 7 Jun 2011 01:24:14 +0000 (11:24 +1000)]
drm/nouveau: convert bo.mem.start usage to bo.offset

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
13 years agodrm/nouveau: convert some bo.offset use to vma.offset
Ben Skeggs [Tue, 7 Jun 2011 01:02:38 +0000 (11:02 +1000)]
drm/nouveau: convert some bo.offset use to vma.offset

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
13 years agodrm/nouveau: create temp vmas for both src and dst of bo moves
Ben Skeggs [Mon, 6 Jun 2011 10:54:42 +0000 (20:54 +1000)]
drm/nouveau: create temp vmas for both src and dst of bo moves

Greatly simplifies a number of things, particularly once per-client GPU
address spaces are involved.

May add this back later once I know what things'll look like.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
13 years agodrm/nouveau: store bo's page size in nouveau_bo
Ben Skeggs [Mon, 6 Jun 2011 04:15:46 +0000 (14:15 +1000)]
drm/nouveau: store bo's page size in nouveau_bo

Was previously assuming a page size of 4KiB unless a VMA was present to
override it.  Eventually, a buffer won't necessarily have a VMA at all at
some stages of its life, so we need to store this info elsewhere.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
13 years agodrm/nouveau: skip move_notify() if bo does not have a vma attached
Ben Skeggs [Fri, 3 Jun 2011 04:55:39 +0000 (14:55 +1000)]
drm/nouveau: skip move_notify() if bo does not have a vma attached

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
13 years agodrm/nouveau: will need to specify channel for vm-ful gpuobj allocations
Ben Skeggs [Fri, 3 Jun 2011 04:23:30 +0000 (14:23 +1000)]
drm/nouveau: will need to specify channel for vm-ful gpuobj allocations

Abuses existing gpuobj_new() chan argument for this, which in turn forces
all NVOBJ_FLAG_VM allocations to be done from the global heap, not
suballocated from the channel's private heap.  Not a problem though in
practise.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
13 years agodrm/nouveau: initialise any vm for a channel before pushbuf/ntfy
Ben Skeggs [Fri, 3 Jun 2011 03:59:44 +0000 (13:59 +1000)]
drm/nouveau: initialise any vm for a channel before pushbuf/ntfy

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
13 years agodrm/nouveau: modify gpuobj/ntfy takedown ordering
Ben Skeggs [Mon, 6 Jun 2011 01:34:27 +0000 (11:34 +1000)]
drm/nouveau: modify gpuobj/ntfy takedown ordering

gpuobj really needs splitting into channel/gpuobj code instead...

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
13 years agodrm/nouveau/gem: implement stub hooks for GEM object open/close
Ben Skeggs [Fri, 3 Jun 2011 06:18:26 +0000 (16:18 +1000)]
drm/nouveau/gem: implement stub hooks for GEM object open/close

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
13 years agodrm/nouveau: remove 'chan' argument from nouveau_gem_new
Ben Skeggs [Tue, 7 Jun 2011 02:25:36 +0000 (12:25 +1000)]
drm/nouveau: remove 'chan' argument from nouveau_gem_new

Userspace hasn't passed us a channel_hint for a long long time now, and
there isn't actually a need to do so anymore anyway.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
13 years agodrm/nv50-nvc0/chan: inherit vm from fpriv, rather than chan_vm directly
Ben Skeggs [Fri, 3 Jun 2011 00:20:52 +0000 (10:20 +1000)]
drm/nv50-nvc0/chan: inherit vm from fpriv, rather than chan_vm directly

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
13 years agodrm/nv50-nvc0/vm: take client reference on shared channel vm
Ben Skeggs [Fri, 3 Jun 2011 00:07:08 +0000 (10:07 +1000)]
drm/nv50-nvc0/vm: take client reference on shared channel vm

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
13 years agodrm/nv50-nvc0/vm: don't touch chan_vm
Ben Skeggs [Thu, 2 Jun 2011 23:57:27 +0000 (09:57 +1000)]
drm/nv50-nvc0/vm: don't touch chan_vm

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
13 years agodrm/nouveau: no need to update bo.offset from vma after validate
Ben Skeggs [Fri, 3 Jun 2011 05:47:39 +0000 (15:47 +1000)]
drm/nouveau: no need to update bo.offset from vma after validate

On chipsets using nouveau_vm, the virtual address stays constant, so
the value set at bo creation time is fine.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
13 years agodrm/nouveau: store a per-client channel list
Ben Skeggs [Wed, 1 Jun 2011 09:18:48 +0000 (19:18 +1000)]
drm/nouveau: store a per-client channel list

Removes the need to disable IRQs to lookup channel struct on every pushbuf
ioctl, among others.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
13 years agodrm/nouveau: use NULL file_priv for DRM-created channels
Ben Skeggs [Tue, 31 May 2011 01:12:55 +0000 (11:12 +1000)]
drm/nouveau: use NULL file_priv for DRM-created channels

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
13 years agodrm/nouveau: allocate structure to store per-client data
Ben Skeggs [Tue, 31 May 2011 01:11:28 +0000 (11:11 +1000)]
drm/nouveau: allocate structure to store per-client data

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
13 years agodrm/nouveau: silence error for missing dac loadval table
Ben Skeggs [Wed, 1 Jun 2011 04:11:10 +0000 (14:11 +1000)]
drm/nouveau: silence error for missing dac loadval table

There's lots of boards (all recent ones) that don't have this anymore, so
punt the message to debug loglevel.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
13 years agodrm/nv50: DCB table quirks for another busted XFX board
Ben Skeggs [Mon, 30 May 2011 02:53:37 +0000 (12:53 +1000)]
drm/nv50: DCB table quirks for another busted XFX board

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
13 years agodrm/nouveau: log if accel is disabled by default on a chipset
Ben Skeggs [Fri, 27 May 2011 06:18:10 +0000 (16:18 +1000)]
drm/nouveau: log if accel is disabled by default on a chipset

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
13 years agodrm/nvc0/gr: fill in some more data for 0xc1/0xc8/0xce
Ben Skeggs [Fri, 27 May 2011 05:50:59 +0000 (15:50 +1000)]
drm/nvc0/gr: fill in some more data for 0xc1/0xc8/0xce

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
13 years agodrm/nvc0/gr: fix typo in class9197 init
Ben Skeggs [Thu, 26 May 2011 22:36:45 +0000 (08:36 +1000)]
drm/nvc0/gr: fix typo in class9197 init

Reported-by: Christoph Bumiller <e0425955@student.tuwien.ac.at>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
13 years agodrm/nvc0/gr: calculate magicgpc918 ourselves
Ben Skeggs [Thu, 26 May 2011 02:12:43 +0000 (12:12 +1000)]
drm/nvc0/gr: calculate magicgpc918 ourselves

Not a clue what it is yet, but we get the same numbers as NVIDIA now.

My 465 didn't seem to care to greatly *what* I bashed into these registers..

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
13 years agodrm/nvc0/gr: add some missing magics for 0xc1/0xc8/0xce
Ben Skeggs [Thu, 26 May 2011 00:54:05 +0000 (10:54 +1000)]
drm/nvc0/gr: add some missing magics for 0xc1/0xc8/0xce

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
13 years agodrm/nvc0/gr: import and use our own fuc by default
Ben Skeggs [Wed, 25 May 2011 08:32:44 +0000 (18:32 +1000)]
drm/nvc0/gr: import and use our own fuc by default

The ability to use NVIDIA's fuc has been retained *temporarily* in order
to better debug any issues that may be lingering in our initial attempt
at writing this ucode.  Once I'm fairly confident we're okay, it'll be
removed.

There's a number of things not implemented by this fuc currently, but
most of it is sets of state that our context setup would not have used
anyway.  No doubt we'll find out what they're for at some point, and
implement it if required.

This has been tested on 0xc0/0xc4 thus far, and from what I could tell
it worked as well as NVIDIA's.  It's also been tested on 0xc1, but even
with NVIDIA's fuc that chipset doesn't work correctly with nouveau yet.

0xc3/0xc8/0xce should in theory be supported too, but I don't have the
hardware to check that.

There's no doubt numerous bugs to squash yet, please report any!

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
13 years agodrm/nvc0: fix suspend/resume of PGRAPH/PCOPYn
Ben Skeggs [Wed, 25 May 2011 07:22:43 +0000 (17:22 +1000)]
drm/nvc0: fix suspend/resume of PGRAPH/PCOPYn

We need the physical VRAM address in vinst, even for objects mapped into
a vm, as the gpuobj suspend/resume code uses PMEM to access the object.

Previously, vinst was overloaded to mean "VRAM address" for !VM objects,
and "VM address" for VM objects, causing the wrong data to be accessed
during suspend/resume.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
13 years agodrm/nouveau: default to noaccel on 0xc1/0xc8/0xce for now
Ben Skeggs [Wed, 25 May 2011 04:48:50 +0000 (14:48 +1000)]
drm/nouveau: default to noaccel on 0xc1/0xc8/0xce for now

Until we know these should work properly, would much rather default to
noaccel than risk giving people corruption/hangs out of the box..

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
13 years agodrm/nvc1/gr: switch on acceleration support
Ben Skeggs [Tue, 24 May 2011 06:06:42 +0000 (16:06 +1000)]
drm/nvc1/gr: switch on acceleration support

There's issues with certain 3D apps still, unknown whether this is a kernel
issue or not.. It does appear that it may be in the 3D driver however.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
13 years agodrm/nvc0/gr: enable 0xc8/0xce support, no idea if it works or not..
Ben Skeggs [Tue, 24 May 2011 05:44:37 +0000 (15:44 +1000)]
drm/nvc0/gr: enable 0xc8/0xce support, no idea if it works or not..

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
13 years agodrm/nvc0/gr: some initial state modifications
Ben Skeggs [Tue, 24 May 2011 04:57:53 +0000 (14:57 +1000)]
drm/nvc0/gr: some initial state modifications

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
13 years agodrm/nvc0/gr: 0x9197/0x9297 state init
Ben Skeggs [Tue, 24 May 2011 04:46:06 +0000 (14:46 +1000)]
drm/nvc0/gr: 0x9197/0x9297 state init

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
13 years agodrm/nvc0/gr: macro to determine fermi class, will use it in a few places
Ben Skeggs [Tue, 24 May 2011 04:37:41 +0000 (14:37 +1000)]
drm/nvc0/gr: macro to determine fermi class, will use it in a few places

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
13 years agodrm/nvc0/fifo: fix typos in unload_context
Ben Skeggs [Tue, 24 May 2011 01:54:42 +0000 (11:54 +1000)]
drm/nvc0/fifo: fix typos in unload_context

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
13 years agodrm/nvc0/fb: allocate page for some unknown PFFB object
Ben Skeggs [Tue, 24 May 2011 01:47:09 +0000 (11:47 +1000)]
drm/nvc0/fb: allocate page for some unknown PFFB object

Fixes DMAR faults during accel, more than likely a similar problem to what
was solved on nv50 previously.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
13 years agodrm/nvc0: Read temperature on Fermi like we do on nv84+
Martin Peres [Thu, 12 May 2011 20:40:47 +0000 (22:40 +0200)]
drm/nvc0: Read temperature on Fermi like we do on nv84+

Signed-off-by: Martin Peres <martin.peres@ensi-bourges.fr>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
13 years agodrm/radeon/kms: add initial CS checker support for compute
Alex Deucher [Wed, 8 Jun 2011 19:26:45 +0000 (15:26 -0400)]
drm/radeon/kms: add initial CS checker support for compute

- Add some new compute regs
- Add new dispatch packets for evergreen/cayman

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
13 years agottm: Fix spelling mistakes and remove unused #ifdef
Konrad Rzeszutek Wilk [Wed, 8 Jun 2011 17:06:15 +0000 (17:06 +0000)]
ttm: Fix spelling mistakes and remove unused #ifdef

. and some comments to make it easier to understand.

Ackedby: Randy Dunlap <randy.dunlap@oracle.com>
[v2: Added some more updates from Randy Dunlap]
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
13 years agodrm/radeon/kms: set dma_copy to NULL for r6xx+
Alex Deucher [Mon, 13 Jun 2011 21:33:39 +0000 (21:33 +0000)]
drm/radeon/kms: set dma_copy to NULL for r6xx+

No need to assign the same copy callback for both
copy blit and dma.

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
13 years agodrm/gem: add hooks to notify driver when object handle is created/destroyed
Ben Skeggs [Thu, 9 Jun 2011 00:24:59 +0000 (00:24 +0000)]
drm/gem: add hooks to notify driver when object handle is created/destroyed

Nouveau is going to use these hooks to map/unmap objects from a client's
private GPU address space.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
13 years agodrm/radeon/kms/r6xx+: voltage fixes
Alex Deucher [Mon, 20 Jun 2011 17:00:31 +0000 (13:00 -0400)]
drm/radeon/kms/r6xx+: voltage fixes

0xff01 is not an actual voltage value, but a flag
for the driver.  If the power state as that value,
skip setting the voltage.

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
13 years agodrm/nouveau: drop leftover debugging
Dave Airlie [Mon, 20 Jun 2011 05:25:35 +0000 (15:25 +1000)]
drm/nouveau: drop leftover debugging

this printk isn't really useful, just drop it for now.

Signed-off-by: Dave Airlie <airlied@redhat.com>
13 years agoMerge branch 'drm-nouveau-fixes' of git://anongit.freedesktop.org/git/nouveau/linux...
Dave Airlie [Mon, 20 Jun 2011 02:02:38 +0000 (12:02 +1000)]
Merge branch 'drm-nouveau-fixes' of git://anongit.freedesktop.org/git/nouveau/linux-2.6 into drm-fixes

* 'drm-nouveau-fixes' of git://anongit.freedesktop.org/git/nouveau/linux-2.6:
  drm/nouveau: fix assumption that semaphore dmaobj is valid in x-chan sync
  drm/nv50/disp: fix gamma with page flipping overlay turned on
  drm/nouveau/pm: Prevent overflow in nouveau_perf_init()
  drm/nouveau: fix big-endian switch

13 years agodrm/radeon: avoid warnings from r600/eg irq handlers on powered off card.
Dave Airlie [Sat, 18 Jun 2011 03:59:51 +0000 (03:59 +0000)]
drm/radeon: avoid warnings from r600/eg irq handlers on powered off card.

Since we were calling the wptr function before checking if the IH was
even enabled, or the GPU wasn't shutdown, we'd get spam in the logs when
the GPU readback 0xffffffff. This reorders things so we return early
in the no IH and GPU shutdown cases.

Reported-and-tested-by: ManDay on #radeon
Reviewed-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
13 years agodrm/radeon/kms: add missing param for dce3.2 DP transmitter setup
Alex Deucher [Fri, 17 Jun 2011 06:11:30 +0000 (06:11 +0000)]
drm/radeon/kms: add missing param for dce3.2 DP transmitter setup

This is used during phy init to set up the phy for DP.  This may
fix DP problems on DCE3.2 cards.

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
13 years agodrm/radeon/kms/atom: fix duallink on some early DCE3.2 cards
Alex Deucher [Fri, 17 Jun 2011 17:13:52 +0000 (13:13 -0400)]
drm/radeon/kms/atom: fix duallink on some early DCE3.2 cards

Certain revisions of the vbios on DCE3.2 cards have a bug
in the transmitter control table which prevents duallink from
being enabled properly on some cards.  The action switch statement
jumps to the wrong offset for the OUTPUT_ENABLE action.  The fix
is to use the ENABLE action rather than the OUTPUT_ENABLE action
on the affected cards.  In fixed version of the vbios, both
actions jump to the same offset, so the change should be safe.

Reported-and-tested-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Cc: stable@kernel.org
Signed-off-by: Dave Airlie <airlied@redhat.com>
13 years agoMerge branch 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groec...
Linus Torvalds [Sun, 19 Jun 2011 03:33:31 +0000 (20:33 -0700)]
Merge branch 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/staging

* 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/staging:
  hwmon: (s3c) Initialize sysfs attributes
  hwmon: (ibmpex) Initialize sysfs attributes
  hwmon: (ibmaem) Initialize sysfs attributes
  hwmon: (asus_atk0110) Consolidate sysfs attribute initialization
  hwmon: (coretemp) Drop unused struct members

13 years agoisofs: fix bh leak in isofs_fill_super() error case
Linus Torvalds [Wed, 8 Jun 2011 17:30:03 +0000 (10:30 -0700)]
isofs: fix bh leak in isofs_fill_super() error case

In isofs_fill_super(), when an iso_primary_descriptor is found, it is
kept in pri_bh.  The error cases don't properly release it.  Fix it.

Reported-and-tested-by: 김원석 <stanley.will.kim@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agohwmon: (s3c) Initialize sysfs attributes
Guenter Roeck [Tue, 24 May 2011 19:34:55 +0000 (12:34 -0700)]
hwmon: (s3c) Initialize sysfs attributes

Initialize dynamically allocated sysfs attributes before device_create_file()
call to suppress lockdep_init_map() warning if lockdep debugging is enabled.

Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
Acked-by: Jean Delvare <khali@linux-fr.org>
Cc: stable@kernel.org # 2.6.34+
13 years agohwmon: (ibmpex) Initialize sysfs attributes
Guenter Roeck [Tue, 24 May 2011 19:34:12 +0000 (12:34 -0700)]
hwmon: (ibmpex) Initialize sysfs attributes

Initialize dynamically allocated sysfs attributes before device_create_file()
call to suppress lockdep_init_map() warning if lockdep debugging is enabled.

Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
Acked-by: Jean Delvare <khali@linux-fr.org>
Cc: stable@kernel.org # 2.6.34+
13 years agohwmon: (ibmaem) Initialize sysfs attributes
Guenter Roeck [Tue, 24 May 2011 19:33:26 +0000 (12:33 -0700)]
hwmon: (ibmaem) Initialize sysfs attributes

Initialize dynamically allocated sysfs attributes before device_create_file()
call to suppress lockdep_init_map() warning if lockdep debugging is enabled.

Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
Acked-by: Jean Delvare <khali@linux-fr.org>
Cc: stable@kernel.org # 2.6.34+
13 years agohwmon: (asus_atk0110) Consolidate sysfs attribute initialization
Guenter Roeck [Tue, 24 May 2011 19:19:05 +0000 (12:19 -0700)]
hwmon: (asus_atk0110) Consolidate sysfs attribute initialization

Call sysfs_attr_init() from atk_init_attribute() to handle sysfs attribute
initialization in a single function.

Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
Cc: Luca Tettamanti <kronos.it@gmail.com>
Acked-by: Jean Delvare <khali@linux-fr.org>
13 years agohwmon: (coretemp) Drop unused struct members
Jean Delvare [Tue, 7 Jun 2011 19:14:26 +0000 (15:14 -0400)]
hwmon: (coretemp) Drop unused struct members

pdev_entry.cpu and pdev_entry.cpu_core_id aren't used anywhere in the
driver code so we can drop these struct members.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Cc: Guenter Roeck <guenter.roeck@ericsson.com>
Cc: Durgadoss R <durgadoss.r@intel.com>
Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
13 years agodrm/nouveau: fix assumption that semaphore dmaobj is valid in x-chan sync
Ben Skeggs [Fri, 17 Jun 2011 13:41:54 +0000 (23:41 +1000)]
drm/nouveau: fix assumption that semaphore dmaobj is valid in x-chan sync

The DDX modifies DMA_SEMAPHORE on nv50 in order to implement sync-to-vblank,
things will go very wrong for cross-channel sync after this.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
13 years agodrm/nv50/disp: fix gamma with page flipping overlay turned on
Ben Skeggs [Thu, 16 Jun 2011 04:40:27 +0000 (14:40 +1000)]
drm/nv50/disp: fix gamma with page flipping overlay turned on

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
13 years agodrm/nouveau/pm: Prevent overflow in nouveau_perf_init()
Emil Velikov [Sat, 11 Jun 2011 12:30:32 +0000 (13:30 +0100)]
drm/nouveau/pm: Prevent overflow in nouveau_perf_init()

While parsing the perf table, there is no check if
the num of entries read from the vbios is less than
the currently allocated number.

In case of a buggy vbios this will cause overwriting
of kernel memory, causing aditional problems.

Add a simple check in order to prevent the case

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
13 years agodrm/nouveau: fix big-endian switch
Ben Skeggs [Tue, 14 Jun 2011 00:16:17 +0000 (10:16 +1000)]
drm/nouveau: fix big-endian switch

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
13 years agoMerge branch 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied...
Linus Torvalds [Sat, 18 Jun 2011 04:15:11 +0000 (21:15 -0700)]
Merge branch 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6

* 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6:
  drm/i915: Fix gen6 (SNB) missed BLT ring interrupts.

13 years agoMerge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/davej/cpufreq
Linus Torvalds [Sat, 18 Jun 2011 04:13:43 +0000 (21:13 -0700)]
Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/davej/cpufreq

* 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/davej/cpufreq:
  [CPUFREQ] powernow-k8: Don't try to transition if the pstate is incorrect
  [CPUFREQ] powernow-k8: Don't notify of successful transition if we failed (vid case).
  [CPUFREQ] Don't set stat->last_index to -1 if the pol->cur has incorrect value.

13 years agoMerge branch 'anon_vma-locking'
Linus Torvalds [Sat, 18 Jun 2011 04:01:21 +0000 (21:01 -0700)]
Merge branch 'anon_vma-locking'

* anon_vma-locking:
  mm: avoid anon_vma_chain allocation under anon_vma lock
  mm: avoid repeated anon_vma lock/unlock sequences in unlink_anon_vmas()
  mm: avoid repeated anon_vma lock/unlock sequences in anon_vma_clone()

13 years agomm: avoid anon_vma_chain allocation under anon_vma lock
Linus Torvalds [Sat, 18 Jun 2011 02:05:36 +0000 (19:05 -0700)]
mm: avoid anon_vma_chain allocation under anon_vma lock

Hugh Dickins points out that lockdep (correctly) spots a potential
deadlock on the anon_vma lock, because we now do a GFP_KERNEL allocation
of anon_vma_chain while doing anon_vma_clone().  The problem is that
page reclaim will want to take the anon_vma lock of any anonymous pages
that it will try to reclaim.

So re-organize the code in anon_vma_clone() slightly: first do just a
GFP_NOWAIT allocation, which will usually work fine.  But if that fails,
let's just drop the lock and re-do the allocation, now with GFP_KERNEL.

End result: not only do we avoid the locking problem, this also ends up
getting better concurrency in case the allocation does need to block.
Tim Chen reports that with all these anon_vma locking tweaks, we're now
almost back up to the spinlock performance.

Reported-and-tested-by: Hugh Dickins <hughd@google.com>
Tested-by: Tim Chen <tim.c.chen@linux.intel.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Andi Kleen <ak@linux.intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agomm: avoid repeated anon_vma lock/unlock sequences in unlink_anon_vmas()
Peter Zijlstra [Fri, 17 Jun 2011 11:54:23 +0000 (13:54 +0200)]
mm: avoid repeated anon_vma lock/unlock sequences in unlink_anon_vmas()

This matches the anon_vma_clone() case, and uses the same lock helper
functions.  Because of the need to potentially release the anon_vma's,
it's a bit more complex, though.

We traverse the 'vma->anon_vma_chain' in two phases: the first loop gets
the anon_vma lock (with the helper function that only takes the lock
once for the whole loop), and removes any entries that don't need any
more processing.

The second phase just traverses the remaining list entries (without
holding the anon_vma lock), and does any actual freeing of the
anon_vma's that is required.

Signed-off-by: Peter Zijlstra <peterz@infradead.org>
Tested-by: Hugh Dickins <hughd@google.com>
Tested-by: Tim Chen <tim.c.chen@linux.intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agomm: avoid repeated anon_vma lock/unlock sequences in anon_vma_clone()
Linus Torvalds [Fri, 17 Jun 2011 03:44:51 +0000 (20:44 -0700)]
mm: avoid repeated anon_vma lock/unlock sequences in anon_vma_clone()

In anon_vma_clone() we traverse the vma->anon_vma_chain of the source
vma, locking the anon_vma for each entry.

But they are all going to have the same root entry, which means that
we're locking and unlocking the same lock over and over again.  Which is
expensive in locked operations, but can get _really_ expensive when that
root entry sees any kind of lock contention.

In fact, Tim Chen reports a big performance regression due to this: when
we switched to use a mutex instead of a spinlock, the contention case
gets much worse.

So to alleviate this all, this commit creates a small helper function
(lock_anon_vma_root()) that can be used to take the lock just once
rather than taking and releasing it over and over again.

We still have the same "take the lock and release" it behavior in the
exit path (in unlink_anon_vmas()), but that one is a bit harder to fix
since we're actually freeing the anon_vma entries as we go, and that
will touch the lock too.

Reported-and-tested-by: Tim Chen <tim.c.chen@linux.intel.com>
Tested-by: Hugh Dickins <hughd@google.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Andi Kleen <ak@linux.intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agodrm/i915: Fix gen6 (SNB) missed BLT ring interrupts.
Daniel J Blueman [Fri, 17 Jun 2011 18:32:19 +0000 (11:32 -0700)]
drm/i915: Fix gen6 (SNB) missed BLT ring interrupts.

The failure appeared in dmesg as:

[drm:i915_hangcheck_ring_idle] *ERROR* Hangcheck timer elapsed... blt
ring idle [waiting on 35064155, at 35064155], missed IRQ?

This works around that problem on by making the blitter command
streamer write interrupt state to the Hardware Status Page when a
MI_USER_INTERRUPT command is decoded, which appears to force the seqno
out to memory before the interrupt happens.

v1->v2: Moved to prior interrupt handler installation and RMW flags as
per feedback.
v2->v3: Removed RMW of flags (by anholt)

Cc: stable@kernel.org
Signed-off-by: Daniel J Blueman <daniel.blueman@gmail.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
Tested-by: Chris Wilson <chris@chris-wilson.co.uk> [v1]
Tested-by: Eric Anholt <eric@anholt.net> [v1,v3]
   (incidence of the bug with a testcase went from avg 2/1000 to
   0/12651 in the latest test run (plus more for v1))
Tested-by: Kenneth Graunke <kenneth@whitecape.org> [v1]
Tested-by: Robert Hooker <robert.hooker@canonical.com> [v1]
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=33394
Signed-off-by: Dave Airlie <airlied@redhat.com>
13 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
Linus Torvalds [Fri, 17 Jun 2011 17:37:57 +0000 (10:37 -0700)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
  ALSA: hda - Fix no NID error with VIA codecs
  ALSA: isight: adjust for new queueing API
  ALSA: 6fire - Fix signedness bug
  ALSA: lola - Fix section mismatch
  ALSA: hda - Fix missing static inline to beep dummy function
  ALSA: 6fire: Fix double-free bug in usb6fire_fw_ezusb_upload()
  ALSA: hda - Fix beep_device compilation warnings
  ALSA: hda - Fix wrong auto-mute type for Acer Aspire-one
  ALSA: emu10k1: Add details for E-mu 0404 PCIe version
  ALSA: hdspm - Add firmware revision ID for RME MADI PCI version
  ALSA: hdspm - Fix jumping external wordclock frequency in AutoSync mode
  ALSA: hdspm - Fix locking in snd_hdspm_midi_input_read

13 years agoMerge branch 'for-linus' of git://oss.sgi.com/xfs/xfs
Linus Torvalds [Fri, 17 Jun 2011 17:37:41 +0000 (10:37 -0700)]
Merge branch 'for-linus' of git://oss.sgi.com/xfs/xfs

* 'for-linus' of git://oss.sgi.com/xfs/xfs:
  xfs: make log devices with write back caches work
  xfs: fix ->mknod() return value on xfs_get_acl() failure