GitHub/moto-9609/android_kernel_motorola_exynos9610.git
13 years agodrm/nv40: attempt to reserve just enough vram for all 32 channels
Ben Skeggs [Tue, 8 Mar 2011 04:47:53 +0000 (14:47 +1000)]
drm/nv40: attempt to reserve just enough vram for all 32 channels

This also makes the fact we're giving 512MiB of GART space to all PCIE
boards explicit, although the vast majority (if not all) of them will
now have a ramin_rsvd_vram larger than 2MiB anyway.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
13 years agodrm/nv50: check for vm traps on every gr irq
Ben Skeggs [Mon, 7 Mar 2011 23:57:17 +0000 (09:57 +1000)]
drm/nv50: check for vm traps on every gr irq

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
13 years agodrm/nv50: decode vm faults some more
Ben Skeggs [Mon, 7 Mar 2011 23:50:06 +0000 (09:50 +1000)]
drm/nv50: decode vm faults some more

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
13 years agodrm/nouveau: add nouveau_enum_find() util function
Ben Skeggs [Mon, 7 Mar 2011 22:39:43 +0000 (08:39 +1000)]
drm/nouveau: add nouveau_enum_find() util function

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
13 years agodrm/nouveau: properly handle pushbuffer check failures
Marcin Slusarz [Mon, 7 Mar 2011 11:31:35 +0000 (12:31 +0100)]
drm/nouveau: properly handle pushbuffer check failures

When "buffer in list" check does not pass, don't free validation lists - they were
not initialized yet.

Fixes this oops:

[drm] nouveau 0000:02:00.0: push 105 buffer not in list
BUG: unable to handle kernel NULL pointer dereference at 000000000000057c
IP: [<ffffffff81236aa4>] do_raw_spin_lock+0x14/0x13c
PGD 1ac6cb067 PUD 1aaa52067 PMD 0
CPU 0
Modules linked in: nouveau ttm drm_kms_helper snd_hda_codec_realtek snd_hda_intel snd_hda_codec

Pid: 6265, comm: OilRush_x86 Not tainted 2.6.38-rc6-nv+ #632 System manufacturer System Product Name/P6T SE
RIP: 0010:[<ffffffff81236aa4>]  [<ffffffff81236aa4>] do_raw_spin_lock+0x14/0x13c
(...)
Process OilRush_x86 (pid: 6265, threadinfo ffff8801a6aee000, task ffff8801a26c0000)
 0000000000000000 ffff8801ac74c618 0000000000000000 0000000000000578
 0000000000000000 ffff8801ac74c618 0000000000000000 ffff8801bd9d0000
 [<ffffffff81417f78>] _raw_spin_lock+0x1e/0x22
 [<ffffffffa00a2746>] nouveau_bo_fence+0x2e/0x60 [nouveau]
 [<ffffffffa00a540b>] validate_fini_list+0x35/0xeb [nouveau]
 [<ffffffffa00a54d3>] validate_fini+0x12/0x31 [nouveau]
 [<ffffffffa00a6386>] nouveau_gem_ioctl_pushbuf+0xe94/0xf6b [nouveau]
 [<ffffffff8141ac56>] ? sub_preempt_count+0x9e/0xb2
 [<ffffffff81417e94>] ? _raw_spin_unlock_irqrestore+0x30/0x4d
 [<ffffffff8105dea2>] ? __wake_up+0x3f/0x48
 [<ffffffff812aebb4>] drm_ioctl+0x289/0x361
 [<ffffffff8141ac56>] ? sub_preempt_count+0x9e/0xb2
 [<ffffffffa00a54f2>] ? nouveau_gem_ioctl_pushbuf+0x0/0xf6b [nouveau]
 [<ffffffff8141ac56>] ? sub_preempt_count+0x9e/0xb2
 [<ffffffffa010caa2>] nouveau_compat_ioctl+0x16/0x1c [nouveau]
 [<ffffffff81142c0d>] compat_sys_ioctl+0x1c8/0x12d7
 [<ffffffff814179ca>] ? trace_hardirqs_off_thunk+0x3a/0x6c
 [<ffffffff81058099>] sysenter_dispatch+0x7/0x30
 [<ffffffff8141798e>] ? trace_hardirqs_on_thunk+0x3a/0x3c
RIP  [<ffffffff81236aa4>] do_raw_spin_lock+0x14/0x13c
 RSP <ffff8801a6aefb88>
---[ end trace 0014d5d93e6147e1 ]---

Additionally, don't call validate_fini twice in case of validation failure.

Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Signed-off-by: Maarten Maathuis <madman2003@gmail.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
13 years agodrm/nvc0: remove vm hack forcing large/small pages to not share a PDE
Ben Skeggs [Mon, 28 Feb 2011 07:20:45 +0000 (17:20 +1000)]
drm/nvc0: remove vm hack forcing large/small pages to not share a PDE

Appears to be fixed with commit:

"drm/nv50-nvc0: make sure vma is definitely unmapped when destroying bo"

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
13 years agodrm: add cap bit to denote if dumb ioctl is available or not.
Dave Airlie [Fri, 4 Mar 2011 04:50:28 +0000 (14:50 +1000)]
drm: add cap bit to denote if dumb ioctl is available or not.

This allows libkms to make an easier decision.

Signed-off-by: Dave Airlie <airlied@redhat.com>
13 years agodrm/core: add ioctl to query device/driver capabilities
Ben Skeggs [Mon, 21 Feb 2011 01:17:35 +0000 (11:17 +1000)]
drm/core: add ioctl to query device/driver capabilities

We're coming to see a need to have a set of generic capability checks in
the core DRM, in addition to the driver-specific ioctls that already
exist.

This patch defines an ioctl to do as such, but does not yet define any
capabilities.

[airlied: drop the driver callback for now.]

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
13 years agodrm/radeon/kms: allow max clock of 340 Mhz on hdmi 1.3+
Alex Deucher [Wed, 2 Mar 2011 15:21:05 +0000 (10:21 -0500)]
drm/radeon/kms: allow max clock of 340 Mhz on hdmi 1.3+

hdmi 1.3 raises the max clock from 165 Mhz to 340 Mhz.

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
13 years agoMerge remote branch 'korg/drm-radeon-cayman' into drm-core-next
Dave Airlie [Thu, 3 Mar 2011 02:00:52 +0000 (12:00 +1000)]
Merge remote branch 'korg/drm-radeon-cayman' into drm-core-next

* korg/drm-radeon-cayman:
  drm/radeon/kms: add cayman pci ids
  drm/radeon/kms: cayman/evergreen cs checker updates
  drm/radeon/kms/cayman: always set certain VGT regs at CP init
  drm/radeon/kms: additional default context regs for cayman
  drm/radeon/kms: add cayman CS check support
  drm/radeon/kms: add radeon_asic entry for cayman
  drm/radeon/kms: add cayman safe regs
  drm/radeon/kms/cayman: add asic init/startup/fini/suspend/resume functions
  drm/radeon/kms: add cayman asic reset support
  drm/radeon/kms: add support for cayman irqs
  drm/radeon/kms: add support for CP setup on cayman asics
  drm/radeon/kms: add support for cayman gart setup
  drm/radeon/kms: add gpu_init function for cayman
  drm/radeon/kms: add ucode loader for cayman
  drm/radeon/kms: add cayman chip family

13 years agodrm/radeon/kms: add cayman pci ids
Alex Deucher [Thu, 3 Mar 2011 01:07:41 +0000 (20:07 -0500)]
drm/radeon/kms: add cayman pci ids

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
13 years agodrm/radeon/kms: cayman/evergreen cs checker updates
Alex Deucher [Thu, 3 Mar 2011 01:07:40 +0000 (20:07 -0500)]
drm/radeon/kms: cayman/evergreen cs checker updates

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
13 years agodrm/radeon/kms/cayman: always set certain VGT regs at CP init
Alex Deucher [Thu, 3 Mar 2011 01:07:39 +0000 (20:07 -0500)]
drm/radeon/kms/cayman: always set certain VGT regs at CP init

These should be handled by the clear_state setup, but set them
directly as well just to be sure.

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
13 years agodrm/radeon/kms: additional default context regs for cayman
Alex Deucher [Thu, 3 Mar 2011 01:07:38 +0000 (20:07 -0500)]
drm/radeon/kms: additional default context regs for cayman

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
13 years agodrm/radeon/kms: add cayman CS check support
Alex Deucher [Thu, 3 Mar 2011 01:07:37 +0000 (20:07 -0500)]
drm/radeon/kms: add cayman CS check support

Added to existing evergreen CS checker.

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
13 years agodrm/radeon/kms: add radeon_asic entry for cayman
Alex Deucher [Thu, 3 Mar 2011 01:07:36 +0000 (20:07 -0500)]
drm/radeon/kms: add radeon_asic entry for cayman

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
13 years agodrm/radeon/kms: add cayman safe regs
Alex Deucher [Thu, 3 Mar 2011 01:07:35 +0000 (20:07 -0500)]
drm/radeon/kms: add cayman safe regs

For the CS checker.

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
13 years agodrm/radeon/kms/cayman: add asic init/startup/fini/suspend/resume functions
Alex Deucher [Thu, 3 Mar 2011 01:07:34 +0000 (20:07 -0500)]
drm/radeon/kms/cayman: add asic init/startup/fini/suspend/resume functions

Cayman is different enough from evergreen to warrant it's own functions.

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
13 years agodrm/radeon/kms: add cayman asic reset support
Alex Deucher [Thu, 3 Mar 2011 01:07:33 +0000 (20:07 -0500)]
drm/radeon/kms: add cayman asic reset support

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
13 years agodrm/radeon/kms: add support for cayman irqs
Alex Deucher [Thu, 3 Mar 2011 01:07:32 +0000 (20:07 -0500)]
drm/radeon/kms: add support for cayman irqs

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
13 years agodrm/radeon/kms: add support for CP setup on cayman asics
Alex Deucher [Thu, 3 Mar 2011 01:07:31 +0000 (20:07 -0500)]
drm/radeon/kms: add support for CP setup on cayman asics

Cayman asics have 3 ring buffers:
ring 0 supports both gfx and compute
rings 1 and 2 are compute only

At the moment we only support ring 0.

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
13 years agodrm/radeon/kms: add support for cayman gart setup
Alex Deucher [Thu, 3 Mar 2011 01:07:30 +0000 (20:07 -0500)]
drm/radeon/kms: add support for cayman gart setup

This patch sets up the gart in legacy mode.  We
probably want to switch to full VM mode at some point.

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
13 years agodrm/radeon/kms: add gpu_init function for cayman
Alex Deucher [Thu, 3 Mar 2011 01:07:29 +0000 (20:07 -0500)]
drm/radeon/kms: add gpu_init function for cayman

This may some work to get accel going.

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
13 years agodrm/radeon/kms: add ucode loader for cayman
Alex Deucher [Thu, 3 Mar 2011 01:07:28 +0000 (20:07 -0500)]
drm/radeon/kms: add ucode loader for cayman

The MC ucode is no longer loaded by the vbios
tables as on previous asics.  It now must be loaded
by the driver.

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
13 years agodrm/radeon/kms: add cayman chip family
Alex Deucher [Thu, 3 Mar 2011 01:07:27 +0000 (20:07 -0500)]
drm/radeon/kms: add cayman chip family

Cayman is DCE5 display plus a new 4-way shader block.
3D state programming is similar to evergreen.

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
13 years agodrm/radeon: add new getparam for number of backends.
Dave Airlie [Tue, 1 Mar 2011 04:32:27 +0000 (14:32 +1000)]
drm/radeon: add new getparam for number of backends.

This allows userspace to work out how many DBs there are
for conditional rendering to work.

Signed-off-by: Dave Airlie <airlied@redhat.com>
13 years agodrm/radeon: fix up dereferencing of busy objects.
Dave Airlie [Tue, 1 Mar 2011 03:40:06 +0000 (13:40 +1000)]
drm/radeon: fix up dereferencing of busy objects.

This could free things twice, just deref the GEM object
and hope its enough.

Signed-off-by: Dave Airlie <airlied@redhat.com>
13 years agodrm/radeon: bump version to 2.9
Dave Airlie [Tue, 1 Mar 2011 02:10:43 +0000 (12:10 +1000)]
drm/radeon: bump version to 2.9

This lets r600g enable texture formats and some more extensions.

Signed-off-by: Dave Airlie <airlied@redhat.com>
13 years agodrm/r600: parse the set predication command. (v2)
Dave Airlie [Mon, 28 Feb 2011 06:11:48 +0000 (16:11 +1000)]
drm/r600: parse the set predication command. (v2)

This is required for NV_conditional_render and EXT_transform_feedback.

v2: add evergreen support.

Signed-off-by: Dave Airlie <airlied@redhat.com>
13 years agodrm/radeon: make sure ib reads are in-order.
Dave Airlie [Mon, 28 Feb 2011 04:27:03 +0000 (14:27 +1000)]
drm/radeon: make sure ib reads are in-order.

have to read values from the IB in order as we could cross
a page boundary at any time and won't be able to go backwards.

Signed-off-by: Dave Airlie <airlied@redhat.com>
13 years agodrm/radeon/r600_cs: off by one errors
Dan Carpenter [Sat, 26 Feb 2011 01:48:18 +0000 (04:48 +0300)]
drm/radeon/r600_cs: off by one errors

There are a bunch of off by one errors in the sanity checks here.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
13 years agoMerge branch 'drm-nouveau-next' of git://anongit.freedesktop.org/git/nouveau/linux...
Dave Airlie [Fri, 25 Feb 2011 03:37:02 +0000 (13:37 +1000)]
Merge branch 'drm-nouveau-next' of git://anongit.freedesktop.org/git/nouveau/linux-2.6 into drm-next

* 'drm-nouveau-next' of git://anongit.freedesktop.org/git/nouveau/linux-2.6: (50 commits)
  drm/nv50: flesh out ZCULL init and match nvidia on later chipsets
  drm/nv50: support for compression
  drm/nv50-nvc0: delay GART binding until move_notify time
  drm/nouveau: rename nouveau_vram to nouveau_mem
  drm/nvc0: allow creation of buffers with any non-compressed memtype
  drm/nv50-nvc0: unmap buffers from the vm when they're evicted
  drm/nv50-nvc0: move vm bind/unbind to move_notify hook
  drm/nv50-nvc0: restrict memtype to those specified at creation time
  drm/nouveau: pass domain rather than ttm flags to gem_new()
  drm/nv50: simplify bo moves now that they're all through the vm
  drm/nouveau: remove no_vm/mappable flags from nouveau_bo
  drm/nouveau: Fix pageflip event
  drm/nouveau/vbios: parse more gpio tag bits from connector table
  drm/nouveau: decode PFIFO DMA_PUSHER error codes
  drm/nv50: fix typos in CCACHE error reporting
  drm/nvc0: support for sw methods + enable page flipping
  drm/nv50: enable page flipping
  drm/nv50-nvc0: activate/update ds channel's framebuffer on modesets
  drm/nv50-nvc0: initialise display sync channels
  drm/nv50-nvc0: precalculate some fb state when creating them
  ...

13 years agodrm/nv50: flesh out ZCULL init and match nvidia on later chipsets
Ben Skeggs [Tue, 22 Feb 2011 23:00:35 +0000 (09:00 +1000)]
drm/nv50: flesh out ZCULL init and match nvidia on later chipsets

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
13 years agodrm/nv50: support for compression
Ben Skeggs [Sun, 13 Feb 2011 23:57:35 +0000 (09:57 +1000)]
drm/nv50: support for compression

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
13 years agodrm/nv50-nvc0: delay GART binding until move_notify time
Ben Skeggs [Thu, 10 Feb 2011 02:59:51 +0000 (12:59 +1000)]
drm/nv50-nvc0: delay GART binding until move_notify time

The immediate benefit of doing this is that on NV50 and up, the GPU
virtual address of any buffer is now constant, regardless of what
memtype they're placed in.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
13 years agodrm/nouveau: rename nouveau_vram to nouveau_mem
Ben Skeggs [Thu, 10 Feb 2011 02:22:52 +0000 (12:22 +1000)]
drm/nouveau: rename nouveau_vram to nouveau_mem

This structure will also be used for GART in the near future.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
13 years agodrm/nvc0: allow creation of buffers with any non-compressed memtype
Ben Skeggs [Sun, 13 Feb 2011 21:34:55 +0000 (07:34 +1000)]
drm/nvc0: allow creation of buffers with any non-compressed memtype

This adds a table of known nvc0 memtypes, and modifies the validity check
to allow any non-compressed type.  Support for Z compression will come at
a later point.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
13 years agodrm/nv50-nvc0: unmap buffers from the vm when they're evicted
Ben Skeggs [Thu, 10 Feb 2011 01:22:12 +0000 (11:22 +1000)]
drm/nv50-nvc0: unmap buffers from the vm when they're evicted

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
13 years agodrm/nv50-nvc0: move vm bind/unbind to move_notify hook
Ben Skeggs [Thu, 10 Feb 2011 00:35:16 +0000 (10:35 +1000)]
drm/nv50-nvc0: move vm bind/unbind to move_notify hook

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
13 years agodrm/nv50-nvc0: restrict memtype to those specified at creation time
Ben Skeggs [Thu, 10 Feb 2011 03:41:01 +0000 (13:41 +1000)]
drm/nv50-nvc0: restrict memtype to those specified at creation time

Upcoming patches are going to enable full support for buffers that keep
a constant GPU virtual address whenever they're validated for use by
the GPU.

In order for this to work properly while keeping support for large pages,
we need to know if it's ever going to be possible for a buffer to end
up in GART, and if so, disable large pages for the buffer's VMA.

This is a new restriction that's not present in earlier kernel's, but
should not break userspace as the current code never attempts to validate
buffers into a memtype other than it was created with.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
13 years agodrm/nouveau: pass domain rather than ttm flags to gem_new()
Ben Skeggs [Thu, 10 Feb 2011 04:42:08 +0000 (14:42 +1000)]
drm/nouveau: pass domain rather than ttm flags to gem_new()

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
13 years agodrm/nv50: simplify bo moves now that they're all through the vm
Ben Skeggs [Tue, 15 Feb 2011 23:10:20 +0000 (09:10 +1000)]
drm/nv50: simplify bo moves now that they're all through the vm

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
13 years agodrm/nouveau: remove no_vm/mappable flags from nouveau_bo
Ben Skeggs [Tue, 15 Feb 2011 22:41:56 +0000 (08:41 +1000)]
drm/nouveau: remove no_vm/mappable flags from nouveau_bo

'mappable' isn't really used at all, nor is it necessary anymore as the
bo code is capable of moving buffers to mappable vram as required.

'no_vm' isn't necessary anymore either, any places that don't want to be
mapped into a GPU address space should allocate the VRAM directly instead.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
13 years agodrm/nouveau: Fix pageflip event
Benjamin Franzke [Wed, 16 Feb 2011 09:04:48 +0000 (10:04 +0100)]
drm/nouveau: Fix pageflip event

Assign correct event when initializing nouveau_page_flip_state.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
13 years agodrm/nouveau/vbios: parse more gpio tag bits from connector table
Ben Skeggs [Wed, 16 Feb 2011 22:03:53 +0000 (08:03 +1000)]
drm/nouveau/vbios: parse more gpio tag bits from connector table

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
13 years agodrm/nouveau: decode PFIFO DMA_PUSHER error codes
Marcin Slusarz [Sun, 13 Feb 2011 19:46:40 +0000 (20:46 +0100)]
drm/nouveau: decode PFIFO DMA_PUSHER error codes

Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
13 years agodrm/nv50: fix typos in CCACHE error reporting
Marcin Slusarz [Sun, 13 Feb 2011 19:46:41 +0000 (20:46 +0100)]
drm/nv50: fix typos in CCACHE error reporting

The code was supposed to print registers around 0x405018 (which is read
earlier), not 0x405818.

Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
13 years agodrm/nvc0: support for sw methods + enable page flipping
Ben Skeggs [Tue, 8 Feb 2011 05:16:23 +0000 (15:16 +1000)]
drm/nvc0: support for sw methods + enable page flipping

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
13 years agodrm/nv50: enable page flipping
Ben Skeggs [Mon, 7 Feb 2011 04:27:04 +0000 (14:27 +1000)]
drm/nv50: enable page flipping

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
13 years agodrm/nv50-nvc0: activate/update ds channel's framebuffer on modesets
Ben Skeggs [Mon, 7 Feb 2011 04:18:37 +0000 (14:18 +1000)]
drm/nv50-nvc0: activate/update ds channel's framebuffer on modesets

The hw doesn't really appear to be designed to be used the way we have to
use it due to DRI2's design.  This leads us to having to keep the flipped
fb support active at all times.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
13 years agodrm/nv50-nvc0: initialise display sync channels
Ben Skeggs [Mon, 7 Feb 2011 03:29:23 +0000 (13:29 +1000)]
drm/nv50-nvc0: initialise display sync channels

Also imports a couple of helper functions that'll be used to implement
page flipping in the following commits..

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
13 years agodrm/nv50-nvc0: precalculate some fb state when creating them
Ben Skeggs [Wed, 9 Feb 2011 01:57:45 +0000 (11:57 +1000)]
drm/nv50-nvc0: precalculate some fb state when creating them

Just a cleanup, to avoid duplicating parts of nv50_crtc.c's code in
the page flipping routines.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
13 years agodrm/nv50-nvc0: tidy evo object creation some more
Ben Skeggs [Mon, 7 Feb 2011 03:08:16 +0000 (13:08 +1000)]
drm/nv50-nvc0: tidy evo object creation some more

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
13 years agodrm/nv50-nvc0: request and wait on notification of modeset completion
Ben Skeggs [Thu, 3 Feb 2011 05:46:14 +0000 (15:46 +1000)]
drm/nv50-nvc0: request and wait on notification of modeset completion

This should prevent a number of races from occuring, the most obvious of
which will be exposed when we start making use of the "display sync" evo
channel for page flipping.  The DS channel will reject any command stream
that doesn't completely agree with the current "master" state.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
13 years agodrm/nv50-nvc0: switch to tasklet for display isr bh
Ben Skeggs [Thu, 3 Feb 2011 10:06:14 +0000 (20:06 +1000)]
drm/nv50-nvc0: switch to tasklet for display isr bh

We need to be able to have the bh run while possibly spinning waiting for
the EVO notifier to signal.  This apparently happens in some circumstances
with preempt disabled, so our workqueue was never being run.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
13 years agodrm/nouveau: make vbios parser runnable from an atomic context
Ben Skeggs [Thu, 3 Feb 2011 10:10:49 +0000 (20:10 +1000)]
drm/nouveau: make vbios parser runnable from an atomic context

The nv50 display isr bh needs to be converted to a tasklet, which means
we can't sleep anymore.  The places we execute vbios init tables are
rare, and not in any way performance critical, so this isn't a huge
problem.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
13 years agodrm/nv50-nvc0: include nv50_display in evo debugging
Ben Skeggs [Thu, 3 Feb 2011 06:07:44 +0000 (16:07 +1000)]
drm/nv50-nvc0: include nv50_display in evo debugging

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
13 years agodrm/nv50-nvc0: tidy evo init failure paths
Ben Skeggs [Tue, 1 Feb 2011 00:59:07 +0000 (10:59 +1000)]
drm/nv50-nvc0: tidy evo init failure paths

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
13 years agodrm/nv50-nvc0: fix ramht entries for multiple evo channels
Ben Skeggs [Tue, 1 Feb 2011 00:41:01 +0000 (10:41 +1000)]
drm/nv50-nvc0: fix ramht entries for multiple evo channels

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
13 years agodrm/nv50-nvc0: disp channels have fixed purposes, don't "allocate" them
Ben Skeggs [Tue, 1 Feb 2011 00:39:45 +0000 (10:39 +1000)]
drm/nv50-nvc0: disp channels have fixed purposes, don't "allocate" them

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
13 years agodrm/nv50-nvc0: rename disp->evo to disp->master
Ben Skeggs [Tue, 1 Feb 2011 00:24:41 +0000 (10:24 +1000)]
drm/nv50-nvc0: rename disp->evo to disp->master

More appropriate, and we're about to be using more than just the master
EVO channel.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
13 years agodrm/nv50-nvc0: move non-sharable display state into private structure
Ben Skeggs [Tue, 1 Feb 2011 00:07:32 +0000 (10:07 +1000)]
drm/nv50-nvc0: move non-sharable display state into private structure

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
13 years agodrm/nouveau: use system_wq instead of dev_priv->wq
Tejun Heo [Wed, 26 Jan 2011 16:49:18 +0000 (17:49 +0100)]
drm/nouveau: use system_wq instead of dev_priv->wq

With cmwq, there's no reason for nouveau to use a dedicated workqueue.
Drop dev_priv->wq and use system_wq instead.  Each work item is sync
flushed when the containing structure is unregistered/destroyed.

Note that this change also makes sure that nv50_gpio_handler is not
freed while the contained work item is still running.

Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: David Airlie <airlied@linux.ie>
Cc: dri-devel@lists.freedesktop.org
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
13 years agodrm/nouveau: use I2C_MODULE_PREFIX kernel define
Lucas Stach [Sun, 6 Feb 2011 21:42:54 +0000 (22:42 +0100)]
drm/nouveau: use I2C_MODULE_PREFIX kernel define

Signed-off-by: Lucas Stach <dev@lynxeye.de>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
13 years agodrm/nv50: drop explicit yields in favour of smaller PFIFO timeslice
Ben Skeggs [Wed, 2 Feb 2011 04:57:05 +0000 (14:57 +1000)]
drm/nv50: drop explicit yields in favour of smaller PFIFO timeslice

This gives a small, but noticeable performance gain at lower performance
levels, and unchanged at the higher ones.

With this commit, we're now using the same timeslice size as the NVIDIA
binary driver currently does, and dropping an unknown bit that NVIDIA
no longer appear to set.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
13 years agodrm/nv84: use vm offsets for semaphores
Ben Skeggs [Wed, 2 Feb 2011 03:21:57 +0000 (13:21 +1000)]
drm/nv84: use vm offsets for semaphores

We may well be making more use of semaphores in the future, having the
entire VM available makes requiring DMA objects for each and every
semaphore block unnecessary.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
13 years agodrm/nv50: 0x50 needs semaphore yields too
Ben Skeggs [Mon, 31 Jan 2011 06:42:28 +0000 (16:42 +1000)]
drm/nv50: 0x50 needs semaphore yields too

Evil, evil chipset.  Worst of both worlds.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
13 years agodrm/nouveau: silence some compiler warnings
Ben Skeggs [Sun, 30 Jan 2011 22:26:04 +0000 (08:26 +1000)]
drm/nouveau: silence some compiler warnings

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
13 years agodrm/nvc0: implement semaphores for inter-channel sync
Ben Skeggs [Fri, 28 Jan 2011 03:44:32 +0000 (13:44 +1000)]
drm/nvc0: implement semaphores for inter-channel sync

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
13 years agodrm/nvc0/pfifo: semi-handle a couple more irqs
Ben Skeggs [Fri, 28 Jan 2011 03:42:16 +0000 (13:42 +1000)]
drm/nvc0/pfifo: semi-handle a couple more irqs

And also, don't disable PFIFO IRQs completely whenever we recieve one,
just when we don't know about it already.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
13 years agodrm/nv84: switch to new-style semaphores
Ben Skeggs [Fri, 28 Jan 2011 02:08:29 +0000 (12:08 +1000)]
drm/nv84: switch to new-style semaphores

These are the same semaphores nvc0 will use, and they potentially allow
us to do much cooler things than our current inter-channel sync impl.

Lets switch to them where possible now for some testing.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
13 years agodrm/nv40: support for 39-bit dma addresses on native PCIE chipsets
Ben Skeggs [Tue, 11 Jan 2011 05:50:26 +0000 (15:50 +1000)]
drm/nv40: support for 39-bit dma addresses on native PCIE chipsets

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
13 years agodrm/nv40: implement support for on-chip PCIEGART
Ben Skeggs [Tue, 11 Jan 2011 04:52:40 +0000 (14:52 +1000)]
drm/nv40: implement support for on-chip PCIEGART

v2. moved nv44 pciegart table back to instmem, where it's not
    accessible by userspace clients.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
13 years agodrm/nouveau: introduce new gart type, and name _SGDMA more appropriately
Ben Skeggs [Tue, 11 Jan 2011 04:10:09 +0000 (14:10 +1000)]
drm/nouveau: introduce new gart type, and name _SGDMA more appropriately

In preparation for the addition of a new nv40 backend, we'll need to be
able to distinguish between a paged dma object and the on-chip GART.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
13 years agodrm/nouveau: move + rename some stuff in nouveau_sgdma.c
Ben Skeggs [Mon, 10 Jan 2011 06:24:00 +0000 (16:24 +1000)]
drm/nouveau: move + rename some stuff in nouveau_sgdma.c

In preparation for the addition of a new nv40 pcie backend.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
13 years agoMerge remote-tracking branch 'airlied/drm-core-next' into drm-nouveau-next
Ben Skeggs [Thu, 24 Feb 2011 20:17:07 +0000 (06:17 +1000)]
Merge remote-tracking branch 'airlied/drm-core-next' into drm-nouveau-next

13 years agoRevert "ttm: Include the 'struct dev' when using the DMA API."
Dave Airlie [Wed, 23 Feb 2011 04:24:01 +0000 (14:24 +1000)]
Revert "ttm: Include the 'struct dev' when using the DMA API."

This reverts commit 5a893fc28f0393adb7c885a871b8c59e623fd528.

This causes a use after free in the ttm free alloc pages path,
when it tries to get the be after the be has been destroyed.

Signed-off-by: Dave Airlie <airlied@redhat.com>
13 years agoMerge branch 'drm-mm-cleanup' into drm-next
Dave Airlie [Wed, 23 Feb 2011 02:07:27 +0000 (12:07 +1000)]
Merge branch 'drm-mm-cleanup' into drm-next

* drm-mm-cleanup:
  radeon: move blit functions to radeon_asic.h
  radeon: kill decls for inline functions
  radeon: consolidate asic-specific function decls for r600 & later
  drm/radeon: kill radeon_bo->gobj pointer
  drm/radeon: introduce gem_to_radeon_bo helper
  drm/radeon: embed struct drm_gem_object
  drm: mm: add helper to unwind scan state
  drm: mm: add api for embedding struct drm_mm_node
  drm: mm: extract node insert helper functions
  drm: mm: track free areas implicitly
  drm/nouveau: don't munge in drm_mm internals

13 years agoMerge branch 'stable/ttm.pci-api.v5' of git://git.kernel.org/pub/scm/linux/kernel...
Dave Airlie [Wed, 23 Feb 2011 02:06:39 +0000 (12:06 +1000)]
Merge branch 'stable/ttm.pci-api.v5' of git://git./linux/kernel/git/konrad/xen into drm-next

* 'stable/ttm.pci-api.v5' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen:
  ttm: Include the 'struct dev' when using the DMA API.
  nouveau/ttm/PCIe: Use dma_addr if TTM has set it.
  radeon/ttm/PCIe: Use dma_addr if TTM has set it.
  ttm: Expand (*populate) to support an array of DMA addresses.
  ttm: Utilize the DMA API for pages that have TTM_PAGE_FLAG_DMA32 set.
  ttm: Introduce a placeholder for DMA (bus) addresses.

13 years agodrm: Remove unused members from struct drm_open_hash
Chris Wilson [Wed, 26 Jan 2011 18:33:25 +0000 (18:33 +0000)]
drm: Remove unused members from struct drm_open_hash

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Dave Airlie <airlied@redhat.com>
13 years agodrm: Trim the GEM mmap offset hashtab
Chris Wilson [Wed, 12 Jan 2011 21:11:33 +0000 (21:11 +0000)]
drm: Trim the GEM mmap offset hashtab

Using an order 19 drm_ht for the mmap offsets is a little obscene. That
means that will a fully populated GTT with every single object mmaped at
least once in its lifetime, there will be exactly one object in each
bucket.

Typically systems only have at most a few thousand objects, though you
may see a KDE desktop hit 50000. And most of those should never be
mapped... On my systems, just using an order 10 ht would still have an
average occupancy less than 1, so apply a small safety factor and
use an order 12 ht, like the other mmap offset ht.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Dave Airlie <airlied@redhat.com>
13 years agodrm: Mark constant arrays of drm_display_mode const
Chris Wilson [Wed, 26 Jan 2011 09:49:47 +0000 (09:49 +0000)]
drm: Mark constant arrays of drm_display_mode const

... and fixup some methods to accept the constant argument.

Now that constant module arrays are loaded into read-only memory, using
const appropriately has some benefits beyond warning the programmer
about likely mistakes.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Dave Airlie <airlied@redhat.com>
13 years agodrm/radeon: overhaul texture checking. (v3)
Dave Airlie [Fri, 18 Feb 2011 05:51:58 +0000 (05:51 +0000)]
drm/radeon: overhaul texture checking. (v3)

the texture checking code didn't work for block formats like s3tc,
this overhauls it to work for all types.

v2: add texture array support.
v3: add subsampled formats

Signed-off-by: Dave Airlie <airlied@redhat.com>
13 years agodrm/ttm: call driver move_notify() when doing system->tt bo moves
Ben Skeggs [Wed, 2 Feb 2011 00:27:10 +0000 (00:27 +0000)]
drm/ttm: call driver move_notify() when doing system->tt bo moves

Nouveau doesn't have enough information at ttm_backend_func.bind() time
to implement things like tiled GART, or to keep a buffer at a constant
address in the GPU virtual address space no matter where in physical
memory it's placed.

To resolve this, nouveau will handle binding of all buffers to the GPU
itself from the move_notify() hook.  This commit ensures it's called
for all buffer moves.

Talked to Dave about the impact on radeon, which uses move_notify, it
doesn't look like anything should break there.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Thomas Hellstrom <thomas@shipmail.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
13 years agodrm: psuedocolor support for ARGB modes
Rob Clark [Wed, 16 Feb 2011 02:45:51 +0000 (02:45 +0000)]
drm: psuedocolor support for ARGB modes

If there is an alpha channel, need to mask in 1's in the alpha channel
to prevent the fb from being completely transparent.

Signed-off-by: Rob Clark <rob@ti.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
13 years agoradeon: move blit functions to radeon_asic.h
Daniel Vetter [Fri, 18 Feb 2011 16:59:21 +0000 (17:59 +0100)]
radeon: move blit functions to radeon_asic.h

Reviewed-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Dave Airlie <airlied@redhat.com>
13 years agoradeon: kill decls for inline functions
Daniel Vetter [Fri, 18 Feb 2011 16:59:20 +0000 (17:59 +0100)]
radeon: kill decls for inline functions

Reviewed-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Dave Airlie <airlied@redhat.com>
13 years agoradeon: consolidate asic-specific function decls for r600 & later
Daniel Vetter [Fri, 18 Feb 2011 16:59:19 +0000 (17:59 +0100)]
radeon: consolidate asic-specific function decls for r600 & later

Now all the asic specific stuff ist mostly hid in radeon_asic.*

Reviewed-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Dave Airlie <airlied@redhat.com>
13 years agodrm/radeon: kill radeon_bo->gobj pointer
Daniel Vetter [Fri, 18 Feb 2011 16:59:18 +0000 (17:59 +0100)]
drm/radeon: kill radeon_bo->gobj pointer

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Dave Airlie <airlied@redhat.com>
13 years agodrm/radeon: introduce gem_to_radeon_bo helper
Daniel Vetter [Fri, 18 Feb 2011 16:59:17 +0000 (17:59 +0100)]
drm/radeon: introduce gem_to_radeon_bo helper

... and switch it to container_of upcasting.

v2: converted new pageflip code-paths.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Dave Airlie <airlied@redhat.com>
13 years agodrm/radeon: embed struct drm_gem_object
Daniel Vetter [Fri, 18 Feb 2011 16:59:16 +0000 (17:59 +0100)]
drm/radeon: embed struct drm_gem_object

Unconditionally initialize the drm gem object - it's not
worth the trouble not to for the few kernel objects.

This patch only changes the place of the drm gem object,
access is still done via pointers.

v2: Uncoditionally align the size in radeon_bo_create. At
least the r600/evergreen blit code didn't to this, angering
the paranoid gem code.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Dave Airlie <airlied@redhat.com>
13 years agodrm: mm: add helper to unwind scan state
Daniel Vetter [Fri, 18 Feb 2011 16:59:15 +0000 (17:59 +0100)]
drm: mm: add helper to unwind scan state

With the switch to implicit free space accounting one pointer
got unused when scanning. Use it to create a single-linked list
to ensure correct unwinding of the scan state.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Dave Airlie <airlied@redhat.com>
13 years agodrm: mm: add api for embedding struct drm_mm_node
Daniel Vetter [Fri, 18 Feb 2011 16:59:14 +0000 (17:59 +0100)]
drm: mm: add api for embedding struct drm_mm_node

The old api has a two-step process: First search for a suitable
free hole, then allocate from that specific hole. No user used
this to do anything clever. So drop it for the embeddable variant
of the drm_mm api (the old one retains this ability, for the time
being).

With struct drm_mm_node embedded, we cannot track allocations
anymore by checking for a NULL pointer. So keep track of this
and add a small helper drm_mm_node_allocated.

Also add a function to move allocations between different struct
drm_mm_node.

v2: Implement suggestions by Chris Wilson.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Dave Airlie <airlied@redhat.com>
13 years agodrm: mm: extract node insert helper functions
Daniel Vetter [Fri, 18 Feb 2011 16:59:13 +0000 (17:59 +0100)]
drm: mm: extract node insert helper functions

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Dave Airlie <airlied@redhat.com>
13 years agodrm: mm: track free areas implicitly
Daniel Vetter [Fri, 18 Feb 2011 16:59:12 +0000 (17:59 +0100)]
drm: mm: track free areas implicitly

The idea is to track free holes implicitly by marking the allocation
immediatly preceeding a hole.

To avoid an ugly corner case add a dummy head_node to struct drm_mm
to track the hole that spans to complete allocation area when the
memory manager is empty.

To guarantee that there's always a preceeding/following node (that might
be marked as hole_follows == 1), move the mm->node_list list_head to the
head_node.

The main allocator and fair-lru scan code actually becomes simpler.
Only the debug code slightly suffers because free areas are no longer
explicit.

Also add drm_mm_for_each_node (which will be much more useful when
struct drm_mm_node is embeddable).

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Dave Airlie <airlied@redhat.com>
13 years agodrm/nouveau: don't munge in drm_mm internals
Daniel Vetter [Fri, 18 Feb 2011 16:59:11 +0000 (17:59 +0100)]
drm/nouveau: don't munge in drm_mm internals

Nouveau was checking drm_mm internals on teardown to see whether the
memory manager was initialized. Hide these internals in a small
inline helper function.

Acked-by: Ben Skeggs <bskeggs@redhat.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Dave Airlie <airlied@redhat.com>
13 years agottm: Include the 'struct dev' when using the DMA API.
Konrad Rzeszutek Wilk [Tue, 22 Feb 2011 18:24:32 +0000 (13:24 -0500)]
ttm: Include the 'struct dev' when using the DMA API.

This makes the accounting when using 'debug_dma_dump_mappings()'
and CONFIG_DMA_API_DEBUG=y be assigned to the correct device
instead of 'fallback'.

No functional change - just cosmetic.

Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
13 years agonouveau/ttm/PCIe: Use dma_addr if TTM has set it.
Konrad Rzeszutek Wilk [Thu, 2 Dec 2010 16:36:24 +0000 (11:36 -0500)]
nouveau/ttm/PCIe: Use dma_addr if TTM has set it.

If the TTM layer has used the DMA API to setup pages that are
TTM_PAGE_FLAG_DMA32 (look at patch titled: "ttm: Utilize the
DMA API for pages that have TTM_PAGE_FLAG_DMA32 set"), lets
use it when programming the GART in the PCIe type cards.

This patch skips doing the pci_map_page (and pci_unmap_page) if
there is a DMA addresses passed in for that page. If the dma_address
is zero (or DMA_ERROR_CODE), then we continue on with our old
behaviour.

[v2: Added a review-by tag]

Reviewed-by: Thomas Hellstrom <thomas@shipmail.org>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Tested-by: Ian Campbell <ian.campbell@citrix.com>
13 years agoradeon/ttm/PCIe: Use dma_addr if TTM has set it.
Konrad Rzeszutek Wilk [Thu, 2 Dec 2010 16:04:29 +0000 (11:04 -0500)]
radeon/ttm/PCIe: Use dma_addr if TTM has set it.

If the TTM layer has used the DMA API to setup pages that are
TTM_PAGE_FLAG_DMA32 (look at patch titled: "ttm: Utilize the dma_addr_t
array for pages that are to in DMA32 pool."), lets use it
when programming the GART in the PCIe type cards.

This patch skips doing the pci_map_page (and pci_unmap_page) if
there is a DMA addresses passed in for that page. If the dma_address
is zero (or DMA_ERROR_CODE), then we continue on with our old
behaviour.

[v2: Fixed an indentation problem, added reviewed-by tag]
[v3: Added Acked-by Jerome]

Acked-by: Jerome Glisse <j.glisse@gmail.com>
Reviewed-by: Thomas Hellstrom <thomas@shipmail.org>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Tested-by: Ian Campbell <ian.campbell@citrix.com>
13 years agodrm/nouveau: fix suspend/resume on GPUs that don't have PM support
Ben Skeggs [Thu, 17 Feb 2011 01:11:28 +0000 (11:11 +1000)]
drm/nouveau: fix suspend/resume on GPUs that don't have PM support

This has been broken since 2.6.37, and fixes resume on a couple of fermi
boards I have access to.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>