Commit graph

1840 commits

Author SHA1 Message Date
Dave Airlie
96982ffc09 radeon: fixup for kms api 2009-04-06 09:57:06 +10:00
Ben Skeggs
62888f088f nouveau: idle the channel a bit better before destroying it 2009-03-25 15:00:52 +10:00
Ben Skeggs
8c46fa5a40 nouveau: fix potential oops in gpuobj_channel_takedown 2009-03-25 15:00:20 +10:00
Ben Skeggs
1e7d005aa0 nouveau: prevent fbcon notifier waits when unnecessary
It seems fbcon_sync will get called continually by something even while
not at a console, so ignore the call unless we've previously rendered
to the fbcon.
2009-03-25 14:59:07 +10:00
Ben Skeggs
56887e62e7 nv50: some kms fixes 2009-03-19 16:11:05 +10:00
Ben Skeggs
abfe1738e0 nv50: pin/unpin framebuffer as required 2009-03-19 16:10:59 +10:00
Ben Skeggs
7e0ed73e0c nouveau: use nouveau_fence_channel() to get chan for m2mf move 2009-03-18 19:30:42 +10:00
Ben Skeggs
3fc105f00a nouveau/ppc: no instmem access at BIOS shadow time 2009-03-10 20:17:52 +10:00
Ben Skeggs
cbbbc9a1fc nv50: remove division from nv50_vm_bind_linear 2009-03-09 21:22:59 +10:00
Ben Skeggs
15e2184f74 nouveau: respect the nomap flag for gem objects 2009-03-09 11:04:49 +10:00
Ben Skeggs
fa73fa6889 nouveau: big rewrite of nv50 kms code
This is a essentially a big squash merge from the kernel tree I've been
working in, sorry about the loss of history, but commiting each patch
individually would've taken quite a while to do.

The nv50 kms code now uses the helpers in the drm, simplifying the
code greatly.

The code is far more stable than previously on all the G8x cards I've
been able to test on, but there's likely still bugs to be ironed out!
2009-03-09 10:58:57 +10:00
Ben Skeggs
f158b0253b nouveau: disable/enable PGRAPH FIFO access around channel creation 2009-03-09 08:07:55 +10:00
Ben Skeggs
54a66c3b44 drm/nouveau: implement NVOBJ_FLAG_ZERO_FREE
Not really necessary it seems as we've been dealing without it for a while
now.  But, it's useful to be sure that we don't end up with stale bits
of state laying around.
2009-03-09 08:06:30 +10:00
Stuart Bennett
6f76c1480c nouveau: don't try to traverse non-existent lists
Fixes nouveau_ioctl_mem_free Oops
2009-03-06 09:09:14 +10:00
Ben Skeggs
96e09e22a6 drm/nouveau: make portion of vram as reserved for PRAMIN on all chipsets
NV04 was completely busted.  Push buffers were getting allocated at the
end of VRAM, overwriting PRAMIN.  So, it turns out PRAMIN is in VRAM on
all chips.  Question answered!
2009-03-06 09:09:14 +10:00
Ben Skeggs
6e68f1f2b0 drm/nouveau: remove gpuobj ref from list even if not found in ramht 2009-03-06 09:09:14 +10:00
Ben Skeggs
baf814d1f2 nouveau: unbreak <nv50 and any ppc cards after instmem changes 2009-03-06 09:09:08 +10:00
Ben Skeggs
b283b22d0b nv50: leave vm offset 0-512MiB invalid
To catch "NULL pointer" access
2009-02-22 12:54:24 +10:00
Ben Skeggs
e033cbf09a nv50: use nv_wait for PRAMIN page table update flushes 2009-02-22 11:40:12 +10:00
Ben Skeggs
f38b654609 nv50: remove redundant instmem flush after PRAMIN page table update 2009-02-22 11:40:08 +10:00
Ben Skeggs
9ab2a667b9 nv50: de-typedef nv50_instmem_priv 2009-02-22 11:40:02 +10:00
Ben Skeggs
05cda72eb7 nouveau: fix backwards conditional in wait_for_idle()
oops..
2009-02-22 11:39:48 +10:00
Ben Skeggs
569d3f8281 nv50: do instmem flush magic on finish_access() after writes 2009-02-22 11:39:43 +10:00
Ben Skeggs
afac6a4ddc nouveau: hide instmem map, force use of {prepare,finish}_access 2009-02-22 11:38:41 +10:00
Ben Skeggs
cdba1bf2e4 nouveau: decapitalise dev_priv->Engine 2009-02-22 11:37:17 +10:00
Ben Skeggs
5a28449f88 nv50: remove clamp to 512MiB VRAM 2009-02-20 15:33:29 +10:00
Ben Skeggs
8616e8499b nv50: rework vm handling so we can support >512MiB VRAM 2009-02-20 15:26:24 +10:00
Ben Skeggs
3c649c9329 nouveau: generalise waiting on register status with timeout 2009-02-20 15:23:50 +10:00
Ben Skeggs
393494d9bd nv50: fix some fbcon corruption issues 2009-02-20 15:21:42 +10:00
Ben Skeggs
6ec57ecae6 nouveau: signal any outstanding fences on channel destroy 2009-02-20 15:04:23 +10:00
Ben Skeggs
776d4fe697 nouveau: use consistant register access macros
We had quite a variety, name them all similarly and add a few new
ones that'll be needed for modesetting.
2009-02-20 14:57:40 +10:00
Ben Skeggs
bedffcd3bc nouveau: always map mmio regs at load time, not first open 2009-02-20 14:39:52 +10:00
Matthew Garrett
a2e02900b6 nouveau: Add in-kernel backlight control support
Several nvidia-based systems don't support backlight control via the
standard ACPI control mechanisms. Instead, it's necessary for the driver
to modify the backlight control registers directly. This patch adds
support for determining whether the registers appear to be in use, and
if so registers a kernel backlight device to control them. The backlight
can then be controlled via existing userspace tools.

Signed-off-by: Matthew Garrett <mjg@redhat.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2009-02-18 13:50:38 +10:00
Ben Skeggs
7436dc6691 nv40: fail completely if we don't have a ctxprog for the chipset 2009-02-15 22:06:57 +10:00
Ben Skeggs
1fee78e8e4 nv50: context info for chipset 0xa0 2009-02-15 21:59:19 +10:00
Jesse Barnes
727feefcac intel: libdrm support for fence management in execbuf
This patch tries to use the available fence count to figure out whether a
given batch can succeed or not (just like the aperture check).

Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Eric Anholt <eric@anholt.net>
(cherry picked from commit 2fa5f28eee)
2009-02-15 17:03:17 +10:00
Ben Skeggs
f0b1f1dce9 drm/nv50: fix nv9x chipsets
NVIDIA do this fun little sequence after updating the PRAMIN page tables.

On 9xxx chips, none of the PRAMIN BAR bindings (except the initial one)
worked, hence the majority of the setup needed to create a channel
ended up in the wrong place, causing all sorts of fun.

This is done by NVIDIA on nv8x chips also, so we'll do it for them too,
even though they appear to work without it.
2009-02-11 11:22:59 +10:00
Ben Skeggs
55c9884d98 drm/nv50: add context info for nv98
It won't work yet, just like the other 9xxx chips.  Real soon now :)
2009-02-11 11:18:28 +10:00
Ben Skeggs
13d7b06baf drm/nv50: use a slightly different initial context for nv96
I'm not 100% sure that the nv94 one we were using won't work.  The context
layouts are identical (well.. same ctxprog, so of course!), only a couple
of registers differ.  But, be safe until we actually get some 9xxx chips
working.
2009-02-10 09:07:28 +10:00
Ben Skeggs
8a60b2d6a8 drm/nv50: correct ramfc pointer in channel header
Suprisingly the card still worked without this...
2009-02-10 09:02:17 +10:00
Ben Skeggs
bc0e48baa3 nv50: support chipset NV96
ctxprog seen in okias' trace identical to one we use on NV94, assuming
the initial context values for NV94 will work here too.
2009-02-10 09:01:00 +10:00
Ben Skeggs
31caf2f9a9 drm/nv50: let the card handle the initial context switch
Our PFIFO/PGRAPH context save/load functions don't really work well
(at all?) on nv5x yet.  Depending on what random state the card is
in before the drm loads, fbcon probably won't work correctly.

Luckily we've setup the GPU in such a way that it'll actually do a
hw context switch for the first context.  Not sure of how successful
this'd be currently on the older chips (actually, pretty sure it won't
work), so NV50 only for now.
2009-02-10 08:57:21 +10:00
Ben Skeggs
2e7db8cc34 drm/nouveau: init fbcon after we flag the card as initialised 2009-02-10 08:56:17 +10:00
Ben Skeggs
933995b1da drm/nouveau: store vram/gart object handles for each channel 2009-02-10 08:55:30 +10:00
Ben Skeggs
417c2c411f nv50: remove some badness, we bail in these situations now anyway 2009-02-06 05:29:14 +10:00
Ben Skeggs
95fc1b0b52 nv50/kms: be less verbose without debug=1 2009-02-04 15:03:48 +10:00
Ben Skeggs
15ed426dd4 nv50/kms: use DRM_DEBUG 2009-02-04 15:03:48 +10:00
Ben Skeggs
5923c976fb nv50/kms: nv50_kms_ -> nv50_ 2009-02-04 15:03:47 +10:00
Ben Skeggs
cd2a87a682 nv50/kms: remove the last of nv50_kms_wrapper 2009-02-04 15:03:47 +10:00
Ben Skeggs
69beb9c191 nv50/kms: remove last bit of state mirroring 2009-02-04 15:03:46 +10:00